1 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3 PR tree-optimization/86618
4 * tree-vect-stmts.c (vectorizable_call): Don't take the address
5 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9 PR tree-optimization/86636
10 * json.cc (json::object::set): Fix comment. Add assertions.
11 (json::array::append): Move here from json.h. Add comment and an
13 (json::string::string): Likewise.
14 * json.h (json::array::append): Move to json.cc.
15 (json::string::string): Likewise.
16 * optinfo-emit-json.cc
17 (optrecord_json_writer::impl_location_to_json): Assert that we
18 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
19 wrapper around it. Expand the location once, rather than three
21 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
22 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
24 (optrecord_json_writer::optinfo_to_json): Likewise, in four
25 places. Fix some overlong lines.
27 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
29 * config/aarch64/aarch64-simd.md
30 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
31 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
32 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
33 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
34 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
35 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
36 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
37 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
38 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
40 2018-07-24 Jakub Jelinek <jakub@redhat.com>
43 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
44 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
45 and abs_d == d, do the power of two handling if profitable.
47 2018-07-24 Richard Biener <rguenther@suse.de>
49 * match.pd: Add BIT_FIELD_REF canonicalizations.
51 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
54 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
56 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
58 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
59 terminated STRING_CST object.
61 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
63 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
65 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
67 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
68 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
69 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
70 the elements into a register.
71 (rs6000_split_v4si_init_di_reg): Delete.
72 (rs6000_split_v4si_init): Delete.
73 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
74 (vsx_init_v4si): Rewrite as a define_expand.
76 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
78 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
79 zero_extend argument from memory): New.
81 2018-07-22 Martin Sebor <msebor@redhat.com>
84 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
85 diagnosing calls with unknown arguments unless -Walloca-larger-than
86 is restricted to less than PTRDIFF_MAX bytes.
88 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
90 * doc/gcov.texi (Invoking Gcov): Editorial changes.
92 2018-07-20 David Malcolm <dmalcolm@redhat.com>
94 * pretty-print.c (text_info::set_location): Remove redundant
95 "line_table" parameter from call to rich_location::set_range.
97 2018-07-20 Martin Sebor <msebor@redhat.com>
100 * builtins.c (expand_builtin_alloca): Adjust.
101 * calls.c (alloc_max_size): Simplify.
102 * cgraphunit.c (cgraph_node::expand): Adjust.
103 * common.opt (larger_than_size, warn_frame_larger_than): Remove
105 (frame_larger_than_size): Same.
106 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
107 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
109 * doc/invoke.texi (GCC Command Options): Document option arguments.
110 Explain byte-size arguments and suffixes.
111 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
112 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
113 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
114 * doc/options.texi (UInteger): Expand.
115 (Host_Wide_Int, ByteSize): Document new properties.
116 * final.c (final_start_function_1): Include sizes in an error message.
117 * function.c (frame_offset_overflow): Same.
118 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
119 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
120 Diagnose unbounded alloca calls only for limits of less than
122 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
123 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
125 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
126 only for limits of less than PTRDIFF_MAX.
127 * langhooks-def.h (lhd_handle_option): Change function argument
129 * langhooks.c (lhd_handle_option): Same.
130 * langhooks.h (handle_option): Same.
131 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
133 (var_type, var_type_struct): Same.
134 (var_set): Handle ByteSize flag.
135 * optc-gen.awk: Add comments to output to ease debugging. Make
136 use of HOST_WIDE_INT where appropriate.
137 * opts-gen-save.awk: Use %lx to format unsigned long.
138 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
139 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
140 arguments. Parse bytes-size suffixes.
141 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
142 (enum_value_to_arg): Same.
143 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
144 (handle_option): Adjust.
145 (generate_option): Change function argument to HOST_WIDE_INT.
146 (cmdline_handle_error): Adjust.
147 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
148 (set_option): Change function argument to HOST_WIDE_INT.
149 (option_enabled): Handle cl_host_wide_int.
150 (get_option_state): Handle CLVC_SIZE.
151 (control_warning_option): Same.
152 * opts.c (common_handle_option): Change function argument to
153 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
154 OPT_Wvla_larger_than_.
155 * opts.h (enum cl_var_type): Add an enumerator.
156 * stor-layout.c (layout_decl): Print a more meaningful warning.
157 * toplev.c (output_stack_usage): Adjust.
159 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
161 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
162 call to inline_expand_builtin_string_cmp.
163 (expand_builtin_strcmp): Likewise.
164 (expand_builtin_strncmp): Likewise.
165 (inline_string_cmp): Delete the last parameter, change char_type_node
166 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
168 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
169 the inlining expansion on target where the type of the call has same or
170 narrower precision than unsigned char.
172 2018-07-20 David Malcolm <dmalcolm@redhat.com>
174 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
175 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
176 * common.opt (fsave-optimization-record): New option.
177 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
178 * doc/invoke.texi (-fsave-optimization-record): New option.
179 * dumpfile.c: Include "optinfo-emit-json.h".
180 (struct kv_pair): Move to coretypes.h.
181 (optgroup_options): Make non-static.
182 (dump_context::end_scope): Call
183 optimization_records_maybe_pop_dump_scope.
184 * dumpfile.h (optgroup_options): New decl.
187 * optinfo-emit-json.cc: New file.
188 * optinfo-emit-json.h: New file.
189 * optinfo.cc: Include "optinfo-emit-json.h".
190 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
191 (optinfo_enabled_p): Check optimization_records_enabled_p.
192 (optinfo_wants_inlining_info_p): Likewise.
193 * optinfo.h: Update comment.
194 * profile-count.c (profile_quality_as_string): New function.
195 * profile-count.h (profile_quality_as_string): New decl.
196 (profile_count::quality): New accessor.
197 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
198 and optinfo_emit_json_cc_tests.
199 * selftest.h (selftest::json_cc_tests): New decl.
200 (selftest::optinfo_emit_json_cc_tests): New decl.
201 * toplev.c: Include "optinfo-emit-json.h".
202 (compile_file): Call optimization_records_finish.
203 (do_compile): Call optimization_records_start.
204 * tree-ssa-live.c: Include optinfo.h.
205 (remove_unused_scope_block_p): Retain inlining information if
206 optinfo_wants_inlining_info_p returns true.
208 2018-07-20 Richard Biener <rguenther@suse.de>
211 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
212 to cover -flto-partition=none.
214 2018-07-20 Martin Liska <mliska@suse.cz>
216 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
217 (get_decl_source_range): Remove unused function.
219 2018-07-20 Richard Biener <rguenther@suse.de>
221 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
222 (struct vn_phi_s): Likewise.
223 (struct vn_reference_s): Likewise.
224 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
225 for searching the slot of an entry known to be in the hash itself.
226 (vn_phi_hasher::equal): Likewise.
227 (vn_reference_hasher::equal): Likewise.
228 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
230 (optimistic_info, current_info): Remove, keeping only valid_info.
231 (vn_reference_lookup_1): Remove fallback lookup.
232 (vn_reference_lookup_2): Likewise.
233 (vn_nary_op_lookup_1): Likewise.
234 (vn_phi_lookup): Likewise.
235 (vn_nary_build_or_lookup_1): Make sure to not chain the built
237 (vn_reference_insert): Adjust, chain the inserted hash element
238 at last_inserted_ref.
239 (vn_reference_insert_pieces): Likewise.
240 (visit_reference_op_call): Likewise.
241 (vn_nary_op_insert_into): Chain the inserted hash element at
243 (vn_nary_op_insert_pieces): Adjust.
244 (vn_nary_op_insert): Likewise.
245 (vn_nary_op_insert_stmt): Likewise.
246 (vn_phi_insert): Adjust, chain the inserted hash element at
248 (process_scc): Remove clearing and copying the optimistic
249 table. Instead remove elements inserted during an optimistic
250 iteration from the single table we maintain.
251 (init_scc_vn): Adjust.
252 (free_scc_vn): Likewise.
253 (sccvn_dom_walker::record_cond): Likewise.
254 (sccvn_dom_walker::after_dom_children): Likewise.
256 2018-07-19 Martin Sebor <msebor@redhat.com>
258 PR tree-optimization/84047
259 PR tree-optimization/83776
260 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
261 (check_array_bounds): Call it.
263 2018-07-19 Martin Sebor <msebor@redhat.com>
265 * align.h (align_flags): Use member initialization.
267 2018-07-19 David Malcolm <dmalcolm@redhat.com>
269 * Makefile.in (OBJS): Add optinfo.o.
270 * coretypes.h (class symtab_node): New forward decl.
271 (struct cgraph_node): New forward decl.
272 (class varpool_node): New forward decl.
273 * dump-context.h: New file.
274 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
276 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
277 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
278 (set_alt_dump_file): Likewise.
279 (dump_context::~dump_context): New dtor.
280 (dump_gimple_stmt): Move implementation to...
281 (dump_context::dump_gimple_stmt): ...this new member function.
282 Add the stmt to any pending optinfo, creating one if need be.
283 (dump_gimple_stmt_loc): Move implementation to...
284 (dump_context::dump_gimple_stmt_loc): ...this new member function.
285 Start a new optinfo and add the stmt to it.
286 (dump_gimple_expr): Move implementation to...
287 (dump_context::dump_gimple_expr): ...this new member function.
288 Add the stmt to any pending optinfo, creating one if need be.
289 (dump_gimple_expr_loc): Move implementation to...
290 (dump_context::dump_gimple_expr_loc): ...this new member function.
291 Start a new optinfo and add the stmt to it.
292 (dump_generic_expr): Move implementation to...
293 (dump_context::dump_generic_expr): ...this new member function.
294 Add the tree to any pending optinfo, creating one if need be.
295 (dump_generic_expr_loc): Move implementation to...
296 (dump_context::dump_generic_expr_loc): ...this new member
297 function. Add the tree to any pending optinfo, creating one if
299 (dump_printf): Move implementation to...
300 (dump_context::dump_printf_va): ...this new member function. Add
301 the text to any pending optinfo, creating one if need be.
302 (dump_printf_loc): Move implementation to...
303 (dump_context::dump_printf_loc_va): ...this new member function.
304 Start a new optinfo and add the stmt to it.
305 (dump_dec): Move implementation to...
306 (dump_context::dump_dec): ...this new member function. Add the
307 value to any pending optinfo, creating one if need be.
308 (dump_context::dump_symtab_node): New member function.
309 (dump_context::get_scope_depth): New member function.
310 (dump_context::begin_scope): New member function.
311 (dump_context::end_scope): New member function.
312 (dump_context::ensure_pending_optinfo): New member function.
313 (dump_context::begin_next_optinfo): New member function.
314 (dump_context::end_any_optinfo): New member function.
315 (dump_context::s_current): New global.
316 (dump_context::s_default): New global.
317 (dump_scope_depth): Delete global.
318 (dumpfile_ensure_any_optinfo_are_flushed): New function.
319 (dump_symtab_node): New function.
320 (get_dump_scope_depth): Reimplement in terms of dump_context.
321 (dump_begin_scope): Likewise.
322 (dump_end_scope): Likewise.
323 (selftest::temp_dump_context::temp_dump_context): New ctor.
324 (selftest::temp_dump_context::~temp_dump_context): New dtor.
325 (selftest::verify_item): New function.
326 (ASSERT_IS_TEXT): New macro.
327 (ASSERT_IS_TREE): New macro.
328 (ASSERT_IS_GIMPLE): New macro.
329 (selftest::test_capture_of_dump_calls): New test.
330 (selftest::dumpfile_c_tests): Call it.
331 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
332 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
333 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
335 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
336 (dump_node, dump_bb): Move these unrelated decls.
337 (class dump_manager): Add leading comment.
338 * optinfo.cc: New file.
339 * optinfo.h: New file.
341 2018-07-19 Michael Collison <michael.collison@arm.com>
342 Richard Henderson <rth@redhat.com>
344 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
345 (subti): Handle op1 zero.
346 (subvti4, usub4ti4): New.
347 (*sub<GPI>3_compare1_imm): New.
348 (sub<GPI>3_carryinCV): New.
349 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
350 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
352 2018-07-19 Michael Collison <michael.collison@arm.com>
353 Richard Henderson <rth@redhat.com>
355 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
356 (addti3): Create simpler code if low part is already known to be 0.
357 (addvti4, uaddvti4): New.
358 (*add<GPI>3_compareC_cconly_imm): New.
359 (*add<GPI>3_compareC_cconly): New.
360 (*add<GPI>3_compareC_imm): New.
361 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
362 handle constants within this pattern..
363 (*add<GPI>3_compareV_cconly_imm): New.
364 (*add<GPI>3_compareV_cconly): New.
365 (*add<GPI>3_compareV_imm): New.
366 (add<GPI>3_compareV): New.
367 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
368 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
369 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
370 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
371 with 'comparison' operator.
372 (*add<GPI>3_compareV_cconly_imm): Ditto.
373 (*add<GPI>3_compareV_cconly): Ditto.
374 (*add<GPI>3_compareV_imm): Ditto.
375 (add<GPI>3_compareV): Ditto.
376 (add<mode>3_carryinC): Ditto.
377 (*add<mode>3_carryinC_zero): Ditto.
378 (*add<mode>3_carryinC): Ditto.
379 (add<mode>3_carryinV): Ditto.
380 (*add<mode>3_carryinV_zero): Ditto.
381 (*add<mode>3_carryinV): Ditto.
383 2018-07-19 Michael Collison <michael.collison@arm.com>
384 Richard Henderson <rth@redhat.com>
386 * config/aarch64/aarch64-modes.def (CC_V): New.
387 * config/aarch64/aarch64-protos.h
388 (aarch64_addti_scratch_regs): Declare
389 (aarch64_subvti_scratch_regs): Declare.
390 (aarch64_expand_subvti): Declare.
391 (aarch64_gen_unlikely_cbranch): Declare
392 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
393 for signed overflow using CC_Vmode.
394 (aarch64_get_condition_code_1): Handle CC_Vmode.
395 (aarch64_gen_unlikely_cbranch): New function.
396 (aarch64_addti_scratch_regs): New function.
397 (aarch64_subvti_scratch_regs): New function.
398 (aarch64_expand_subvti): New function.
400 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
402 * config/aarch64/aarch64-option-extensions.def: New entry for profile
404 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
405 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
408 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
411 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
412 address check not strict.
414 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
416 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
418 (store_pair_lanes<mode>): Likewise.
419 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
420 enum value 'ADDR_QUERY_LDP_STP_N'.
421 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
422 (aarch64_print_address_internal): Add declaration.
423 (aarch64_print_ldpstp_address): Remove.
424 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
425 (aarch64_print_operand): Change printing of 'y'.
426 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
427 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
428 'true' rather than '1'.
429 * config/aarch64/constraints.md (Uml): Likewise.
430 (Uml): Rename to Umn.
433 2018-07-19 Richard Biener <rguenther@suse.de>
435 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
437 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
438 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
439 (vn_reference_hasher): Likewise.
440 (struct vn_tables_s): Remove obstack and alloc-pool members.
441 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
442 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
443 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
444 (vn_reference_insert_pieces): Likewise.
445 (alloc_vn_nary_op_noinit): Adjust.
446 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
448 (shared_lookup_phiargs): Remove.
449 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
450 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
451 (visit_reference_op_call): Likewise.
452 (copy_nary, copy_phi, copy_reference): Remove.
453 (process_scc): Rewind the obstack when iterating. Do not
454 copy the elements to valid_info but just move them from one
455 hashtable to the other.
456 (allocate_vn_table): Adjust.
457 (free_vn_table): Likewise.
458 (init_scc_vn): Likewise.
459 (free_scc_vn): Likewise.
461 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
464 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
465 indirect_return as function type attribute.
466 (ix86_attribute_table): Change indirect_return to function
468 * doc/extend.texi: Update indirect_return attribute.
470 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
472 * wide-int.h (widest2_int): New.
473 * gimple-fold.c (arith_overflowed_p): Use it.
474 * tree.h (widest2_int_cst): New.
475 * tree-vrp.c (wide_int_binop_overflow): Rename from
477 Rewrite to work on trees.
478 (extract_range_from_multiplicative_op_1): Abstract code to...
479 (wide_int_range_min_max): ...here.
480 (wide_int_range_cross_product): ...and here.
481 (extract_range_from_binary_expr_1): Abstract overflow code to...
482 (wide_int_range_mult_wrapping): ...here.
483 * tree-vrp.h (wide_int_range_cross_product): New.
484 (wide_int_range_mult_wrapping): New.
486 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
487 Julia Koval <julia.koval@intel.com>
489 * config/i386/x86-tune-costs.h (skylake_memcpy,
490 skylake_memset): Replace rep_prefix with unrolling for size 512.
492 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
495 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
498 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
500 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
501 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
502 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
503 previously known as "PowerPC AltiVec Built-in Functions". Move
504 some material to new subsubsections "PowerPC AltiVec Built-in
505 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
507 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
508 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
509 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
510 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
512 2018-07-18 Richard Biener <rguenther@suse.de>
514 PR tree-optimization/86557
515 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
518 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
520 * config/s390/s390.c (s390_function_profiler): Generate CFI.
522 2018-07-17 Jeff Law <law@redhat.com>
524 * config/arm/arm.c (get_label_padding): Update for recent
525 changes to label_to_alignment.
527 PR tree-optimization/86010
528 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
530 * config/mips/mips.c (vr4130_align_insns): Update for recent
531 changes to label_to_alignment.
533 * config/frv/frv.c (frv_label_align): Update for recent changes
534 to label_to_alignment.
536 * config/nios2/nios2.c (nios2_label_align): Update for recent
537 changes which dropped ALIGN_LABELS_LOG.
539 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
541 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
542 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
544 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
546 * config/arc/arc.c (arc_label_align): Use align_labels instead of
547 deprecated align_labels_log.
549 2018-07-17 Richard Biener <rguenther@suse.de>
552 * dwarf2out.c (init_sections_and_labels): Always generate
553 a debug_line_str_section for early LTO debug.
554 (dwarf2out_finish): Reset debug_line_str_hash output early.
555 Bump counter for extra dwarf5 .debug_loc labels to not conflict
557 (dwarf2out_early_finish): Output debug_line_str.
559 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
561 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
562 index register on z196 or later.
564 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
566 * config/s390/s390.c (s390_default_align): Set default function
568 (s390_override_options_after_change): Call s390_default align.
569 (s390_option_override_internal): Call s390_default_align.
570 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
572 2018-07-17 Jakub Jelinek <jakub@redhat.com>
575 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
576 to _looptemp_ clauses, other than the first two.
578 2018-07-17 Martin Liska <mliska@suse.cz>
580 * opts.c: Do not enable OPT_falign_* for -Os.
582 2018-07-17 Martin Liska <mliska@suse.cz>
584 * align.h (MAX_CODE_ALIGN): New.
585 (MAX_CODE_ALIGN_VALUE): New.
586 * common/config/i386/i386-common.c (ix86_handle_option):
587 (MAX_CODE_ALIGN): Moved to align.h.
588 * final.c (MAX_CODE_ALIGN): Likewise.
589 * opts.c (parse_and_check_align_values):
590 (MAX_CODE_ALIGN): Likewise.
591 (MAX_CODE_ALIGN_VALUE): Likewise.
593 2018-07-17 Martin Liska <mliska@suse.cz>
595 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
596 in order to fulfil coding style.
597 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
598 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
599 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
600 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
601 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
602 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
603 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
604 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
605 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
607 2018-07-17 Martin Liska <mliska@suse.cz>
610 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
611 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
612 align_flags of label_to_alignment.
613 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
615 * config/m68k/m68k.c: Do not use removed align_labels_value and
617 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
618 (LOOP_ALIGN): Likewise.
619 (LABEL_ALIGN): Likewise.
620 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
621 Remove not used macro.
622 (rs6000_loop_align): Change return type to align_flags.
623 (rs6000_loop_align_max_skip): Remove.
624 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
625 Change return type to align_flags.
626 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
627 Remove not used macro.
628 (rs6000_loop_align): Change return type to align_flags.
629 (rs6000_loop_align_max_skip): Remove.
630 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
631 * config/rx/rx-protos.h (rx_align_for_label): Make it
633 * config/rx/rx.c (rx_align_for_label): Change return type
635 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
637 into align_flags class.
638 (LABEL_ALIGN): Likewise.
639 (LOOP_ALIGN): Likewise.
640 * config/s390/s390.c (s390_label_align): Use align_flags
642 (s390_asm_output_function_label): Likewise.
643 * config/sh/sh.c (sh_override_options_after_change):
644 Use align_flags class directly without macros.
645 (find_barrier): Likewise.
646 (barrier_align): Likewise.
647 (sh_loop_align): Likewise.
648 * config/spu/spu.c (spu_option_override):
649 Use align_flags_tuple::get_value instead of removed macros.
650 (spu_sched_init): Likewise.
651 * config/spu/spu.h (GTY): Likewise.
652 * config/visium/visium.c (visium_option_override):
653 Set "8" as default secondary alignment.
654 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
655 in order to guarantee secondary alignment of 8.
656 * coretypes.h: Include align.h header file.
657 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
658 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
659 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
660 * doc/tm.texi.in: Likewise.
661 * final.c (struct label_alignment): Remove not used structure.
662 (LABEL_ALIGN): Change type to align_flags.
663 (LOOP_ALIGN): Likewise.
664 (JUMP_ALIGN): Likewise.
665 (default_loop_align_max_skip): Remove.
666 (default_label_align_max_skip): Likewise.
667 (default_jump_align_max_skip): Likewise.
668 (default_label_align_after_barrier_max_skip):
669 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
670 (LABEL_TO_MAX_SKIP): Remove.
671 (label_to_alignment): Return align_flags type instead of integer.
672 (label_to_max_skip): Remove.
673 (align_fuzz): Use align_flags type.
674 (compute_alignments): Use align_flags type and use align_flags::max
675 to combine multiple alignments.
676 (grow_label_align): Grow vec instead of C array.
677 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
678 (shorten_branches): Use align_flags type and use align_flags::max
679 to combine multiple alignments.
680 (final_scan_insn_1): Remove usage of secondary alignment that comes
681 from label alignment, but instead use proper secondary alignment
682 which is computed in grow_label_align.
683 * flags.h (struct align_flags_tuple): Move to align.h.
684 (struct align_flags): Likewise.
685 (state_align_loops): Rename to align_loops.
686 (state_align_jumps): Rename to align_jumps.
687 (state_align_labels): Rename to align_labels.
688 (state_align_functions): Rename to align_functions.
689 (align_loops_log): Remove.
690 (align_jumps_log): Remove.
691 (align_labels_log): Remove.
692 (align_functions_log): Remove.
693 (align_loops_max_skip): Remove.
694 (align_jumps_max_skip): Remove.
695 (align_labels_max_skip): Remove.
696 (align_functions_max_skip): Remove.
697 (align_loops_value): Remove.
698 (align_jumps_value): Remove.
699 (align_labels_value): Remove.
700 (align_functions_value): Remove.
701 * output.h (label_to_alignment): Change return type to align_flags.
702 (label_to_max_skip): Remove.
703 * target.def: Remove loop_align_max_skip, label_align_max_skip,
704 jump_align_max_skip macros.
705 * targhooks.h (default_loop_align_max_skip): Remove.
706 (default_label_align_max_skip): Likewise.
707 (default_jump_align_max_skip): Likewise.
708 (default_label_align_after_barrier_max_skip): Remove.
709 * toplev.c (read_log_maxskip): Use ::normalize function.
710 (parse_N_M): Remove not used argument and also call ::normalize.
711 (parse_alignment_opts): Do not pass unused arguments.
712 * varasm.c (assemble_start_function): Use directly align_functions
713 instead of removed macros.
714 * system.h: Do not poison removed macros.
716 2018-07-17 Jakub Jelinek <jakub@redhat.com>
719 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
720 and cond temporaries don't have reference type if iterator has
721 pointer type. For init use &for_pre_body instead of pre_p if
722 for_pre_body is non-empty.
724 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
726 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
727 double-double modes to SFmode directly directly.
728 (trunc<mode>sf2_fprs): Delete.
730 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
732 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
733 for conversions between IFmode and the decimal floating point modes.
734 (init_float128_ieee): Use the correct names for conversions between
735 KFmode and the decimal floating point modes.
737 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
739 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
740 for the conversions between TDmode and IFmode.
741 (init_float128_ieee): Use more correct names for the conversions
742 between TDmode and KFmode.
744 2018-07-16 Jakub Jelinek <jakub@redhat.com>
746 PR tree-optimization/86526
747 * builtins.c (expand_builtin_memcmp): Formatting fixes.
748 (inline_expand_builtin_string_cmp): Likewise.
749 (inline_string_cmp): Likewise. Use c_readstr instead of
750 builtin_memcpy_read_str. Add unit_mode temporary.
752 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
755 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
756 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
758 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
760 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
761 Alphabetize prototypes of built-in functions, separating out
762 built-in functions that are listed in this section but should be
765 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
768 * expmed.c (emit_store_flag): Do not emit setcc followed by a
769 conditional move when trapping comparison was split to a
770 non-trapping one (and vice versa).
772 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
774 * config/s390/s390.c (s390_function_profiler): Generate nops
775 instead of profiler call sequences.
776 * config/s390/s390.opt: Add the new option.
778 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
780 * config/s390/s390.c (s390_function_profiler): Generate
781 __mcount_loc section.
782 * config/s390/s390.opt: Add the new option.
784 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
786 * common.opt: Add the new warning.
787 * config/s390/s390.c (s390_function_profiler): Emit "brasl
788 %r0,__fentry__" when -mfentry is specified.
789 (s390_option_override_internal): Disallow -mfentry for 31-bit
791 * config/s390/s390.opt: Add the new option.
793 2018-07-16 Richard Biener <rguenther@suse.de>
796 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
797 for function-local FUNCTION_DECL and RESULT_DECL immediately.
799 2018-07-16 Martin Liska <mliska@suse.cz>
802 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
805 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
807 * config/arc/arcHS.md: Update ARCHS scheduling rules.
809 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
811 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
813 * config/arc/arc-cpus.def (hs4x): New cpu.
815 * config/arc/arc-tables.opt: Regenerate.
816 * config/arc/arc.c (arc_sched_issue_rate): New function.
817 (TARGET_SCHED_ISSUE_RATE): Define.
818 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
819 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
821 (attr tune): Add ARCHS4x tune values.
822 (attr tune_dspmpy): Define.
823 (*tst): Correct instruction type.
824 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
825 * config/arc/arcHS4x.md: New file.
826 * config/arc/fpu.md: Update instruction type attributes.
827 * config/arc/t-multilib: Regenerate.
829 2018-07-16 Tom de Vries <tdevries@suse.de>
832 * var-tracking.c (vt_initialize): Fix pre_dec handling.
834 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
836 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
839 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
841 PR tree-optimization/86514
842 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
843 conversion to a boolean type from a type with greater precision.
845 2018-07-16 Tom de Vries <tdevries@suse.de>
847 * var-tracking.c (vt_initialize): Print adjusted insn slim if
848 dump_flags request TDF_SLIM.
850 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
852 * fold-const.c (int_const_binop_1): Abstract...
853 (wide_int_binop): ...wide int code here.
854 (poly_int_binop): ...poly int code here.
855 Abstract the rest of int_const_binop_1 into int_const_binop.
856 * fold-const.h (wide_int_binop): New.
857 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
858 Remove useless PLUS/MINUS_EXPR case.
859 (zero_nonzero_bits_from_vr): Move wide int code...
860 (zero_nonzero_bits_from_bounds): ...here.
861 (extract_range_from_binary_expr_1): Move mask optimization code...
862 (range_easy_mask_min_max): ...here.
863 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
864 (range_easy_mask_min_max): New.
866 2018-07-15 Jeff Law <law@redhat.com>
869 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
872 2018-07-14 Jim Wilson <jimw@sifive.com>
874 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
876 2018-07-14 Paul Koning <ni1d@arrl.net>
878 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
880 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
882 * lto-streamer-out.c (copy_function_or_variable): Dump info about
885 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
886 Steve Munroe <munroesj52@gmail.com>
888 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
889 (_mm_andnot_si128): Likewise.
890 (_mm_or_si128): Likewise.
891 (_mm_xor_si128): Likewise.
893 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
896 * builtins.c (expand_builtin_memcmp): Inline the calls first
897 when result_eq is false.
898 (expand_builtin_strcmp): Inline the calls first.
899 (expand_builtin_strncmp): Likewise.
900 (inline_string_cmp): New routine. Expand a string compare
901 call by using a sequence of char comparison.
902 (inline_expand_builtin_string_cmp): New routine. Inline expansion
903 a call to str(n)cmp/memcmp.
904 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
906 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
908 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
910 * config/arm/driver-arm.c: Include arm-native.h.
911 (host_detect_local_cpu): Use auto-generated data tables.
912 (vendors, arm_cpu_table): Delete. Move part information to ...
913 * config/arm/arm-cpus.in: ... here.
914 * config/arm/parsecpu.awk (gen_native): New function.
915 (vendor, part): New CPU fields.
916 (END): Add support for building the native CPU detection tables.
917 * config/arm/t-arm (arm-native.h): Add build rule.
918 (driver-arm.o): Add dependency on arm-native.h.
920 2018-07-13 Richard Biener <rguenther@suse.de>
923 * match.pd (addr1 - addr2): Allow either of the operand to
926 2018-07-13 Tom de Vries <tdevries@suse.de>
928 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
931 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
933 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
934 arrays instead of numbered variables.
936 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
938 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
939 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
941 2018-07-13 Richard Biener <rguenther@suse.de>
944 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
945 instead of get_context_die.
947 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
948 Richard Biener <rguenther@suse.de>
951 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
952 that the loop latch destination where phi is defined.
954 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
956 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
957 (riscv_expand_epilogue): Add assertion to check interrupt mode.
958 (riscv_set_current_function): Extract getting interrupt type to new
960 (riscv_get_interrupt_type): New function.
961 (riscv_merge_decl_attributes): New function, checking interrupt type is
963 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
965 2018-07-12 Paul Koning <ni1d@arrl.net>
967 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
970 2018-07-12 Paul Koning <ni1d@arrl.net>
972 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
973 zero reference, add doloop_end instead.
974 * doc/md.texi (decrement_and_branch_until_zero): Remove.
975 (Looping patterns): Remove decrement_and_branch_until_zero. Add
976 detail for doloop_end.
978 2018-07-12 Martin Sebor <msebor@redhat.com>
981 * attribs.c (decl_attributes): Reject conflicting attributes before
982 calling attribute handlers.
984 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
986 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
988 (gcc::dump_manager::get_dump_file_name): likewise.
989 (dump_begin): Likewise.
990 * dumpfile.h (dump_begin): Update prototype.
991 (gcc::dump_manager::get_dump_file_name,
992 gcc::dump_manager::get_dump_file_name): Update prototype.
994 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
996 * internal-fn.h (vectorizable_internal_fn_p): New function.
997 * tree-vect-slp.c (compatible_calls_p): Likewise.
998 (vect_build_slp_tree_1): Remove nops argument. Handle calls
999 to internal functions.
1000 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1002 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1004 * fold-const.h (inverse_conditions_p): Declare.
1005 * fold-const.c (inverse_conditions_p): New function.
1006 * match.pd: Use inverse_conditions_p. Add folds of view_converts
1007 that test the inverse condition of a conditional internal function.
1008 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1009 * internal-fn.c (internal_fn_mask_index): Handle conditional
1011 (vectorized_internal_fn_supported_p): New function.
1012 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1013 (any_pred_load_store): Replace with...
1014 (need_to_predicate): ...this new variable.
1015 (redundant_ssa_names): New variable.
1016 (ifcvt_can_use_mask_load_store): Move initial checks to...
1017 (ifcvt_can_predicate): ...this new function. Handle tree codes
1018 for which a conditional internal function exists.
1019 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1020 instead of ifcvt_can_use_mask_load_store. Update after variable
1022 (predicate_load_or_store): New function, split out from
1023 predicate_mem_writes.
1024 (check_redundant_cond_expr): New function.
1025 (value_available_p): Likewise.
1026 (predicate_rhs_code): Likewise.
1027 (predicate_mem_writes): Rename to...
1028 (predicate_statements): ...this. Use predicate_load_or_store
1029 and predicate_rhs_code.
1030 (combine_blocks, tree_if_conversion): Update after above name changes.
1031 (ifcvt_local_dce): Handle redundant_ssa_names.
1032 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1033 general conditional functions.
1034 * tree-vect-stmts.c (vectorizable_call): Likewise.
1036 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1037 Alan Hayward <alan.hayward@arm.com>
1038 David Sherwood <david.sherwood@arm.com>
1040 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1041 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1042 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1043 plus and minus and convert them into IFN_COND_FMA-based sequences.
1044 (convert_mult_to_fma): Handle conditional plus and minus.
1046 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1048 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1049 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1050 (cond_fnms_optab): New optabs.
1051 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1053 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1054 * internal-fn.h (get_conditional_internal_fn): Declare.
1055 (get_unconditional_internal_fn): Likewise.
1056 * internal-fn.c (cond_ternary_direct): New macro.
1057 (expand_cond_ternary_optab_fn): Likewise.
1058 (direct_cond_ternary_optab_supported_p): Likewise.
1059 (FOR_EACH_COND_FN_PAIR): Likewise.
1060 (get_conditional_internal_fn): New function.
1061 (get_unconditional_internal_fn): Likewise.
1062 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1063 (gimple_match_op::gimple_match_op): Add a new overload for 5
1065 (gimple_match_op::set_op): Likewise.
1066 (gimple_resimplify5): Declare.
1067 * genmatch.c (decision_tree::gen): Generate simplifications for
1069 * gimple-match-head.c (gimple_simplify): Define an overload for
1070 5 operands. Handle calls with 5 arguments in the top-level overload.
1071 (convert_conditional_op): Handle conversions from unconditional
1072 internal functions to conditional ones.
1073 (gimple_resimplify5): New function.
1074 (build_call_internal): Pass a fifth operand.
1075 (maybe_push_res_to_seq): Likewise.
1076 (try_conditional_simplification): Try converting conditional
1077 internal functions to unconditional internal functions.
1078 Handle 3-operand unconditional forms.
1079 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1080 Define ternary equivalents of the current rules for binary conditional
1082 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1084 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1085 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1086 (optab): Handle them.
1087 (SVE_COND_FP_TERNARY): New int iterator.
1088 (sve_fmla_op, sve_fmad_op): New int attributes.
1089 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1090 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1091 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1093 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1095 * target.def (preferred_else_value): New target hook.
1096 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1097 * doc/tm.texi: Regenerate.
1098 * targhooks.h (default_preferred_else_value): Declare.
1099 * targhooks.c (default_preferred_else_value): New function.
1100 * internal-fn.h (conditional_internal_fn_code): Declare.
1101 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1102 (get_conditional_internal_fn): Use it.
1103 (conditional_internal_fn_code): New function.
1104 * gimple-match.h (gimple_match_cond): New struct.
1105 (gimple_match_op): Add a cond member function.
1106 (gimple_match_op::gimple_match_op): Update all forms to take a
1108 * genmatch.c (expr::gen_transform): Use the same condition as res_op
1109 for the suboperation, but don't specify a particular else_value.
1110 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1111 (visit_nary_op, visit_reference_op_load): Pass
1112 gimple_match_cond::UNCOND to the gimple_match_op constructor.
1113 * gimple-match-head.c: Include tree-eh.h
1114 (convert_conditional_op): New function.
1115 (maybe_resimplify_conditional_op): Likewise.
1116 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1117 (gimple_resimplify2): Likewise.
1118 (gimple_resimplify3): Likewise.
1119 (gimple_resimplify4): Likewise.
1120 (maybe_push_res_to_seq): Return null for conditional operations.
1121 (try_conditional_simplification): New function.
1122 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
1124 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1126 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1128 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1130 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1132 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1134 (hash_tree): Do not hash DECL_FCONTEXT
1135 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1136 Do not stream DECL_FCONTEXT.
1137 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1138 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1140 2018-07-12 Richard Biener <rguenther@suse.de>
1143 * dwarf2out.c (gen_block_die): Only output blocks when they have
1144 at least one !DECL_IGNORED_P variable.
1146 2018-07-12 Richard Biener <rguenther@suse.de>
1149 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1150 Remove -mieee-fp handling.
1152 2018-07-12 Richard Biener <rguenther@suse.de>
1154 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1155 left-over from last patch.
1157 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1159 PR tree-optimization/86492
1160 * gimple-ssa-store-merging.c
1161 (imm_store_chain_info::coalesce_immediate_stores): Call
1162 check_no_overlap even for the merge_overlapping case. Formatting fix.
1164 2018-07-12 Richard Biener <rguenther@suse.de>
1167 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1168 move possibly trapping operations into the conditional.
1170 2018-07-12 Richard Biener <rguenther@suse.de>
1172 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1173 (vn_lookup_simplify_result): Remove recursion limit applied
1175 (vn_nary_build_or_lookup_1): Adjust.
1176 (try_to_simplify): Likewise.
1177 * gimple-match-head.c (gimple_resimplify1): Instead apply one
1179 (gimple_resimplify2): Likewise.
1180 (gimple_resimplify3): Likewise.
1181 (gimple_resimplify4): Likewise.
1183 2018-07-11 Jakub Jelinek <jakub@redhat.com>
1185 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1186 Use __mmask64 type instead of __mmask8 for __M argument.
1187 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1188 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1190 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1191 __mmask16 for __M argument.
1192 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1193 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1194 to __mmask16 instead of __mmask8.
1195 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1196 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1197 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1198 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1199 instead of __mmask16 for __U argument.
1200 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1201 __mmask16 instead of __mmask8 for __U argument.
1202 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1204 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1206 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1208 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1210 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1212 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1214 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1216 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1218 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1220 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1222 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1223 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1224 return type as well as __M argument type and all casts from __mmask8
1226 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1227 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1228 return type as well as __M argument type and all casts from __mmask8
1230 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1231 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1232 return type as well as __M argument type and all casts from __mmask8
1234 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1235 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1236 return type as well as __M argument type and all casts from __mmask8
1238 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1239 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1242 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
1244 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1245 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1248 2018-07-11 Paul Koning <ni1d@arrl.net>
1250 * doc/md.texi (define_subst): Document how multiple occurrences of
1251 the same argument in the replacement pattern are handled.
1253 2018-07-11 Paul Koning <ni1d@arrl.net>
1255 * doc/extend.texi (Common Variable Attributes): Move "mode" into
1257 (Common Type Attributes): Add "mode" attribute.
1259 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
1261 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1262 stream DECL_ORIGINAL_TYPE.
1263 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1264 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1265 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1266 Do not walk original type.
1267 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1269 (write_ts_decl_non_common_tree_pointers): Do not stream
1271 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1272 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1274 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1276 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1277 thread twice from the same starting edge.
1279 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1281 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1282 * gimple.c (gimple_call_nonnull_result_p): ...here...
1283 (gimple_call_nonnull_arg): ...and here.
1284 * gimple.h (gimple_call_nonnull_result_p): New.
1285 (gimple_call_nonnull_arg): New.
1287 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
1289 * config/arm/arm-cpus.in: Move information from fpu field of each
1290 cpu definition to the isa field.
1291 * config/arm/parsecpu.awk (fpu): Delete match rule.
1292 (gen_comm_data): Don't add bits from the CPU's FPU entry.
1294 2018-07-11 Richard Biener <rguenther@suse.de>
1297 * dwarf2out.c (init_sections_and_labels): Use
1298 output_asm_line_debug_info consistently.
1299 (dwarf2out_early_finish): Likewise.
1300 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1303 2018-07-11 Richard Biener <rguenther@suse.de>
1305 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1306 Rework father_bb setting in a way to avoid propagating constants
1307 multiple times on a loop body.
1309 2018-07-10 Mark Wielaard <mark@klomp.org>
1312 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1314 2018-07-10 Richard Biener <rguenther@suse.de>
1316 * hash-map.h (hash_map::iterator::operator*): Return
1317 references to key and value.
1319 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1322 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1323 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1324 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1325 (gimplify_omp_for): For composite loops, move outer
1326 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1327 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
1328 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
1329 TREE_LIST for both the original class iterator and the "last" helper
1330 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
1331 loop, remember has_decl_expr from outer composite loops for the
1332 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1334 2018-07-09 Martin Sebor <msebor@redhat.com>
1338 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1339 accessing implicitly initialized array elements.
1340 * expr.c (string_constant): Handle string initializers of
1341 character arrays within aggregates.
1342 * gimple-fold.c (fold_array_ctor_reference): Add argument.
1343 Store element offset. As a special case, handle zero size.
1344 (fold_nonarray_ctor_reference): Same.
1345 (fold_ctor_reference): Add argument. Store subobject offset.
1346 * gimple-fold.h (fold_ctor_reference): Add argument.
1348 2018-07-09 Paul Koning <ni1d@arrl.net>
1350 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1351 (pdp11_insn_cost): New function.
1352 (pdp11_md_asm_adjust): New function.
1353 (TARGET_INVALID_WITHIN_DOLOOP): Define.
1354 (pdp11_rtx_costs): Update to match machine better.
1355 (output_addr_const_pdp11): Correct format mismatch warnings.
1356 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1357 * config/pdp11/pdp11.md: General change to add base_cost and/or
1358 length attributes for use by new pdp11_insn_cost function.
1359 (MIN_BRANCH): Correct definition.
1361 (doloop_end): Use standard pattern name for looping pattern.
1362 (doloop_end_nocc): New.
1363 (movsf): Add another constraint alternative.
1364 (zero_extendqihi2): Add constraint alternatives for not in place
1366 (zero_extendhisi2): Remove.
1367 (shift patterns): Add CC handling variants.
1371 (define_peephole2): New peephole to recognize mov that sets CC for
1374 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1376 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1377 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1380 2018-07-09 Jakub Jelinek <jakub@redhat.com>
1383 * real.c (real_nextafter): Return true if result is denormal.
1385 2018-07-09 Martin Liska <mliska@suse.cz>
1387 * common.opt: Add back wrongly removed attribute.
1389 2018-07-09 Richard Biener <rguenther@suse.de>
1392 * dwarf2out.c (gen_block_die): For an early generated DIE
1393 always output high/low PC attributes.
1395 2018-07-09 Tom de Vries <tdevries@suse.de>
1397 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1398 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1399 onto VAR_DECL with abstract origin.
1401 2018-07-07 Jim Wilson <jimw@sifive.com>
1403 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1405 2018-07-07 Tom de Vries <tdevries@suse.de>
1407 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1409 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
1411 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1413 (combine_bound): Use wide-int overflow calculation instead of
1415 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1417 * fold-const.c (int_const_binop_2): Same.
1418 (extract_muldiv_1): Same.
1419 (fold_div_compare): Same.
1420 (fold_abs_const): Same.
1422 * poly-int.h (add): Same.
1426 * predict.c (predict_iv_comparison): Same.
1427 * profile-count.c (slow_safe_scale_64bit): Same.
1428 * simplify-rtx.c (simplify_const_binary_operation): Same.
1429 * tree-chrec.c (tree_fold_binomial): Same.
1430 * tree-data-ref.c (split_constant_offset_1): Same.
1431 * tree-if-conv.c (idx_within_array_bound): Same.
1432 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1433 * tree-ssa-phiopt.c (minmax_replacement): Same.
1434 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1435 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1436 * vr-values.c (vr_values::adjust_range_with_scev): Same.
1437 * wide-int.cc (wi::add_large): Same.
1438 (wi::mul_internal): Same.
1439 (wi::sub_large): Same.
1440 (wi::divmod_internal): Same.
1441 * wide-int.h: Change overflow type to overflow_type for neg, add,
1442 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1443 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1444 mul_internal, divmod_internal.
1445 (overflow_type): New enum.
1446 (accumulate_overflow): New.
1448 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1450 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1451 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1453 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1455 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1456 argument is checked for zero before entering loop, avoid checking again.
1458 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1460 * gimplify.h (generic_expr_could_trap_p): Set as global function.
1461 * gimplify.h (generic_expr_could_trap_p): Likwise.
1462 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1464 2018-07-06 Jakub Jelinek <jakub@redhat.com>
1466 PR tree-optimization/86401
1467 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1468 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1469 (fold_bit_and_mask): ... here. New helper function for match.pd.
1470 * fold-const.h (fold_bit_and_mask): Declare.
1471 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1473 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1476 * target.def (translate_mode_attribute): New hook.
1477 * targhooks.h (default_translate_mode_attribute): Declare.
1478 * targhooks.c (default_translate_mode_attribute): New function.
1479 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1480 * doc/tm.texi: Regenerate.
1481 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1482 (rs6000_translate_mode_attribute): New function.
1484 2018-07-06 Paul Koning <ni1d@arrl.net>
1486 * doc/md.texi (define_split): Document DONE and FAIL.
1487 (define_peephole2): Ditto.
1489 2018-07-05 Jeff Law <law@redhat.com>
1491 PR tree-optimization/86010
1492 * tree-ssa-dse.c (compute_trims): More aggressively trim at
1493 both the head and tail of mem* and str* calls.
1495 2018-07-05 Jim Wilson <jimw@sifive.com>
1497 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1499 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
1501 * config/aarch64/aarch64-simd.md: correct flags text for
1502 MIN_EXPR replacement.
1504 2018-07-05 James Clarke <jrtc27@jrtc27.com>
1506 * configure: Regenerated.
1508 2018-07-05 Carl Love <cel@us.ibm.com>
1510 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1511 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1512 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1513 VSX_BUILTIN_DOUBLEL_V4SF.
1515 2018-07-05 Martin Sebor <msebor@redhat.com>
1518 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1519 than its domain to compute its the upper bound of a char array.
1521 2018-07-05 Nathan Sidwell <nathan@acm.org>
1523 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1524 * doc/cpp.texi: Update comment.
1525 * doc/tm.texi: Rebuilt.
1526 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1527 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1528 * doc/extend.texi (Backwards Compatibility): Clarify it is system
1529 headers affected by extern "C".
1530 * system.h: Poison NO_IMPLICIT_EXTERN_C.
1531 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1532 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1533 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1534 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1535 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1536 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1537 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1538 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1539 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1540 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1541 config/sparc/sp64-elf.h, config/spu/spu.h,
1542 config/stormy16/stormy16.h, config/v850/v850.h,
1543 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1544 define NO_IMPLICIT_EXTERN_C.
1545 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1547 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1550 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1551 instead of GET_MODE_SIZE when comparing Units.
1553 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1556 * rtlanal.c (set_noop_p): Constrain on mode change,
1557 include hard-reg-set.h
1559 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1561 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1563 2018-07-05 Jakub Jelinek <jakub@redhat.com>
1566 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1569 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1571 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1573 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1576 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1578 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1580 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
1583 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1585 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
1587 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1588 neg_*_op* variables.
1590 2018-07-04 Martin Liska <mliska@suse.cz>
1592 * tree-switch-conversion.c: Define
1593 max_ratio_for_speed and max_ratio_for_size constants.
1595 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1596 Martin Liska <mliska@suse.cz>
1601 * common.opt: Rename align options with 'str_' prefix.
1602 * common/config/i386/i386-common.c (set_malign_value): New
1604 (ix86_handle_option): Use it to set -falign-* options/
1605 * config/aarch64/aarch64-protos.h (struct tune_params): Change
1606 type from int to string.
1607 * config/aarch64/aarch64.c: Update default values from int
1609 * config/alpha/alpha.c (alpha_override_options_after_change):
1611 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1612 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1613 max skip conditionally.
1614 * config/i386/freebsd.h (SUBALIGN_LOG): New.
1615 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1616 max skip conditionally.
1617 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1618 max skip conditionally.
1619 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1620 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1621 max skip conditionally.
1622 * config/i386/i386.c (struct ptt): Change type from int to
1624 (ix86_default_align): Set default values.
1625 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1626 max skip conditionally.
1627 * config/i386/iamcu.h (SUBALIGN_LOG): New.
1628 (ASM_OUTPUT_MAX_SKIP_ALIGN):
1629 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1630 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1631 max skip conditionally.
1632 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1633 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1634 * config/i386/x86-64.h (SUBALIGN_LOG): New.
1635 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1636 max skip conditionally.
1637 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1638 * config/ia64/ia64.c (ia64_option_override): Set default values
1639 for alignment options.
1640 * config/m68k/m68k.c: Handle new str_align_* options.
1641 * config/mips/mips.c (mips_set_compression_mode): Change
1643 (mips_option_override): Set default values for options.
1644 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1646 * config/rs6000/rs6000.c (rs6000_option_override_internal):
1648 * config/rx/rx.c (rx_option_override): Likewise.
1649 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1650 (LABEL_ALIGN): Use align_labels_log.
1651 (LOOP_ALIGN): Use align_loops_align.
1652 * config/s390/s390.c (s390_asm_output_function_label): Use new
1654 * config/sh/sh.c (sh_override_options_after_change):
1655 Change type of constants.
1656 * config/spu/spu.c (spu_sched_init): Likewise.
1657 * config/sparc/sparc.c (sparc_option_override): Set default
1659 * config/visium/visium.c (visium_option_override): Likewise.
1660 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1661 emit p2align format with last argument if it's not needed.
1662 * doc/invoke.texi: Document extended format of -falign-*.
1663 * final.c: Use align_labels alignment.
1664 * flags.h (struct target_flag_state): Change type to use
1666 (struct align_flags_tuple): New.
1667 (struct align_flags): Likewise.
1668 (align_loops_log): Redefine macro to use new types.
1669 (align_loops_max_skip): Redefine macro to use new types.
1670 (align_jumps_log): Redefine macro to use new types.
1671 (align_jumps_max_skip): Redefine macro to use new types.
1672 (align_labels_log): Redefine macro to use new types.
1673 (align_labels_max_skip): Redefine macro to use new types.
1674 (align_functions_log): Redefine macro to use new types.
1675 (align_loops): Redefine macro to use new types.
1676 (align_jumps): Redefine macro to use new types.
1677 (align_labels): Redefine macro to use new types.
1678 (align_functions): Redefine macro to use new types.
1679 (align_functions_max_skip): Redefine macro to use new types.
1680 (align_loops_value): New macro.
1681 (align_jumps_value): New macro.
1682 (align_labels_value): New macro.
1683 (align_functions_value): New macro.
1684 * function.c (invoke_set_current_function_hook): Propagate
1685 alignment values from flags to global variables default in
1687 * ipa-icf.c (sem_function::equals_wpa): Use
1688 cl_optimization_option_eq instead of memcmp.
1689 * lto-streamer.h (cl_optimization_stream_out): Support streaming
1691 (cl_optimization_stream_in): Likewise.
1692 * optc-save-gen.awk: Support strings in cl_optimization.
1693 * opth-gen.awk: Likewise.
1694 * opts.c (finish_options): Remove error checking of invalid
1696 (MAX_CODE_ALIGN): Remove.
1697 (MAX_CODE_ALIGN_VALUE): Likewise.
1698 (parse_and_check_align_values): New function.
1699 (check_alignment_argument): Likewise.
1700 (common_handle_option): Use check_alignment_argument.
1701 * opts.h (parse_and_check_align_values): Declare.
1702 * toplev.c (init_alignments): Remove.
1703 (read_log_maxskip): New.
1704 (parse_N_M): Likewise.
1705 (parse_alignment_opts): Likewise.
1706 (backend_init_target): Remove usage of init_alignments.
1707 * toplev.h (parse_alignment_opts): Declare.
1708 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1710 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1711 * tree.c (cl_option_hasher::equal): New.
1712 * varasm.c: Use new global macros.
1714 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1716 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1717 Use a simpler align directive also if MAXSKIP = ALIGN-1.
1718 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1719 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1720 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1721 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1722 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1723 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1724 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1725 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1726 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1727 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1728 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1730 2018-07-04 Martin Liska <mliska@suse.cz>
1731 Jonathan Wakely <jwakely@redhat.com>
1733 * coverage.c: Use correct type.
1734 * doc/invoke.texi: Language correction.
1736 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
1739 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1740 ENDBRANCH for non-tail call which may return via indirect branch.
1741 * doc/extend.texi: Document indirect_return attribute.
1743 2018-07-03 Martin Sebor <msebor@redhat.com>
1745 PR tree-optimization/86274
1746 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1748 (format_floating): Correct handling of infinities and NaNs.
1750 2018-07-03 Martin Sebor <msebor@redhat.com>
1752 * print-tree.c (print_real_cst): New function.
1753 (print_node_brief): Call it.
1754 (print_node): Ditto.
1756 2018-07-03 Jeff Law <law@redhat.com>
1758 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1759 into a single pattern.
1761 * config/h8300/h8300.md (ors code_iterator): New.
1762 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1763 a single pattern and single splitter.
1764 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1765 (iorqi3_1, xorqi3_1): Likewise.
1766 (iorqi3, xorqi3 expanders): Similarly.
1768 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1769 (movmd_internal) into a single pattern using the P mode iterator.
1770 (movmd splitters): Similarly.
1771 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1772 (movsd splitters): Similarly.
1774 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1775 ADDB, ADDW and ADDL into a single ADD attribute which selects the
1776 right table based on the size of the operand.
1777 * config/h8300/h8300.md (length_table): Corresponding changes. All
1778 references to "addb", "addw" and "addl" changed to "add".
1779 (btst patterns): Merge two variants into a single pattern.
1780 (tstqi, tsthi): Likewise.
1781 (addhi3_incdec, addsi3_incdec): Likewise.
1782 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1783 (mulhi3, mulsi3): Likewise.
1784 (udivhi3, udivsi3): Likewise.
1785 (divhi3, divsi3): Likewise.
1786 (andorqi3, andorhi3, andorsi3): Likewise.
1788 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
1791 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1792 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1794 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1796 PR tree-optimization/85694
1797 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1798 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1800 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1801 (<u>avg<mode>3_ceil): New patterns.
1803 2018-07-03 David Malcolm <dmalcolm@redhat.com>
1805 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1806 scan-tree-dump directive.
1807 * gcc.dg/vect/slp-perm-2.c: Likewise.
1808 * gcc.dg/vect/slp-perm-3.c: Likewise.
1809 * gcc.dg/vect/slp-perm-5.c: Likewise.
1810 * gcc.dg/vect/slp-perm-6.c: Likewise.
1811 * gcc.dg/vect/slp-perm-7.c: Likewise.
1812 * gcc.dg/vect/slp-perm-8.c: Likewise.
1814 2018-07-03 Marek Polacek <polacek@redhat.com>
1817 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1819 2018-07-03 Richard Biener <rguenther@suse.de>
1822 * tree-ssa-structalias.c (find_func_clobbers): Properly
1823 handle indirect calls.
1825 2018-07-03 Jeff Law <law@redhat.com>
1827 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1828 (shifts): New code iterator.
1829 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1830 expander. Fix HImode handling on H8/SX.
1831 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1832 (subqi3, subhi3, subsi3 expanders): Likewise.
1833 (andqi3, andhi3, andsi3 expanders): Likewise.
1834 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1835 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1836 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1837 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1838 (zero_extendqihi2, zero_extendqisi2): Likewise.
1839 (extendqihi2, extendqisi2): Likewise.
1840 (rotlqi3, rotlhi3, rotlsi3): Likewise.
1841 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1842 (rotlqi3_1, rotlhi3_1): Likewise.
1843 (logicalhi3_sn, logicalsi3_sn): Likewise.
1844 (logicalhi3, logicalsi3): Likewise.
1846 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1848 * tree-vect-patterns.c (vect_recog_rotate_pattern)
1849 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1850 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1851 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1852 type to append_pattern_def_seq instead of creating a stmt_vec_info
1854 (build_mask_conversion): Likewise. Remove vinfo argument.
1855 (vect_add_conversion_to_patterm): Likewise, renaming to...
1856 (vect_add_conversion_to_pattern): ...this.
1857 (vect_recog_mask_conversion_pattern): Update call to
1858 build_mask_conversion. Pass the vector type to
1859 append_pattern_def_seq here too.
1860 (vect_recog_gather_scatter_pattern): Update call to
1861 vect_add_conversion_to_pattern.
1863 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1865 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1866 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1867 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1868 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1869 STMT_VINFO_PATTERN_DEF_SEQ to null here.
1870 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1871 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1872 append_pattern_def_seq instead of new_pattern_def_seq.
1873 (vect_recog_divmod_pattern): Do both of the above.
1874 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1877 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1879 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1880 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1881 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1882 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1883 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1884 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1885 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1886 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1887 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1888 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1889 parameter with a single stmt_vec_info.
1890 (vect_recog_func_ptr): Likewise.
1891 (vect_recog_gather_scatter_pattern): Likewise, folding in...
1892 (vect_try_gather_scatter_pattern): ...this.
1893 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1894 the stmt_vec_info of the statement to be matched. Don't clear
1895 STMT_VINFO_RELATED_STMT.
1896 (vect_pattern_recog): Update call accordingly.
1898 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1900 PR tree-optimization/85694
1901 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1902 (uavgM3_ceil): Document new optabs.
1903 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1904 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1906 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1907 (savg_ceil_optab): New optabs.
1908 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1909 (vect_vect_recog_func_ptrs): Add it.
1910 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1911 constant directly from the associated lhs.
1913 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1915 * tree-vect-patterns.c (vect_split_statement): New function.
1916 (vect_convert_input): Use it to try to split an existing cast.
1918 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1920 * poly-int.h (print_hex): New function.
1921 * dumpfile.h (dump_dec, dump_hex): Declare.
1922 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1923 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1924 min_input_precision, operation_precision and operation_sign.
1925 * tree-vect-patterns.c (vect_get_range_info): New function.
1926 (vect_same_loop_or_bb_p, vect_single_imm_use)
1927 (vect_operation_fits_smaller_type): Delete.
1928 (vect_look_through_possible_promotion): Add an optional
1929 single_use_p parameter.
1930 (vect_recog_over_widening_pattern): Rewrite to use new
1931 stmt_vec_info infomration. Handle one operation at a time.
1932 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1933 (vect_truncatable_operation_p, vect_set_operation_type)
1934 (vect_set_min_input_precision): New functions.
1935 (vect_determine_min_output_precision_1): Likewise.
1936 (vect_determine_min_output_precision): Likewise.
1937 (vect_determine_precisions_from_range): Likewise.
1938 (vect_determine_precisions_from_users): Likewise.
1939 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1940 (vect_vect_recog_func_ptrs): Put over_widening first.
1942 (vect_pattern_recog): Call vect_determine_precisions.
1944 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1946 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1947 statements that have been replaced by further pattern statements.
1948 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1950 2018-07-03 Richard Biener <rguenther@suse.de>
1952 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1953 always set *dt. Dump vectype in vectype overload.
1954 * dumpfile.h (dump_gimple_expr): New function.
1955 (dump_gimple_expr_loc): Likewise.
1956 * dumpfile.c (dump_gimple_expr): New function.
1957 (dump_gimple_expr_loc): Likewise.
1959 2018-07-02 Jeff Law <law@redhat.com>
1961 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1962 the H8/300, H8/300H and H8/S variants into a single pattern.
1963 (movhi_h8300, movqi_h8300hs): Similarly.
1964 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1965 (QHI mode iterator): New.
1967 * config/h8300/h8300.md: Remove trailing whitespace.
1969 2018-07-02 Jim Wilson <jimw@sifive.com>
1971 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1972 instead of emit_insn for interrupt returns.
1973 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1974 (riscv_sret, riscv_uret): Likewise.
1976 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1978 * pretty-print.c (selftest::test_pp_format): Move save and restore
1979 of quotes to class auto_fix_quotes, and add an instance.
1980 * selftest.c: Include "intl.h".
1981 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1982 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1983 * selftest.h (selftest::auto_fix_quotes): New class.
1985 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
1987 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1988 (aarch64_sve_prepare_conditional_op): Remove.
1989 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1990 Allow aarch64_simd_reg_or_zero as select operand; remove
1991 the aarch64_sve_prepare_conditional_op call.
1992 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1993 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1994 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1995 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1996 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1997 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1998 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1999 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2000 and a splitters to match all of the *_any patterns.
2001 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2003 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2004 (SVE_COND_FP_BINARY_REV): Remove.
2005 (sve_int_op_rev, sve_fp_op_rev): New.
2006 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2007 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2008 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2009 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2010 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2011 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2012 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2013 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2014 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2016 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2017 Remove match_dup 1 from the inner unspec.
2018 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2020 * config/aarch64/aarch64.md (movprfx): New attr.
2021 (length): Default movprfx to 8.
2022 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2023 (*madd<SVE_I>, *msub<SVE_I): Likewise.
2024 (*<su>mul<SVE_I>3_highpart): Likewise.
2025 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2026 (*v<ASHIFT><SVE_I>3): Likewise.
2027 (*<su><MAXMIN><SVE_I>3): Likewise.
2028 (*<su><MAXMIN><SVE_F>3): Likewise.
2029 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2030 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2031 (*div<SVE_F>4): Likewise.
2033 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
2035 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2038 2018-07-02 Richard Biener <rguenther@suse.de>
2040 PR tree-optimization/86363
2041 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2042 memset argument refers to a non-variable address.
2044 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2046 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2047 {PLUS,MINUS}_EXPR code to...
2048 (adjust_symbolic_bound): ...here,
2049 (combine_bound): ...here,
2050 (set_value_range_with_overflow): ...and here.
2052 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2054 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2056 (extract_range_from_abs_expr): ...here.
2058 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
2060 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2061 -fno-omit-frame-pointer when not optimizing.
2063 2018-07-02 Martin Liska <mliska@suse.cz>
2066 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2067 (propagate_nothrow): Likewise.
2069 2018-07-02 Martin Liska <mliska@suse.cz>
2072 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2074 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2076 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2077 function in r262149, changing "loc" param from source_location to
2078 const dump_location_t &.
2079 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2080 declaration, as above.
2082 2018-07-01 Paul Koning <ni1d@arrl.net>
2084 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2085 -munit-asm, -mgnu-asm, -mdec-asm.
2086 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2087 (pdp11_output_labelref): New.
2088 (pdp11_output_def): New.
2089 (pdp11_output_addr_vec_elt): New.
2090 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
2091 %# and %@ format codes.
2092 (pdp11_option_override): New.
2093 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2094 (pdp11_output_ident): New.
2095 (pdp11_asm_named_section): New.
2096 (pdp11_asm_init_sections): New.
2097 (pdp11_file_start): New.
2098 (pdp11_file_end): New.
2099 (output_ascii): Use .ascii/.asciz for -mdec-asm.
2100 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
2101 %o, like %c but octal.
2102 (pdp11_option_override): New.
2103 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2105 (DATA_SECTION_ASM_OP): Ditto.
2106 (READONLY_DATA_SECTION_ASM_OP): New.
2107 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2108 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2109 (ASM_OUTPUT_LABELREF): Ditto.
2110 (ASM_OUTPUT_DEF): Ditto.
2111 (ASM_OUTPUT_EXTERNAL): New.
2112 (ASM_OUTPUT_SOURCE_FILENAME): New.
2113 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2114 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2115 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
2116 %# and %@ format codes.
2117 * config/pdp11/pdp11.opt (mgnu-asm): New.
2118 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2119 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2120 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2122 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
2124 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2125 dereferencing path[] beyond its length.
2127 (debug_all_paths): New.
2128 (rewire_first_differing_edge): New.
2129 (adjust_paths_after_duplication): New.
2130 (duplicate_thread_path): Call adjust_paths_after_duplication.
2132 (thread_through_all_blocks): Add new argument to
2133 duplicate_thread_path.
2135 2018-06-30 Jim Wilson <jimw@sifive.com>
2137 * config/riscv/predicates.md (p2m1_shift_operand): New.
2138 (high_mask_shift_operand): New.
2139 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2140 pattern using p2m1_shift_operand.
2141 (lshsi3_zero_extend_3+2): New combiner pattern using
2142 high_mask_shift_operand.
2144 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2146 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2148 (vect_recog_rotate_pattern): ...here.
2149 (vect_convert_input): Try to insert casts of invariants in the
2151 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2152 preheader to be empty.
2154 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2156 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2157 vector type. If given, install it in the new statement's
2159 (vect_element_precision): New function.
2160 (vect_unpromoted_value): New struct.
2161 (vect_unpromoted_value::vect_unpromoted_value): New function.
2162 (vect_unpromoted_value::set_op): Likewise.
2163 (vect_look_through_possible_promotion): Likewise.
2164 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2165 (vect_widened_op_tree, vect_convert_input): Likewise.
2166 (vect_convert_inputs, vect_convert_output): Likewise.
2167 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2168 to handle the optional cast of the multiplication result and
2169 vect_widened_op_tree to detect the widened multiplication itself.
2170 Do not require the input and output of promotion casts to have
2171 the same sign, but base the signedness of the operation on the
2172 input rather than the result. If the pattern includes two
2173 promotions, check that those promotions have the same sign.
2174 Do not restrict the MULT_EXPR handling to a double-width result;
2175 handle quadruple-width results and wider. Use vect_convert_inputs
2176 to convert the inputs to the common type.
2177 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
2178 to handle the optional cast of the ABS result. Also allow a sign
2179 change or a sign extension between the ABS and MINUS.
2180 Use vect_widened_op_tree to detect the widened subtraction and use
2181 vect_convert_inputs to convert the inputs to the common type.
2182 (vect_handle_widen_op_by_const): Delete.
2183 (vect_recog_widen_op_pattern): New function.
2184 (vect_recog_widen_mult_pattern): Use it.
2185 (vect_recog_widen_shift_pattern): Likewise.
2186 (vect_recog_widen_sum_pattern): Use
2187 vect_look_through_possible_promotion to handle the promoted
2190 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2192 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2193 the containing gimple_seq *.
2194 * gimple-iterator.h (gsi_for_stmt): Declare it.
2195 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2196 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2197 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2198 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2199 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2201 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2203 (vect_mark_pattern_stmts): ...here. Handle cases in which the
2204 statement being replaced is part of an existing pattern
2205 definition sequence, inserting the new pattern statements before
2207 (vect_pattern_recog_1): Don't return a bool. If the statement
2208 is already part of a pattern, instead apply pattern matching
2209 to the pattern definition statements. Don't clear the
2210 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2211 (vect_pattern_recog): Don't break after the first match;
2212 continue processing the pattern definition statements instead.
2213 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2215 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2217 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2218 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2219 (vect_recog_widen_sum_pattern): Use it.
2221 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2223 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2224 phi is not a pattern statement and has not been replaced by
2225 a pattern statement.
2226 * tree-vect-patterns.c (type_conversion_p): Don't check
2227 STMT_VINFO_IN_PATTERN_P.
2228 (vect_recog_vector_vector_shift_pattern): Likewise.
2229 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2230 the pattern statement rather than the original statement; check
2231 directly for a WIDEN_MULT_EXPR here.
2232 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2233 vect_is_simple_use to return the pattern statement rather
2234 than the original statement; use is_pattern_stmt_p to check
2235 for such a pattern statement.
2236 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2237 to return the pattern statement rather than the original statement;
2238 don't do the same transformation here.
2239 (vect_is_simple_use): If the defining statement has been replaced
2240 by a pattern statement, return the pattern statement instead.
2241 Remove the corresponding (local) transformation from the vectype
2244 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2246 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2247 end and default to null.
2248 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2249 (vectorizable_reduction): Update calls accordingly, dropping the
2250 gimple ** argument if the passed-back statement isn't needed.
2251 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2252 (vect_recog_rotate_pattern): Likewise.
2253 (vect_recog_mask_conversion_pattern): Likewise.
2254 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2255 (vect_mask_constant_operand_p): Likewise.
2256 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2257 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2258 (get_group_load_store_type, get_load_store_type): Likewise.
2259 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2260 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2261 (vectorizable_conversion, vectorizable_assignment): Likewise.
2262 (vectorizable_shift, vectorizable_operation): Likewise.
2263 (vectorizable_store, vect_is_simple_cond): Likewise.
2264 (vectorizable_condition, vectorizable_comparison): Likewise.
2265 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2266 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2267 and move it to the end. Cope with null def_stmt_outs.
2269 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2271 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2273 2018-06-29 Jeff Law <law@redhat.com>
2275 * config/v850/v850.c (v850_legitimate_address_p): Handle large
2276 displacements for TARGET_V850E2V3 and newer.
2277 (TARGET_LRA_P): Remove. Defaults to LRA now.
2278 * config/v850/v850.md (sign23byte_load): Remove.
2279 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2280 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2282 2018-06-29 Martin Liska <mliska@suse.cz>
2285 * coverage.c (coverage_init): Mangle full path name.
2286 * doc/invoke.texi: Document the change.
2287 * gcov-io.c (mangle_path): New.
2288 * gcov-io.h (mangle_path): Likewise.
2289 * gcov.c (mangle_name): Use mangle_path for path mangling.
2291 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2293 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2294 if starting source register is not even.
2296 2018-06-29 Martin Liska <mliska@suse.cz>
2298 PR tree-optimization/86263
2299 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2300 Make edge redirection.
2302 2018-06-29 David Malcolm <dmalcolm@redhat.com>
2304 * dumpfile.c (dump_loc): Add indentation based on scope depth.
2305 (dump_scope_depth): New variable.
2306 (get_dump_scope_depth): New function.
2307 (dump_begin_scope): New function.
2308 (dump_end_scope): New function.
2309 * dumpfile.h (get_dump_scope_depth): New declaration.
2310 (dump_begin_scope): New declaration.
2311 (dump_end_scope): New declaration.
2312 (class auto_dump_scope): New class.
2313 (AUTO_DUMP_SCOPE): New macro.
2314 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2317 2018-06-29 Richard Biener <rguenther@suse.de>
2319 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2320 compute_all_dependences succeeds.
2321 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2322 exceed --param loop-max-datarefs-for-datadeps.
2324 2018-06-29 Jakub Jelinek <jakub@redhat.com>
2326 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2328 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
2331 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2332 alternative 0 in preferred_for_speed attribute.
2334 2018-06-28 Paul Koning <ni1d@arrl.net>
2336 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2337 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2338 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2339 * config/pdp11/pdp11.md: Correct "length" attribute calculation
2340 for shift insn patterns.
2342 2018-06-28 David Malcolm <dmalcolm@redhat.com>
2344 * cgraph.c (cgraph_node::get_body): Replace assignments to
2345 "dump_file" with calls to set_dump_file.
2346 * dumpfile.c (alt_dump_file): Make static, and group with...
2347 (alt_flags): ...this definition.
2348 (dumps_are_enabled): New variable.
2349 (refresh_dumps_are_enabled): New function.
2350 (set_dump_file): New function.
2351 (set_alt_dump_file): New function.
2352 (gcc::dump_manager::dump_start): Replace assignments to
2353 "dump_file" and "alt_dump_file" with calls to set_dump_file and
2355 (gcc::dump_manager::dump_finish): Likewise.
2356 * dumpfile.h (alt_dump_file): Delete decl.
2357 (dumps_are_enabled): New variable decl.
2358 (set_dump_file): New function decl.
2359 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2361 * tree-nested.c (lower_nested_functions): Replace assignments to
2362 "dump_file" with calls to set_dump_file.
2364 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2366 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2367 goto_locus of each outgoing edge of each basic block.
2369 2018-06-28 Richard Biener <rguenther@suse.de>
2371 * dwarf2out.c (decl_scope_table): Remove.
2372 (push_decl_scope): Likewise.
2373 (pop_decl_scope): Likewise.
2374 (gen_type_die_for_member): Do not call push/pop_decl_scope.
2375 (gen_struct_or_union_type_die): Likewise.
2376 (gen_tagged_type_die): Likewise.
2377 (dwarf2out_init): Do not initialize decl_scope_table.
2378 (dwarf2out_c_finalize): Do not free it.
2380 2018-06-28 Richard Biener <rguenther@suse.de>
2382 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2383 deciding whether to not re-use a DIE.
2385 2018-06-28 Richard Biener <rguenther@suse.de>
2387 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2388 DW_AT_abstract_origin attribute.
2390 2018-06-28 Martin Liska <mliska@suse.cz>
2392 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2393 Use newly introduced constants.
2394 * tree-switch-conversion.h (struct jump_table_cluster):
2395 Define max_ratio_for_size and max_ratio_for_speed.
2397 2018-06-28 Martin Liska <mliska@suse.cz>
2399 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2400 Add new checking assert to catch invalid state.
2401 (jump_table_cluster::can_be_handled): Handle single case
2403 (jump_table_cluster::is_beneficial): Bail out for such case.
2404 (bit_test_cluster::find_bit_tests):
2405 Add new checking assert to catch invalid state.
2406 (bit_test_cluster::can_be_handled): Handle single case
2408 (bit_test_cluster::is_beneficial): Bail out for such case.
2409 (switch_decision_tree::analyze_switch_statement):
2412 2018-06-28 Martin Liska <mliska@suse.cz>
2414 * common.opt: Introduce -completion option.
2415 * gcc.c (driver_handle_option): Handle it.
2416 (driver::main): Print completions if completion
2418 * opt-suggestions.c (option_proposer::get_completions):
2420 (option_proposer::suggest_completion): Likewise.
2421 (option_proposer::find_param_completions): Likewise.
2422 (verify_autocompletions): Likewise.
2423 (test_completion_valid_options): Likewise.
2424 (test_completion_valid_params): Likewise.
2425 (in_completion_p): Likewise.
2426 (empty_completion_p): Likewise.
2427 (test_completion_partial_match): Likewise.
2428 (test_completion_garbage): Likewise.
2429 (opt_proposer_c_tests): Likewise.
2430 * opt-suggestions.h: Declare new functions.
2431 * opts.c (common_handle_option): Handle OPT__completion_.
2432 * selftest-run-tests.c (selftest::run_tests): Add
2433 opt_proposer_c_tests.
2434 * selftest.c (assert_str_startswith): New.
2435 * selftest.h (assert_str_startswith): Likewise.
2436 (opt_proposer_c_tests): New.
2437 (ASSERT_STR_STARTSWITH): Likewise.
2439 2018-06-28 Martin Liska <mliska@suse.cz>
2441 * Makefile.in: Add opt-suggestions.o.
2442 * gcc-main.c: Include opt-suggestions.h.
2443 * gcc.c (driver::driver): Likewise.
2444 (driver::~driver): Remove m_option_suggestions.
2445 (driver::build_option_suggestions): Moved to option_proposer.
2446 (driver::suggest_option): Likewise.
2447 (driver::handle_unrecognized_options): Use option_proposer.
2448 * gcc.h (class driver): Add new memver m_option_proposer.
2449 * opt-suggestions.c: New file.
2450 * opt-suggestions.h: New file.
2452 2018-06-28 Martin Liska <mliska@suse.cz>
2454 * vec.h (class auto_string_vec): New (moved from auto_argvec).
2455 (auto_string_vec::~auto_string_vec): Likewise.
2457 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2459 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2460 prevent_decl_creation_for_types fields up and add reset_location field.
2461 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2462 statement if id->reset_location is true.
2463 (copy_edges_for_bb): Do not set goto_locus on the new edges if
2464 id->reset_location is true.
2465 (copy_phis_for_bb): Force input_location on the arguments if
2466 id->reset_location is true.
2467 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2468 is set on the function to be inlined.
2470 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
2472 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2474 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
2476 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2477 registers for Pmode.
2478 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2479 hard registers for the clobbered pseudo.
2481 2018-06-27 Paul Koning <ni1d@arrl.net>
2483 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2484 mutually exclusive options.
2485 * config/pdp11/constraints.md (h): New constraint.
2486 (O): Update definition to match shift code generation.
2487 (D): New constraint.
2488 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2490 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2492 (output_jump): Change arguments.
2493 (pdp11_fixed_cc_regs): New function.
2494 (pdp11_cc_mode): Ditto.
2495 (pdp11_expand_shift): Ditto.
2496 (pdp11_assemble_shift): Ditto.
2497 (pdp11_small_shift): Ditto.
2498 (pdp11_branch_cost): Remove.
2499 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2501 (pdp11_register_move_cost): Update for CC registers.
2502 (pdp11_rtx_costs): Add case for LSHIFTRT.
2503 (pdp11_output_jump): Add CCNZ mode conditional branches.
2504 (notice_update_cc_on_set): Remove.
2505 (pdp11_cc_mode): New function.
2506 (simple_memory_operand): Correct pre/post decrement case.
2507 (no_side_effect_operand): New function.
2508 (pdp11_regno_reg_class): Add CC_REGS class.
2509 (pdp11_fixed_cc_regs): New function.
2510 (pdp11_small_shift): New function.
2511 (pdp11_expand_shift): New function to expand shift insns.
2512 (pdp11_assemble_shift): New function to output shifts.
2513 (pdp11_branch_cost): Remove.
2514 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2515 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2516 (WCHAR_TYPE): Ditto.
2517 (PTRDIFF_TYPE): Ditto.
2518 (ADJUST_INSN_LENGTH): New macro.
2519 (FIXED_REGISTERS): Add CC registers.
2520 (CALL_USED_REGISTERS): Ditto.
2522 (REG_CLASS_NAMES): Ditto.
2523 (REG_CLASS_CONTENTS): Ditto.
2524 (SELECT_CC_MODE): Use new function.
2525 (TARGET_FLAGS_REGNUM): New macro.
2526 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2527 (cc0_reg_rtx): Remove.
2528 (CC_STATUS_MDEP): Remove.
2529 (CC_STATUS_MDEFP_INIT): Remove.
2530 (CC_IN_FPU): Remove.
2531 (NOTICE_UPDATE_CC): Remove.
2532 (REGISTER_NAMES): Add CC registers.
2533 (BRANCH_COST): Change to constant 1.
2534 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2536 * config/pdp11/pdp11.opt (mbcopy): Remove.
2537 (mbcopy-builtin): Remove.
2538 (mbranch-cheap): Remove.
2539 (mbranch-expensive): Remove.
2540 * config/pdp11/predicates.md (expand_shift_operand): Update to
2541 match shift code generation.
2542 (ccnz_operator): New predicate.
2543 * doc/invoke.texi (PDP-11 Options): Remove deleted options
2544 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2545 Remove non-existent option -mabshi, -mno-abshi. Document mutually
2547 * doc/md.texi (PDP-11): Document new D and h constraints. Update
2548 description of O constraint.
2550 2018-06-27 Jeff Law <law@redhat.com>
2551 Austin Law <austinklaw@gmail.com>
2553 * config/v850/v850.md (addsi3_set_flags): New pattern.
2554 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2555 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2556 (zero_extendhisi2_v850_set_flags): Likewise.
2557 (zero_extendqisi2_v850_set_flags): Likewise.
2558 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2559 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2560 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2562 * config/v850/v850-protos.h (notice_update_cc): Remove.
2563 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2564 (v850_print_operand): Handle 'D' and "d".
2565 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2566 Add handling of arithmetic/logical operations compared against zero.
2567 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2568 Do not look at v850_compare_op, instead get mode from last argument.
2569 (v850_gen_compare): Remove
2570 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2571 after reload for prologue insns.
2572 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2574 (construct_save_jarl): Likewise.
2575 (TARGET_FLAGS_REGNUM): Define.
2576 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2577 (NOTICE_UPDATE_CC): Remove.
2578 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2579 than cc0. Conditionalize on reload_completed.
2580 (cmpsi_insn, setfcc_insn): Likewise.
2581 (tst1 splitter): Turn into define_and_split which sets the flags
2583 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2584 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2585 (cstoresf4, cstoredf4): Clobber the flags.
2586 (cmpsi, cmpsf, cmpdf): Remove expanders.
2587 (setf_insn): Remove pattern.
2588 (addsi3): Turn into define_and_split which clobbers the flags after
2589 reload and a suitable pattern (addsi3_clobber_flags) for use after
2591 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2592 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2593 (ashrsi3, ashrsi3_v850e2): Likewise.
2594 (bins): Clobber the flags.
2595 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2596 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2597 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2598 (call_value_internal_short, call_value_internal_long): Likewise.
2599 (callt_save_interrupt, callt_return_interrupt): Likewise.
2600 (save_interrupt, return_interrupt): Likewise.
2601 (callt_save_all_interrupt, save_all_interrupt): Likewise.
2602 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2603 (restore_all_interrupt, _restore_all_interrupt): Likewise.
2604 (All FP comparisons): Only allow after reload has completed.
2606 (divh, divhu): Tweak output template.
2607 (branch_z_normal, branch_z_invert): Remove
2608 (branch_nz_normal, branch_nz_invert): Likewise.
2609 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2611 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2612 * config/v850/v850.c (notice_update_cc): Remove.
2613 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
2614 (CC_NO_CARRY): Likewise.
2615 (NOTICE_UPDATE_CC): Define to nothing.
2616 * config/v850/v850.md: Remove block comment on cc0 handling
2617 Remove "cc" attribute from all patterns. Remove cc_status handling
2618 from all patterns. Minor formatting fixes.
2620 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2622 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2623 (cortex-a76.cortex-a55): Likewise.
2624 * config/aarch64/aarch64-tune.md: Regenerate.
2625 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2626 cortex-a76.cortex-a55.
2628 2018-06-27 Jeff Law <law@redhat.com>
2630 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2631 (MULTILIB_DIRNAMES): Similarly.
2633 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
2635 * gimple.h (gimple_return_retbnd): Delete.
2636 (gimple_return_set_retbnd): Likewise.
2637 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2638 gimple_return_set_retbnd.
2639 * gimple-pretty-print.c (dump_gimple_return): Remove call to
2640 gimple_return_retbnd and adjust.
2641 * tree-inline.h (struct copy_body_data): Remove retbnd field.
2642 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2643 Explicitly return NULL in a couple more cases. Move assertion
2644 on debug statements and remove unreachable code.
2645 (reset_debug_binding): Do not test id->retbnd.
2646 (expand_call_inline): Do not set it.
2648 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2650 * configure.ac: Add --disable-gcov option.
2651 * configure: Regenerate.
2652 * Makefile.in: Honour @enable_gcov@.
2653 * doc/install.texi: Document --disable-gcov.
2655 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2657 * config/arm/arm-cpus.in (cortex-a76): New entry.
2658 (cortex-a76.cortex-a55): Likewise.
2659 * config/arm/arm-tables.opt: Regenerate.
2660 * config/arm/arm-tune.md: Likewise.
2661 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2662 * doc/invoke.texi (ARM Options): Document cortex-a76 and
2663 cortex-a76.cortex-a55.
2665 2018-06-27 Tamar Christina <tamar.christina@arm.com>
2668 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2670 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
2672 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2674 (EPILOGUE_USES): Likewise.
2676 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
2678 * tree-inline.c (remap_location): New function extracted from...
2679 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
2680 (copy_phis_for_bb): ...here. Call remap_location.
2681 (copy_cfg_body): Adjust call to copy_edges_for_bb.
2683 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2685 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2686 unaligned vsx for 16B memset.
2688 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
2691 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2692 ieee128_float_type_node to long_double_type_node unless
2693 TARGET_LONG_DOUBLE_128 is set.
2695 2018-06-26 David Malcolm <dmalcolm@redhat.com>
2697 * cfgloop.c (get_loop_location): Convert return type from
2698 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2699 by implicit construction from rtx_insn *, and using
2700 dump_user_location_t::from_function_decl for the fallback case.
2701 * cfgloop.h (get_loop_location): Convert return type from
2702 location_t to dump_user_location_t.
2703 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2704 dump_printf_loc to pass in a dump_location_t rather than a
2705 location_t, via the gimple stmt.
2706 * coverage.c (get_coverage_counts): Update calls to
2707 dump_printf_loc to pass in dump_location_t rather than a
2709 * doc/optinfo.texi (Dump types): Convert example of
2710 dump_printf_loc from taking "locus" to taking "insn". Update
2711 description of the "_loc" calls to cover dump_location_t.
2712 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2714 (dump_user_location_t::dump_user_location_t): New constructors,
2715 from gimple *stmt and rtx_insn *.
2716 (dump_user_location_t::from_function_decl): New function.
2717 (dump_loc): Make static.
2718 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2719 const dump_location_t &.
2720 (dump_generic_expr_loc): Delete.
2721 (dump_printf_loc): Convert param "loc" from location_t to
2722 const dump_location_t &.
2723 (selftest::test_impl_location): New function.
2724 (selftest::dumpfile_c_tests): New function.
2725 * dumpfile.h: Include "profile-count.h".
2726 (class dump_user_location_t): New class.
2727 (struct dump_impl_location_t): New struct.
2728 (class dump_location_t): New class.
2729 (dump_printf_loc): Convert 2nd param from source_location to
2730 const dump_location_t &.
2731 (dump_generic_expr_loc): Delete.
2732 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2733 const dump_location_t &.
2734 * gimple-fold.c (fold_gimple_assign): Update call to
2735 dump_printf_loc to pass in a dump_location_t rather than a
2736 location_t, via the gimple stmt.
2737 (gimple_fold_call): Likewise.
2738 * gimple-loop-interchange.cc
2739 (loop_cand::analyze_iloop_reduction_var): Update for change to
2740 check_reduction_path.
2741 (tree_loop_interchange::interchange): Update for change to
2743 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2744 change in return-type of find_loop_location.
2745 (graphite_regenerate_ast_isl): Likewise.
2746 * graphite-optimize-isl.c (optimize_isl): Likewise.
2747 * graphite.c (graphite_transform_loops): Likewise.
2748 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2749 pass in a dump_location_t rather than a location_t, via the
2751 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2752 * ipa.c (walk_polymorphic_call_targets): Likewise.
2753 * loop-unroll.c (report_unroll): Convert "locus" param from
2754 location_t to dump_location_t.
2755 (decide_unrolling): Update for change to get_loop_location's
2757 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2758 location_t to dump_user_location_t.
2759 (grid_find_single_omp_among_assignments_1): Updates calls to
2760 dump_printf_loc to pass in a dump_location_t rather than a
2761 location_t, via the gimple stmt.
2762 (grid_parallel_clauses_gridifiable): Convert "tloc" from
2763 location_t to dump_location_t. Updates calls to dump_printf_loc
2764 to pass in a dump_location_t rather than a location_t, via the
2766 (grid_inner_loop_gridifiable_p): Likewise.
2767 (grid_dist_follows_simple_pattern): Likewise.
2768 (grid_gfor_follows_tiling_pattern): Likewise.
2769 (grid_target_follows_gridifiable_pattern): Likewise.
2770 (grid_attempt_target_gridification): Convert initialization
2771 of local "grid" from memset to zero-initialization; FIXME: does
2772 this require C++11? Update call to dump_printf_loc to pass in a
2773 optinfo_location rather than a location_t, via the gimple stmt.
2774 * profile.c (read_profile_edge_counts): Updates call to
2775 dump_printf_loc to pass in a dump_location_t rather than a
2777 (compute_branch_probabilities): Likewise.
2778 * selftest-run-tests.c (selftest::run_tests): Call
2780 * selftest.h (dumpfile_c_tests): New decl.
2781 * tree-loop-distribution.c (pass_loop_distribution::execute):
2782 Update for change in return type of find_loop_location.
2783 * tree-parloops.c (parallelize_loops): Likewise.
2784 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2785 "locus" from location_t to dump_user_location_t.
2786 (canonicalize_loop_induction_variables): Likewise.
2787 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2788 for change in return type of find_loop_location.
2789 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2790 to dump_printf_loc to pass in a dump_location_t rather than a
2791 location_t, via the stmt.
2792 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2794 * tree-vect-loop-manip.c (find_loop_location): Convert return
2795 type from source_location to dump_user_location_t.
2796 (vect_do_peeling): Update for above change.
2797 (vect_loop_versioning): Update for change in type of
2799 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2800 from location_t to dump_user_location_t.
2801 (vect_estimate_min_profitable_iters): Update for change in type
2803 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2804 location_t to dump_location_t.
2805 (vect_slp_bb): Update for change in type of vect_location.
2806 * tree-vectorizer.c (vect_location): Convert from source_location
2807 to dump_user_location_t.
2808 (try_vectorize_loop_1): Update for change in vect_location's type.
2809 (vectorize_loops): Likewise.
2810 (increase_alignment): Likewise.
2811 * tree-vectorizer.h (vect_location): Convert from source_location
2812 to dump_user_location_t.
2813 (find_loop_location): Convert return type from source_location to
2814 dump_user_location_t.
2815 (check_reduction_path): Convert 1st param from location_t to
2816 dump_user_location_t.
2817 * value-prof.c (check_counter): Update call to dump_printf_loc to
2818 pass in a dump_user_location_t rather than a location_t; update
2819 call to error_at for change in type of "locus".
2820 (check_ic_target): Update call to dump_printf_loc to
2821 pass in a dump_user_location_t rather than a location_t, via the
2824 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
2826 * config/s390/s390.h (enum processor_flags): Do not use
2827 default tune parameter when -march was specified.
2829 2018-06-26 Jakub Jelinek <jakub@redhat.com>
2832 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2833 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2836 2018-06-26 Richard Biener <rguenther@suse.de>
2838 PR tree-optimization/86287
2840 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2841 (vect_analyze_loop): Initialize n_stmts.
2843 2018-06-26 Richard Biener <rguenther@suse.de>
2846 * fold-const.c (fold_convertible_p): Pointer extension
2849 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
2852 * dwarf2out.c (loc_list_has_views): Adjust comments.
2853 (dw_loc_list): Split single cross-partition range with
2856 2018-06-25 Jeff Law <law@redhat.com>
2858 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2859 on -mbig-switch by default.
2861 * config/v850/predicates.md (const_float_1_operand): Fix match_code
2863 (const_float_0_operand): Remove unused predicate.
2864 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2865 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2866 (recipsf2): New expander. Original pattern now called
2868 (recipdf2, recipdf2_insn): Similarly.
2869 (rsqrtsf2, rsqrtsf2_insn): Similarly
2870 (rsqrtdf2, rsqrtdf2_insn): Similarly
2872 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
2874 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2875 Simplify logic for FreeBSD (twice).
2877 2018-06-25 Martin Sebor <msebor@redhat.com>
2879 PR tree-optimization/86204
2880 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2881 a strnlen result if it's less than the length of the string.
2883 2018-06-25 Martin Sebor <msebor@redhat.com>
2885 PR tree-optimization/85700
2886 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2887 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2888 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2890 2018-06-25 Martin Sebor <msebor@redhat.com>
2892 * doc/extend.texi (Zero-length arrays): Update and clarify.
2894 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
2896 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2897 added IEEE/IBM long double multilib support on PowerPC little
2898 endian Linux systems.
2899 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2900 (MULTILIB_DEFAULTS): Likewise.
2901 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2903 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2904 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2905 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2907 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
2910 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2911 (REORDER_45): Likewise.
2913 2018-06-25 Jeff Law <law@redhat.com>
2915 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2916 dividend to 32 bits. Adjust length.
2917 (udivmodhi4): Cleanup output template. Fix length.
2919 2018-06-25 Carl Love <cel@us.ibm.com>
2921 * config/rs6000/vsx.md: Change word selector to prefered location.
2923 2018-06-25 Richard Biener <rguenther@suse.de>
2925 PR tree-optimization/86304
2926 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2927 epilogue-if-converted loops as well.
2929 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
2931 * lto-section-out.c (lto_begin_section): Do not print section
2932 name for noaddr and unnumbered dumps.
2934 2018-06-25 Richard Biener <rguenther@suse.de>
2936 * tree-vectorizer.h (struct vec_info_shared): New structure
2937 with parts split out from struct vec_info and loop_nest from
2938 struct _loop_vec_info.
2939 (struct vec_info): Adjust accordingly.
2940 (struct _loop_vec_info): Likewise.
2941 (LOOP_VINFO_LOOP_NEST): Adjust.
2942 (LOOP_VINFO_DATAREFS): Likewise.
2943 (LOOP_VINFO_DDRS): Likewise.
2944 (struct _bb_vec_info): Likewise.
2945 (BB_VINFO_DATAREFS): Likewise.
2946 (BB_VINFO_DDRS): Likewise.
2947 (struct _stmt_vec_info): Add dr_aux member.
2948 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2949 (DR_MISALIGNMENT_UNINITIALIZED): New.
2950 (set_dr_misalignment): Adjust.
2951 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2952 (vect_analyze_loop): Adjust prototype.
2953 (vect_analyze_loop_form): Likewise.
2954 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2955 Compute dependences lazily.
2956 (vect_record_base_alignments): Use shared datarefs/ddrs.
2957 (vect_verify_datarefs_alignment): Likewise.
2958 (vect_analyze_data_refs_alignment): Likewise.
2959 (vect_analyze_data_ref_accesses): Likewise.
2960 (vect_analyze_data_refs): Likewise.
2961 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2962 constructor parameter for shared part.
2963 (vect_analyze_loop_form): Pass in shared part and adjust.
2964 (vect_analyze_loop_2): Pass in storage for the number of
2965 stmts. Move loop nest finding to the caller. Compute
2967 (vect_analyze_loop): Pass in shared part.
2968 (vect_transform_loop): Verify shared datarefs are unchanged.
2969 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2970 constructor parameter for shared part.
2971 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2972 (vect_slp_bb): Verify shared datarefs are unchanged before
2974 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2976 (new_stmt_vec_info): Initialize DR_AUX misalignment to
2977 DR_MISALIGNMENT_UNINITIALIZED.
2978 * tree-vectorizer.c (vec_info::vec_info): Add constructor
2979 parameter for shared part.
2980 (vec_info::~vec_info): Adjust.
2981 (vec_info_shared::vec_info_shared): New.
2982 (vec_info_shared::~vec_info_shared): Likewise.
2983 (vec_info_shared::save_datarefs): Likewise.
2984 (vec_info_shared::check_datarefs): Likewise.
2985 (try_vectorize_loop_1): Construct shared part live for analyses
2986 of a single loop for multiple vector sizes.
2987 * tree-parloops.c (gather_scalar_reductions): Adjust.
2989 2018-06-25 Richard Biener <rguenther@suse.de>
2991 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2992 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2993 (vect_analyze_data_refs): Remove similar code from here and
2994 simplify accordingly.
2996 2018-06-25 Richard Biener <rguenther@suse.de>
2998 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2999 for reverse storage order accesses rather than asserting
3000 they cannot happen here.
3002 2018-06-25 Tom de Vries <tdevries@suse.de>
3005 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3006 Use data16 instead of .byte for insn prefix.
3008 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
3011 * parser.c (make_char_string_pack): Pass this literal chars
3012 through cpp_interpret_string.
3013 (cp_parser_userdef_numeric_literal): Check the result of
3014 make_char_string_pack.
3016 2018-06-24 Maya Rashish <coypu@sdf.org>
3018 * ginclude/stddef.h: Simplify conditions around avoiding
3019 re-definition of __size_t.
3021 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3023 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3024 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3026 2018-06-22 Maya Rashish <coypu@sdf.org>
3028 * doc/invoke.texi (mno-fancy-math-387): Update for changes
3029 made to OpenBSD and NetBSD through the years.
3031 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3033 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3034 behavior of vec_pack (vector double, vector double) to match
3035 behavior of vec_float2 (vector double, vector double).
3037 2018-06-22 Olivier Hainque <hainque@adacore.com>
3039 * gimplify.c (gimplify_function_tree): Prevent creation
3040 of a trampoline for the address of the current function
3041 passed to entry/exit instrumentation hooks.
3043 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
3046 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3049 2018-06-22 Martin Liska <mliska@suse.cz>
3051 PR tree-optimization/86263
3052 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3053 Bail out if is_enabled is false.
3054 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3056 (jump_table_cluster::is_enabled): New function.
3058 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3060 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3061 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3062 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3063 (lto_input_ts_binfo_tree_pointers): Likewise.
3064 * tree-streamer-out.c (streamer_write_tree_bitfields,
3065 write_ts_binfo_tree_pointers): Likewise.
3066 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3068 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3070 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3072 2018-06-22 Martin Liska <mliska@suse.cz>
3074 * symbol-summary.h (get): Make it pure and inline move
3075 functionality from ::get function.
3076 (get): Remove and inline into ::get and ::get_create.
3077 (get_create): Move code from ::get function.
3079 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3082 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3083 -x assembler-with-cpp.
3085 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3087 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3088 _FILE_OFFSET_BITS=64 for C++.
3090 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3092 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3093 conversion insn that shows up when pr85657-3.c is compiled using
3094 IEEE 128-bit long double.
3095 (neg<mode>2_internal): Use the correct mode to check whether the
3096 mode is IBM extended.
3097 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3098 multiply and divide external functions from being created more
3101 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3103 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3105 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
3106 the edge can be forwarded.
3107 (cfg_layout_merge_blocks): Likewise.
3109 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3111 * except.c (finish_eh_generation): Commit edge insertions only after
3112 the EH edges have been redirected from post-landing to landing pads.
3114 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3116 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3117 create_tmp_var_for to create the FRAME decl.
3118 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3120 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3122 * tree-inline.c (copy_edges_for_bb): Minor tweak.
3123 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3124 debug statement when resetting its value.
3125 (expand_call_inline): Copy the locus of the call onto the assignment
3126 of the return value, if any. Use local variable in more cases.
3128 2018-06-21 Martin Liska <mliska@suse.cz>
3130 * ipa-pure-const.c (propagate_nothrow): Use
3131 funct_state_summaries->get.
3132 (dump_malloc_lattice): Likewise.
3133 (propagate_malloc): Likewise.
3135 2018-06-21 Richard Biener <rguenther@suse.de>
3137 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3138 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3139 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3141 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3142 BLOCK_ABSTRACT_ORIGIN unconditionally.
3144 2018-06-21 David Malcolm <dmalcolm@redhat.com>
3146 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3148 * ipa-reference.c (ipa_reference_c_finalize): Delete
3149 ipa_ref_opt_sum_summaries and set it to NULL.
3151 2018-06-21 Tom de Vries <tdevries@suse.de>
3153 PR tree-optimization/85859
3154 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3155 test with comment from bb_no_side_effects_p.
3157 2018-06-21 Richard Biener <rguenther@suse.de>
3159 PR tree-optimization/86232
3160 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3161 max for constant niter.
3163 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3165 * config/aarch64/aarch64-simd.md
3166 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3168 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3170 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3171 Make opernads of the unspec commutative.
3173 2018-06-21 Richard Biener <rguenther@suse.de>
3175 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3176 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3177 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3178 (vect_analyze_data_ref_dependence): Re-order checks to deal with
3180 (vect_record_base_alignments): Do not record base alignment
3181 for gathers or scatters.
3182 (vect_compute_data_ref_alignment): Drop return value that is always
3183 true. Bail out early for gathers or scatters.
3184 (vect_enhance_data_refs_alignment): Bail out early for gathers
3186 (vect_find_same_alignment_drs): Likewise.
3187 (vect_analyze_data_refs_alignment): Remove dead code.
3188 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3189 (vect_analyze_data_refs): For possible gathers or scatters do
3190 not create an alternate DR, just check their possible validity
3191 and mark them. Adjust DECL_NONALIASED handling to not rely
3193 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3194 update inits of gathers or scatters.
3195 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3196 Also copy gather/scatter flag to pattern vinfo.
3198 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
3200 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3201 behavior of vec_packsu (vector unsigned long long, vector unsigned
3202 long long) to match behavior of vec_packs with same signature.
3204 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3205 Thomas Schwinge <thomas@codesourcery.com>
3206 Cesar Philippidis <cesar@codesourcery.com>
3208 * gimplify.c (gimplify_scan_omp_clauses): Add support for
3209 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3210 (gimplify_adjust_omp_clauses): Likewise.
3211 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3212 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3213 (gimplify_omp_target_update): Update handling of acc update and
3215 * omp-low.c (install_var_field): Remove unused parameter
3216 base_pointers_restrict.
3217 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3218 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3220 (omp_target_base_pointers_restrict_p): Delete.
3221 (scan_omp_target): Update call to scan_sharing_clauses.
3222 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3224 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3225 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3226 (convert_local_omp_clauses): Likewise.
3227 * tree-pretty-print.c (dump_omp_clause): Likewise.
3228 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
3230 (omp_clause_code_name): Likewise.
3232 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3235 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3238 PR tree-optimization/86231
3239 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
3240 anti-range don't overwrite *vr0min before using it to compute *vr0max.
3242 2018-06-20 Tom de Vries <tdevries@suse.de>
3244 PR tree-optimization/86097
3245 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3246 iv type if signedness of iv type is not the same as that of *nit.
3248 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3250 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
3251 EDGE_EH edges, verify they are all EDGE_EH.
3253 2018-06-20 Maya Rashish <coypu@sdf.org>
3255 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3257 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3259 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3260 * config/aarch64/aarch64.c (xgene1_tunings): Add
3261 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3262 (aarch64_mode_valid_for_sched_fusion_p):
3263 Allow 16-byte modes.
3264 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3265 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3267 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3269 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3270 * config/aarch64/iterators.md (VQ2): New mode iterator.
3272 2018-06-20 Martin Liska <mliska@suse.cz>
3274 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3275 Change default ratio from 10 to 8.
3277 2018-06-20 Martin Liska <mliska@suse.cz>
3279 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3281 (bit_test_cluster::find_bit_tests): Likewise.
3282 (switch_decision_tree::analyze_switch_statement): Find clusters.
3283 * tree-switch-conversion.h (struct jump_table_cluster): Document
3286 2018-06-20 Martin Liska <mliska@suse.cz>
3288 * tree-switch-conversion.c (switch_conversion::collect):
3289 Record m_uniq property.
3290 (switch_conversion::expand): Bail out for special conditions.
3291 (group_cluster::~group_cluster): New.
3292 (group_cluster::group_cluster): Likewise.
3293 (group_cluster::dump): Likewise.
3294 (jump_table_cluster::emit): New.
3295 (switch_decision_tree::fix_phi_operands_for_edges): New.
3296 (struct case_node): Remove struct.
3297 (jump_table_cluster::can_be_handled): New.
3298 (case_values_threshold): Moved to header.
3299 (reset_out_edges_aux): Likewise.
3300 (jump_table_cluster::is_beneficial): New.
3301 (bit_test_cluster::can_be_handled): Likewise.
3302 (add_case_node): Remove.
3303 (bit_test_cluster::is_beneficial): New.
3304 (case_bit_test::cmp): New.
3305 (bit_test_cluster::emit): New.
3306 (expand_switch_as_decision_tree_p): Remove.
3307 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3308 (fix_phi_operands_for_edge): Likewise.
3309 (switch_decision_tree::analyze_switch_statement): New.
3310 (compute_cases_per_edge): Move ...
3311 (switch_decision_tree::compute_cases_per_edge): ... here.
3312 (try_switch_expansion): Likewise.
3313 (switch_decision_tree::try_switch_expansion): Likewise.
3314 (record_phi_operand_mapping): Likewise.
3315 (switch_decision_tree::record_phi_operand_mapping): Likewise.
3316 (emit_case_decision_tree): Likewise.
3317 (switch_decision_tree::emit): Likewise.
3318 (balance_case_nodes): Likewise.
3319 (switch_decision_tree::balance_case_nodes): Likewise.
3320 (dump_case_nodes): Likewise.
3321 (switch_decision_tree::dump_case_nodes): Likewise.
3322 (emit_jump): Likewise.
3323 (switch_decision_tree::emit_jump): Likewise.
3324 (emit_cmp_and_jump_insns): Likewise.
3325 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3326 (emit_case_nodes): Likewise.
3327 (switch_decision_tree::emit_case_nodes): Likewise.
3328 (conditional_probability): Remove.
3329 * tree-switch-conversion.h (enum cluster_type): New.
3331 (struct cluster): Likewise.
3332 (cluster::cluster): Likewise.
3333 (struct simple_cluster): Likewise.
3334 (simple_cluster::simple_cluster): Likewise.
3335 (struct group_cluster): Likewise.
3336 (struct jump_table_cluster): Likewise.
3337 (struct bit_test_cluster): Likewise.
3338 (struct min_cluster_item): Likewise.
3339 (struct case_tree_node): Likewise.
3340 (case_tree_node::case_tree_node): Likewise.
3341 (jump_table_cluster::case_values_threshold): Likewise.
3342 (struct case_bit_test): Likewise.
3343 (struct switch_decision_tree): Likewise.
3344 (struct switch_conversion): Likewise.
3345 (switch_decision_tree::reset_out_edges_aux): Likewise.
3347 2018-06-20 Martin Liska <mliska@suse.cz>
3349 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3350 (hoist_edge_and_branch_if_true): Likewise.
3351 (expand_switch_using_bit_tests_p): Likewise.
3352 (struct case_bit_test): Likewise.
3353 (case_bit_test_cmp): Likewise.
3354 (emit_case_bit_tests): Likewise.
3355 (switch_conversion::switch_conversion): New class.
3356 (struct switch_conv_info): Remove old struct.
3357 (collect_switch_conv_info): More to ...
3358 (switch_conversion::collect): ... this.
3359 (check_range): Likewise.
3360 (switch_conversion::check_range): Likewise.
3361 (check_all_empty_except_final): Likewise.
3362 (switch_conversion::check_all_empty_except_final): Likewise.
3363 (check_final_bb): Likewise.
3364 (switch_conversion::check_final_bb): Likewise.
3365 (create_temp_arrays): Likewise.
3366 (switch_conversion::create_temp_arrays): Likewise.
3367 (free_temp_arrays): Likewise.
3368 (gather_default_values): Likewise.
3369 (switch_conversion::gather_default_values): Likewise.
3370 (build_constructors): Likewise.
3371 (switch_conversion::build_constructors): Likewise.
3372 (constructor_contains_same_values_p): Likewise.
3373 (switch_conversion::contains_same_values_p): Likewise.
3374 (array_value_type): Likewise.
3375 (switch_conversion::array_value_type): Likewise.
3376 (build_one_array): Likewise.
3377 (switch_conversion::build_one_array): Likewise.
3378 (build_arrays): Likewise.
3379 (switch_conversion::build_arrays): Likewise.
3380 (gen_def_assigns): Likewise.
3381 (switch_conversion::gen_def_assigns): Likewise.
3382 (prune_bbs): Likewise.
3383 (switch_conversion::prune_bbs): Likewise.
3384 (fix_phi_nodes): Likewise.
3385 (switch_conversion::fix_phi_nodes): Likewise.
3386 (gen_inbound_check): Likewise.
3387 (switch_conversion::gen_inbound_check): Likewise.
3388 (process_switch): Use the newly created class.
3389 (switch_conversion::expand): New.
3390 (switch_conversion::~switch_conversion): New.
3391 * tree-switch-conversion.h: New file.
3393 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3395 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3396 tree-vect-patterns.c.
3397 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3398 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
3399 (vect_recog_sad_pattern): Likewise.
3400 (vect_recog_widen_sum_pattern): Likewise.
3401 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
3402 (vect_recog_widen_shift_pattern): Remove the type_in argument.
3403 (vect_recog_rotate_pattern): Likewise.
3404 (vect_recog_mult_pattern): Likewise.
3405 (vect_recog_vector_vector_shift_pattern): Likewise.
3406 (vect_recog_divmod_pattern): Likewise.
3407 (vect_recog_mixed_size_cond_pattern): Likewise.
3408 (vect_recog_bool_pattern): Likewise.
3409 (vect_recog_mask_conversion_pattern): Likewise.
3410 (vect_try_gather_scatter_pattern): Likewise.
3411 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
3412 (vect_recog_over_widening_pattern): Likewise.
3413 (vect_recog_gather_scatter_pattern): Likewise.
3414 (vect_recog_func_ptr): Move from tree-vectorizer.h
3415 (vect_vect_recog_func_ptrs): Move further down the file.
3416 (vect_recog_func): Likewise. Remove the third argument.
3417 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3418 (vect_pattern_recog_1): Expect the pattern function to do any
3419 necessary target tests. Also expect it to provide a vector type.
3420 Remove the type_in handling.
3422 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3424 * tree-vect-patterns.c (vect_pattern_detected): New function.
3425 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3426 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3427 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3428 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3429 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3430 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3431 (vect_recog_mask_conversion_pattern)
3432 (vect_try_gather_scatter_pattern): Likewise.
3434 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3436 * tree-vect-patterns.c (vect_get_internal_def): New function.
3437 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3438 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3439 (search_type_for_mask_1): Use it.
3441 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3443 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3444 redundant WIDEN_SUM_EXPR handling.
3445 (vect_recog_sad_pattern): Likewise.
3447 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3449 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3450 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3451 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3452 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3453 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3455 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3457 * tree-vect-stmts.c (vectorizable_call): Make sure that we
3458 use the stmt_vec_info of the original bb statement for the
3459 new zero assignment, even if the call is part of a pattern.
3461 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3463 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3464 that the sequence is attached to the original statement rather
3465 than the pattern statement.
3466 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3467 PATTERN_DEF_SEQ from the original statement rather than
3468 the main pattern statement.
3469 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3470 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3471 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3473 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3475 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3476 definition statements before the early exit for statements that aren't
3478 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3480 (vect_transform_loop): ...here. Process pattern definition
3481 statements without first checking whether the main pattern
3482 statement is live or relevant.
3484 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3486 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3487 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3489 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
3491 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3492 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3493 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3494 (expand_block_compare): Change select_block_compare_mode call.
3495 (expand_strncmp_align_check): Use new functions, fix comment.
3496 (emit_final_str_compare_gpr): New function.
3497 (expand_strn_compare): Refactor and clean up code.
3498 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3500 2018-06-19 Tony Reix <tony.reix@atos.com>
3501 Damien Bergamini <damien.bergamini@atos.com>
3502 David Edelsohn <dje.gcc@gmail.com>
3504 * collect2.c (static_obj): New variable.
3505 (static_libs): New variable.
3506 (is_in_list): Uncomment declaration.
3507 (main): Track AIX libraries linked statically.
3508 (is_in_list): Uncomment definition.
3509 (scan_prog_file): Don't add AIX shared libraries initializer
3510 to constructor list if linking statically.
3512 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3514 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3516 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3518 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
3520 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3523 2018-06-19 Martin Liska <mliska@suse.cz>
3525 * config/i386/i386.c (ix86_can_inline_p): Do not use
3526 ipa_fn_summaries::get_create.
3527 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3529 (devirtualization_time_bonus): Likewise.
3530 (ipcp_propagate_stage): Likewise.
3531 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3532 (edge_set_predicate): Likewise.
3533 (evaluate_conditions_for_known_args): Likewise.
3534 (evaluate_properties_for_edge): Likewise.
3535 (ipa_call_summary::reset): Tranform to ...
3536 (ipa_call_summary::~ipa_call_summary): ... this.
3537 (ipa_fn_summary::reset): Transform to ...
3538 (ipa_fn_summary::~ipa_fn_summary): ... this.
3539 (ipa_fn_summary_t::remove): Rename to ...
3540 (ipa_fn_summary_t::remove_callees): ... this.
3541 (ipa_fn_summary_t::duplicate): Use placement new
3542 instead of memory copy.
3543 (ipa_call_summary_t::duplicate): Likewise.
3544 (ipa_call_summary_t::remove): Remove.
3545 (dump_ipa_call_summary): Change get_create to get.
3546 (ipa_dump_fn_summary): Dump only when summary exists.
3547 (analyze_function_body): Use symbol_summary::get instead
3549 (compute_fn_summary): Likewise.
3550 (estimate_edge_devirt_benefit): Likewise.
3551 (estimate_edge_size_and_time): Likewise.
3552 (inline_update_callee_summaries): Likewise.
3553 (remap_edge_change_prob): Likewise.
3554 (remap_edge_summaries): Likewise.
3555 (ipa_merge_fn_summary_after_inlining): Likewise.
3556 (write_ipa_call_summary): Likewise.
3557 (ipa_fn_summary_write): Likewise.
3558 (ipa_free_fn_summary): Likewise.
3559 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3560 (struct ipa_call_summary): Likewise.
3561 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3563 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3564 (estimate_size_after_inlining): Likewise.
3565 (estimate_growth): Likewise.
3566 (growth_likely_positive): Likewise.
3567 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3568 (inline_call): Likewise.
3569 * ipa-inline.c (caller_growth_limits): Likewise.
3570 (can_inline_edge_p): Likewise.
3571 (can_inline_edge_by_limits_p): Likewise.
3572 (compute_uninlined_call_time): Likewise.
3573 (compute_inlined_call_time): Likewise.
3574 (want_inline_small_function_p): Likewise.
3575 (edge_badness): Likewise.
3576 (update_caller_keys): Likewise.
3577 (update_callee_keys): Likewise.
3578 (inline_small_functions): Likewise.
3579 (inline_to_all_callers_1): Likewise.
3580 (dump_overall_stats): Likewise.
3581 (early_inline_small_functions): Likewise.
3582 (early_inliner): Likewise.
3583 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3584 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3585 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3586 * ipa-split.c (execute_split_functions): Likewise.
3587 * symbol-summary.h: Likewise.
3588 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3590 2018-06-19 Richard Biener <rguenther@suse.de>
3592 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3593 (vectorize_loops): ... here. Fix dbgcnt handling.
3594 (try_vectorize_loop): Wrap try_vectorize_loop_1.
3596 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
3599 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3600 ieee128 argument takes up only one (vector) register, not two (floating
3603 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3605 * gimplify.c (gimplify_init_constructor): Really never clear for an
3606 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3608 2018-06-19 Richard Biener <rguenther@suse.de>
3610 PR tree-optimization/86179
3611 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3612 after failed recognition.
3614 2018-06-18 Martin Sebor <msebor@redhat.com>
3617 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3618 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3619 Handle integer subtraction.
3620 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3621 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3623 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3625 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3626 param from rtx to rtx_insn *.
3627 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3629 (frv_ifcvt_modify_insn): Likwise.
3630 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3631 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
3632 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3633 as_a <rtx_insn *> cast to local "unprotected_region" once
3634 it's been established that it's not NULL or pc_rtx.
3635 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3636 param "sethi" from rtx to rtx_insn *.
3637 (nds32_group_float_insns): Likewise for param "insn".
3638 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3640 (vax_output_int_subtract): Likewise.
3641 * config/vax/vax.c (vax_output_int_add): Likewise for param
3643 (vax_output_int_subtract): Likewise.
3644 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3645 (emit_pattern_after): Likewise for param "after".
3646 (emit_insn_after): Likewise.
3647 (emit_jump_insn_after): Likewise.
3648 (emit_call_insn_after): Likewise.
3649 (emit_debug_insn_after): Likewise.
3650 (emit_pattern_before): Likewise for param "before".
3651 (emit_insn_before): Likewise.
3652 (emit_jump_insn_before): Likewise.
3653 * final.c (get_insn_template): Likewise for param "insn", removing
3655 * output.h (get_insn_template): Likewise for 2nd param.
3656 * rtl.h (emit_insn_before): Likewise.
3657 (emit_jump_insn_before): Likewise.
3658 (emit_debug_insn_before_noloc): Likewise.
3659 (emit_insn_after): Likewise.
3660 (emit_jump_insn_after): Likewise.
3661 (emit_call_insn_after): Likewise.
3662 (emit_debug_insn_after): Likewise.
3663 (set_insn_deleted): Likewise for param.
3665 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
3668 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3669 floating point modes, so that IFmode is numerically greater than
3670 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3671 to declare the ordering. This prevents IFmode from being
3672 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3673 machine. Include rs6000-modes.h to share the fractional values
3674 between genmodes* and the rest of the compiler.
3678 * config/rs6000/rs6000-modes.h: New file.
3679 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3680 meaning of rs6000_long_double_size so that 126..128 selects an
3681 appropriate 128-bit floating point type.
3682 (rs6000_option_override_internal): Likewise.
3683 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3684 (TARGET_LONG_DOUBLE_128): Change the meaning of
3685 rs6000_long_double_size so that 126..128 selects an appropriate
3686 128-bit floating point type.
3687 (LONG_DOUBLE_TYPE_SIZE): Update comment.
3688 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3689 source and destination to match the standard usage.
3690 (truncifkf2): Likewise.
3691 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3692 ISA 2.07 to use an explicit clobber, instead of passing in a
3694 (copysign<mode>3_soft): Likewise.
3696 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3698 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3699 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3700 (vect_slp_analyze_instance_dependence): Likewise.
3701 (vect_enhance_data_refs_alignment): Likewise.
3702 (vect_analyze_data_refs_alignment): Likewise.
3703 (vect_slp_analyze_and_verify_instance_alignment
3704 (vect_analyze_data_ref_accesses): Likewise.
3705 (vect_prune_runtime_alias_test_list): Likewise.
3706 (vect_analyze_data_refs): Likewise.
3707 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3708 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3709 (vect_analyze_scalar_cycles_1): Likewise.
3710 (vect_get_loop_niters): Likewise.
3711 (vect_analyze_loop_form_1): Likewise.
3712 (vect_update_vf_for_slp): Likewise.
3713 (vect_analyze_loop_operations): Likewise.
3714 (vect_analyze_loop): Likewise.
3715 (vectorizable_induction): Likewise.
3716 (vect_transform_loop): Likewise.
3717 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3718 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3719 (vect_make_slp_decision): Likewise.
3720 (vect_detect_hybrid_slp): Likewise.
3721 (vect_slp_analyze_operations): Likewise.
3722 (vect_slp_bb): Likewise.
3723 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3724 (vectorizable_bswap): Likewise.
3725 (vectorizable_call): Likewise.
3726 (vectorizable_simd_clone_call): Likewise.
3727 (vectorizable_conversion): Likewise.
3728 (vectorizable_assignment): Likewise.
3729 (vectorizable_shift): Likewise.
3730 (vectorizable_operation): Likewise.
3731 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3733 2018-06-18 Martin Sebor <msebor@redhat.com>
3735 PR tree-optimization/81384
3736 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3737 * builtins.c (expand_builtin_strnlen): New function.
3738 (expand_builtin): Call it.
3739 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3740 * builtins.def (BUILT_IN_STRNLEN): New.
3741 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3742 Warn for bounds in excess of maximum object size.
3743 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3744 single-value ranges. Handle strnlen.
3745 (handle_builtin_strlen): Handle strnlen.
3746 (strlen_check_and_optimize_stmt): Same.
3747 * doc/extend.texi (Other Builtins): Document strnlen.
3749 2018-06-18 Maya Rashish <coypu@sdf.org>
3751 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3752 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3753 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3755 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3757 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3759 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3761 * tree.c (escaped_string::escape): Replace cast to char * by
3762 const_cast<char *> (unescaped).
3764 2018-06-18 Nick Clifton <nickc@redhat.com>
3767 * tree.c (escaped_string): New class. Converts an unescaped
3768 string into its escaped equivalent.
3769 (warn_deprecated_use): Use the new class to convert the
3770 deprecation message, if present.
3771 (test_escaped_strings): New self test.
3772 (test_c_tests): Add test_escaped_strings.
3773 * doc/extend.texi (deprecated): Add a note that the
3774 deprecation message is affected by the -fmessage-length
3775 option, and that control characters will be escaped.
3776 (#pragma GCC error): Document this pragma.
3777 (#pragma GCC warning): Likewise.
3778 * doc/invoke.texi (-fmessage-length): Document this option's
3779 effect on the #warning and #error preprocessor directives and
3780 the deprecated attribute.
3782 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
3784 * tree.c (decl_value_expr_lookup): Revert latest change.
3785 (decl_value_expr_insert): Likewise.
3787 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
3789 * gimplify.c (nonlocal_vlas): Delete.
3790 (nonlocal_vla_vars): Likewise.
3791 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3793 (gimplify_body): Do not create and destroy nonlocal_vlas.
3794 * tree-nested.c: Include diagnostic.h.
3795 (use_pointer_in_frame): Tweak.
3796 (lookup_field_for_decl): Add assertion and declare the transformation.
3797 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3798 internal error when the reference is in a wrong context. Do not
3799 create a debug decl by default.
3800 (note_nonlocal_block_vlas): Delete.
3801 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3802 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
3803 create a debug decl by default.
3804 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3805 call is in a wrong context.
3806 (fixup_vla_decls): New function.
3807 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
3808 debug variables were created.
3809 * tree.c (decl_value_expr_lookup): Add checking assertion.
3810 (decl_value_expr_insert): Likewise.
3812 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3815 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3816 * tree-scalar-evolution.c (interpret_expr): Likewise.
3817 (expression_expensive_p): Likewise.
3818 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3819 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3820 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3821 (ssa_defined_by_minus_one_stmt_p): New.
3823 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3826 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3827 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3828 * dojump.c (do_jump): Likewise.
3829 * expr.c (expand_expr_real_2): Check operand type's sign.
3830 * fold-const.c (const_unop): Handle ABSU_EXPR.
3831 (fold_abs_const): Likewise.
3832 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3833 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3834 (strip_sign_op_1): Likesise.
3835 * match.pd: Add new pattern to generate ABSU_EXPR.
3836 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3837 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3838 * tree-eh.c (operation_could_trap_helper_p): Likewise.
3839 * tree-inline.c (estimate_operator_cost): Likewise.
3840 * tree-pretty-print.c (dump_generic_node): Likewise.
3841 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3842 * tree.def (ABSU_EXPR): New.
3844 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3847 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3848 documented as preserved for backward compatibility only.
3849 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3851 PR rtl-optimization/86108
3852 * bb-reorder.c (create_forwarder_block): Renamed to ...
3853 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
3854 jump from new landing pad to the second part.
3855 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3858 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3861 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3862 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3863 Only call store_expr for halves if the mode is the same.
3866 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3867 Fix up comment formatting.
3869 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3871 * typed-splay-tree.h (typed_splay_tree::remove): New function.
3872 (typed_splay_tree::closure,
3873 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3874 (typed_splay_tree::typed_splay_tree,
3875 typed_splay_tree::operator =): Declared private.
3876 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3877 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3878 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3879 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3880 typed_splay_tree::splay_tree_splay,
3881 typed_splay_tree::splay_tree_foreach_helper,
3882 typed_splay_tree::splay_tree_insert,
3883 typed_splay_tree::splay_tree_remove,
3884 typed_splay_tree::splay_tree_lookup,
3885 typed_splay_tree::splay_tree_predecessor,
3886 typed_splay_tree::splay_tree_successor,
3887 typed_splay_tree::splay_tree_min,
3888 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3889 (typed_splay_tree::root, typed_splay_tree::comp,
3890 typed_splay_tree::delete_key,
3891 typed_splay_tree::delete_value): New data members.
3892 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3893 typed_splay_tree::remove.
3895 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
3897 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3898 -mginv and -mno-ginv to the assembler.
3899 * config/mips/mips.opt (-mcrc): New option.
3901 * doc/invoke.text (-mcrc): Document.
3904 2018-06-15 Nick Clifton <nickc@redhat.com>
3907 * tree.c (escaped_string): New class. Converts an unescaped
3908 string into its escaped equivalent.
3909 (warn_deprecated_use): Use the new class to convert the
3910 deprecation message, if present.
3911 (test_escaped_strings): New self test.
3912 (test_c_tests): Add test_escaped_strings.
3913 * doc/extend.texi (deprecated): Add a note that the
3914 deprecation message is affected by the -fmessage-length
3915 option, and that control characters will be escaped.
3916 (#pragma GCC error): Document this pragma.
3917 (#pragma GCC warning): Likewise.
3918 * doc/invoke.texi (-fmessage-length): Document this option's
3919 effect on the #warning and #error preprocessor directives and
3920 the deprecated attribute.
3922 2018-06-15 Richard Biener <rguenther@suse.de>
3924 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3925 here, also noting vector size used.
3926 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
3927 size used in MSG_OPTIMIZED_LOCATIONS dump.
3928 (pass_slp_vectorize::execute): Adjust.
3930 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
3933 * config/arc/arc.c (arc_return_address_register): Fix
3936 2018-06-15 Richard Biener <rguenther@suse.de>
3939 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3940 leave useless conversion stripping to force_gimple_operand_gsi.
3941 (gimplify_build2): Likewise.
3942 (gimplify_build1): Likewise.
3944 2018-06-15 Richard Biener <rguenther@suse.de>
3947 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3948 before adjusting their block.
3950 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3952 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3953 multilibs for *-*-rtems*.
3954 * config/riscv/t-rtems: New file.
3956 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3959 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3960 unsigned_type_for returns NULL.
3963 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3964 subregs of multi-word pseudos unless the float mode has word size.
3966 2018-06-14 Richard Biener <rguenther@suse.de>
3969 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3970 duplicate and harmful type_hash_canon.
3971 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3973 2018-06-14 Richard Biener <rguenther@suse.de>
3976 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3979 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3981 * config/rtems.h (STDINT_LONG32): Define.
3983 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
3984 Prachi Godbole <prachi.godbole@imgtec.com>
3986 * config/mips/mips-cpus.def: Define P6600.
3987 * config/mips/mips-tables.opt: Regenerate.
3988 * config/mips/mips.c (mips_ucbranch_type): New enum.
3989 (mips_rtx_cost_data): Add support for P6600.
3990 (mips_issue_rate): Likewise.
3991 (mips_multipass_dfa_lookahead): Likewise.
3992 (mips_avoid_hazard): Likewise.
3993 (mips_reorg_process_insns): Likewise.
3994 (mips_classify_branch_p6600): New function.
3995 * config/mips/mips.h (TUNE_P6600): New define.
3996 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3997 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3998 * config/mips/mips.md: Include p6600.md.
3999 (processor): Add p6600.
4000 * config/mips/p6600.md: New file.
4001 * doc/invoke.texi: Add p6600 to supported architectures.
4003 2018-06-13 Martin Sebor <msebor@redhat.com>
4005 PR tree-optimization/86114
4006 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4008 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4010 2018-06-13 Richard Biener <rguenther@suse.de>
4012 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4013 Properly set vector type of the intermediate stmt.
4014 * tree-vect-stmts.c (vectorizable_operation): The destination
4015 var always has vectype_out type.
4017 2018-06-13 Jeff Law <law@redhat.com>
4019 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4020 integer 0 for argument to print_rtl_with_bb.
4021 (rl78_reorg): Likewise.
4023 2018-06-13 David Malcolm <dmalcolm@redhat.com>
4025 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4026 from rtx to rtx_insn *.
4027 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4029 (add_sched_insns_for_speculation): Likewise for local "target",
4030 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4031 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4032 from rtx_insn ** to rtx_code_label **.
4033 (reorg_emit_nops): Likewise.
4034 (c6x_reorg): Likewise for local "call_labels".
4035 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4037 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4038 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4039 the loops over LABEL_REFS.
4040 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4042 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4043 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4044 (split_branches): Strengthen local "olabel" from rtx to
4045 rtx_insn *, adding a safe_as_a cast.
4046 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4048 (add_insn_after): Likewise for first two params.
4049 (add_insn_before): Likewise.
4050 (remove_insn): Likewise for param.
4051 (emit_pattern_before_noloc): Likewise for second and third params.
4052 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4053 (emit_call_insn_before_noloc): Likewise.
4054 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4056 (emit_barrier_before): Likewise.
4057 (emit_label_before): Strengthen "label" param from "rtx" to
4058 "rtx_code_label *". Strengthen "before" param from "rtx" to
4060 (emit_insn_after_1): Strengthen "after" param from "rtx" to
4062 (emit_pattern_after_noloc): Likewise.
4063 (emit_insn_after_noloc): Likewise.
4064 (emit_jump_insn_after_noloc): Likewise.
4065 (emit_call_insn_after_noloc): Likewise.
4066 (emit_debug_insn_after_noloc): Likewise.
4067 (emit_barrier_after): Likewise.
4068 (emit_label_after): Likewise for both params.
4069 (emit_pattern_after_setloc): Likewise for "after" param. Convert
4070 "loc" param from "int" to "location_t".
4071 (emit_insn_after_setloc): Likewise.
4072 (emit_jump_insn_after_setloc): Likewise.
4073 (emit_call_insn_after_setloc): Likewise.
4074 (emit_debug_insn_after_setloc): Likewise.
4075 (emit_pattern_before_setloc): Likewise for "before" param. Convert
4076 "loc" param from "int" to "location_t".
4077 (emit_pattern_before): Convert NULL_RTX to NULL.
4078 (emit_insn_before_setloc): Convert "loc" param from "int" to
4080 (emit_jump_insn_before_setloc): Likewise.
4081 (emit_call_insn_before_setloc): Likewise.
4082 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4083 rtx_insn *. Convert "loc" param from "int" to "location_t".
4084 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4085 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4086 Convert 3rd param from "int" to "location_t".
4087 (emit_barrier_before, emit_barrier_after, next_real_insn):
4088 Strengthen param from rtx to rtx_insn *.
4089 (emit_label_before): Strengthen 1st param from "rtx" to
4090 "rtx_code_label *". Strengthen 2nd param from "rtx" to
4092 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4093 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4094 Strengthen 2nd param from "rtx" to "rtx_insn *".
4095 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4096 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4097 Likewise. Convert 3rd param from "int" to "location_t".
4098 (emit_label_after): Strengthen 1st param from "rtx" to
4100 (next_real_insn, remove_insn): Strengthen param from "rtx" to
4102 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4103 from "rtx" to "rtx_insn *".
4105 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
4107 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4108 bodies streamed in with -Q.
4109 * dumpfile.c (dump_files): Add lto-stream-out dump file.
4110 * dumpfile.h (tree_dump_index): Add lto_stream_out.
4111 * gimple-streamer-out.c: Include gimple-pretty-print.h
4112 (output_bb): Dump stmts streamed.
4113 * lto-section-out.c: Include print-tree.h
4114 (lto_begin_section): Dump sections created.
4115 (lto_output_decl_index): Dump decl encoded.
4116 * lto-streamer-out.c: Include print-tree.h
4117 (create_output_block): Dump output block created.
4118 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4119 (output_function): Dump function output.
4120 (output_constructor): Dump constructor streamed.
4121 (write_global_stream): Output indexes encoded.
4122 (produce_asm_for_decls): Dump streams encoded.
4123 * lto-streamer.c (streamer_dump_file): New global var.
4124 * lto-streamer.h (streamer_dump_file): Declare.
4125 * passes.c (ipa_write_summaries): Initialize streamer dump.
4126 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4129 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
4132 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4133 offsets for register save directives. Emit a second batch of save
4134 directives, if need be, when the function accesses prior frames.
4136 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4138 * config/arc/fpu.md (fmasf4): Force operand to register.
4139 (fnmasf4): Likewise.
4141 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4143 * config/arc/arc-protos.h (arc_pad_return): Remove.
4144 * config/arc/arc.c (machine_function): Remove force_short_suffix
4146 (arc_print_operand): Adjust printing of '&'.
4147 (arc_verify_short): Remove conditional printing of short suffix.
4148 (arc_final_prescan_insn): Remove reference to size_reason.
4149 (pad_return): New function.
4150 (arc_reorg): Call pad_return.
4151 (arc_pad_return): Remove.
4152 (arc_init_machine_status): Remove reference to force_short_suffix.
4153 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4154 (attr length): When attribute iscompact is true force to 2
4155 regardless; in the case of maybe check if we want to force the
4156 instruction to have 4 bytes length.
4157 (nopv): Change it to generate 4 byte long nop as well.
4158 (blockage): New pattern.
4159 (simple_return): Remove call to arc_pad_return.
4160 (p_return_i): Likewise.
4162 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4164 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4166 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4168 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4171 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4173 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4174 for ARC700 and ARCv2.
4176 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
4179 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4180 operands[2] instead of operands[1].
4183 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4185 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4186 case, check whether the outer register overlaps an unallocatable
4187 register, not just whether it fits the required class.
4189 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4191 * poly-int.h (can_div_trunc_p): Add new overload in which all values
4193 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4194 (memrefs_conflict_p): Likewise.
4195 (init_alias_analysis): Likewise.
4196 * cfgexpand.c (expand_debug_expr): Likewise.
4197 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4198 * cse.c (fold_rtx): Likewise.
4199 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4200 * expr.c (emit_block_move_hints): Likewise.
4201 (clear_storage_hints, push_block, emit_push_insn): Likewise.
4202 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4203 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4204 (emit_group_store): Likewise.
4205 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
4206 to read the PRE/POST_MODIFY increment.
4207 * calls.c (store_one_arg): Use strip_offset.
4208 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4210 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4212 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4213 (simplify_binary_operation_1): Extend CONST_INT handling to
4215 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4216 than a HOST_WIDE_INT.
4217 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4219 (adjust_mems, add_stores): Update accodingly.
4220 (vt_canonicalize_addr): Track polynomial offsets.
4221 (emit_note_insn_var_location): Likewise.
4222 (vt_add_function_parameter): Likewise.
4223 (vt_initialize): Likewise.
4225 2018-06-12 Jeff Law <law@redhat.com>
4227 * config.gcc (alpha*-*-freebsd*): Remove.
4228 * config/alpha/freebsd.h: Remove.
4230 2018-06-12 David Malcolm <dmalcolm@redhat.com>
4233 * spellcheck-tree.c (levenshtein_distance): Rename to...
4234 (get_edit_distance): ...this, and update for underlying renaming.
4235 * spellcheck-tree.h (levenshtein_distance): Rename to...
4236 (get_edit_distance): ...this.
4237 * spellcheck.c (levenshtein_distance): Rename to...
4238 (get_edit_distance): ...this. Convert from Levenshtein distance
4239 to Damerau-Levenshtein distance by supporting transpositions of
4240 adjacent characters. Rename "v1" to "v_next" and "v0" to
4242 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4243 (selftest::test_edit_distance_unit_test_oneway): ...this, and
4244 update for underlying renaming.
4245 (selftest::levenshtein_distance_unit_test): Rename to...
4246 (selftest::test_get_edit_distance_unit): ...this, and update for
4247 underlying renaming.
4248 (selftest::test_find_closest_string): Add example from PR 69968
4249 where transposition helps
4250 (selftest::test_metric_conditions): Update for renaming.
4251 (selftest::test_metric_conditions): Likewise.
4252 (selftest::spellcheck_c_tests): Likewise.
4253 * spellcheck.h (levenshtein_distance): Rename both overloads to...
4254 (get_edit_distance): ...this.
4255 (best_match::consider): Update for renaming.
4257 2018-06-12 Martin Sebor <msebor@redhat.com>
4259 PR tree-optimization/85259
4260 * builtins.c (compute_objsize): Handle constant offsets.
4261 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4262 true iff a warning has been issued.
4263 * gimple.h (gimple_nonartificial_location): New function.
4264 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4265 gimple_nonartificial_location and handle -Wno-system-headers.
4266 (handle_builtin_stxncpy): Same.
4268 2018-06-12 Martin Sebor <msebor@redhat.com>
4271 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4273 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
4275 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4276 BUILTIN_VEC_XST entries for pointer to double and long long.
4278 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
4281 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4283 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4286 2018-06-12 Martin Liska <mliska@suse.cz>
4288 * doc/options.texi: Document IntegerRange.
4290 2018-06-12 Martin Liska <mliska@suse.cz>
4292 * config/i386/i386.opt: Make MPX-related options as Deprecated.
4293 * opt-functions.awk: Handle Deprecated flag.
4294 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4296 (read_cmdline_option): Report warning for a deprecated option.
4297 * opts.h (struct cl_option): Add new field cl_deprecated.
4298 (CL_ERR_DEPRECATED): New.
4300 2018-06-12 Martin Liska <mliska@suse.cz>
4302 * doc/options.texi: Document Deprecated option flag.
4304 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4306 * config/arc/arc-arch.h (arc_extras): New enum.
4307 (arc_cpu_t):Add field extra.
4308 (arc_cpu_types): Consider the extras.
4309 * config/arc/arc-cpus.def: Add extras info.
4310 * config/arc/arc-opts.h (processor_type): Consider extra field.
4311 * config/arc/arc.c (arc_override_options): Handle extra field.
4313 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4315 * config/arc/arc-arch.h: Update ARC_OPTX macro.
4316 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4318 * config/arc/arc.c (arc_init): Update pic warning.
4319 (irq_range): Update irq range parsing warnings.
4320 (arc_override_options): Update various warning messages.
4321 (arc_handle_aux_attribute): Likewise.
4323 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
4325 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4327 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4329 * doc/sourcebuild.texi: Document usage of line number 0 in verify
4330 compiler messages directives.
4332 2018-06-12 Matthew Fortune <mfortune@gmail.com>
4334 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4335 * config/mips/mips-tables.opt: Regenerate.
4336 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4338 * doc/invoke.texi: Document -march=i6500.
4340 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
4342 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4343 (i6400_gpmul): Add cpu_unit.
4344 (i6400_gpdiv): Likewise.
4345 (i6400_msa_add_d): Update reservations.
4346 (i6400_msa_int_add) Likewise.
4347 (i6400_msa_short_logic3) Likewise.
4348 (i6400_msa_short_logic2) Likewise.
4349 (i6400_msa_short_logic) Likewise.
4350 (i6400_msa_move) Likewise.
4351 (i6400_msa_cmp) Likewise.
4352 (i6400_msa_short_float2) Likewise.
4353 (i6400_msa_div_d) Likewise.
4354 (i6400_msa_long_logic1) Likewise.
4355 (i6400_msa_long_logic2) Likewise.
4356 (i6400_msa_mult) Likewise.
4357 (i6400_msa_long_float2) Likewise.
4358 (i6400_msa_long_float4) Likewise.
4359 (i6400_msa_long_float5) Likewise.
4360 (i6400_msa_long_float8) Likewise.
4361 (i6400_fpu_fadd): Include frint type.
4362 (i6400_fpu_store): New define_insn_reservation.
4363 (i6400_fpu_load): Likewise.
4364 (i6400_fpu_move): Likewise.
4365 (i6400_fpu_fcmp): Likewise.
4366 (i6400_fpu_fmadd): Likewise.
4367 (i6400_int_mult): Include imul3nc type and update reservation.
4368 (i6400_int_div): Include idiv3 type and update reservation.
4369 (i6400_int_load): Update to check type not move_type.
4370 (i6400_int_store): Likewise.
4371 (i6400_int_prefetch): Set zero latency.
4373 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
4375 * gcc.c: Document new %@{...} sequence.
4376 (LINK_COMMAND_SPEC): Use it for the -L switches.
4377 (cpp_unique_options): Use it for the -I switches.
4378 (at_file_argbuf): New global variable.
4379 (in_at_file): Likewise.
4380 (alloc_args): Create at_file_argbuf.
4381 (clear_args): Truncate at_file_argbuf.
4382 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4383 (open_at_file): New function.
4384 (close_at_file): Likewise.
4385 (create_at_file): Delete.
4386 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4389 (validate_switches_from_spec): Deal with %@{...} sequence.
4390 (validate_switches): Likewise.
4391 (driver::finalize): Call clear_args.
4393 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4395 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4397 2018-06-11 Martin Sebor <msebor@redhat.com>
4399 * doc/invoke.texi (-Wall): List -Wc++17-compat.
4400 (Wno-class-memaccess): Add @opindex.
4401 (Wno-templates, Wno-multiple-inheritance): Same.
4402 (Wno-virtual-inheritance, Wno-namespaces): Same.
4403 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4404 (Wno-format-overflow, Wno-format-truncation): Same.
4405 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4406 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4407 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4408 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4409 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4410 (Wno-misspelled-isr): Same.
4412 2018-06-11 Martin Sebor <msebor@redhat.com>
4414 * PR tree-optimization/86083
4415 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4417 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4419 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4421 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4424 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4425 on the correct operand.
4426 (*movdi_internal64): Ditto.
4428 2018-06-11 Martin Liska <mliska@suse.cz>
4430 PR tree-optimization/86089
4431 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4433 2018-06-11 Julia Koval <julia.koval@intel.com>
4435 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4436 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4437 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4439 2018-06-11 Olivier Hainque <hainque@adacore.com>
4441 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4442 for Ada with strict dwarf2.
4444 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
4447 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4450 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
4452 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4454 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
4456 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4459 2018-06-08 Martin Liska <mliska@suse.cz>
4461 * tree-cfg.h (debug_function): Fix argument type to match
4464 2018-06-08 Martin Liska <mliska@suse.cz>
4466 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4467 Remove usage of MPX-related (and removed) fields.
4468 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4470 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4472 * cfg.c (debug): Use TDF_NONE rather than 0.
4473 * cfghooks.c (debug): Likewise.
4474 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4475 (struct dump_option_value_info): Convert to...
4476 (struct kv_pair): ...this template type.
4477 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4479 (optinfo_verbosity_options): Likewise.
4480 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4482 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4483 than int for "optgroup_flags" param.
4484 (dump_generic_expr_loc): Use dump_flags_t rather than int for
4486 (dump_dec): Likewise.
4487 (dump_finish): Use TDF_NONE rather than 0.
4488 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4489 rather than int for "optgroup_flags" param. Use TDF_NONE rather
4490 than 0. Update for change to option_ptr.
4491 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4492 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
4493 0. Update for changes to optinfo_verbosity_options and
4495 (opt_info_switch_p): Convert optgroup_flags from int to
4497 (dump_basic_block): Use dump_flags_t rather than int
4498 for "dump_kind" param.
4499 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4500 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4501 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4502 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4503 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4504 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4505 TDF_NONE): Convert from macros to...
4506 (enum dump_flag): ...this new enum.
4507 (dump_flags_t): Update to use enum.
4508 (operator|, operator&, operator~, operator|=, operator&=):
4509 Implement for dump_flags_t.
4510 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4511 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4512 Convert from macros to...
4513 (enum optgroup_flag): ...this new enum.
4514 (optgroup_flags_t): New typedef.
4515 (operator|, operator|=): Implement for optgroup_flags_t.
4516 (struct dump_file_info): Convert field "alt_flags" to
4517 dump_flags_t. Convert field "optgroup_flags" to
4519 (dump_basic_block): Use dump_flags_t rather than int for param.
4520 (dump_generic_expr_loc): Likewise.
4521 (dump_dec): Likewise.
4522 (dump_register): Convert param "optgroup_flags" to
4524 (opt_info_enable_passes): Likewise.
4525 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4527 * gimple-pretty-print.c (debug): Likewise.
4528 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4529 (merged_store_group::apply_stores): Likewise.
4530 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4531 * gimple.c (verify_gimple_pp): Likewise.
4532 * graphite-poly.c (print_pbb_body): Likewise.
4533 * passes.c (pass_manager::register_one_dump_file): Convert
4534 local "optgroup_flags" to optgroup_flags_t.
4535 * print-tree.c (print_node): Use TDF_NONE rather than 0.
4537 (debug_body): Likewise.
4538 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4539 to optgroup_flags_t.
4540 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4542 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4543 (convert_mult_to_fma): Likewise.
4544 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4545 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4546 * tree-vect-data-refs.c (dump_lower_bound): Convert param
4547 "dump_kind" to dump_flags_t.
4549 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4551 * config/rs6000/rs6000.c (min, max): Delete.
4553 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4555 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4556 -mabi=spe and -mabi=no-spe.
4558 2018-06-08 Martin Liska <mliska@suse.cz>
4560 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4561 where we expect an existing summary.
4563 2018-06-08 Martin Liska <mliska@suse.cz>
4565 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4566 * ipa-inline.h (estimate_edge_growth): Likewise.
4568 2018-06-08 Martin Liska <mliska@suse.cz>
4570 * cgraph.c (function_version_hasher::hash): Use
4571 cgraph_node::get_uid ().
4572 (function_version_hasher::equal):
4573 * cgraph.h (cgraph_node::get_uid): New method.
4574 * ipa-inline.c (update_caller_keys): Use
4575 cgraph_node::get_uid ().
4576 (update_callee_keys): Likewise.
4577 * ipa-utils.c (searchc): Likewise.
4578 (ipa_reduced_postorder): Likewise.
4579 * lto-cgraph.c (input_node): Likewise.
4580 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4581 * symbol-summary.h (symtab_insertion): Likewise.
4582 (symtab_removal): Likewise.
4583 (symtab_duplication): Likewise.
4584 * tree-pretty-print.c (dump_function_header): Likewise.
4585 * tree-sra.c (convert_callers_for_node): Likewise.
4587 2018-06-08 Martin Liska <mliska@suse.cz>
4589 * cgraph.c (symbol_table::create_edge): Always assign a new
4591 (symbol_table::free_edge): Do not recycle numbers.
4592 * cgraph.h (cgraph_edge::get): New method.
4593 * symbol-summary.h (symtab_removal): Use it.
4594 (symtab_duplication): Likewise.
4595 (call_summary::hashable_uid): Remove.
4597 2018-06-08 Martin Liska <mliska@suse.cz>
4599 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4600 (initialize_growth_caches): Remove.
4601 (free_growth_caches): Likewise.
4602 (do_estimate_edge_time): Use edge_growth_cache.
4603 (do_estimate_edge_size): Likewise.
4604 (do_estimate_edge_hints): Likewise.
4605 * ipa-inline.c (reset_edge_caches): Likewise.
4606 (recursive_inlining): Likewise.
4607 (inline_small_functions): Likewise.
4608 * ipa-inline.h (initialize_growth_caches): Remove.
4609 (estimate_edge_size): Likewise.
4610 (estimate_edge_time): Likewise.
4611 (estimate_edge_hints): Likewise.
4612 (reset_edge_growth_cache): Likewise.
4613 * symbol-summary.h (call_summary::remove): New method.
4615 2018-06-08 Martin Liska <mliska@suse.cz>
4617 * ipa-cp.c (class edge_clone_summary): New summary.
4618 (grow_edge_clone_vectors): Remove.
4619 (ipcp_edge_duplication_hook): Remove.
4620 (class edge_clone_summary_t): New call_summary class.
4621 (ipcp_edge_removal_hook): Remove.
4622 (edge_clone_summary_t::duplicate): New function.
4623 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4624 (create_specialized_node): Likewise.
4625 (ipcp_driver): Initialize edge_clone_summaries and do not
4628 2018-06-08 Martin Liska <mliska@suse.cz>
4630 * symbol-summary.h (get): New function.
4631 (call_summary::m_initialize_when_cloning): New class member.
4633 2018-06-08 Martin Liska <mliska@suse.cz>
4635 * cgraph.c (cgraph_node::remove): Do not recycle uid.
4636 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4637 (symbol_table::allocate_cgraph_symbol): Do not set uid.
4638 * passes.c (uid_hash_t): Record removed_nodes by their uids.
4639 (remove_cgraph_node_from_order): Use the removed_nodes set.
4640 (do_per_function_toporder): Likwise.
4641 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4642 instead of summary_uid.
4643 (symtab_removal): Likewise.
4644 (symtab_duplication): Likewise.
4646 2018-06-08 Martin Liska <mliska@suse.cz>
4648 * ipa-cp.c (ipcp_store_bits_results): Use
4649 ipcp_transformation_sum.
4650 (ipcp_store_vr_results): Likewise.
4651 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4653 (ipcp_transformation_initialize): ... this.
4654 (ipa_set_node_agg_value_chain):
4655 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4656 (write_ipcp_transformation_info): Likewise.
4657 (read_ipcp_transformation_info): Likewise.
4658 (ipcp_update_bits): Likewise.
4659 (ipcp_update_vr): Likewise.
4660 (ipcp_transform_function): Likewise.
4661 * ipa-prop.h: Rename ipcp_transformation_summary to
4662 ipcp_transformation.
4663 (class ipcp_transformation_t): New function summary.
4664 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4665 (ipa_get_agg_replacements_for_node): Likewise.
4667 2018-06-08 Martin Liska <mliska@suse.cz>
4669 * ipa-pure-const.c (struct funct_state_d): Do it class instead
4671 (class funct_state_summary_t): New function_summary class.
4672 (has_function_state): Remove.
4673 (get_function_state): Likewise.
4674 (set_function_state): Likewise.
4675 (add_new_function): Likewise.
4676 (funct_state_summary_t::insert): New function.
4677 (duplicate_node_data): Remove.
4678 (remove_node_data): Remove.
4679 (funct_state_summary_t::duplicate): New function.
4680 (register_hooks): Create new funct_state_summaries.
4681 (pure_const_generate_summary): Use it.
4682 (pure_const_write_summary): Likewise.
4683 (pure_const_read_summary): Likewise.
4684 (propagate_pure_const): Likewise.
4685 (propagate_nothrow): Likewise.
4686 (dump_malloc_lattice): Likewise.
4687 (propagate_malloc): Likewise.
4688 (execute): Do not register hooks, just remove summary
4690 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4693 2018-06-08 Martin Liska <mliska@suse.cz>
4695 * ipa-reference.c (remove_node_data): Remove.
4696 (duplicate_node_data): Likewise.
4697 (class ipa_ref_var_info_summary_t): New class.
4698 (class ipa_ref_opt_summary_t): Likewise.
4699 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4700 (get_reference_optimization_summary): Use
4701 ipa_ref_opt_sum_summaries.
4702 (set_reference_vars_info): Remove.
4703 (set_reference_optimization_summary): Likewise.
4704 (ipa_init): Create summaries.
4705 (init_function_info): Use function summary.
4706 (ipa_ref_opt_summary_t::duplicate): New function.
4707 (ipa_ref_opt_summary_t::remove): New function.
4708 (get_read_write_all_from_node): Fix GNU coding style.
4709 (propagate): Use function summary.
4710 (write_node_summary_p): Fix GNU coding style.
4711 (stream_out_bitmap): Likewise.
4712 (ipa_reference_read_optimization_summary): Use function summary.
4713 (ipa_reference_c_finalize): Do not release hooks.
4715 2018-06-08 Martin Liska <mliska@suse.cz>
4717 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4718 (analyze_function_body): Extract multiple calls of get_create.
4719 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4720 * ipa-inline.c (recursive_inlining): Use ::get method.
4721 * ipa-inline.h (estimate_edge_growth): Likewise.
4723 2018-06-08 Martin Liska <mliska@suse.cz>
4725 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4727 (hsa_function_summary::hsa_function_summary): Use the new enum
4729 (hsa_gpu_implementation_p): Use hsa_summaries::get.
4730 * hsa-gen.c (hsa_get_host_function): Likewise.
4731 (get_brig_function_name): Likewise.
4732 * ipa-hsa.c (process_hsa_functions): Likewise.
4733 (ipa_hsa_write_summary): Likewise.
4734 * symbol-summary.h (symtab_duplication): Use ::get function/
4735 (get): New function.
4737 2018-06-08 Martin Liska <mliska@suse.cz>
4739 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4741 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4742 (hsa_register_kernel): Likewise.
4743 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4744 * hsa-gen.c (hsa_get_host_function): Likewise.
4745 (get_brig_function_name): Likewise.
4746 (generate_hsa): Likewise.
4747 (pass_gen_hsail::execute): Likewise.
4748 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4749 (devirtualization_time_bonus): Likewise.
4750 (ipcp_propagate_stage): Likewise.
4751 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4752 (edge_set_predicate): Likewise.
4753 (evaluate_conditions_for_known_args): Likewise.
4754 (evaluate_properties_for_edge): Likewise.
4755 (ipa_fn_summary::reset): Likewise.
4756 (ipa_fn_summary_t::duplicate): Likewise.
4757 (dump_ipa_call_summary): Likewise.
4758 (ipa_dump_fn_summary): Likewise.
4759 (analyze_function_body): Likewise.
4760 (compute_fn_summary): Likewise.
4761 (estimate_edge_devirt_benefit): Likewise.
4762 (estimate_edge_size_and_time): Likewise.
4763 (estimate_calls_size_and_time): Likewise.
4764 (estimate_node_size_and_time): Likewise.
4765 (inline_update_callee_summaries): Likewise.
4766 (remap_edge_change_prob): Likewise.
4767 (remap_edge_summaries): Likewise.
4768 (ipa_merge_fn_summary_after_inlining): Likewise.
4769 (ipa_update_overall_fn_summary): Likewise.
4770 (read_ipa_call_summary): Likewise.
4771 (inline_read_section): Likewise.
4772 (write_ipa_call_summary): Likewise.
4773 (ipa_fn_summary_write): Likewise.
4774 (ipa_free_fn_summary): Likewise.
4775 * ipa-hsa.c (process_hsa_functions): Likewise.
4776 (ipa_hsa_write_summary): Likewise.
4777 (ipa_hsa_read_section): Likewise.
4778 * ipa-icf.c (sem_function::merge): Likewise.
4779 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4780 (do_estimate_edge_time): Likewise.
4781 (estimate_size_after_inlining): Likewise.
4782 (estimate_growth): Likewise.
4783 (growth_likely_positive): Likewise.
4784 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4785 (inline_call): Likewise.
4786 * ipa-inline.c (caller_growth_limits): Likewise.
4787 (can_inline_edge_p): Likewise.
4788 (can_inline_edge_by_limits_p): Likewise.
4789 (compute_uninlined_call_time): Likewise.
4790 (compute_inlined_call_time): Likewise.
4791 (want_inline_small_function_p): Likewise.
4792 (edge_badness): Likewise.
4793 (update_caller_keys): Likewise.
4794 (update_callee_keys): Likewise.
4795 (recursive_inlining): Likewise.
4796 (inline_small_functions): Likewise.
4797 (inline_to_all_callers_1): Likewise.
4798 (dump_overall_stats): Likewise.
4799 (early_inline_small_functions): Likewise.
4800 (early_inliner): Likewise.
4801 * ipa-inline.h (estimate_edge_growth): Likewise.
4802 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4803 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4804 * ipa-prop.h (IPA_NODE_REF): Likewise.
4805 (IPA_EDGE_REF): Likewise.
4806 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4807 (propagate_malloc): Likewise.
4808 * ipa-split.c (execute_split_functions): Likewise.
4809 * symbol-summary.h: Rename get to get_create.
4811 (get_create): Likewise.
4812 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4814 2018-06-08 Martin Liska <mliska@suse.cz>
4816 * symbol-summary.h (release): Move definition out of class
4818 (symtab_removal): Likewise.
4819 (symtab_duplication): Likewise.
4821 2018-06-08 Martin Liska <mliska@suse.cz>
4823 * symbol-summary.h (function_summary): Move constructor
4824 implementation out of class declaration.
4825 (release): Likewise.
4826 (symtab_insertion): Likewise.
4827 (symtab_removal): Likewise.
4828 (symtab_duplication): Likewise.
4831 2018-06-08 Martin Liska <mliska@suse.cz>
4833 * Makefile.in: Remove support for MPX (macros, related functions,
4834 fields in cgraph_node, ...).
4835 * builtin-types.def (BT_BND): Likewise.
4836 (BT_FN_BND_CONST_PTR): Likewise.
4837 (BT_FN_CONST_PTR_BND): Likewise.
4838 (BT_FN_VOID_PTR_BND): Likewise.
4839 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4840 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4841 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4842 (expand_builtin_mempcpy_with_bounds): Likewise.
4843 (expand_builtin_memset_with_bounds): Likewise.
4844 (expand_builtin_memset_args): Likewise.
4845 (std_expand_builtin_va_start): Likewise.
4846 (expand_builtin): Likewise.
4847 (expand_builtin_with_bounds): Likewise.
4848 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4849 (DEF_LIB_BUILTIN_CHKP): Likewise.
4850 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4851 (DEF_CHKP_BUILTIN): Likewise.
4852 (BUILT_IN_MEMCPY): Likewise.
4853 (BUILT_IN_MEMMOVE): Likewise.
4854 (BUILT_IN_MEMPCPY): Likewise.
4855 (BUILT_IN_MEMSET): Likewise.
4856 (BUILT_IN_STPCPY): Likewise.
4857 (BUILT_IN_STRCAT): Likewise.
4858 (BUILT_IN_STRCHR): Likewise.
4859 (BUILT_IN_STRCPY): Likewise.
4860 (BUILT_IN_STRLEN): Likewise.
4861 (BUILT_IN_MEMCPY_CHK): Likewise.
4862 (BUILT_IN_MEMMOVE_CHK): Likewise.
4863 (BUILT_IN_MEMPCPY_CHK): Likewise.
4864 (BUILT_IN_MEMSET_CHK): Likewise.
4865 (BUILT_IN_STPCPY_CHK): Likewise.
4866 (BUILT_IN_STRCAT_CHK): Likewise.
4867 (BUILT_IN_STRCPY_CHK): Likewise.
4868 * calls.c (store_bounds): Likewise.
4869 (emit_call_1): Likewise.
4870 (special_function_p): Likewise.
4871 (maybe_warn_nonstring_arg): Likewise.
4872 (initialize_argument_information): Likewise.
4873 (finalize_must_preallocate): Likewise.
4874 (compute_argument_addresses): Likewise.
4875 (expand_call): Likewise.
4876 * cfgexpand.c (expand_call_stmt): Likewise.
4877 (expand_return): Likewise.
4878 (expand_gimple_stmt_1): Likewise.
4879 (pass_expand::execute): Likewise.
4880 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4881 (cgraph_node::remove): Likewise.
4882 (cgraph_node::dump): Likewise.
4883 (cgraph_node::verify_node): Likewise.
4884 * cgraph.h (chkp_function_instrumented_p): Likewise.
4885 (symtab_node::get_alias_target): Likewise.
4886 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4887 (cgraph_local_p): Likewise.
4888 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4889 (cgraph_edge::rebuild_references): Likewise.
4890 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4891 (walk_polymorphic_call_targets): Likewise.
4892 (cgraph_node::expand_thunk): Likewise.
4893 (symbol_table::output_weakrefs): Likewise.
4894 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4895 (ix86_handle_option): Likewise.
4896 * config/i386/constraints.md: Likewise.
4897 * config/i386/i386-builtin-types.def (BND): Likewise.
4901 * config/i386/i386-builtin.def (BDESC_END): Likewise.
4902 (BDESC_FIRST): Likewise.
4904 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4905 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4906 * config/i386/i386.c (enum reg_class): Likewise.
4907 (ix86_target_string): Likewise.
4908 (ix86_option_override_internal): Likewise.
4909 (ix86_conditional_register_usage): Likewise.
4910 (ix86_valid_target_attribute_inner_p): Likewise.
4911 (ix86_set_indirect_branch_type): Likewise.
4912 (ix86_set_current_function): Likewise.
4913 (ix86_function_arg_regno_p): Likewise.
4914 (init_cumulative_args): Likewise.
4915 (ix86_function_arg_advance): Likewise.
4916 (ix86_function_arg): Likewise.
4917 (ix86_pass_by_reference): Likewise.
4918 (ix86_function_value_regno_p): Likewise.
4919 (ix86_function_value_1): Likewise.
4920 (ix86_function_value_bounds): Likewise.
4921 (ix86_return_in_memory): Likewise.
4922 (ix86_setup_incoming_vararg_bounds): Likewise.
4923 (ix86_va_start): Likewise.
4924 (indirect_thunk_need_prefix): Likewise.
4925 (print_reg): Likewise.
4926 (ix86_print_operand): Likewise.
4927 (ix86_expand_call): Likewise.
4928 (ix86_output_function_return): Likewise.
4929 (reg_encoded_number): Likewise.
4930 (BDESC_VERIFYS): Likewise.
4931 (ix86_init_mpx_builtins): Likewise.
4932 (ix86_init_builtins): Likewise.
4933 (ix86_emit_cmove): Likewise.
4934 (ix86_emit_move_max): Likewise.
4935 (ix86_expand_builtin): Likewise.
4936 (ix86_builtin_mpx_function): Likewise.
4937 (ix86_get_arg_address_for_bt): Likewise.
4938 (ix86_load_bounds): Likewise.
4939 (ix86_store_bounds): Likewise.
4940 (ix86_load_returned_bounds): Likewise.
4941 (ix86_store_returned_bounds): Likewise.
4942 (ix86_class_likely_spilled_p): Likewise.
4943 (ix86_hard_regno_mode_ok): Likewise.
4944 (x86_order_regs_for_local_alloc): Likewise.
4945 (ix86_mitigate_rop): Likewise.
4946 (ix86_bnd_prefixed_insn_p): Likewise.
4947 (ix86_mpx_bound_mode): Likewise.
4948 (ix86_make_bounds_constant): Likewise.
4949 (ix86_initialize_bounds): Likewise.
4950 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4951 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4952 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4953 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4954 (TARGET_CHKP_BOUND_MODE): Likewise.
4955 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4956 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4957 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4958 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4959 * config/i386/i386.h (TARGET_MPX): Likewise.
4960 (TARGET_MPX_P): Likewise.
4961 (VALID_BND_REG_MODE): Likewise.
4962 (FIRST_BND_REG): Likewise.
4963 (LAST_BND_REG): Likewise.
4964 (enum reg_class): Likewise.
4965 (BND_REG_P): Likewise.
4966 (BND_REGNO_P): Likewise.
4967 (BNDmode): Likewise.
4968 (ADJUST_INSN_LENGTH): Likewise.
4969 * config/i386/i386.md: Likewise.
4970 * config/i386/i386.opt: Likewise.
4971 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4972 (defined): Likewise.
4973 (LINK_MPX): Likewise.
4974 (MPX_SPEC): Likewise.
4975 (LIBMPX_SPEC): Likewise.
4976 (LIBMPXWRAPPERS_SPEC): Likewise.
4977 (CHKP_SPEC): Likewise.
4978 * config/i386/predicates.md: Likewise.
4979 * dbxout.c (dbxout_type): Likewise.
4980 * doc/extend.texi: Likewise.
4981 * doc/invoke.texi: Likewise.
4982 * doc/md.texi: Likewise.
4983 * doc/tm.texi: Likewise.
4984 * doc/tm.texi.in: Likewise.
4985 * dwarf2out.c (is_base_type): Likewise.
4986 (gen_formal_types_die): Likewise.
4987 (gen_subprogram_die): Likewise.
4988 (gen_type_die_with_usage): Likewise.
4989 (gen_decl_die): Likewise.
4990 (dwarf2out_late_global_decl): Likewise.
4991 * expr.c (expand_assignment): Likewise.
4992 (emit_storent_insn): Likewise.
4993 (store_expr_with_bounds): Likewise.
4994 (store_expr): Likewise.
4995 (expand_expr_real_1): Likewise.
4996 * expr.h (store_expr_with_bounds): Likewise.
4997 * function.c (use_register_for_decl): Likewise.
4998 (struct bounds_parm_data): Likewise.
4999 (assign_parms_augmented_arg_list): Likewise.
5000 (assign_parm_find_entry_rtl): Likewise.
5001 (assign_parm_is_stack_parm): Likewise.
5002 (assign_parm_load_bounds): Likewise.
5003 (assign_bounds): Likewise.
5004 (assign_parms): Likewise.
5005 (expand_function_start): Likewise.
5006 * gcc.c (CHKP_SPEC): Likewise.
5007 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5008 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5009 (wrestrict_dom_walker::check_call): Likewise.
5010 * gimple.c (gimple_build_call_from_tree): Likewise.
5011 * gimple.h (enum gf_mask): Likewise.
5012 (gimple_call_with_bounds_p): Likewise.
5013 (gimple_call_set_with_bounds): Likewise.
5014 * gimplify.c (gimplify_init_constructor): Likewise.
5015 * ipa-cp.c (initialize_node_lattices): Likewise.
5016 (propagate_constants_across_call): Likewise.
5017 (find_more_scalar_values_for_callers_subset): Likewise.
5018 * ipa-hsa.c (process_hsa_functions): Likewise.
5019 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5020 * ipa-icf.c (sem_function::merge): Likewise.
5021 * ipa-inline.c (early_inliner): Likewise.
5022 * ipa-pure-const.c (warn_function_noreturn): Likewise.
5023 (warn_function_cold): Likewise.
5024 (propagate_pure_const): Likewise.
5025 * ipa-ref.h (enum GTY): Likewise.
5026 * ipa-split.c (find_retbnd): Likewise.
5027 (consider_split): Likewise.
5028 (split_function): Likewise.
5029 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5030 * ipa.c (walk_polymorphic_call_targets): Likewise.
5031 (symbol_table::remove_unreachable_nodes): Likewise.
5032 (process_references): Likewise.
5033 (cgraph_build_static_cdtor_1): Likewise.
5034 * lto-cgraph.c (lto_output_node): Likewise.
5035 (output_refs): Likewise.
5036 (compute_ltrans_boundary): Likewise.
5037 (input_overwrite_node): Likewise.
5038 (input_node): Likewise.
5039 (input_cgraph_1): Likewise.
5040 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5041 * passes.c (pass_manager::execute_early_local_passes): Likewise.
5042 (class pass_chkp_instrumentation_passes): Likewise.
5043 (make_pass_chkp_instrumentation_passes): Likewise.
5044 * passes.def: Likewise.
5045 * rtl.h (struct GTY): Likewise.
5046 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5047 * stor-layout.c (layout_type): Likewise.
5048 * symtab.c: Likewise.
5049 * target.def: Likewise.
5050 * targhooks.c (default_chkp_bound_type): Likewise.
5051 (default_chkp_bound_mode): Likewise.
5052 (default_builtin_chkp_function): Likewise.
5053 (default_chkp_function_value_bounds): Likewise.
5054 (default_chkp_make_bounds_constant): Likewise.
5055 (default_chkp_initialize_bounds): Likewise.
5056 * targhooks.h (default_chkp_bound_type): Likewise.
5057 (default_chkp_bound_mode): Likewise.
5058 (default_builtin_chkp_function): Likewise.
5059 (default_chkp_function_value_bounds): Likewise.
5060 (default_chkp_make_bounds_constant): Likewise.
5061 (default_chkp_initialize_bounds): Likewise.
5062 * toplev.c (compile_file): Likewise.
5063 (process_options): Likewise.
5064 * tree-core.h (DEF_BUILTIN): Likewise.
5065 (DEF_BUILTIN_CHKP): Likewise.
5066 * tree-inline.c (declare_return_variable): Likewise.
5067 (remap_gimple_stmt): Likewise.
5068 (copy_bb): Likewise.
5069 (initialize_inlined_parameters): Likewise.
5070 (expand_call_inline): Likewise.
5071 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5072 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5073 (make_pass_ipa_chkp_produce_thunks): Likewise.
5074 (make_pass_chkp): Likewise.
5075 (make_pass_chkp_opt): Likewise.
5076 (make_pass_chkp_instrumentation_passes): Likewise.
5077 * tree-pretty-print.c (dump_generic_node): Likewise.
5078 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5079 * tree-ssa-dce.c (propagate_necessity): Likewise.
5080 (eliminate_unnecessary_stmts): Likewise.
5081 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5082 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5083 * tree-ssa-sccvn.h: Likewise.
5084 * tree-ssa-strlen.c (get_string_length): Likewise.
5085 (valid_builtin_call): Likewise.
5086 (adjust_last_stmt): Likewise.
5087 (handle_builtin_strchr): Likewise.
5088 (handle_builtin_strcpy): Likewise.
5089 (handle_builtin_stxncpy): Likewise.
5090 (handle_builtin_memcpy): Likewise.
5091 (handle_builtin_strcat): Likewise.
5092 (strlen_check_and_optimize_stmt): Likewise.
5093 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5094 * tree-streamer-in.c: Likewise.
5095 * tree-streamer.c (record_common_node): Likewise.
5096 * tree.c (tree_code_size): Likewise.
5097 (wide_int_to_tree_1): Likewise.
5098 (type_contains_placeholder_1): Likewise.
5099 (build_common_tree_nodes): Likewise.
5100 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5101 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5102 (POINTER_BOUNDS_P): Likewise.
5103 (BOUNDED_TYPE_P): Likewise.
5104 (BOUNDED_P): Likewise.
5105 (CALL_WITH_BOUNDS_P): Likewise.
5106 (pointer_bounds_type_node): Likewise.
5107 * value-prof.c (gimple_ic): Likewise.
5108 * var-tracking.c (vt_add_function_parameters): Likewise.
5109 * varasm.c (make_decl_rtl): Likewise.
5110 (assemble_start_function): Likewise.
5111 (output_constant): Likewise.
5112 (maybe_assemble_visibility): Likewise.
5113 * varpool.c (ctor_for_folding): Likewise.
5114 * chkp-builtins.def: Remove.
5115 * ipa-chkp.c: Remove.
5116 * ipa-chkp.h: Remove.
5117 * rtl-chkp.c: Remove.
5118 * rtl-chkp.h: Remove.
5119 * tree-chkp-opt.c: Remove.
5120 * tree-chkp.c: Remove.
5121 * tree-chkp.h: Remove.
5123 2018-06-07 Carl Love <cel@us.ibm.com>
5125 * config/rs6000/vsx.md (vextract_fp_from_shorth,
5126 vextract_fp_from_shortl): Add BE support.
5128 2018-06-07 Paul Koning <ni1d@arrl.net>
5130 * compare-elim.c (try_merge_compare): Don't merge compare if
5131 address contains a side effect.
5132 (try_eliminate_compare): Likewise.
5134 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
5136 * config.gcc: Support "tremont".
5137 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5138 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5140 * config/i386/i386.c (m_TREMONT): Define.
5141 (processor_target_table): Add "tremont".
5142 (PTA_TREMONT): Define.
5143 (ix86_lea_outperforms): Add TARGET_TREMONT.
5144 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5145 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5146 and M_INTEL_GOLDMONT_PLUS.
5147 (fold_builtin_cpu): Add "tremont".
5148 (ix86_add_stmt_cost): Add TARGET_TREMONT.
5149 (ix86_option_override_internal): Add "tremont".
5150 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5151 (processor_type): Add PROCESSOR_TREMONT.
5152 * config/i386/x86-tune.def: Add m_TREMONT.
5153 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5155 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5157 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5158 symbol defined for msp430i* devices to be lower case.
5160 2018-06-07 Richard Biener <rguenther@suse.de>
5162 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5163 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
5164 Properly wrap signed arithmetic if overflow wraps.
5166 2018-06-07 Jakub Jelinek <jakub@redhat.com>
5168 PR tree-optimization/69615
5169 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5170 of a cast from a same precision integral SSA_NAME in a bb dominated
5171 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
5172 cast to utype if rhs2 has already a compatible type.
5174 2018-06-07 Richard Biener <rguenther@suse.de>
5176 PR tree-optimization/85935
5177 * graphite-scop-detection.c (find_params_in_bb): Analyze
5178 condition operands with respect to the correct loop. Assert
5179 the analysis doesn't fail.
5181 2018-06-04 Carl Love <cel@us.ibm.com>
5183 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5184 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
5185 as it is slightly cheaper.
5186 (first_match_or_eos_index_<mode>):
5187 Calculate index using natural element order.
5188 (first_match_index_<mode>):
5189 Calculate index using natural element order.
5190 (first_match_or_eos_index_<mode>):
5191 Calculate index using natural order.
5192 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5193 for BE and LE modes.
5194 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5195 P9V_BUILTIN_VCLZLSBB_V16QI.
5196 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5199 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5201 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5202 indentation and line wrap for many prototypes. Add missing
5203 @smallexample directives around block of prototypes for vec_xl and
5206 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
5208 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5209 track if we pass or return IEEE 128-bit floating point.
5210 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5211 C++ mangling that is compatible with GCC 8.1.
5212 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5213 (init_cumulative_args): Note if we pass or return IEEE 128-bit
5214 floating point types.
5215 (rs6000_function_arg_advance_1): Likewise.
5216 (rs6000_mangle_type): Optionally generate mangled names that match
5217 what GCC 8.1 generated for IEEE 128-bit floating point types.
5218 (rs6000_globalize_decl_name): If we have an external function that
5219 passes or returns IEEE 128-bit types, generate a weak reference
5220 from the mangled name used in GCC 8.1 to the current mangled
5222 (rs6000_init_builtins): Make __ibm128 use the long double type if
5223 long double is IBM extended double. Make __float128 use the long
5224 double type if long double is IEEE 128-bit.
5227 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5228 macro for __ibm128 built-in functions.
5229 (PACK_IF): Add __ibm128 pack/unpack functions.
5230 (UNPACK_IF): Likewise.
5231 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5232 enable long double built-in functions if long double is IEEE
5233 128-bit floating point.
5234 (rs6000_invalid_builtin): Update long double built-in function
5236 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5237 functions, adjust the built-in function to use the long double
5238 built-in function if __ibm128 and long double are the same type.
5239 * doc/extend.texi (PowerPC builtins): Update documention for
5240 __builtin_{,un}pack_longdouble. Add documentation for
5241 __builtin_{,un}pack_ibm128.
5243 2018-06-06 Jim Wilson <jimw@sifive.com>
5245 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5246 (struct machine_function): New field interrupt_mode.
5247 (riscv_handle_type_attribute): New function. Add forward declaration.
5248 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5249 (riscv_expand_epilogue): Check interrupt_mode field.
5250 (riscv_set_current_function): Check interrupt attribute args and
5251 set interrupt_mode field.
5252 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5253 (riscv_sret, riscv_uret): New.
5254 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5255 new arguments to interrupt attribute.
5257 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
5260 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5261 Don't handle -mcpu=power8 if -mpower9-vector is also used.
5263 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5265 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5266 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5267 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5268 several redundant entries.
5270 2018-06-06 David Malcolm <dmalcolm@redhat.com>
5272 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5273 type from "rtx" to "rtx_insn *".
5274 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5275 for local "call_insn", removing cast.
5276 (ix86_expand_call): Likewise, introducing a "call_insn" local.
5278 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
5280 PR tree-optimization/86066
5281 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5282 for BIT_INSERT_EXPR stores.
5284 2018-06-06 Richard Biener <rguenther@suse.de>
5286 PR tree-optimization/86062
5287 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5288 component refs ontop
5289 of to be offsetted base.
5291 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5293 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5294 to be static and remove check on interrupt attribute name.
5296 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
5298 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5299 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5301 2018-06-05 Steve Ellcey <sellcey@cavium.com>
5304 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5306 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5307 Remove second argument, change how error is called.
5308 (aarch64_layout_arg): Remove second argument from
5309 aarch64_err_no_fpadvsimd call.
5310 (aarch64_init_cumulative_args): Ditto.
5311 (aarch64_gimplify_va_arg_expr): Ditto.
5312 * config/aarch64/aarch64.md (mov<mode>): Ditto.
5314 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
5316 * config/i386/i386.md (simple_return_indirect_internal): New expander.
5317 (*simple_return_indirect_internal<mode>): Rename from
5318 simple_return_indirect_internal. Use W mode iterator.
5319 (rstorssp): New expander.
5320 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
5321 (clrssbsy): New expander.
5322 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
5324 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
5326 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5328 (cmse_check_pointed_object): Likewise.
5330 2018-06-05 Martin Liska <mliska@suse.cz>
5332 PR gcov-profile/47618
5333 * doc/invoke.texi: Document how -fprofile-dir format
5336 2018-06-05 Richard Biener <rguenther@suse.de>
5338 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5339 removal pretend DOM info isn't available so we do not update
5340 it and only remove edges, not dominated blocks. Actually free
5341 DOM info in case we removed something. Remove unreachable blocks.
5342 (mfb_keep_latches): Work with either DOM info or marked backedges.
5343 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5344 first. Mark backedges if DOM info isn't available.
5345 (Re-)compute DOM info after cleanup_control_flow_pre.
5347 2018-06-05 Richard Biener <rguenther@suse.de>
5349 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5350 (locus_discrim_hasher::hash): Adjust.
5351 (locus_discrim_hasher::equal): Likewise.
5352 (next_discriminator_for_locus): Work on line directly.
5353 (same_line_p): Pass in expanded locus1 as well.
5354 (assign_discriminators): Avoid redundant location expansions.
5356 2018-06-05 Richard Biener <rguenther@suse.de>
5358 PR tree-optimization/86046
5359 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5360 if required after clearing TREE_ADDRESSABLE.
5362 2018-06-05 Richard Biener <rguenther@suse.de>
5364 PR tree-optimization/86047
5365 * tree-ssa-loop.c (for_each_index): Glob handling of all
5366 decls and constants and really handle all of them.
5368 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5371 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5372 qualifier_void_pointer and qualifier_const_void_pointer.
5373 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5374 (arm_init_builtins): Handle the above.
5375 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5376 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5377 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5380 2018-06-05 Martin Liska <mliska@suse.cz>
5382 * auto-profile.c (read_autofdo_file): Do not use
5383 gcov_ctr_summary struct.
5384 (afdo_callsite_hot_enough_for_early_inline): Likewise.
5385 * coverage.c (struct counts_entry): Likewise.
5386 (read_counts_file): Read just single summary entry.
5387 (get_coverage_counts): Use gcov_summary struct.
5388 * coverage.h (get_coverage_counts): Likewise.
5389 * gcov-dump.c (dump_working_sets): Likewise.
5390 (tag_summary): Dump just single summary.
5391 * gcov-io.c (gcov_write_summary): Write just histogram
5393 (gcov_read_summary): Read just single summary.
5394 (compute_working_sets): Use gcov_summary struct.
5395 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5396 of GCOV_COUNTERS_SUMMABLE.
5397 (GCOV_COUNTERS_SUMMABLE): Remove.
5398 (GCOV_FIRST_VALUE_COUNTER): Replace with
5399 GCOV_COUNTER_V_INTERVAL.
5400 (struct gcov_ctr_summary): Remove.
5401 (struct gcov_summary): Directly use fields of former
5403 (compute_working_sets): Use gcov_summary struct.
5404 * gcov.c (read_count_file): Do not use ctrs fields.
5405 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5407 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5409 * profile.c: Likewise.
5410 * profile.h: Likewise.
5412 2018-06-05 Martin Liska <mliska@suse.cz>
5414 PR gcov-profile/84846
5415 * gcov.c (output_lines): Print working directory only
5416 in intermediate format.
5418 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
5420 * config/s390/s390-builtin-types.def: Add void function type.
5421 * config/s390/s390-builtins.def: Use the function type for the
5424 2018-06-04 Jim Wilson <jimw@sifive.com>
5426 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5428 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5429 and maybe_eh_return. Change regno to unsigned int. Use new args to
5430 handle EH_RETURN_DATA_REGNO registers properly.
5431 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5432 (riscv_expand_epilogue): Update comment. Change argument name and
5433 type. Update code to use new name and type. Pass new args to
5434 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
5436 * config/riscv/riscv.md (NORMAL_RETURN): New.
5437 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5438 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5439 (eh_return): Call gen_eh_return_internal and emit barrier.
5440 (eh_return_internal): Call riscv_expand_epilogue.
5442 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
5444 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5445 bit_insertion field and declare can_be_merged_into method.
5446 (merged_store_group::can_be_merged_into): New method.
5447 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5448 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
5449 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5451 2018-06-04 Richard Biener <rguenther@suse.de>
5453 PR tree-optimization/85955
5454 * builtins.c (fold_builtin_sincos): Convert pointers to
5455 destination to appropriate type before dereferencing.
5457 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
5459 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5461 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
5463 * expr.c (expand_expr_real_1): Force the operand into memory if
5464 its TYPE_MODE is BLKmode and if there is no integer mode for
5465 the number of bits being extracted.
5467 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5471 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5472 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5474 2018-06-04 Richard Biener <rguenther@suse.de>
5476 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5477 (cleanup_tree_cfg_noloop): ... single caller. Do
5478 start_recording_case_labels later.
5480 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
5482 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5483 to _IMMINTRIN_H_INCLUDED.
5484 * config/i386/pconfigintrin.h: Ditto.
5485 * config/i386/waitpkgintrin.h: Ditto.
5486 * config/i386/immintrin.h: Add includes for sgxintrin.h,
5487 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5488 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5489 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5490 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5491 waitpkgintrin.h and cldemoteintrin.h.
5493 2018-06-04 Richard Biener <rguenther@suse.de>
5495 PR tree-optimization/86038
5496 * tracer.c (find_best_successor): Check probability for
5497 being initialized, bail out if not.
5499 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
5502 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5503 of bits to ignore when comparing architectures.
5505 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5507 PR tree-optimization/69615
5508 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5509 maximum or minimum of the type, try to merge it also as if
5510 range1 is + [-, x - 1] or + [x + 1, -].
5513 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5515 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
5517 PR tree-optimization/86034
5518 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5519 the unsigned bitfield type in a bit insertion sequence if it does not
5520 have a larger precision than the bitfield size.
5521 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5523 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
5525 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5527 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5529 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5530 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5531 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5532 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5534 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5536 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5537 Disable -fdelete-null-pointer-checks for ELF toolchain.
5539 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5540 Kito Cheng <kito.cheng@gmail.com>
5542 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5543 (nds32le-*-*, nds32be-*-*): Integrate checking process.
5544 (nds32*-*-*): Add glibc and uclibc conditions.
5545 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5546 (TARGET_EXCEPT_UNWIND_INFO): Define.
5547 * config/nds32/elf.h: New file.
5548 * config/nds32/linux.h: New file.
5549 * config/nds32/nds32-elf.opt: New file.
5550 * config/nds32/nds32-linux.opt: New file.
5551 * config/nds32/nds32-fp-as-gp.c
5552 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5553 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5555 (nds32_asm_file_end): Ditto.
5556 (nds32_print_operand): Ditto.
5557 (nds32_insert_attributes): Ditto.
5558 (nds32_init_libfuncs): New function.
5559 (TARGET_HAVE_TLS): Define.
5560 (TARGET_INIT_LIBFUNCS): Define.
5561 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5563 (TARGET_ELF): Apply different mcmodel setting.
5564 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5565 been migrated into elf.h and linux.h files.
5566 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5567 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5568 (mcmodel): The content has been migrated into nds32-elf.opt and
5569 nds32-linux.opt files.
5570 * config/nds32/t-elf: New file.
5571 * config/nds32/t-linux: New file.
5573 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5574 Shiva Chen <shiva0217@gmail.com>
5576 * config/nds32/constants.md (unspec_volatile_element): Add
5577 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5578 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5580 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5581 (make_pass_nds32_fp_as_gp): Declare.
5582 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5584 (nds32_asm_function_end_prologue): Remove unused asm output.
5585 (nds32_asm_function_begin_epilogue): Remove unused asm output.
5586 (nds32_asm_file_start): Output necessary fp_as_gp information.
5587 (nds32_option_override): Adjust register usage.
5588 (nds32_expand_prologue): Consider fp_as_gp situation.
5589 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5590 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5593 (simple_return): Ditto.
5594 (omit_fp_begin): Output special directive for fp_as_gp.
5595 (omit_fp_end): Output special directive for fp_as_gp.
5596 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5597 mforbid-fp-as-gp): New options.
5599 2018-06-01 Mark Wielaard <mark@klomp.org>
5601 * dwarf2out.c (dwarf2out_finish): Remove generation of
5602 DW_AT_loclists_base.
5604 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5606 * gimple-ssa-store-merging.c: Include gimple-fold.h.
5607 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5608 (struct merged_store_group): Add bit_insertion field.
5609 (dump_char_array): Use standard hexadecimal format.
5610 (merged_store_group::merged_store_group): Set bit_insertion to false.
5611 (merged_store_group::apply_stores): Use optimal buffer size. Deal
5612 with BIT_INSERT_EXPR stores. Move up code updating the mask and
5613 also print the mask in the dump file.
5614 (pass_store_merging::gate): Minor tweak.
5615 (imm_store_chain_info::coalesce_immediate): Fix wrong association
5616 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
5617 stores with INTEGER_CST stores.
5618 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5619 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5620 and use it throughout. Generate bit insertion sequences if need be.
5621 (pass_store_merging::process_store): Remove redundant condition.
5622 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5624 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
5626 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5627 the 128-bit floating point types. Fix function comment.
5629 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5631 * config/aarch64/aarch64-simd.md
5632 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5634 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5637 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5639 PR tree-optimization/85989
5640 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5642 (backprop::intersect_uses): Check it when deciding whether this
5643 is a backedge reference.
5644 (backprop::process_block): Add each phi to m_visited_phis
5645 after visiting it, then clear it at the end.
5647 2018-06-01 Richard Biener <rguenther@suse.de>
5649 * tree-vectorizer.h (vect_dr_stmt): New function.
5650 (vect_get_load_cost): Adjust.
5651 (vect_get_store_cost): Likewise.
5652 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5653 Use vect_dr_stmt instead of DR_SMTT.
5654 (vect_record_base_alignments): Likewise.
5655 (vect_calculate_target_alignment): Likewise.
5656 (vect_compute_data_ref_alignment): Likewise and make static.
5657 (vect_update_misalignment_for_peel): Likewise.
5658 (vect_verify_datarefs_alignment): Likewise.
5659 (vector_alignment_reachable_p): Likewise.
5660 (vect_get_data_access_cost): Likewise. Pass down
5661 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5662 (vect_get_peeling_costs_all_drs): Likewise.
5663 (vect_peeling_hash_get_lowest_cost): Likewise.
5664 (vect_enhance_data_refs_alignment): Likewise.
5665 (vect_find_same_alignment_drs): Likewise.
5666 (vect_analyze_data_refs_alignment): Likewise.
5667 (vect_analyze_group_access_1): Likewise.
5668 (vect_analyze_group_access): Likewise.
5669 (vect_analyze_data_ref_access): Likewise.
5670 (vect_analyze_data_ref_accesses): Likewise.
5671 (vect_vfa_segment_size): Likewise.
5672 (vect_small_gap_p): Likewise.
5673 (vectorizable_with_step_bound_p): Likewise.
5674 (vect_prune_runtime_alias_test_list): Likewise.
5675 (vect_analyze_data_refs): Likewise.
5676 (vect_supportable_dr_alignment): Likewise.
5677 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5678 (vect_gen_prolog_loop_niters): Likewise.
5679 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5680 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5682 (vect_recog_mask_conversion_pattern): Likewise.
5683 (vect_try_gather_scatter_pattern): Likewise.
5684 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5685 to vect_get_store_cost.
5686 (vect_get_store_cost): Get stmt_info instead of DR.
5687 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5688 (vect_get_load_cost): Get stmt_info instead of DR.
5690 2018-06-01 Richard Biener <rguenther@suse.de>
5693 * gimple-fold.c (var_decl_component_p): Also allow offsetted
5694 vars wrapped in MEM_REFs.
5696 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5698 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5699 Fix subreg tests so that we only return a choice between
5700 GENERAL_REGS and FP_REGS if the original classes included both.
5702 2018-06-01 Richard Biener <rguenther@suse.de>
5705 * tree-ssa-structalias.c (get_function_part_constraint):
5706 Handle NULL fi->decl.
5707 (find_func_aliases_for_call): Properly handle indirect
5708 fi from direct call.
5709 (find_func_clobbers): Likewise.
5710 (ipa_pta_execute): Likewise.
5711 (create_variable_info_for): For functions that are ifunc_resolver
5712 resolve to a varinfo that contains the result of the resolver call.
5713 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5716 2018-05-31 Michael Collison <michael.collison@arm.com>
5718 * config/aarch64/aarch64.md:
5719 (*fix_to_zero_extenddfdi2): New pattern.
5720 * gcc.target/aarch64/fix_extend1.c: New testcase.
5722 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
5726 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5727 and BUILT_IN_STRNCMP_EQ.
5728 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5729 BUILT_IN_STRNCMP_EQ.
5730 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5731 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5732 (gimple_fold_builtin): Likewise.
5733 * tree-ssa-strlen.c (compute_string_length): New function.
5734 (determine_min_obsize): New function.
5735 (handle_builtin_string_cmp): New function to handle calls to
5736 string compare functions.
5737 (strlen_optimize_stmt): Add handling to builtin string compare
5739 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5740 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5741 * tree.c (build_common_builtin_nodes): Add new defines of
5742 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5744 2018-05-31 Jakub Jelinek <jakub@redhat.com>
5747 * bb-reorder.c (pass_partition_blocks::gate): Return false for
5748 functions with naked attribute.
5750 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5752 * config/i386/sse.md (avx_vec_concat<mode>):
5753 Substitute concat_tg_mode mode attribute with xtg_mode.
5754 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5755 (concat_tg_mode): Remove mode attribute.
5757 2018-05-31 Martin Sebor <msebor@redhat.com>
5760 * calls.c (alloc_max_size): Correct a logic error/typo.
5761 Treat excessive arguments as infinite. Warn for invalid arguments.
5762 * doc/invoke.texi (-Walloc-size-larger-than): Update.
5764 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
5767 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5768 and movx for Haswell.
5770 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
5771 Cesar Philippidis <cesar@codesourcery.com>
5774 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5775 when emitting error on private/firstprivate reductions.
5776 * omp-low.c (lower_omp_target): Avoid reference-type processing
5777 on pointers for firstprivate clause.
5779 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5781 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5784 * config/aarch64/aarch64-simd.md
5785 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5786 (aarch64_ld1_x3_<mode>): Likewise
5787 (aarch64_st1x2<VALLDIF:mode>): Likewise
5788 (aarch64_st1_x2_<mode>): Likewise
5789 (aarch64_st1x3<VALLDIF:mode>): Likewise
5790 (aarch64_st1_x3_<mode>): Likewise
5791 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5792 (vld1_s8_x3): Likewise.
5793 (vld1_u16_x3): Likewise.
5794 (vld1_s16_x3): Likewise.
5795 (vld1_u32_x3): Likewise.
5796 (vld1_s32_x3): Likewise.
5797 (vld1_u64_x3): Likewise.
5798 (vld1_s64_x3): Likewise.
5799 (vld1_f16_x3): Likewise.
5800 (vld1_f32_x3): Likewise.
5801 (vld1_f64_x3): Likewise.
5802 (vld1_p8_x3): Likewise.
5803 (vld1_p16_x3): Likewise.
5804 (vld1_p64_x3): Likewise.
5805 (vld1q_u8_x3): Likewise.
5806 (vld1q_s8_x3): Likewise.
5807 (vld1q_u16_x3): Likewise.
5808 (vld1q_s16_x3): Likewise.
5809 (vld1q_u32_x3): Likewise.
5810 (vld1q_s32_x3): Likewise.
5811 (vld1q_u64_x3): Likewise.
5812 (vld1q_s64_x3): Likewise.
5813 (vld1q_f16_x3): Likewise.
5814 (vld1q_f32_x3): Likewise.
5815 (vld1q_f64_x3): Likewise.
5816 (vld1q_p8_x3): Likewise.
5817 (vld1q_p16_x3): Likewise.
5818 (vld1q_p64_x3): Likewise.
5819 (vst1_s64_x2): Likewise.
5820 (vst1_u64_x2): Likewise.
5821 (vst1_f64_x2): Likewise.
5822 (vst1_s8_x2): Likewise.
5823 (vst1_p8_x2): Likewise.
5824 (vst1_s16_x2): Likewise.
5825 (vst1_p16_x2): Likewise.
5826 (vst1_s32_x2): Likewise.
5827 (vst1_u8_x2): Likewise.
5828 (vst1_u16_x2): Likewise.
5829 (vst1_u32_x2): Likewise.
5830 (vst1_f16_x2): Likewise.
5831 (vst1_f32_x2): Likewise.
5832 (vst1_p64_x2): Likewise.
5833 (vst1q_s8_x2): Likewise.
5834 (vst1q_p8_x2): Likewise.
5835 (vst1q_s16_x2): Likewise.
5836 (vst1q_p16_x2): Likewise.
5837 (vst1q_s32_x2): Likewise.
5838 (vst1q_s64_x2): Likewise.
5839 (vst1q_u8_x2): Likewise.
5840 (vst1q_u16_x2): Likewise.
5841 (vst1q_u32_x2): Likewise.
5842 (vst1q_u64_x2): Likewise.
5843 (vst1q_f16_x2): Likewise.
5844 (vst1q_f32_x2): Likewise.
5845 (vst1q_f64_x2): Likewise.
5846 (vst1q_p64_x2): Likewise.
5847 (vst1_s64_x3): Likewise.
5848 (vst1_u64_x3): Likewise.
5849 (vst1_f64_x3): Likewise.
5850 (vst1_s8_x3): Likewise.
5851 (vst1_p8_x3): Likewise.
5852 (vst1_s16_x3): Likewise.
5853 (vst1_p16_x3): Likewise.
5854 (vst1_s32_x3): Likewise.
5855 (vst1_u8_x3): Likewise.
5856 (vst1_u16_x3): Likewise.
5857 (vst1_u32_x3): Likewise.
5858 (vst1_f16_x3): Likewise.
5859 (vst1_f32_x3): Likewise.
5860 (vst1_p64_x3): Likewise.
5861 (vst1q_s8_x3): Likewise.
5862 (vst1q_p8_x3): Likewise.
5863 (vst1q_s16_x3): Likewise.
5864 (vst1q_p16_x3): Likewise.
5865 (vst1q_s32_x3): Likewise.
5866 (vst1q_s64_x3): Likewise.
5867 (vst1q_u8_x3): Likewise.
5868 (vst1q_u16_x3): Likewise.
5869 (vst1q_u32_x3): Likewise.
5870 (vst1q_u64_x3): Likewise.
5871 (vst1q_f16_x3): Likewise.
5872 (vst1q_f32_x3): Likewise.
5873 (vst1q_f64_x3): Likewise.
5874 (vst1q_p64_x3): Likewise.
5876 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5878 * config/msp430/msp430.c (msp430_output_labelref): Prepend
5879 user_label_prefix to name.
5881 * tree-core.h: Update comment about the format of NAME string
5882 passed to handler in attribute_spec.
5884 * config/msp430/msp430.md: Remove erroneous subreg expression from
5885 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5886 zero_extend{q,h}isi2.
5888 2018-05-30 Borislav Petkov <bp@suse.de>
5890 * doc/extend.texi: Document some architecture specific
5891 constraints and sort entries.
5893 2018-05-30 Martin Sebor <msebor@redhat.com>
5896 * builtins.c (expand_builtin_stpcpy_1): New function.
5897 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5898 only if the former succeeds.
5900 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5902 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5905 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5907 * doc/invoke.texi (-flinker-output): Document
5909 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5911 * passes.c (ipa_write_summaries): Only modify statements if body
5913 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5914 incrementally linking.
5915 (ipa_passes): Likewise.
5916 * lto-cgraph.c (lto_output_node): When incrementally linking do not
5917 pass down resolution info.
5918 * common.opt (flag_incremental_link): Update info.
5919 * gcc.c (plugin specs): Turn flinker-output=* to
5920 -plugin-opt=-linker-output-known
5921 * toplev.c (compile_file): Also cut compilation when doing incremental
5923 * flag-types. (enum lto_partition_model): Add
5924 LTO_LINKER_OUTPUT_NOLTOREL.
5925 (invoke.texi): Add -flinker-output docs.
5926 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5927 link same way as WPA; do not stream in dead initializers.
5929 * dwarf2out.c (dwarf2out_die_ref_for_decl,
5930 darf2out_register_external_decl): Support incremental link.
5932 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5934 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5936 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5938 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5939 it down to simple_object_copy_lto_debug_sections.
5940 (run_gcc): Determine incremental LTO link time and configure
5941 lto1 into non-wpa mode, disable renaming of debug sections.
5943 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
5945 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5946 descriptions of various incorrectly documented functions.
5948 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
5951 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5952 address check not strict.
5954 2018-05-30 Richard Biener <rguenther@suse.de>
5956 PR tree-optimization/85964
5957 * tracer.c (better_p): Drop initialized count check, we only
5958 call the function with initialized counts now.
5959 (find_best_successor): Do find a best edge if one
5960 has uninitialized count.
5961 (find_best_predecessor): Likewise. Do BB frequency check only
5962 if count is initialized.
5964 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
5966 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5967 (aarch64_ldrstr_offset_compare): New.
5968 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5969 load/store orderings.
5970 (aarch64_gen_adjusted_ldpstp): Likewise.
5972 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
5974 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5975 Check for subset of GENERAL_REGS and FP_REGS.
5976 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5979 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
5981 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5982 and wi::to_poly_offset. Add the current offset and then check
5983 whether the sum fits, rather than using an unchecked addition of
5984 a checked term. Check for a shwi rather than a uhwi.
5985 * expr.c (get_bit_range): Use tree_to_poly_uint64.
5986 (store_constructor): Use poly_int_tree_p.
5987 (expand_expr_real_1): Likewise.
5988 * function.c (assign_temp): Likewise.
5989 * fold-const.c (const_binop): Use poly_int_tree_p and
5991 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
5993 * ipa-icf-gimple.c (func_checker::compare_operand): Use
5994 to_poly_offset for MEM offsets.
5995 * ipa-icf.c (sem_variable::equals): Likewise.
5996 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5997 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5998 wi::to_poly_offset for BIT_FIELD_REF offsets.
5999 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6001 * var-tracking.c (emit_note_insn_var_location): Use
6002 tree_to_poly_uint64.
6004 2018-05-29 Jim Wilson <jimw@sifive.com>
6006 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6008 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
6011 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6012 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6014 (sse4_1_round<mode>2): Use nonimmediate_operand
6015 for operand 1 predicate.
6017 2018-05-29 Martin Sebor <msebor@redhat.com>
6018 Richard Biener <rguenther@suse.de>
6021 * calls.c (get_size_range): Call determine_value_range instead
6022 of get_value_range..
6023 * tree-vrp.h (determine_value_range): Declared new function.
6024 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6026 2018-05-29 Richard Biener <rguenther@suse.de>
6028 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6029 sure to use non-pattern stmts for get_earlier_stmt arguments.
6030 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6031 called on pattern stmts.
6032 (get_later_stmt): Likewise.
6034 2018-05-29 Martin Liska <mliska@suse.cz>
6036 PR gcov-profile/85759
6037 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6040 2018-05-29 Jakub Jelinek <jakub@redhat.com>
6042 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6044 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6048 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6049 VEC_PACK_FLOAT_EXPR): New tree codes.
6050 * tree-pretty-print.c (op_code_prio): Handle
6051 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6052 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6053 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6054 * tree-inline.c (estimate_operator_cost): Likewise.
6055 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6056 * fold-const.c (const_binop): Likewise.
6057 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6058 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6059 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6060 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6061 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6062 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6063 * expr.c (expand_expr_real_2): Likewise.
6064 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6065 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6066 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6068 * optabs.c (expand_widen_pattern_expr): For
6069 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6070 sign from result type rather than operand's type.
6071 (expand_binop_directly): For vec_packu_float_optab and
6072 vec_packs_float_optab allow result type to be different from operand's
6074 * optabs-tree.c (optab_for_tree_code): Handle
6075 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6076 VEC_PACK_FLOAT_EXPR. Formatting fixes.
6077 * tree-vect-generic.c (expand_vector_operations_1): Handle
6078 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6079 VEC_PACK_FLOAT_EXPR.
6080 * tree-vect-stmts.c (supportable_widening_operation): Handle
6082 (supportable_narrowing_operation): Handle FLOAT_EXPR.
6083 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6084 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6085 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
6086 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6088 (vec_pack<floatprefix>_float_<mode>): New expander.
6089 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6091 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6092 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6093 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6094 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6095 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6097 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6098 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6099 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6100 VEC_PACK_FLOAT_EXPR): Document.
6102 2018-05-29 Richard Biener <rguenther@suse.de>
6104 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6106 (stmt_vec_info_vec): Make pointer.
6107 (init_stmt_vec_info_vec): Remove.
6108 (free_stmt_vec_info_vec): Likewise.
6109 (set_stmt_vec_info_vec): New function.
6110 (free_stmt_vec_infos): Likewise.
6111 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6112 (set_vinfo_for_stmt): Likewise.
6113 (get_earlier_stmt): Likewise.
6114 (get_later_stmt): Likewise.
6115 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6116 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6117 (vec_info::~vec_info): Free stmt_vec_infos.
6118 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6119 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6120 (pass_slp_vectorize::execute): Likewise.
6121 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6122 (free_stmt_vec_info_vec): Likewise.
6123 (set_stmt_vec_info_vec): New function.
6124 (free_stmt_vec_infos): Likewise.
6125 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6126 the global stmt_vec_info_vec.
6127 * tree-parloops.c (gather_scalar_reductions): Use
6128 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6131 2018-05-29 Richard Biener <rguenther@suse.de>
6133 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6135 2018-05-29 Martin Liska <mliska@suse.cz>
6136 David Malcolm <dmalcolm@redhat.com>
6138 * vec.c (test_reverse): New.
6139 (vec_c_tests): Add new test.
6140 * vec.h (vl_ptr>::reverse): New function.
6142 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
6144 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6146 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6149 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
6151 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6153 2018-05-28 Richard Biener <rguenther@suse.de>
6155 PR tree-optimization/85933
6156 * tree-vect-data-refs.c (vect_record_base_alignments): Only
6157 look at stmts marked as vectorizable.
6159 2018-05-28 Richard Biener <rguenther@suse.de>
6161 PR tree-optimization/85934
6162 * tree-vect-generic.c (expand_vector_operations_1): Hoist
6163 vector boolean check before scalar optimization.
6165 2018-05-28 Jakub Jelinek <jakub@redhat.com>
6167 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6170 2018-05-28 Mark Wielaard <mark@klomp.org>
6172 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6173 if it is an expression containing a minus sign.
6175 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
6177 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6179 2018-05-27 Paul Koning <ni1d@arrl.net>
6181 * config/pdp11/pdp11.md (truncsihi2): Remove.
6183 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
6184 Chung-Ju Wu <jasonwucj@gmail.com>
6186 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6188 (unaligned_store_dw): Ditto.
6189 * config/nds32/nds32-memory-manipulation.c
6190 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6191 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6192 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6193 (emit_setmem_word_loop): Rename to ...
6194 (emit_setmem_doubleword_loop): ... this.
6195 (nds32_gen_dup_4_byte_to_word_value): New function.
6196 (nds32_gen_dup_8_byte_to_double_word_value): New function.
6197 (nds32_expand_setmem_loop): Refine implementation.
6198 (nds32_expand_setmem_loop_v3m): Ditto.
6199 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6202 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6204 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6206 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6208 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6209 (nds32_init_machine_status): Initialize machine->attr_naked_p and
6210 machine->attr_no_prologue_p.
6211 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6212 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6213 (nds32_expand_epilogue): Consider attr_naked_p.
6214 (nds32_expand_epilogue_v3pop): Likewise.
6215 (nds32_can_use_return_insn): Likewise.
6216 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6217 attr_no_prologue_p fields.
6218 * config/nds32/nds32.opt (mret-in-naked-func): New option.
6220 2018-05-27 Jakub Jelinek <jakub@redhat.com>
6223 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6225 * config/i386/sse.md
6226 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6228 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6230 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6232 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6234 (*<floatsuffix>floatv2div2sf2): Rename to ...
6235 (*float<floatunssuffix>v2div2sf2): ... this.
6236 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6237 (float<floatunssuffix>v2div2sf2_mask): ... this.
6238 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6239 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6240 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6242 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6244 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6246 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6248 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6250 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6252 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6253 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6254 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6255 gen_ufix_truncv8dfv8si2.
6256 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6257 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6258 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6259 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6260 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6261 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6262 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6263 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6265 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6269 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6271 2018-05-25 Jim Wilson <jimw@sifive.com>
6273 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6274 * config/riscv/riscv.c (struct machine_function): Add
6275 interrupt_handler_p and attribute_checked_p fields.
6276 (riscv_attribute_table): Add interrupt.
6277 (riscv_interrupt_type_p): New.
6278 (riscv_save_reg_p): Save extra regs for interrupt handler.
6279 (riscv_use_save_libcall): Return false for interrupt handler.
6280 (riscv_first_stack_step): Add forward declaration.
6281 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
6282 for interrupt handler with large frame. Use it for saved reg list.
6283 (riscv_expand_prologue): Move flag_stack_usage_info support to
6284 eliminate duplication.
6285 (riscv_expand_epilogue): Generate mret for interrupt handler.
6286 (riscv_epilogue_uses): New.
6287 (riscv_can_use_return_insn): Return false for interrupt handler.
6288 (riscv_function_ok_for_sibcall): Likewise.
6289 (riscv_set_current_function): Add interrupt handler support.
6290 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6291 * config/riscv/riscv.md (UNSPECV_MRET): New.
6293 (riscv_frflags, riscv_fsflags): Use tab after opcode.
6295 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6297 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
6299 PR tree-optimization/85712
6300 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6301 this candidate has already been replaced in-situ by a copy.
6303 2018-05-25 Jason Merrill <jason@redhat.com>
6305 PR c++/80485 - inline function non-zero address.
6306 * symtab.c (nonzero_address): Check DECL_COMDAT.
6308 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
6311 * config/alpha/alpha.md (ashlsi3): New insn pattern.
6312 (*ashlsi_se): Rename from *ashldi_se. Define as sign
6313 extension of SImode operation. Use const123_operand predicate.
6314 (*saddsi_1): Remove.
6315 (*saddl_se_1): Ditto.
6317 (*ssubl_se_1): Ditto.
6318 * config/alpha/predicates.md (const123_operand): New predicate.
6319 * config/alpha/constraints.md (P): Use IN_RANGE.
6321 2018-05-25 Richard Biener <rguenther@suse.de>
6323 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6325 (ref_maybe_used_by_stmt_p): Likewise.
6326 (stmt_may_clobber_ref_p): Likewise.
6327 (stmt_may_clobber_ref_p_1): Likewise.
6328 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6330 (ref_maybe_used_by_stmt_p): Likewise.
6331 (stmt_may_clobber_ref_p): Likewise.
6332 (stmt_may_clobber_ref_p_1): Likewise.
6333 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6334 the alias oracle to disambiguate DRs with stmts DR analysis
6336 (vect_analyze_data_refs): Do not give up on not analyzable
6337 DRs for BB vectorization. Remove code truncating the dataref
6340 2018-05-25 Jakub Jelinek <jakub@redhat.com>
6343 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6344 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
6345 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6347 2018-05-25 Richard Biener <rguenther@suse.de>
6349 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6350 function, combining stmt data ref gathering and fatal analysis
6352 (vect_analyze_data_refs): Remove now redudnant code and simplify.
6353 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6354 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6355 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6356 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6358 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6360 PR tree-optimization/85720
6361 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6362 SCC if all partitions are builtins.
6363 (version_loop_by_alias_check): New parameter. Generate cancelable
6364 runtime alias check if all partitions are builtins.
6365 (distribute_loop): Update call to above function.
6367 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6369 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6370 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6371 (parm_default_def_partition_arg): Ditto.
6372 (set_parm_default_def_partition): Ditto.
6373 (get_parm_default_def_partitions): Ditto and make it static.
6374 (get_undefined_value_partitions): Ditto and make it static.
6375 (remove_ssa_form): Refactor call to init_var_map here.
6376 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6377 computation for loop region.
6378 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6379 (register_default_def): Delete.
6380 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6381 (parm_default_def_partition_arg): Ditto.
6382 (set_parm_default_def_partition): Ditto.
6383 (get_parm_default_def_partitions): Ditto and make it static.
6384 (get_undefined_value_partitions): Ditto and make it static.
6385 (coalesce_with_default, coalesce_with_default): Update comment.
6386 (create_coalesce_list_for_region): New func factored out from
6387 create_outofssa_var_map.
6388 (populate_coalesce_list_for_outofssa): New func factored out from
6389 create_outofssa_var_map and coalesce_ssa_name.
6390 (create_outofssa_var_map): Delete.
6391 (coalesce_ssa_name): Refactor to support live range computation.
6392 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6393 (get_parm_default_def_partitions): Delete.
6394 (get_undefined_value_partitions): Ditto.
6395 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6396 computation for loop region.
6397 (new_tree_live_info, loe_visit_block): Ditto.
6398 (live_worklist, set_var_live_on_entry): Ditto.
6399 (calculate_live_on_exit, verify_live_on_entry): Ditto.
6400 * tree-ssa-live.h (struct _var_map): New fields.
6401 (init_var_map): Change decl.
6402 (region_contains_p): New.
6404 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6406 * tree-ssa-live.h (live_merge_and_clear): Delete.
6408 2018-05-25 Richard Biener <rguenther@suse.de>
6411 * tree-dump.c (dequeue_and_dump): Remove access to removed
6412 operand 2 of a SWITCH_EXPR.
6414 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6416 * doc/sourcebuild.texi (vect_double_cond_arith): Include
6417 multiplication and division.
6418 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6419 (cond_udiv@var{m}, cond_umod@var{m}): Document.
6420 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6421 (cond_udiv_optab, cond_umod_optab): New optabs.
6422 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6423 (IFN_COND_RDIV): New internal functions.
6424 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6425 TRUNC_MOD_EXPR and RDIV_EXPR.
6426 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6427 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6429 (SVE_INT_BINARY): Include mult.
6430 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6431 (optab, sve_int_op): Handle mult.
6432 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6434 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6435 for SVE_INT_BINARY_SD.
6437 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6439 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6440 (optab, sve_int_op): Handle div and udiv.
6441 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6442 for SVE_INT_BINARY_SD.
6443 (*<optab><mode>3): New insn for the same.
6445 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6447 * tree-vect-patterns.c: Include predict.h.
6448 (vect_recog_divmod_pattern): Restrict check for division support
6449 to when optimizing for size.
6451 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6453 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6454 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6455 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6456 (gimple_match_op::set_op): Likewise.
6457 (gimple_resimplify4): Declare.
6458 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6459 (expr::gen_transform): Likewise.
6460 (decision_tree::gen): Generate a simplification routine for 4 operands.
6461 * gimple-match-head.c (gimple_simplify): Add an overload for
6462 4 operands. In the top-level function, handle up to 4 call
6463 arguments and call gimple_resimplify4.
6464 (gimple_resimplify4): New function.
6465 (build_call_internal): Pass a fourth operand.
6466 (maybe_push_to_seq): Likewise.
6467 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6468 Fold VEC_COND_EXPRs of an operation and a default value into
6469 an IFN_COND_* function if possible.
6470 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6472 (SVE_COND_FP_BINARY): Include them.
6473 (optab, sve_fp_op): Handle them.
6474 (SVE_INT_BINARY_REV): New code iterator.
6475 (SVE_COND_FP_BINARY_REV): New int iterator.
6476 (commutative): New int attribute.
6477 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6479 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6481 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6482 (*cond_<optab><mode>): New patterns for reversed operands.
6484 2018-05-25 Richard Biener <rguenther@suse.de>
6486 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6487 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6488 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6489 (STMT_VINFO_GROUPED_ACCESS): Adjust.
6490 * tree-vect-data-refs.c (everywhere): Adjust users.
6491 * tree-vect-loop.c (everywhere): Likewise.
6492 * tree-vect-slp.c (everywhere): Likewise.
6493 * tree-vect-stmts.c (everywhere): Likewise.
6494 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6496 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6498 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6500 (gcc_cv_as_section_exclude): ... this.
6501 Try Solaris as #exclude syntax.
6502 * configure: Regenerate.
6503 * config.in: Regenerate.
6504 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6506 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6507 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6509 * varasm.c (default_elf_asm_named_section): Don't check if
6510 HAVE_GAS_SECTION_EXCLUDE is defined.
6512 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6514 * doc/md.texi: Update the documentation of the cond_* optabs
6515 to mention the new final operand. Fix GET_MODE_NUNITS call.
6516 Describe the scalar case too.
6517 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6518 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6520 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6521 (get_conditional_internal_fn): Update comment.
6522 * tree-vect-loop.c (vectorizable_reduction): Pass the original
6523 accumulator value as a final argument to conditional functions.
6524 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6525 a define_expand and add an "else" operand. Assert for now that
6526 the else operand is equal to operand 2. Use SVE_INT_BINARY and
6527 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6528 (*cond_<optab><mode>): New patterns.
6529 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6530 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6531 (UNSPEC_COND_EOR): Delete.
6532 (optab): Remove associated mappings.
6533 (SVE_INT_BINARY): New code iterator.
6534 (sve_int_op): Remove int attribute and add "minus" to the code
6536 (SVE_COND_INT_OP): Delete.
6537 (SVE_COND_FP_OP): Rename to...
6538 (SVE_COND_FP_BINARY): ...this.
6540 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6542 * optabs.c (can_reuse_operands_p): New function.
6543 (maybe_legitimize_operands): Try to reuse the results for
6546 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6548 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6549 Add {q} suffix to insn mnemonic.
6551 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6553 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6554 (msp430_warn_func_return): New.
6556 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
6558 * fold-const.c (tree_nonzero_bits): New function.
6559 * fold-const.h (tree_nonzero_bits): Likewise.
6560 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6561 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6563 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6567 * varasm.c (assemble_alias): Check ifunc_resolver only on
6570 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6573 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6574 when memory input operand is handled.
6576 2018-05-24 Luis Machado <luis.machado@linaro.org>
6578 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6580 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6582 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6584 * match.pd: Delay FMA folds until after vectorization.
6586 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
6589 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6590 address check not strict.
6592 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6594 * gimple-match.h (gimple_match_op): New class.
6595 (mprts_hook): Replace parameters with a gimple_match_op *.
6596 (maybe_build_generic_op): Likewise.
6597 (gimple_simplified_result_is_gimple_val): Replace parameters with
6598 a const gimple_match_op *.
6599 (gimple_simplify): Replace code_helper * and tree * parameters with
6600 a gimple_match_op * parameter.
6601 (gimple_resimplify1): Replace code_helper *, tree and tree *
6602 parameters with a gimple_match_op * parameter.
6603 (gimple_resimplify2): Likewise.
6604 (gimple_resimplify3): Likewise.
6605 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6606 parameters with a gimple_match_op * parameter.
6607 * gimple-match-head.c (gimple_simplify): Change prototypes of
6608 auto-generated functions to take a gimple_match_op * instead of
6609 separate code_helper * and tree * parameters. Make the same
6610 change in the top-level overload and update calls to the
6611 gimple_resimplify routines. Update calls to the auto-generated
6612 functions and to maybe_push_res_to_seq in the publicly-facing
6613 operation-specific gimple_simplify overloads.
6614 (gimple_match_op::MAX_NUM_OPS): Define.
6615 (gimple_resimplify1): Replace rcode and ops with a single res_op
6616 parameter. Update call to gimple_simplify.
6617 (gimple_resimplify2): Likewise.
6618 (gimple_resimplify3): Likewise.
6619 (mprts_hook): Replace parameters with a gimple_match_op *.
6620 (maybe_build_generic_op): Likewise.
6621 (build_call_internal): Replace type, nargs and ops with
6622 a gimple_match_op *.
6623 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6624 with a single gimple_match_op *. Update calls to mprts_hook,
6625 build_call_internal and gimple_simplified_result_is_gimple_val.
6626 Factor out code that is common to the tree_code and combined_fn cases.
6627 * genmatch.c (expr::gen_transform): Replace tem_code and
6628 tem_ops with a gimple_match_op called tem_op. Update calls
6629 to the gimple_resimplify functions and maybe_push_res_to_seq.
6630 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6631 res_ops. Update call to the gimple_resimplify functions.
6632 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6633 (decision_tree::gen): Make the functions take a gimple_match_op *
6634 called res_op instead of separate res_code and res_ops parameters.
6635 Update call accordingly.
6636 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6637 and ops with a single res_op parameter. Update calls to
6638 maybe_build_generic_op and maybe_push_res_to_seq.
6639 (fold_stmt_1): Update calls to gimple_simplify and
6640 replace_stmt_with_simplification.
6641 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6642 and gimple_simplified_result_is_gimple_val.
6643 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6645 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6646 with a gimple_match_op *.
6647 (vn_nary_build_or_lookup): Likewise. Update call to
6648 vn_nary_build_or_lookup_1.
6649 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6650 gimple_match_op *. Update calls to the gimple_resimplify routines
6651 and to gimple_simplified_result_is_gimple_val.
6652 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6653 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6654 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6655 (visit_nary_op): Likewise.
6656 (visit_reference_op_load): Likewise.
6658 2018-05-23 Luis Machado <luis.machado@linaro.org>
6660 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6661 modifier for printing the step amount.
6663 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
6666 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6669 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
6671 * doc/sourcebuild.texi (Endianness): New subsubsection.
6673 2018-05-23 Luis Machado <luis.machado@linaro.org>
6675 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6676 <prefetch_dynamic_strides>: New const bool field.
6677 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6678 prefetch_dynamic_strides.
6679 (exynosm1_prefetch_tune): Likewise.
6680 (thunderxt88_prefetch_tune): Likewise.
6681 (thunderx_prefetch_tune): Likewise.
6682 (thunderx2t99_prefetch_tune): Likewise.
6683 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6685 (aarch64_override_options_internal): Update to set
6686 PARAM_PREFETCH_DYNAMIC_STRIDES.
6687 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6688 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6689 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6690 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6691 prefetch-dynamic-strides setting.
6693 2018-05-23 Luis Machado <luis.machado@linaro.org>
6695 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6696 <minimum_stride>: New const int field.
6697 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6698 minimum_stride field defaulting to -1.
6699 (exynosm1_prefetch_tune): Likewise.
6700 (thunderxt88_prefetch_tune): Likewise.
6701 (thunderx_prefetch_tune): Likewise.
6702 (thunderx2t99_prefetch_tune): Likewise.
6703 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6704 <default_opt_level>: Set to 3.
6705 (aarch64_override_options_internal): Update to set
6706 PARAM_PREFETCH_MINIMUM_STRIDE.
6707 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6708 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6709 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6710 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6711 stride is constant and is below the minimum stride threshold.
6713 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6715 * config/arm/arm-cpus.in (mode26): Delete.
6716 (armv4): Delete mode26 reference.
6717 * config/arm/arm.c (arm_configure_build_target): Delete use of
6720 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6722 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6724 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6725 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
6727 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
6728 (floatunsdidf2): Ditto.
6730 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6732 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6733 (fixuns_trunc<mode>si2_avx512f): Ditto.
6734 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6735 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6736 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6738 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6740 PR rtl-optimization/79985
6741 * df-scan.c (df_insn_refs_collect): Remove special case for
6742 global registers and asm statements.
6744 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6746 * extend.texi (Global Register Variables): Rewrite the bullet list.
6747 Note that the register is available for allocation. Note that access
6748 via inline asm must use constraints. Add note about async-signal
6749 handlers. Remove paragraph about automagic register selection.
6751 2018-05-23 Richard Biener <rguenther@suse.de>
6753 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6754 of fixed offset from memset VN.
6756 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
6758 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6760 (alloc_cand_and_find_basis): Initialize first_interp field.
6761 (slsr_process_mul): Modify first_interp field.
6762 (slsr_process_add): Likewise.
6763 (slsr_process_cast): Modify first_interp field for each new
6765 (slsr_process_copy): Likewise.
6766 (dump_candidate): Dump first_interp field.
6767 (replace_mult_candidate): Process all interpretations, not just
6769 (replace_rhs_if_not_dup): Likewise.
6770 (replace_one_candidate): Likewise.
6772 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
6774 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6776 (aarch64_needs_frame_chain): New function.
6777 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6779 2018-05-23 Sudakshina Das <sudi.das@arm.com>
6782 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6783 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6784 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6785 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6786 as true for strict-align.
6787 (aarch64_can_inline_p): Perform checks even when callee has no
6788 attributes to check for strict alignment.
6789 * doc/extend.texi (AArch64 Function Attributes): Document
6791 * doc/invoke.texi: (AArch64 Options): Likewise.
6793 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
6795 PR tree-optimization/85853
6796 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6797 the handling of the root of the node to...
6798 (vect_slp_analyze_node_operations_1): ...this new function,
6799 and run the whole thing with the child nodes' def types
6800 set according to their SLP node's def type.
6802 2018-05-23 Richard Biener <rguenther@suse.de>
6805 * tree-data-ref.c (create_runtime_alias_checks): Defer
6806 and ignore overflow warnings.
6808 2018-05-23 Yury Gribov <tetra2005@gmail.com>
6810 PR tree-optimization/85822
6811 * tree-vrp.c (is_masked_range_test): Fix handling of negative
6814 2018-05-23 Richard Biener <rguenther@suse.de>
6816 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6817 memset constants via native_interpret_expr.
6819 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
6822 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6824 (cgraph_node::create_alias): Likewise.
6825 (cgraph_node::get_availability): Check ifunc_resolver instead
6826 of looking up ifunc attribute.
6827 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6828 * varasm.c (do_assemble_alias): Likewise.
6829 (assemble_alias): Likewise.
6830 (default_binds_local_p_3): Likewise.
6831 * cgraph.h (cgraph_node): Add ifunc_resolver.
6832 (cgraph_node::only_called_directly_or_aliased_p): Return false
6834 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6836 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6837 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6838 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6839 instead of looking up ifunc attribute.
6841 2018-05-22 Luis Machado <luis.machado@linaro.org>
6843 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6845 2018-05-22 Martin Sebor <msebor@redhat.com>
6848 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6849 only when expasion succeeds.
6850 (expand_builtin_strcmp): Same.
6851 (expand_builtin_strncmp): Same.
6853 2018-05-22 Martin Sebor <msebor@redhat.com>
6855 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6857 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6858 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6860 * config/aarch64/aarch64-ldpstp.md: Replace uses of
6861 aarch64_mem_pair_operand with memory_operand and delete operand swapping
6863 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6864 Add check for legitimate_address.
6865 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6866 (aarch64_swap_ldrstr_operands): New.
6867 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6870 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6871 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6873 * config/aarch64/aarch64.md: New patterns to generate stp
6875 (store_pair_sw, store_pair_dw): New patterns to generate stp for
6876 single words and double words.
6877 (load_pair_sw, load_pair_dw): Likewise.
6878 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6880 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6882 * config/aarch64/aarch64-ldpstp.md: Modify peephole
6883 for different mode ldpstp and add peephole for merged zero stores.
6885 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6887 (aarch64_gen_store_pair): Rename calls to match new patterns.
6888 (aarch64_gen_load_pair): Rename calls to match new patterns.
6889 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6890 (load_pair<DREG:mode><DREG2:mode>): ... This.
6891 (store_pair<mode>): Rename to...
6892 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6893 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6895 (V_INT_EQUIV): Handle SImode.
6896 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6899 2018-05-22 Martin Sebor <msebor@redhat.com>
6902 * calls.c (maybe_warn_nonstring_arg): Use string length to set
6903 or ajust the presumed bound on an operation to avoid unnecessary
6906 2018-05-22 Martin Sebor <msebor@redhat.com>
6908 PR tree-optimization/85826
6909 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6910 assuming that a DECL necesarily has a constant size.
6912 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
6915 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6917 2018-05-22 Richard Biener <rguenther@suse.de>
6919 PR tree-optimization/85834
6920 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6921 non-constant and non-zero memset arguments.
6923 2018-05-22 Martin Liska <mliska@suse.cz>
6926 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6928 2018-05-22 Richard Biener <rguenther@suse.de>
6930 PR tree-optimization/85863
6931 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6932 comparisons when vectype is specified.
6933 (vectorizable_condition): Do not specify vectype for
6934 vect_is_simple_cond when SLP vectorizing.
6936 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
6939 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6940 define __ibm128 as long double.
6941 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6942 as a distinct type when IEEE 128-bit support is enabled.
6943 (init_float128_ieee): Fix up conversions between IFmode and IEEE
6944 128-bit types to use the correct functions.
6945 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6946 convert between 128-bit floating point types that have different
6947 modes but the same representation, instead of using gen_lowpart to
6949 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6951 (IFKF_reg): New attributes to give the register constraints for
6953 (extend<mode>tf2_internal): New insns to mark an explicit
6954 conversion between 128-bit floating point types that have a
6955 different mode but share the same representation.
6957 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
6959 PR tree-optimization/85814
6960 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6961 a null return from get_strinfo when unsharing the next
6962 strinfo in the chain.
6964 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6967 * varasm.c (weak_finish): Clean up weak_decls.
6969 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6971 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6972 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6973 UNSPEC_UADALP values.
6974 * config/aarch64/iterators.md (ABAL): New int iterator.
6977 (sur): Add mappings for the above.
6978 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6980 (aarch64_<sur>abal<mode>_4): Likewise.
6981 (aarch64_<sur>adalp<mode>_3): Likewise.
6982 (<sur>sadv16qi): New define_expand.
6984 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
6986 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6987 (*movdf_internal): Ditto.
6988 (*rcpsf2_sse): Ditto.
6989 (*rsqrtsf2_sse): Ditto.
6990 (*sqrt<mode>2_sse): Ditto.
6992 2018-05-21 Tamar Christina <tamar.christina@arm.com>
6994 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6996 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6997 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6998 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6999 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7001 * config/aarch64/arm_neon.h: Likewise.
7002 * config/aarch64/iterators.md (VQ_I): New.
7004 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
7006 * config.gcc: Add arc/t-multilib-linux to tmake_file for
7008 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7011 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7013 * config/nds32/constraints.md (S): New constraint.
7014 * config/nds32/nds32.md (call_internal): Use constraint S.
7015 (call_value_internal): Likewise.
7016 (sibcall_internal): Likewise.
7017 (sibcall_value_internal): Likewise.
7019 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7020 Chung-Ju Wu <jasonwucj@gmail.com>
7022 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7025 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7026 Chung-Ju Wu <jasonwucj@gmail.com>
7028 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7029 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7030 (nds32_rtx_costs_impl): Simplify.
7031 (nds32_address_cost_impl): Simplify.
7032 (nds32_init_rtx_costs): New function.
7033 (nds32_rtx_costs_speed_prefer): Likewise.
7034 (nds32_rtx_costs_size_prefer): Likewise.
7035 (nds32_address_cost_speed_prefer): Likewise.
7036 (nds32_address_cost_speed_fwprop): Likewise.
7037 (nds32_address_cost_size_prefer): Likewise.
7038 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7039 * config/nds32/nds32.c (nds32_option_override): Use
7040 nds32_init_rtx_costs function.
7042 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7044 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7045 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7046 (TARGET_PIPELINE_N8): Likewise.
7047 (TARGET_PIPELINE_N10): Likewise.
7048 (TARGET_PIPELINE_N13): Likewise.
7049 (TARGET_PIPELINE_GRAYWOLF): Likewise.
7051 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
7053 * config/nds32/nds32-fpu.md: Update copyright year.
7055 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7057 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7059 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7061 * config/nds32/nds32.c
7062 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7063 * config/nds32/nds32.opt (minline-asm-r15): New option.
7065 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7067 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7069 * config/nds32/nds32.md (abssi2): New pattern.
7071 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
7073 * config/i386/i386.md (rex64namesuffix): New mode attribute.
7074 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7075 Merge insn pattern from sse_cvtsi2ss<round_name> and
7076 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7077 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7078 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7079 using SWI48 mode iterator.
7080 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7081 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7082 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7083 pattern from sse_cvttss2si<round_saeonly_name>
7084 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7085 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7086 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7087 using SWI48 mode iterator.
7088 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7089 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7090 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7091 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7092 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7093 using SWI48 mode iterator.
7094 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7095 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7096 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7097 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7098 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7099 SWI48 mode iterator.
7100 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7101 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7102 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7103 pattern from sse_cvttsd2si<round_saeonly_name>
7104 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7106 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7108 * config/nds32/nds32-md-auxiliary.c
7109 (nds32_valid_smw_lwm_base_p): Refine.
7110 (nds32_output_smw_single_word): Refine.
7111 (nds32_output_smw_double_word): New.
7112 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7114 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7116 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7117 (nds32_output_stack_pop): Refine.
7118 (nds32_expand_unaligned_load): Refine.
7119 (nds32_expand_unaligned_store): Refine.
7121 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7122 Chung-Ju Wu <jasonwucj@gmail.com>
7124 * config/nds32/constants.md: Add TP_REGNUM constant.
7125 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7126 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7128 * config/nds32/nds32-doubleword.md: Consider flag_pic.
7129 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7130 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7131 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7132 and PIC code generation.
7133 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7135 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7137 * config/nds32/nds32.md: Support TLS and PIC.
7138 * config/nds32/nds32.c: Support TLS and PIC.
7139 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7140 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7143 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7145 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7146 mode with E_ prefix.
7148 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7149 Chung-Ju Wu <jasonwucj@gmail.com>
7151 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7152 * config/nds32/nds32-md-auxiliary.c
7153 (symbolic_reference_mentioned_p): New.
7154 (nds32_legitimize_ict_address): New.
7155 (nds32_expand_ict_move): New.
7156 (nds32_indirect_call_referenced_p): New.
7157 (nds32_symbol_binds_local_p): Delete.
7158 (nds32_long_call_p): Modify.
7159 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7160 * config/nds32/nds32-protos.h
7161 (symbolic_reference_mentioned_p): Declare.
7162 (nds32_legitimize_ict_address): Declare.
7163 (nds32_expand_ict_move): Declare.
7164 (nds32_indirect_call_referenced_p): Declare.
7165 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7166 (nds32_relax_group): Use nds32_ict_const_p as condition.
7167 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7168 (nds32_asm_file_start): Output ict_model directive in asm code.
7169 (nds32_legitimate_address_p): Consider indirect call.
7170 (nds32_print_operand): Consider indirect call.
7171 (nds32_print_operand_address): Consider indirect call.
7172 (nds32_insert_attributes): Handle "indirect_call" attribute.
7173 (TARGET_LEGITIMATE_ADDRESS_P): Define.
7174 (TARGET_LEGITIMATE_CONSTANT_P): Define.
7175 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7176 (TARGET_DELEGITIMIZE_ADDRESS): Define.
7177 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7178 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7179 (TARGET_ICT_MODEL_SMALL): Define.
7180 (TARGET_ICT_MODEL_LARGE): Define.
7181 * config/nds32/nds32.md (movsi): Consider ict model.
7182 (call, call_value): Consider ict model.
7183 (sibcall, sibcall_value): Consider ict model.
7184 * config/nds32/nds32.opt (mict-model): New option.
7185 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7188 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
7189 Monk Chiang <sh.chiang04@gmail.com>
7190 Jim Wilson <jimw@sifive.com>
7192 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7193 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
7194 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7195 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7196 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
7197 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7198 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7199 compute save_libcall_adjustment properly.
7200 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7201 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7202 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7203 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7204 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7205 (ABI_SPEC): Handle mabi=ilp32e.
7206 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7207 (RVE): Add RVE mask.
7208 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7209 <-march>: Add rv32e as an example.
7211 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
7214 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7215 (intra_create_variable_infos): Handle C++ constructors.
7217 2018-05-18 Martin Liska <mliska@suse.cz>
7219 * passes.def: Remove a redundant pass.
7221 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
7224 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7226 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7228 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7230 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7232 (armv2, armv2a, armv3, armv3m): Delete architectures.
7233 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7234 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7235 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7237 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7238 (*mulsidi3adddi): Likewise.
7239 (mulsidi3): Likewise.
7240 (*mulsidi3_nov6): Likewise.
7241 (umulsidi3): Likewise.
7242 (umulsidi3_nov6): Likewise.
7243 (umaddsidi4): Likewise.
7244 (*umulsidi3adddi): Likewise.
7245 (smulsi3_highpart): Likewise.
7246 (*smulsi3_highpart_nov6): Likewise.
7247 (umulsi3_highpart): Likewise.
7248 (*umulsi3_highpart_nov6): Likewise.
7249 * config/arm/arm.h (arm_arch3m): Delete.
7250 * config/arm/arm.c (arm_arch3m): Delete.
7251 (arm_option_override_internal): Update armv3-related comment.
7252 (arm_configure_build_target): Delete use of isa_bit_mode32.
7253 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7254 (arm_rtx_costs_internal): Delete check of arm_arch3m.
7255 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7257 (mulusa3): Likewise.
7258 * config/arm/arm-protos.h (arm_arch3m): Delete.
7259 * config/arm/arm-tables.opt: Regenerate.
7260 * config/arm/arm-tune.md: Likewise.
7261 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7262 deleted architectures.
7264 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7266 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7267 (armv5t, armv5te): New features.
7268 (ARMv5, ARMv5e): Delete fgroups.
7269 (ARMv5t, ARMv5te): Adjust for above changes.
7271 (armv5, armv5e): Delete arches.
7272 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7274 (*call_reg_arm): Likewise.
7275 (*call_value_reg_armv5): Likewise.
7276 (*call_value_reg_arm): Likewise.
7277 (*call_symbol): Likewise.
7278 (*call_value_symbol): Likewise.
7279 (*sibcall_insn): Likewise.
7280 (*sibcall_value_insn): Likewise.
7282 (prefetch): Likewise.
7283 (define_split and define_peephole2 dependent on arm_arch5):
7285 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7287 (TARGET_ARM_QBIT): Likewise.
7288 (TARGET_DSP_MULTIPLY): Likewise.
7289 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7290 (arm_arch5, arm_arch5e): Delete.
7291 (arm_arch5t, arm_arch5te): Declare.
7292 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7293 (arm_arch5t): Declare.
7294 (arm_option_reconfigure_globals): Update for the above.
7295 (arm_options_perform_arch_sanity_checks): Update comment, replace
7296 use of arm_arch5 with arm_arch5t.
7297 (use_return_insn): Likewise.
7298 (arm_emit_call_insn): Likewise.
7299 (output_return_instruction): Likewise.
7300 (arm_final_prescan_insn): Likewise.
7301 (arm_coproc_builtin_available): Likewise.
7302 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7303 arm_arch5e with arm_arch5t and arm_arch5te.
7304 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7305 (arm_arch5t, arm_arch5te): Declare.
7306 * config/arm/arm-tables.opt: Regenerate.
7307 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7308 * config/arm/t-multilib: Likewise.
7309 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7310 instead of arm_arch5.
7311 (*call_reg_thumb1): Likewise.
7312 (*call_value_reg_thumb1_v5): Likewise.
7313 (*call_value_reg_thumb1): Likewise.
7314 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7316 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7318 2018-05-18 Martin Liska <mliska@suse.cz>
7320 PR gcov-profile/84846
7321 * doc/gcov.texi: Document -t option of gcov tool.
7323 2018-05-18 Martin Liska <mliska@suse.cz>
7325 PR gcov-profile/84846
7326 * gcov.c (print_usage): Add new -t option.
7327 (process_args): Handle the option.
7328 (generate_results): Use stdout as output when requested by
7331 2018-05-18 Martin Liska <mliska@suse.cz>
7333 PR gcov-profile/84846
7334 * coverage.c (coverage_init): Write PWD to .gcno file.
7335 * doc/gcov.texi: Document how working directory is printed.
7336 * gcov-dump.c (dump_gcov_file): Print PWD.
7337 * gcov.c (output_intermediate_file): Likewise.
7338 (read_graph_file): Read PWD string.
7339 (output_lines): Print PWD.
7341 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7344 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7345 for retval and return false if all args to phi are zero.
7347 2018-05-18 Richard Biener <rguenther@suse.de>
7349 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7351 (evrp_dom_walker::before_dom_children): Call it.
7353 2018-05-18 Richard Biener <rguenther@suse.de>
7355 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7356 results when processing array refs with variable index.
7358 2018-05-18 Toon Moene <toon@moene.org>
7360 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7361 directly after that of -floop-interchange. Indicate that both
7362 options are enabled by default when specifying -O3.
7364 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7366 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7367 iterator. Delete separate integer-mode vec_set<mode> expander.
7368 (aarch64_simd_vec_setv2di): Delete.
7369 (vec_setv2di): Delete.
7370 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7371 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
7372 the "w, r" alternative.
7374 2018-05-18 Martin Liska <mliska@suse.cz>
7376 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7377 * tree-pass.h (make_pass_lower_switch_O0): New function.
7378 * tree-switch-conversion.c (node_has_low_bound): Remove.
7379 (node_has_high_bound): Likewise.
7380 (node_is_bounded): Likewise.
7381 (class pass_lower_switch): Make it a template type and create
7383 (pass_lower_switch::execute): Add template argument.
7384 (make_pass_lower_switch): New function.
7385 (make_pass_lower_switch_O0): New function.
7386 (do_jump_if_equal): Remove.
7387 (emit_case_nodes): Simplify to just handle all 3 cases and leave
7388 all the hard work to tree optimization passes.
7390 2018-05-18 Martin Liska <mliska@suse.cz>
7392 * dbgcnt.c (limit_low): Renamed from limit.
7393 (limit_high): New variable.
7394 (dbg_cnt_is_enabled): Check for upper limit.
7395 (dbg_cnt): Adjust dumping.
7396 (dbg_cnt_set_limit_by_index): Add new argument for high
7398 (dbg_cnt_set_limit_by_name): Likewise.
7399 (dbg_cnt_process_single_pair): Parse new format.
7400 (dbg_cnt_process_opt): Use strtok.
7401 (dbg_cnt_list_all_counters): Remove 'value' and add
7403 * doc/invoke.texi: Document changes.
7405 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
7407 * doc/sourcebuild.texi (scalar_all_fma): Document.
7408 * tree.def (FMA_EXPR): Delete.
7409 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7410 * internal-fn.c (ternary_direct): New macro.
7411 (expand_ternary_optab_fn): Likewise.
7412 (direct_ternary_optab_supported_p): Likewise.
7413 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7414 * builtins.c (fold_builtin_fma): Delete.
7415 (fold_builtin_3): Don't call it.
7416 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7417 * expr.c (expand_expr_real_2): Likewise.
7418 * fold-const.c (operand_equal_p): Likewise.
7419 (fold_ternary_loc): Likewise.
7420 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7421 * gimple.c (DEFTREECODE): Likewise.
7422 * gimplify.c (gimplify_expr): Likewise.
7423 * optabs-tree.c (optab_for_tree_code): Likewise.
7424 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7425 * tree-eh.c (operation_could_trap_p): Likewise.
7426 (stmt_could_throw_1_p): Likewise.
7427 * tree-inline.c (estimate_operator_cost): Likewise.
7428 * tree-pretty-print.c (dump_generic_node): Likewise.
7429 (op_code_prio): Likewise.
7430 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7431 * tree-ssa-operands.c (get_expr_operands): Likewise.
7432 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7433 * fold-const-call.h (fold_fma): Delete.
7434 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7435 CFN_FNMA and CFN_FNMS.
7437 * genmatch.c (combined_fn): New enum.
7438 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7439 (commutative_op): New function.
7440 (commutate): Use it. Handle more than 2 operands.
7441 (dt_operand::gen_gimple_expr): Use commutative_op.
7442 (parser::parse_expr): Allow :c to be used with non-binary
7443 operators if the commutative operand is known.
7444 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7445 CFN_FMS, CFN_FNMA and CFN_FNMS.
7446 (backprop::process_assign_use): Remove FMA_EXPR handling.
7447 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7448 (gen_hsa_fma): New function.
7449 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7450 IFN_FNMA and IFN_FNMS.
7451 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7452 * gimple-fold.h (follow_all_ssa_edges): Declare.
7453 * gimple-fold.c (follow_all_ssa_edges): New function.
7454 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7455 gimple_build interface and use follow_all_ssa_edges to fold the result.
7456 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7457 instead of checking for optabs directly.
7458 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7459 rather than FMA_EXPRs.
7460 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7461 call to IFN_FMA instead of an FMA_EXPR.
7463 2018-05-17 Jim Wilson <jimw@sifive.com>
7465 * expr.c (do_tablejump): When converting index to Pmode, if we have a
7466 sign extended promoted subreg, and the range does not have the sign bit
7467 set, then do a sign extend.
7469 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7470 test, check for sign extended subreg and/or constant operands, and
7471 do a sign extend in that case.
7473 2018-05-17 Steve Ellcey <sellcey@cavium.com>
7475 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7476 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7478 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7479 Change logics_shift_reg to logics_shift_imm.
7480 (thunderx2t99_fp_loadpair_basic): Delete.
7481 (thunderx2t99_fp_storepair_basic): Delete.
7482 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7483 (thunderx2t99_asimd_polynomial): Delete.
7484 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7485 and neon_fp_mul_d_scalar_q.
7486 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7487 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7488 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7489 (thunderx2t99_asimd_lut): Add missing tbl types.
7490 (thunderx2t99_asimd_ext): Delete.
7491 (thunderx2t99_asimd_load1_1_mult): Delete.
7492 (thunderx2t99_asimd_load1_2_mult): Delete.
7493 (thunderx2t99_asimd_load1_ldp): New.
7494 (thunderx2t99_asimd_load1): New.
7495 (thunderx2t99_asimd_load2): Add missing *load2* types.
7496 (thunderx2t99_asimd_load3): New.
7497 (thunderx2t99_asimd_load4): New.
7498 (thunderx2t99_asimd_store1_1_mult): Delete.
7499 (thunderx2t99_asimd_store1_2_mult): Delete.
7500 (thunderx2t99_asimd_store2_mult): Delete.
7501 (thunderx2t99_asimd_store2_onelane): Delete.
7502 (thunderx2t99_asimd_store_stp): New.
7503 (thunderx2t99_asimd_store1): New.
7504 (thunderx2t99_asimd_store2): New.
7505 (thunderx2t99_asimd_store3): New.
7506 (thunderx2t99_asimd_store4): New.
7508 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
7510 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7511 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
7513 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
7514 Segher Boessenkool <segher@kernel.crashing.org>
7517 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7520 2018-05-17 Richard Biener <rguenther@suse.de>
7522 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7523 for pruning loop and prune defs feeding only already visited PHIs.
7525 2018-05-17 Richard Biener <rguenther@suse.de>
7527 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7529 2018-05-17 Bin Cheng <bin.cheng@arm.com>
7530 Richard Biener <rguenther@suse.de>
7532 PR tree-optimization/85793
7533 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7534 for VMAT_ELEMENTWISE.
7536 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7538 * internal-fn.h (lookup_internal_fn): Declare
7539 * internal-fn.c (lookup_internal_fn): New function.
7540 * gimple.c (gimple_build_call_from_tree): Handle calls to
7542 * gimple-pretty-print.c (dump_gimple_call): Print "." before
7543 internal function names.
7544 * tree-pretty-print.c (dump_generic_node): Likewise.
7545 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7547 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7549 * gimple-fold.h (gimple_build): Make the function forms take
7550 combined_fn rather than built_in_function.
7551 (gimple_simplify): Likewise.
7552 * gimple-match-head.c (gimple_simplify): Likewise.
7553 * gimple-fold.c (gimple_build): Likewise.
7554 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7555 rather than gimple_build_call_internal.
7556 (get_initial_defs_for_reduction): Likewise.
7557 (vect_create_epilog_for_reduction): Likewise.
7558 (vectorizable_live_operation): Likewise.
7560 2018-05-17 Martin Liska <mliska@suse.cz>
7562 * gimple-ssa-sprintf.c (format_directive): Do not use
7563 space in between 'G_' and '('.
7565 2018-05-17 Jakub Jelinek <jakub@redhat.com>
7568 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7569 even if the mask is not all ones.
7572 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7574 (ix86_gimple_fold_builtin): Likewise.
7577 * config/i386/i386.c: Include tree-vector-builder.h.
7578 (ix86_vector_shift_count): New function.
7579 (ix86_fold_builtin): Fold shift builtins by scalar count.
7580 (ix86_gimple_fold_builtin): Likewise.
7582 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7583 _mm512_setzero): New intrinsics.
7585 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
7586 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7588 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7589 code generation for cases where splatting a value is not useful.
7590 * simplify-rtx.c (simplify_ternary_operation): Simplify
7591 vec_merge across a vec_duplicate and a paradoxical subreg forming
7592 a vector mode to a vec_concat.
7594 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
7596 * config.gcc: Support "goldmont-plus".
7597 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7599 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7600 PROCESSOR_GOLDMONT_PLUS.
7601 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7602 (processor_target_table): Add "goldmont-plus".
7603 (PTA_GOLDMONT_PLUS): Define.
7604 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7605 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7606 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7607 (fold_builtin_cpu): Add "goldmont-plus".
7608 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7609 (ix86_option_override_internal): Add "goldmont-plus".
7610 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7611 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7612 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7613 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7615 2018-05-17 Richard Biener <rguenther@suse.de>
7617 PR tree-optimization/85757
7618 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7619 remove defs that only feed that PHI from further processing.
7621 2018-05-16 Jim Wilson <jimw@sifive.com>
7623 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7625 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7627 2018-05-16 Mark Wielaard <mark@klomp.org>
7629 * dwarf2out.c (count_index_strings): New function.
7630 (output_indirect_strings): Call count_index_strings and generate
7631 header for dwarf_version >= 5.
7633 2018-05-16 Mark Wielaard <mark@klomp.org>
7635 * dwarf2out.c (dwarf_FORM): New function.
7636 (set_indirect_string): Use dwarf_FORM.
7637 (reset_indirect_string): Likewise.
7638 (size_of_die): Likewise.
7639 (value_format): Likewise.
7640 (output_die): Likewise.
7641 (add_skeleton_AT_string): Likewise.
7642 (output_macinfo_op): Likewise.
7643 (index_string): Likewise.
7644 (output_index_string_offset): Likewise.
7645 (output_index_string): Likewise.
7646 (count_index_strings): Likewise.
7648 2018-05-16 Carl Love <cel@us.ibm.com>
7650 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7651 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7653 2018-05-16 Martin Jambor <mjambor@suse.cz>
7655 * ipa-prop.c (ipa_free_all_edge_args): Remove.
7656 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7658 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
7660 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7661 (fnma<mode>4): Likewise.
7662 (fms<mode>4): Likewise.
7663 (fnms<mode>4): Likewise.
7664 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7665 (aarch64_fnma<mode>4): Likewise.
7666 (aarch64_fms<mode>4): Likewise.
7667 (aarch64_fnms<mode>4): Likewise.
7668 (aarch64_fnmadd<mode>4): Likewise.
7670 2018-05-16 Jason Merrill <jason@redhat.com>
7672 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
7674 2018-05-16 Richard Biener <rguenther@suse.de>
7676 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7677 (dump_stmt_cost): Declare.
7678 (add_stmt_cost): Dump cost we add.
7679 (add_stmt_costs): New function.
7680 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7682 (vect_analyze_stmt): Adjust prototype.
7683 (vectorizable_condition): Likewise.
7684 (vectorizable_live_operation): Likewise.
7685 (vectorizable_reduction): Likewise.
7686 (vectorizable_induction): Likewise.
7687 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7688 cost vector to pass to vectorizable_ and record afterwards.
7689 (vect_model_reduction_cost): Take cost vector argument and adjust.
7690 (vect_model_induction_cost): Likewise.
7691 (vectorizable_reduction): Likewise.
7692 (vectorizable_induction): Likewise.
7693 (vectorizable_live_operation): Likewise.
7694 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7695 SLP_TREE_NUMBER_OF_VEC_STMTS.
7696 (vect_analyze_slp_cost_1): Remove.
7697 (vect_analyze_slp_cost): Likewise.
7698 (vect_slp_analyze_node_operations): Take visited args and
7699 a target cost vector. Avoid processing already visited stmt sets.
7700 (vect_slp_analyze_operations): Use a local cost vector to gather
7701 costs and register those of non-discarded instances.
7702 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7703 (vect_schedule_slp_instance): Remove copying of
7704 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
7706 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7707 adding cost. Record cost entry location.
7708 (vect_prologue_cost_for_slp_op): Function to compute cost of
7709 a constant or invariant generated for SLP vect in the prologue,
7710 split out from vect_analyze_slp_cost_1.
7711 (vect_model_simple_cost): Make static. Adjust for SLP costing.
7712 (vect_model_promotion_demotion_cost): Likewise.
7713 (vect_model_store_cost): Likewise, make static.
7714 (vect_model_load_cost): Likewise.
7715 (vectorizable_bswap): Add cost vector arg and adjust.
7716 (vectorizable_call): Likewise.
7717 (vectorizable_simd_clone_call): Likewise.
7718 (vectorizable_conversion): Likewise.
7719 (vectorizable_assignment): Likewise.
7720 (vectorizable_shift): Likewise.
7721 (vectorizable_operation): Likewise.
7722 (vectorizable_store): Likewise.
7723 (vectorizable_load): Likewise.
7724 (vectorizable_condition): Likewise.
7725 (vectorizable_comparison): Likewise.
7726 (can_vectorize_live_stmts): Likewise.
7727 (vect_analyze_stmt): Likewise.
7728 (vect_transform_stmt): Adjust calls to vectorizable_*.
7729 * tree-vectorizer.c: Include gimple-pretty-print.h.
7730 (dump_stmt_cost): New function.
7732 2018-05-16 Richard Biener <rguenther@suse.de>
7734 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7735 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7736 * tree-ssa-dse.c: Include tree-ssa-loop.h.
7737 (check_name): New callback.
7738 (dse_classify_store): Track cycles via a visited bitmap of PHI
7739 defs and simplify handling of in-loop and across loop dead stores
7740 and properly fail for loop-variant refs. Handle byte-tracking with
7741 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7744 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
7746 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7747 (vect_get_mask_type_for_stmt): Likewise.
7748 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7750 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
7751 to determine the statement's vector type and the vector type that
7752 should be used for calculating nunits. Deal with cases in which
7753 the type has to be deferred.
7754 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7755 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7756 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7757 (vect_determine_vf_for_stmt): New functions, split out from...
7758 (vect_determine_vectorization_factor): ...here.
7759 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7760 (vect_get_mask_type_for_stmt): New functions, split out from
7761 vect_determine_vectorization_factor.
7763 2018-05-16 Richard Biener <rguenther@suse.de>
7765 * tree-cfg.c (verify_gimple_assign_ternary): Properly
7766 verify the [VEC_]COND_EXPR embedded comparison.
7768 2018-05-15 Martin Sebor <msebor@redhat.com>
7770 PR tree-optimization/85753
7771 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7772 RECORD_TYPE in addition to ARRAY_TYPE.
7774 2018-05-15 Martin Sebor <msebor@redhat.com>
7777 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7779 2018-05-15 Richard Biener <rguenther@suse.de>
7781 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7782 add by_clobber_p one. Change algorithm to collect all defs
7783 representing uses we need to walk and try reducing them to
7784 a single one before failing.
7785 (dse_dom_walker::dse_optimize_stmt): Adjust.
7787 2018-05-13 Mark Wielaard <mark@klomp.org>
7789 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7790 (size_of_loc_descr): Likewise.
7791 (output_loc_operands): Likewise.
7792 (output_loc_operands_raw): Likewise.
7793 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7794 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7795 (hash_loc_operands): Likewise.
7796 (compare_loc_operands): Likewise.
7798 2018-05-14 Mark Wielaard <mark@klomp.org>
7800 * dwarf2out.c (count_index_addrs): New function.
7801 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7803 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7805 PR tree-optimization/83648
7806 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7807 return value as malloc candidate.
7809 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7812 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7813 param as true in call to suggest_attribute.
7815 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
7817 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7818 -mreadonly-in-sdata.
7820 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7822 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7824 (aarch64_crypto_aesd_fused): Likewise.
7826 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
7828 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7829 (movsi_aarch64): Likewise.
7830 (load_pairsi): Likewise.
7831 (load_pairdi): Likewise.
7832 (store_pairsi): Likewise.
7833 (store_pairdi): Likewise.
7834 (load_pairsf): Likewise.
7835 (load_pairdf): Likewise.
7836 (store_pairsf): Likewise.
7837 (store_pairdf): Likewise.
7838 (zero_extend): Likewise.
7839 (trunc): Swap alternatives.
7840 (fcvt_target): Add '?' to prefer w over r.
7842 2018-05-14 Jakub Jelinek <jakub@redhat.com>
7845 * config/i386/i386.md: Disallow non-commutative arithmetics in
7846 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7847 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
7848 in the peephole2 before it.
7850 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
7852 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7853 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7854 (ix86_handle_option): Handle -mcldemote.
7855 * config.gcc: New header.
7856 * config/i386/cldemoteintrin.h: New file.
7857 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7858 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7860 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7861 OPTION_MASK_ISA_CLDEMOTE.
7862 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7863 (ix86_valid_target_attribute_inner_p): Ditto.
7864 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7865 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7866 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7867 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7868 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7870 * config/i386/i386.opt: Add -mcldemote.
7871 * config/i386/x86intrin.h: New header.
7872 * doc/invoke.texi: Add -mcldemote.
7874 2018-05-14 Richard Biener <rguenther@suse.de>
7876 * doc/match-and-simplify.texi: Adjust :s documentation.
7878 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
7880 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7881 intended memcpy size.
7882 (REORDER_45): Likewise.
7884 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
7886 * sort.cc: New file.
7887 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7888 * vec.c (qsort_chk): Use gcc_qsort.
7889 * Makefile.in (OBJS-libcommon): Add sort.o.
7890 (build/sort.o): New target. Use it...
7891 (BUILD_RTL): ... here, and...
7892 (build/gencfn-macros): ... here, and...
7893 (build/genmatch): ... here.
7895 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7896 Chung-Ju Wu <jasonwucj@gmail.com>
7898 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7899 * config/nds32/nds32-graywolf.md: New file.
7900 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7901 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7903 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7904 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7905 * config/nds32/nds32.md (pipeline_model): Add graywolf.
7906 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7907 * config/nds32/pipelines.md: Include n15 settings.
7909 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7910 Chung-Ju Wu <jasonwucj@gmail.com>
7912 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7913 * config/nds32/nds32-n13.md: New file.
7914 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7915 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7917 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7918 * config/nds32/nds32.md (pipeline_model): Add n13.
7919 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7920 * config/nds32/pipelines.md: Include n13 settings.
7922 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7923 Chung-Ju Wu <jasonwucj@gmail.com>
7925 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7926 * config/nds32/nds32-n10.md: New file.
7927 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7928 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7930 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7931 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7932 * config/nds32/nds32.md (pipeline_model): Add n10.
7933 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7934 * config/nds32/pipelines.md: Include n10 settings.
7936 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
7937 Kito Cheng <kito.cheng@gmail.com>
7938 Chung-Ju Wu <jasonwucj@gmail.com>
7940 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7941 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7942 Add enum values for DSP extension instructions.
7943 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7945 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7946 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7948 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7949 * config/nds32/nds32-dspext.md: New file for DSP implementation.
7950 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7951 * config/nds32/nds32-intrinsic.md: Likewise.
7952 * config/nds32/nds32_intrinsic.h: Likewise.
7953 * config/nds32/nds32-md-auxiliary.c: Likewise.
7954 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7955 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7956 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7957 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7958 * config/nds32/nds32-protos.h: New declarations for DSP extension.
7959 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7960 TYPE_DMAC in switch statement.
7961 * config/nds32/nds32.c: New checking and implementation for DSP
7962 extension instructions.
7963 * config/nds32/nds32.h: Likewise.
7964 * config/nds32/nds32.md: Likewise.
7965 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7966 * config/nds32/predicates.md: Implement new predicates for DSP
7969 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7971 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7972 Reformat alternatives and attributes so it is easier to identify
7973 which constraints/attributes go with which instruction.
7974 (mov<mode>_hardfloat32, FMOVE64): Likewise.
7975 (mov<mode>_softfloat32, FMOVE64): Likewise.
7976 (mov<mode>_hardfloat64, FMOVE64): Likewise.
7977 (mov<mode>_softfloat64, FMOVE64): Likewise.
7979 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
7981 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7983 (Basic PowerPC Built-in Functions): The new name of the
7984 subsection previously known as "PowerPC Built-in Functions".
7985 (Basic PowerPC Built-in Functions Available on all Configurations):
7987 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7988 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7989 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7990 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7992 2018-05-11 Martin Jambor <mjambor@suse.cz>
7995 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7998 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8001 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8003 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
8005 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8006 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8007 (ix86_handle_option): Handle -mwaitpkg.
8008 * config.gcc: New header.
8009 * config/i386/cpuid.h (bit_WAITPKG): New bit.
8010 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8011 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8013 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8014 OPTION_MASK_ISA_WAITPKG.
8015 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8016 (ix86_option_override_internal): Add PTA_WAITPKG.
8017 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8018 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8019 IX86_BUILTIN_TPAUSE.
8020 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8021 __builtin_ia32_umwait and __builtin_ia32_tpause.
8022 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8023 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8024 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8025 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8026 UNSPECV_TPAUSE): New.
8027 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8028 * config/i386/i386.opt: Add -mwaitpkg.
8029 * config/i386/waitpkgintrin.h: New file.
8030 * config/i386/x86intrin.h: New header.
8031 * doc/invoke.texi: Add -mwaitpkg.
8033 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8036 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8038 (cortex-m0): Use armv6s-m isa.
8039 (cortex-m0plus): Likewise.
8040 (cortex-m1): Likewise.
8041 (cortex-m0.small-multiply): Likewise.
8042 (cortex-m0plus.small-multiply): Likewise.
8043 (cortex-m1.small-multiply): Likewise.
8045 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
8046 Jakub Jelinek <jakub@redhat.com>
8048 PR tree-optimization/85692
8049 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8050 source permute as well.
8052 2018-05-11 Martin Liska <mliska@suse.cz>
8055 * doc/extend.texi: Document LLVM style format for no_sanitize
8058 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
8060 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8061 mode_supports_vsx_dform_quad to mode_supports_dq_form.
8062 (mode_supports_vsx_dform_quad): Likewise.
8063 (mode_supports_vmx_dform): Move these functions to be next to the
8064 other mode_supports functions.
8065 (mode_supports_dq_form): Likewise.
8066 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8067 mode_supports_dq_form.
8068 (reg_offset_addressing_ok_p): Likewise.
8069 (offsettable_ok_by_alignment): Likewise.
8070 (rs6000_legitimate_offset_address_p): Likewise.
8071 (legitimate_lo_sum_address_p): Likewise.
8072 (rs6000_legitimize_address): Likewise.
8073 (rs6000_legitimize_reload_address): Likewise.
8074 (rs6000_secondary_reload_inner): Likewise.
8075 (rs6000_preferred_reload_class): Likewise.
8076 (rs6000_output_move_128bit): Likewise.
8078 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8080 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8081 Generate SImode target register for null target.
8082 <case IX86_BUILTIN_XGETBV>: Ditto.
8083 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8084 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8086 2018-05-10 Carl Love <cel@us.ibm.com>
8088 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8089 dcbtt and dcbtstt if operands[2] is 0.
8091 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8094 * config/i386/sse.md (usadv64qi): New expander.
8096 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
8098 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8099 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8100 -maltivec=be support.
8101 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8102 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8103 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8104 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8105 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8106 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8107 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8108 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8109 altivec_vsumsws): Adjust.
8110 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8111 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8112 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8114 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8115 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8116 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8117 (altivec_lve<VI_char>x): Delete expand.
8118 (*altivec_lve<VI_char>x_internal): Rename to...
8119 (altivec_lve<VI_char>x): ... this.
8120 (altivec_lvxl_<mode>): Delete expand.
8121 (*altivec_lvxl_<mode>_internal): Rename to ...
8122 (altivec_lvxl_<mode>): ... this.
8123 (altivec_stvxl_<mode>): Delete expand.
8124 (*altivec_stvxl_<mode>_internal): Rename to ...
8125 (altivec_stvxl_<mode>): ... this.
8126 (altivec_stve<VI_char>x): Delete expand.
8127 (*altivec_stve<VI_char>x_internal): Rename to ...
8128 (altivec_stve<VI_char>x): ... this.
8129 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8130 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8131 reduc_plus_scal_<mode>): Adjust.
8132 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8134 (rs6000_cpu_cpp_builtins): Adjust.
8135 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8136 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8137 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8138 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8139 -maltivec=be support.
8140 (rs6000_split_vec_extract_var): Adjust.
8141 (rs6000_split_v4si_init): Adjust.
8142 (swap_selector_for_mode): Delete.
8143 (altivec_expand_lvx_be, altivec_expand_stvx_be,
8144 altivec_expand_stvex_be): Delete.
8145 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8146 -maltivec=be support.
8147 (rs6000_gimple_fold_builtin): Ditto.
8148 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8150 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8151 (TARGET_DIRECT_MOVE_64BIT): Adjust.
8152 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8153 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8154 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8155 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8156 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8157 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8158 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8159 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8160 anonymous split): Adjust.
8161 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8162 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8164 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
8166 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8167 when --with-gxx-include-dir is also specified.
8168 * configure: Regenerate.
8170 2018-05-09 Jim Wilson <jimw@sifive.com>
8173 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8174 * config/riscv/t-withmultilib: New.
8175 * config/riscv/withmultilib.h: New.
8176 * doc/install.texi: Document RISC-V --with-multilib-list support.
8178 2018-05-09 Richard Biener <rguenther@suse.de>
8180 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8182 (vect_bb_vectorization_profitable_p): Adjust. Compute
8183 actual scalar cost using the cost vector and the add_stmt_cost
8186 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8188 PR rtl-optimization/85645
8189 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8190 in the REG_CFA_REGISTER note for LR, don't leave it empty.
8192 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8194 PR rtl-optimization/85645
8195 * shrink-wrap.c (spread_components): Return a boolean saying if
8196 anything was changed.
8197 (try_shrink_wrapping_separate): Iterate spread_components until
8198 nothing changes anymore.
8200 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8202 PR rtl-optimization/85645
8203 * regrename.c (build_def_use): Also kill the chains that include the
8204 destination of a REG_CFA_REGISTER note.
8206 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8208 PR rtl-optimization/85645
8209 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8210 insn that has a REG_CFA_REGISTER note.
8212 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
8214 * cfgexpand.c (expand_clobber): New function.
8215 (expand_gimple_stmt_1): Use it.
8216 * tree-vect-stmts.c (vect_clobber_variable): New function,
8218 (vectorizable_simd_clone_call): ...here.
8219 (vectorizable_store): Emit a clobber either side of an
8220 IFN_STORE_LANES sequence.
8221 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8223 2018-05-09 Tom de Vries <tom@codesourcery.com>
8226 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8227 (define_insn "trap_if_false"): Add exit after trap.
8229 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
8231 PR rtl-optimization/85638
8232 * bb-reorder.c: Include common/common-target.h.
8233 (create_forwarder_block): New function extracted from...
8234 (fix_up_crossing_landing_pad): ...here. Rename into...
8235 (dw2_fix_up_crossing_landing_pad): ...this.
8236 (sjlj_fix_up_crossing_landing_pad): New function.
8237 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8238 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8239 from both partitions and exit the loop after one iteration.
8241 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8244 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8246 (Basic PowerPC Built-in Functions): The new name of the
8247 subsection previously known as "PowerPC Built-in Functions".
8248 (Basic PowerPC Built-in Functions Available on all Configurations):
8250 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8252 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8254 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8256 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8259 2018-05-08 Jim Wilson <jimw@sifive.com>
8261 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8262 (LD_EMUL_SUFFIX): New.
8263 (LINK_SPEC): Use it.
8265 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8267 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8269 (Basic PowerPC Built-in Functions): The new name of the
8270 subsection previously known as "PowerPC Built-in Functions".
8271 (Basic PowerPC Built-in Functions Available on all Configurations):
8273 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8275 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8277 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8279 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8282 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8285 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8286 after cmpelim optimization.
8288 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
8290 * config.gcc: Support "goldmont".
8291 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8292 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8294 * config/i386/i386.c (m_GOLDMONT): Define.
8295 (processor_target_table): Add "goldmont".
8296 (PTA_GOLDMONT): Define.
8297 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8298 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8299 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8300 (fold_builtin_cpu): Add "goldmont".
8301 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8302 (ix86_option_override_internal): Add "goldmont".
8303 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8304 (processor_type): Add PROCESSOR_GOLDMONT.
8305 * config/i386/i386.md: Add CPU "glm".
8306 * config/i386/glm.md: New file.
8307 * config/i386/x86-tune.def: Add m_GOLDMONT.
8308 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8310 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8313 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8315 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8316 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
8317 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
8320 * config/i386/i386.c (ix86_fold_builtin): Handle
8321 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8324 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8325 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8327 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
8330 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8331 (check_arch): Likewise.
8332 (check_fpu): Return the result rather than printing it.
8333 (end arch): Fix operator precedence.
8334 (end cpu): Likewise.
8335 (END): Print the result from check_fpu.
8337 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8338 Alan Hayward <alan.hayward@arm.com>
8339 David Sherwood <david.sherwood@arm.com>
8341 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8342 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8343 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8344 (*fcmuo<mode>_and): New patterns.
8346 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8348 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8349 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8350 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8351 (cmp_op, sve_imm_con): New code attributes.
8352 (SVE_COND_INT_CMP, imm_con): Delete.
8353 (cmp_op): Remove above unspecs from int attribute.
8354 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8356 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
8357 comparison-specific unspecs.
8358 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8359 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8360 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8361 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8362 (*vec_fcm<cmp_op><mode>): Rename to...
8363 (*fcm<cmp_op><mode>): ...this and adjust likewise.
8364 (*vec_fcmuo<mode>): Rename to...
8365 (*fcmuo<mode>): ...this and adjust likewise.
8366 (*pred_fcm<cmp_op><mode>): New pattern.
8367 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8368 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8370 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8372 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8373 (aarch64_emit_sve_predicated_cond): New function.
8374 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8375 (aarch64_emit_unspec_cond_or): Replace with...
8376 (aarch64_emit_sve_or_conds): ...this new function. Use
8377 aarch64_emit_sve_ptrue_op for the individual comparisons and
8378 aarch64_emit_binop to OR them together.
8379 (aarch64_emit_inverted_unspec_cond): Replace with...
8380 (aarch64_emit_sve_inverted_cond): ...this new function. Use
8381 aarch64_emit_sve_ptrue_op for the comparison and
8382 aarch64_emit_unop to invert the result.
8383 (aarch64_expand_sve_vec_cmp_float): Update after the above
8384 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
8386 2018-05-07 Nathan Sidwell <nathan@acm.org>
8388 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8389 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8390 (Backwards Compatibility): Likewise.
8392 2018-05-07 Luis Machado <luis.machado@linaro.org>
8396 2018-05-07 Luis Machado <luis.machado@linaro.org>
8398 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8399 <prefetch_dynamic_strides>: New const bool field.
8400 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8401 prefetch_dynamic_strides.
8402 (exynosm1_prefetch_tune): Likewise.
8403 (thunderxt88_prefetch_tune): Likewise.
8404 (thunderx_prefetch_tune): Likewise.
8405 (thunderx2t99_prefetch_tune): Likewise.
8406 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8408 (aarch64_override_options_internal): Update to set
8409 PARAM_PREFETCH_DYNAMIC_STRIDES.
8410 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8411 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8412 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8413 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8414 prefetch-dynamic-strides setting.
8416 2018-05-07 Luis Machado <luis.machado@linaro.org>
8418 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8419 <minimum_stride>: New const int field.
8420 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8421 minimum_stride field.
8422 (exynosm1_prefetch_tune): Likewise.
8423 (thunderxt88_prefetch_tune): Likewise.
8424 (thunderx_prefetch_tune): Likewise.
8425 (thunderx2t99_prefetch_tune): Likewise.
8426 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8427 (aarch64_override_options_internal): Update to set
8428 PARAM_PREFETCH_MINIMUM_STRIDE.
8429 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8430 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8431 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8432 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8433 stride is constant and is below the minimum stride threshold.
8435 2018-05-07 Luis Machado <luis.machado@linaro.org>
8437 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8440 2018-05-07 Luis Machado <luis.machado@linaro.org>
8442 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8443 <prefetch_dynamic_strides>: New const bool field.
8444 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8445 prefetch_dynamic_strides.
8446 (exynosm1_prefetch_tune): Likewise.
8447 (thunderxt88_prefetch_tune): Likewise.
8448 (thunderx_prefetch_tune): Likewise.
8449 (thunderx2t99_prefetch_tune): Likewise.
8450 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8452 (aarch64_override_options_internal): Update to set
8453 PARAM_PREFETCH_DYNAMIC_STRIDES.
8454 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8455 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8456 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8457 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8458 prefetch-dynamic-strides setting.
8460 2018-05-07 Luis Machado <luis.machado@linaro.org>
8462 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8463 <minimum_stride>: New const int field.
8464 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8465 minimum_stride field.
8466 (exynosm1_prefetch_tune): Likewise.
8467 (thunderxt88_prefetch_tune): Likewise.
8468 (thunderx_prefetch_tune): Likewise.
8469 (thunderx2t99_prefetch_tune): Likewise.
8470 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8471 (aarch64_override_options_internal): Update to set
8472 PARAM_PREFETCH_MINIMUM_STRIDE.
8473 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8474 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8475 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8476 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8477 stride is constant and is below the minimum stride threshold.
8479 2018-05-06 Jakub Jelinek <jakub@redhat.com>
8482 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8483 the type is addressable. Don't force op into register if it has
8486 2018-05-05 Roland McGrath <mcgrathr@google.com>
8489 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8490 any section for which we don't know a specific type it should have,
8491 regardless of name. Previously this was done only for the exact
8492 names ".init_array", ".fini_array", and ".preinit_array".
8493 (default_elf_asm_named_section): Add comment about
8494 relationship with default_section_type_flags and SECTION_NOTYPE.
8495 (get_section): Don't consider it a type conflict if one side has
8496 SECTION_NOTYPE and the other doesn't, as long as neither has the
8497 SECTION_BSS et al used in the default_section_type_flags logic.
8499 2018-05-05 Tom de Vries <tom@codesourcery.com>
8502 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8503 (workaround_barsyncs): New function.
8504 (nvptx_reorg): Use workaround_barsyncs.
8505 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8506 (define_expand "nvptx_membar_cta"): New define_expand.
8507 (define_insn "*nvptx_membar_cta"): New insn.
8509 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
8511 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8512 To improve optimization opportunities.
8513 * builtin-types.def: The new needed builtin types for the above.
8515 2018-05-04 Richard Biener <rguenther@suse.de>
8517 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8518 * gimple-ssa-store-merging.c
8519 (imm_store_chain_info::output_merged_store): Remove redundant create,
8520 release split_store vector contents on failure.
8521 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8522 scalar stmt vector on cache hit.
8524 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
8526 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8528 * config.gcc (powerpc-xilinx-eabi*): Remove.
8529 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8531 (fusion_addis_mem_combo_load): Ditto.
8532 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8534 (rs6000_cpu_cpp_builtins): Ditto.
8535 * config/rs6000/rs6000-linux.c
8536 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8537 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8538 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8540 (rs6000_setup_reg_addr_masks): Ditto.
8541 (rs6000_init_hard_regno_mode_ok): Ditto.
8542 (rs6000_option_override_internal): Ditto.
8543 (legitimate_lo_sum_address_p): Ditto.
8544 (rs6000_legitimize_address): Ditto.
8545 (rs6000_legitimize_reload_address): Ditto.
8546 (rs6000_legitimate_address_p): Ditto.
8547 (abi_v4_pass_in_fpr): Ditto.
8548 (setup_incoming_varargs): Ditto.
8549 (rs6000_gimplify_va_arg): Ditto.
8550 (rs6000_split_multireg_move): Ditto.
8551 (rs6000_savres_strategy): Ditto.
8552 (rs6000_emit_prologue_components): Ditto.
8553 (rs6000_emit_epilogue_components): Ditto.
8554 (rs6000_emit_prologue): Ditto.
8555 (rs6000_emit_epilogue): Ditto.
8556 (rs6000_elf_file_end): Ditto.
8557 (rs6000_function_value): Ditto.
8558 (rs6000_libcall_value): Ditto.
8559 * config/rs6000/rs6000.h: Ditto.
8560 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8561 (TARGET_MINMAX): ... this. New.
8562 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8563 * config/rs6000/rs6000.md: Remove Xilinx FP support.
8564 (*movsi_internal1_single): Delete.
8565 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8566 mfpu=, mxilinx-fpu): Delete.
8567 * config/rs6000/singlefp.h: Delete.
8568 * config/rs6000/sysv4.h: Remove Xilinx FP support.
8569 * config/rs6000/t-rs6000: Ditto.
8570 * config/rs6000/t-xilinx: Delete.
8571 * config/rs6000/titan.md: Adjust for fp_type removal.
8572 * config/rs6000/vsx.md: Remove Xilinx FP support.
8573 (VStype_simple): Delete.
8574 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8575 * config/rs6000/xfpu.h: Delete.
8576 * config/rs6000/xfpu.md: Delete.
8577 * config/rs6000/xilinx.h: Delete.
8578 * config/rs6000/xilinx.opt: Delete.
8579 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8580 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8582 2018-05-04 Tom de Vries <tom@codesourcery.com>
8585 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8588 2018-05-04 Richard Biener <rguenther@suse.de>
8591 * tree-complex.c (update_complex_assignment): We are always in SSA form.
8592 (expand_complex_div_wide): Likewise.
8593 (expand_complex_operations_1): Likewise.
8594 (expand_complex_libcall): Preserve EH info of the original stmt.
8595 (tree_lower_complex): Handle removed blocks.
8596 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8597 on complex multiplication and division libcall builtins.
8599 2018-05-04 Richard Biener <rguenther@suse.de>
8602 * fold-const.c (negate_expr_p): Restrict negation of operand
8603 zero of a division to when we know that can happen without
8605 (fold_negate_expr_1): Likewise.
8607 2018-05-04 Jakub Jelinek <jakub@redhat.com>
8610 * real.h (real_nextafter): Declare.
8611 * real.c (real_nextafter): New function.
8612 * fold-const-call.c (fold_const_nextafter): New function.
8613 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8614 CASE_CFN_NEXTTOWARD.
8615 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8616 even when arg1_mode is different from arg0_mode.
8618 2018-05-03 Nathan Sidwell <nathan@acm.org>
8620 * doc/extend.texi (Deprecated Features): Remove
8622 (Backwards Compatibility): Likewise.
8623 * doc/invoke.texi (C++ Language Options): Likewise.
8624 (C++ Dialect Options): Likewise.
8626 2018-05-03 Jakub Jelinek <jakub@redhat.com>
8629 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8630 _mm512_mask_mullox_epi64): New intrinsics.
8632 2018-05-03 Tom de Vries <tom@codesourcery.com>
8635 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8636 dump files): Add offload-tree.
8638 2018-05-03 Richard Biener <rguenther@suse.de>
8640 PR tree-optimization/85615
8641 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8642 to loops not nested in BBs loop father to avoid creating multi-entry
8645 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8647 PR tree-optimization/70291
8648 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8649 arguments. Change return type to tree. Emit libcall as a new
8650 statement rather than replacing existing one when inplace_p is true.
8651 (expand_complex_multiplication_components): New function.
8652 (expand_complex_multiplication): Expand floating-point complex
8653 multiplication using the above.
8654 (expand_complex_division): Rename inner_type parameter to type.
8655 Update expand_complex_libcall call-site.
8656 (expand_complex_operations_1): Update expand_complex_multiplication
8657 and expand_complex_division call-sites.
8659 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8662 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8663 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8664 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8665 the highest significant bit of the shift count mask is clear. In
8666 check whether and[sq]i3 is needed verify that all significant bits
8667 of the shift count other than the highest are set.
8669 2018-05-02 Tom de Vries <tom@codesourcery.com>
8672 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8673 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8674 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8675 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8676 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8677 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8678 __builtin_goacc_parlevel_size.
8680 2018-05-02 Richard Biener <rguenther@suse.de>
8682 PR tree-optimization/85597
8683 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8684 do not use split vect_get_vec_defs call but call vect_get_slp_defs
8687 2018-05-02 Tom de Vries <tom@codesourcery.com>
8690 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8691 dump files): Add ltrans-tree.
8693 2018-05-02 Tom de Vries <tom@codesourcery.com>
8696 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8697 dump files): Add wpa-ipa.
8699 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
8701 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
8702 powerpc*-*-linux*paired* target.
8703 * config/rs6000/750cl.h: Delete.
8704 * config/rs6000/paired.h: Delete.
8705 * config/rs6000/paired.md: Delete.
8706 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8708 * config/rs6000/rs6000-builtin.def: Remove paired float support.
8709 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8710 comment. Remove paired float support.
8711 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8712 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8714 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8715 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8717 * config/rs6000/rs6000.c: Remove paired float support.
8718 (paired_expand_vector_init, paired_expand_vector_move,
8719 paired_emit_vector_compare, paired_emit_vector_cond_expr,
8720 (paired_expand_lv_builtin, paired_expand_stv_builtin,
8721 paired_expand_builtin, paired_expand_predicate_builtin,
8722 paired_init_builtins): Delete.
8723 * config/rs6000/rs6000.h: Remove paired float support.
8724 * config/rs6000/rs6000.md: Remove paired float support.
8725 (move_from_CR_ov_bit): Delete.
8726 * config/rs6000/rs6000.opt (mpaired): Delete.
8727 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8728 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8730 2018-05-02 Richard Biener <rguenther@suse.de>
8733 * gimplify.c (gimplify_save_expr): When in SSA form allow
8734 SAVE_EXPRs to compute to SSA vars.
8736 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8739 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8740 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8741 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8742 clobber operands[2], instead use a new pseudo. Formatting fixes.
8744 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
8746 PR tree-optimization/85586
8747 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8748 exit early for statements in the same group if the accesses are
8751 2018-05-02 Tom de Vries <tom@codesourcery.com>
8754 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8757 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
8759 PR tree-optimization/85143
8760 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8762 2018-05-01 Tom de Vries <tom@codesourcery.com>
8765 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8766 not found" error message.
8768 2018-05-01 Tom de Vries <tom@codesourcery.com>
8771 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8772 * vec.c (test_ordered_remove_if): New function.
8773 (vec_c_tests): Call test_ordered_remove_if.
8774 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8775 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8776 * tree-vect-patterns.c (vect_pattern_recog_1): Use
8777 VEC_ORDERED_REMOVE_IF.
8779 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8781 PR tree-optimization/82665
8782 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8783 pointer subtraction where arguments come from a memchr call.
8785 2018-05-01 Jakub Jelinek <jakub@redhat.com>
8787 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8788 --push-state --as-needed and --pop-state instead of --as-needed and
8789 --no-as-needed if ld supports it.
8790 * configure: Regenerated.
8793 * doc/install.texi2html: Replace _002d with - and _002a with * in
8794 generated html files using sed.
8796 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8799 * gcc-rich-location.c (blank_line_before_p): New function.
8800 (use_new_line): New function.
8801 (gcc_rich_location::add_fixit_insert_formatted): New function.
8802 * gcc-rich-location.h
8803 (gcc_rich_location::add_fixit_insert_formatted): New function.
8805 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8807 * selftest.c (assert_streq): Rename "expected" and "actual" to
8808 "val1" and "val2". Extend NULL-handling to cover both inputs
8809 symmetrically, while still requiring both to be non-NULL for a pass.
8810 * selftest.h (assert_streq): Rename "expected" and "actual" to
8812 (ASSERT_EQ): Likewise.
8813 (ASSERT_EQ_AT): Likewise.
8814 (ASSERT_KNOWN_EQ): Likewise.
8815 (ASSERT_KNOWN_EQ_AT): Likewise.
8816 (ASSERT_NE): Likewise.
8817 (ASSERT_MAYBE_NE): Likewise.
8818 (ASSERT_MAYBE_NE_AT): Likewise.
8819 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
8820 the assertion to pass.
8821 (ASSERT_STREQ_AT): Likewise.
8823 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8825 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8826 interaction with -pie.
8828 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8830 * selftest.h: Fix alphabetization of per-source-file selftest
8833 2018-04-30 Jason Merrill <jason@redhat.com>
8835 PR c++/61982 - dead stores to destroyed objects.
8836 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8839 2018-04-30 Jason Merrill <jason@redhat.com>
8841 * tree.c (build_clobber): New.
8842 * tree.h: Declare it.
8843 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8845 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8847 * diagnostic-show-locus.c (layout::layout): Update for
8848 location_get_source_line returning a char_span.
8849 (struct char_span): Move to input.h.
8850 (struct correction): Update for fields in char_span becoming
8852 (struct source_line): Update for location_get_source_line
8853 returning a char_span.
8854 (layout::print_line): Likewise.
8855 * edit-context.c (edited_file::print_content): Likewise.
8856 (edited_file::print_diff_hunk): Likewise.
8857 (edited_file::print_run_of_changed_lines): Likewise.
8858 (edited_file::get_num_lines): Likewise.
8859 (edited_line::edited_line): Likewise.
8860 * final.c (asm_show_source): Likewise.
8861 * input.c (location_get_source_line): Convert return type
8862 from const char * to char_span, losing the final "line_len"
8864 (dump_location_info): Update for the above.
8865 (get_substring_ranges_for_loc): Likewise. Use a char_span
8866 when handling the literal within the line.
8867 (test_reading_source_line): Update for location_get_source_line
8868 returning a char_span.
8869 * input.h (class char_span): Move here from
8870 diagnostic-show-locus.c, converting from a struct to a class.
8871 Make data members private.
8872 (char_span::operator bool): New.
8873 (char_span::length): New.
8874 (char_span::get_buffer): New.
8875 (char_span::operator[]): New.
8876 (char_span::subspan): Make const.
8877 (char_span::xstrdup): New.
8878 (location_get_source_line): Convert return type from const char *
8879 to char_span, losing the final "line_size" param.
8881 2018-04-30 Jan Hubicka <jh@suse.cz>
8883 * lto-wrapper.c (ltrans_priorities): New static var.
8884 (cmp_priority): New.
8885 (run_gcc): Read priorities and if doing parallel build order
8886 the Makefile by them.
8888 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8890 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8892 2018-04-30 Richard Biener <rguenther@suse.de>
8894 * tree-cfg.c (verify_address): Remove base argument, add
8895 flag whether to check TREE_ADDRESSABLE and do that.
8896 (verify_expr): Remove.
8897 (verify_types_in_gimple_reference): Add pieces from verify_expr.
8898 (verify_gimple_assign_single): Likewise.
8899 (verify_gimple_switch): Likewise.
8900 (verify_expr_location_1): Dereference tp once. Add (disabled)
8901 piece from verify_expr.
8902 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8904 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8906 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8908 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8910 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8911 (small_data_pattern): Likewise.
8912 (arc_rewrite_small_data): Likewise.
8913 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8914 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8915 (get_symbol_alignment): New function.
8916 (legitimate_small_data_address_p): Likewise.
8917 (legitimate_scaled_address): Update, call
8918 legitimate_small_data_address_p.
8919 (output_sdata): New static variable.
8920 (arc_print_operand): Update how we handle small data operands.
8921 (arc_print_operand_address): Likewise.
8922 (arc_legitimate_address_p): Update, use
8923 legitimate_small_data_address_p.
8924 (arc_rewrite_small_data_p): Remove.
8925 (arc_rewrite_small_data_1): Likewise.
8926 (arc_rewrite_small_data): Likewise.
8927 (small_data_pattern): Likewise.
8928 (compact_sda_memory_operand): Update to use
8929 legitimate_small_data_address_p and get_symbol_alignment.
8930 (prepare_move_operands): Don't rewite sdata pattern.
8931 (prepare_extend_operands): Remove.
8932 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8934 (zero_extendqisi2): Likewise.
8935 (zero_extendhisi2): Likewise.
8936 (extendqihi2): Likewise.
8937 (extendqisi2): Likewise.
8938 (extendhisi2): Likewise.
8942 * config/arc/constraints.md (Usd): Change it to memory constraint.
8944 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8946 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8947 as source of std instructions.
8948 * config/arc/arc.md (movsi_insn): Update pattern predicate to
8949 allow 6-bit constants as source for store instructions.
8950 (movdi_insn): Update instruction pattern to allow 6-bit constants
8951 as source for store instructions.
8953 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8955 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8957 2018-04-30 Nathan Sidwell <nathan@acm.org>
8958 Sandra Loosemore <sandra@codesourcery.com>
8960 * dumpfile.c (dump_open): Allow '-' for stdout.
8961 * doc/invoke.texi (Developer Options): Document dump filename
8962 determination early. Document stdin/stdout selection.
8964 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
8966 Microblaze Target: PIC data text relative
8968 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8969 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8971 * config/microblaze/microblaze.h (microblaze_constant_address_p):
8972 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8973 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8974 New addressing mode for data-text relative position indepenedent code.
8975 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8976 'ADDRESS_SYMBOLIC_TXT_REL'.
8977 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8978 (microblaze_legitimate_pic_operand): Exclude function calls from
8979 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8980 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8982 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8983 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8984 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8985 for 'address + offset'.
8986 (microblaze_expand_prologue): Add new function prologue call for
8988 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8989 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8990 table in case of TARGET_PIC_DATA_TEXT_REL.
8991 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8992 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8993 Add new macros 'UNSPEC_TEXT',
8994 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8995 + exclude function calls from 'UNSPEC_PLT' in case of data text
8997 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8998 new target hook for generating address diff vector tables in case of
9000 * doc/tm.texi : Regenerate.
9001 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9002 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9003 of addr diff vector generation.
9004 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9005 target hook definition.
9006 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9007 Add default function for generate_pic_addr_diff_vec -> flag_pic.
9008 * doc/invoke.texi (Add new pic option): Add new microblaze pic
9009 option for data text relative.
9011 2018-04-30 Richard Biener <rguenther@suse.de>
9013 * tree-chrec.h (evolution_function_is_constant_p): Remove
9015 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9017 2018-04-30 Richard Biener <rguenther@suse.de>
9020 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9022 2018-04-30 Richard Biener <rguenther@suse.de>
9024 PR tree-optimization/28364
9025 PR tree-optimization/85275
9026 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9027 copying first exit test.
9029 2018-04-28 Mark Wielaard <mark@klomp.org>
9031 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9033 (dwarf_AT): Handle DW_AT_addr_base.
9034 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9036 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
9039 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9040 (*ashl<dwi>3_doubleword_mask_1): Ditto.
9041 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9042 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9044 2018-04-28 Richard Biener <rguenther@suse.de>
9046 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9047 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9048 to reflect use. Only add interesting stmts.
9050 2018-04-27 Martin Jambor <mjambor@suse.cz>
9053 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9054 the jump function allows for passing through aggregate values.
9056 2018-04-27 David Malcolm <dmalcolm@redhat.com>
9058 * input.h (in_system_header_at): Convert from macro to inline
9060 (from_macro_expansion_at): Likewise.
9061 (from_macro_definition_at): Likewise.
9063 2018-04-27 Jeff Law <law@redhat.com>
9065 * config.gcc: Mark tile* targets as deprecated/obsolete.
9067 2018-04-27 Richard Biener <rguenther@suse.de>
9069 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9072 2018-04-27 Richard Biener <rguenther@suse.de>
9074 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9076 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
9078 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9079 with Yd constraint. Set "preferred_for_speed" attribute from
9080 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9082 (*movdi_internal): Ditto.
9083 (movti_interunit splitters): Remove
9084 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9085 (movdi_interunit splitters): Ditto.
9086 * config/i386/constraints.md (Ye): Remove.
9087 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9089 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9092 * config/aarch64/constraints.md (Usg): Limit to 31.
9095 2018-04-27 Jakub Jelinek <jakub@redhat.com>
9097 PR tree-optimization/85529
9098 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9099 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9100 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9101 zero extension or masking of the MSB bit.
9102 (optimize_range_tests): Add FIRST_BB argument, pass it through
9103 to optimize_range_tests_var_bound.
9104 (maybe_optimize_range_tests, reassociate_bb): Adjust
9105 optimize_range_tests callers.
9107 2018-04-26 Richard Biener <rguenther@suse.de>
9108 Jakub Jelinek <jakub@redhat.com>
9110 * cgraph.h (symbol_table): Just declare debug method here.
9111 * symtab.c (symbol_table::debug): Define.
9113 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
9115 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9117 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
9119 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9120 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9121 (*movdi_internal): Substitute Yi and Yj constraint with x
9122 and Ym and Yn constraint with y constraint. Update "isa"
9123 attribute and set "preferred_for_speed" attribute from
9124 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9125 (*movsi_internal): Ditto.
9126 (*movdf_internal): Ditto.
9127 (*movsf_internal): Ditto.
9128 (*zero_extendsidi2): Ditto.
9129 * config/i386/sse.md (vec_set<mode>_0): Ditto.
9130 (sse2_loadld): Ditto.
9131 (*vec_extract<ssevecmodelower>_0): Ditto.
9132 (*vec_extractv4si_0_zext_sse4): Ditto.
9133 (vec_concatv2di): Ditto.
9134 (*vec_dup<mode>): Ditto.
9135 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9136 * config/i386/constraints.md (Yi): Remove.
9141 2018-04-26 Nathan Sidwell <nathan@acm.org>
9143 * dumpfile.c (dump_open): New.
9144 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9145 (dump_finish): Detect stdio/stderr by value not name.
9147 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
9149 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9151 2018-04-26 Tom de Vries <tom@codesourcery.com>
9154 * config/nvptx/nvptx.c (verify_neutering_jumps)
9155 (verify_neutering_labels): New function
9156 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9158 2018-04-26 Tom de Vries <tom@codesourcery.com>
9161 * config/nvptx/nvptx.c (needs_neutering_p): New function.
9162 (nvptx_single): Use needs_neutering_p to skip over insns that do not
9165 2018-04-26 Richard Biener <rguenther@suse.de>
9166 Tom de Vries <tom@codesourcery.com>
9169 * lto-streamer-out.c (output_function): Fixup loops if required to match
9170 discovery done in the reader.
9172 2018-04-26 Richard Biener <rguenther@suse.de>
9174 PR tree-optimization/85116
9175 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9176 have a loop exit from the single latch predecessor. Remove
9177 case of header with just condition.
9178 (ch_base::copy_headers): Exclude infinite loops from any
9180 (pass_ch::execute): Record exits.
9182 2018-04-26 Richard Biener <rguenther@suse.de>
9184 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9185 prologue cost vector and pass it to vect_get_load_cost.
9186 (vect_get_peeling_costs_all_drs): Likewise.
9187 (vect_peeling_hash_get_lowest_cost): Likewise.
9188 (vect_enhance_data_refs_alignment): Likewise.
9190 2018-04-26 Richard Biener <rguenther@suse.de>
9193 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9194 checking of integer<->pointer conversions.
9195 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9196 sign-/zero-extending pointer types.
9197 (expand_omp_for_static_chunk): Likewise.
9199 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
9200 Jean Lee <xiaoyur347@gmail.com>
9202 * config/mips/mips.c (mips_asan_shadow_offset): New function.
9203 (TARGET_ASAN_SHADOW_OFFSET): Define.
9204 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9205 true for -fsanitize=address.
9207 2018-04-25 Mark Wielaard <mark@klomp.org>
9209 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9212 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9214 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9215 than "alu", remove explicit "memory" and "imm_disp" attributes.
9216 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9219 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9220 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9221 gen_lowpart_no_emit.
9223 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
9226 * config/i386/i386.c (ix86_expand_builtin): Change memory
9227 operand to XI, extend p0 to Pmode.
9228 * config/i386/i386.md: Change unspec volatile and operand
9229 1 mode to XI, change operand 0 mode to P.
9231 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9233 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9234 GET_MODE_MASK before any checking.
9235 (nds32_can_use_bset_p): Likewise.
9236 (nds32_can_use_btgl_p): Likewise.
9238 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9240 * config/nds32/nds32-doubleword.md: New define_split pattern for
9241 illegal register number.
9243 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9245 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9247 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9249 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9251 2018-04-25 Richard Biener <rguenther@suse.de>
9253 * lto-streamer.h (LTO_major_version): Bump to 8.
9255 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9257 * BASE-VER: Set to 9.0.0.
9259 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
9261 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9262 in __abskf2 and __powikf2.
9264 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9267 * config/aarch64/constraints.md (Usg, Usj): New constraints.
9268 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9269 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9270 Use the above on operand 2. Reindent.
9271 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9273 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9276 * common/config/i386/i386-common.c (ix86_handle_option): Don't
9278 * config/i386/i386.opt (mcet): Removed.
9279 * doc/install.texi: Remove -mcet documentation.
9280 * doc/invoke.texi: Likewise.
9282 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9285 * doc/install.texi: Remove -mcet from bootstrap-cet.
9287 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9290 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9291 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9295 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9296 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9297 containing a CONST_VECTOR.
9299 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
9301 * doc/install.texi: Update newlib dependency for nvptx.
9303 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9306 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9307 instead of INTVAL when shifting x left.
9309 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
9311 PR tree-optimization/85478
9312 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9313 vect_grouped_store_supported for single element vectors.
9315 2018-04-24 Richard Biener <rguenther@suse.de>
9318 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9319 load cost increase to the case of non-constant step.
9321 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9324 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9325 destination if any_malformed_asm.
9327 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
9330 * expr.c (store_field): In the bitfield case, if the value comes from
9331 a function call and is returned in registers by means of a PARALLEL,
9332 do not change the mode of the temporary unless BLKmode and VOIDmode.
9334 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
9336 PR rtl-optimization/85423
9337 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9338 dependencies to debug insns when the previous insn is non-debug.
9340 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9342 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9343 enums into a single definition.
9344 (fls): Fix predicates and printing.
9347 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9349 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9350 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9351 and short u6 immediate.
9352 (check_if_valid_sleep_operand): Remove.
9353 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9355 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9357 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9358 flag_always_save_lp condition.
9359 * config/nds32/nds32.opt (malways-save-lp): New option.
9361 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9363 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9364 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9365 * config/nds32/nds32.h
9366 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9367 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9369 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9371 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9372 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9374 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9375 Chung-Ju Wu <jasonwucj@gmail.com>
9377 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9379 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9380 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9382 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9384 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9386 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9388 * config/nds32/nds32-protos.h (nds32_data_alignment,
9389 nds32_local_alignment): Declare.
9390 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9391 nds32_local_alignment): New functions.
9392 (TARGET_CONSTANT_ALIGNMENT): Define.
9393 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9395 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9397 * config/nds32/nds32.c
9398 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9399 (TARGET_MODES_TIEABLE_P): Likewise.
9401 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9403 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9406 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
9407 Chung-Ju Wu <jasonwucj@gmail.com>
9409 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9410 for unaligned access.
9411 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9413 * config/nds32/nds32-intrinsic.md: Likewise.
9414 * config/nds32/nds32_intrinsic.h: Likewise.
9415 * config/nds32/nds32.h (nds32_builtins): Likewise.
9416 * config/nds32/nds32.opt (munaligned-access): New option.
9417 * config/nds32/nds32.c (nds32_asm_file_start): Display
9418 flag_unaligned_access status.
9420 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9422 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9423 -mno-relax is present.
9424 * config/riscv/linux.h (LINK_SPEC): Ditto.
9426 2018-04-20 Martin Sebor <msebor@redhat.com>
9429 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9431 (gimple_fold_builtin_stxcpy_chk): Same.
9432 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9434 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
9437 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9438 __powikf2 when long double is IEEE 128-bit.
9440 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9442 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9443 step to make sure stack always aligned.
9445 2018-04-20 Carl Love <cel@us.ibm.com>
9448 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9449 size check for arg0.
9451 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
9452 Tom de Vries <tom@codesourcery.com>
9455 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9456 Emit insns for calls too.
9457 (nvptx_find_par): Always look for worker-level predecessor insn.
9458 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
9460 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9461 (nvptx_process_pars): Propagate frames for calls.
9463 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
9466 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9468 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9469 (ix86_handle_option): Don't handle OPT_mibt.
9470 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9472 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9474 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9475 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9476 (ix86_target_macros): Define __CET__ with flag_cf_protection
9477 for -fcf-protection.
9478 * config/i386/i386.c (isa2_opts): Remove -mibt.
9479 * config/i386/i386.h (TARGET_IBT): Removed.
9480 (TARGET_IBT_P): Likewise.
9481 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9482 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9483 * config/i386/i386.opt (mcet): Update help message.
9486 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
9487 -mcet as an alias for -mshstk.
9489 2018-04-20 Richard Biener <rguenther@suse.de>
9492 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9493 complexity by forcing a single use of the multiply operand.
9495 2018-04-20 Martin Jambor <mjambor@suse.cz>
9498 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9499 recursion dependency to only apply to non-clones.
9501 2018-04-20 Martin Jambor <mjambor@suse.cz>
9504 * ipa-cp.c (create_specialized_node): Check that clones of
9505 self-recursive edges exist during IPA-CP.
9507 2018-04-19 Toon Moene <toon@moene.org>
9509 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9512 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9514 PR tree-optimization/85467
9515 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9516 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
9517 VECTOR_CST element to type.
9519 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9522 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9523 * config/i386/i386.md (builtin_setjmp_setup): Removed.
9524 (builtin_longjmp): Likewise.
9525 (save_stack_nonlocal): New pattern.
9526 (restore_stack_nonlocal): Likewise.
9528 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9531 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9532 Replace ASM_OUTPUT_LABEL with fprintf.
9534 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9537 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9538 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9539 * config/i386/i386-c.c (ix86_target_macros_internal): Also
9540 define __IBT__ and __SHSTK__ for -fcf-protection.
9541 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9543 (ix86_trampoline_init): Likewise.
9544 (x86_output_mi_thunk): Likewise.
9545 (ix86_notrack_prefixed_insn_p): Likewise.
9546 (ix86_option_override_internal): Don't disallow -fcf-protection.
9547 * config/i386/i386.md (rdssp<mode>): Also enable for
9549 (incssp<mode>): Likewise.
9550 (nop_endbr): Likewise.
9551 * config/i386/i386.opt (mcet): Change help message to built-in
9555 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9556 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
9557 enable CET built-in functions.
9559 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
9561 * common/config/i386/i386-common.c
9562 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9563 OPTION_MASK_ISA_MOVDIRI_UNSET,
9564 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9565 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9566 * config.gcc (movdirintrin.h): New header.
9567 * config/i386/cpuid.h (bit_MOVDIRI,
9568 bit_MOVDIR64B): New bits.
9569 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9571 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9572 (VOID, PVOID, PCVOID)): New function types.
9573 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9574 __builtin_ia32_directstoreu_u64,
9575 __builtin_ia32_movdir64b): New builtins.
9576 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9577 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9579 (ix86_valid_target_attribute_inner_p): Ditto.
9580 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9581 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9582 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9583 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9584 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9585 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9586 (movdiri<mode>, movdir64b_<mode>): New.
9587 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9588 * config/i386/immintrin.h: Include movdirintrin.h.
9589 * config/i386/movdirintrin.h: New file.
9590 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9592 2018-04-19 Richard Biener <rguenther@suse.de>
9595 * cfg.c (clear_bb_flags): When loop state says we have
9596 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9598 2018-04-19 Richard Biener <rguenther@suse.de>
9600 PR tree-optimization/84737
9601 * tree-vect-data-refs.c (vect_copy_ref_info): New function
9602 copying restrict info.
9603 (vect_setup_realignment): Use it.
9604 * tree-vectorizer.h (vect_copy_ref_info): Declare.
9605 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9606 the first DR to all generated stores.
9607 (vectorizable_load): Likewise for loads.
9609 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9611 PR tree-optimization/85446
9612 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9613 the integral and pointer types to have the same precision.
9615 * doc/install.texi: Document --disable-cet being the default and
9618 2018-04-18 Martin Liska <mliska@suse.cz>
9620 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9623 2018-04-18 Martin Liska <mliska@suse.cz>
9626 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
9629 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9630 arguments if they are comparable.
9632 2018-04-18 Martin Liska <mliska@suse.cz>
9635 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
9638 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9641 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
9644 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9645 ENDBR after calling __morestack.
9647 2018-04-18 David Malcolm <dmalcolm@redhat.com>
9650 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9651 by using gcc_base_ver to generate a gcc_driver_version, and use
9652 it when generating GCC_DRIVER_NAME.
9653 * configure: Regenerate.
9655 2018-04-18 Jakub Jelinek <jakub@redhat.com>
9658 * config.gcc: Obsolete powerpc*-*-*spe*.
9660 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9663 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9664 (stabstr_D): Change type of unum from unsigned int to
9665 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
9668 2018-04-17 Jim Wilson <jimw@sifive.com>
9671 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9672 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9673 Set arg_pointer_offset after using pretend_args_size.
9675 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9677 PR rtl-optimization/85431
9678 * dse.c (record_store): Ignore zero width stores.
9681 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
9682 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9683 __builtin_stack_restore rather than after it.
9684 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9685 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9686 argument instead of virtual_dynamic_stack_rtx.
9688 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
9690 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9692 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9693 Add note to error message to explain internal mapping of overloaded
9694 built-in function name to non-overloaded built-in function name.
9695 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9698 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
9701 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9702 where the inputs overlap with the output.
9704 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9706 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9707 (=v, v) alternative and explicit "memory" attribute.
9708 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
9709 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9711 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9712 "sselog1" type instead of "sselog".
9713 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9714 "sselog". Remove explicit "memory" attribute.
9715 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9716 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9718 (vec_extract_hi_v32hi): Merge all alternatives into one, use
9719 "sselog1" type instead of "sselog". Remove explicit "memory"
9721 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9722 use "sselog1" type instead of "sselog". Remove explicit "memory"
9724 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9725 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9727 (vec_extract_hi_v64qi): Merge all alternatives into one, use
9728 "sselog1" type instead of "sselog". Remove explicit "memory"
9730 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9731 use "sselog1" type instead of "sselog". Remove explicit "memory"
9735 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9738 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9741 2018-04-17 Martin Jambor <mjambor@suse.cz>
9744 * ipa-cp.c (create_specialized_node): Call
9745 expand_all_artificial_thunks if necessary.
9747 2018-04-17 Martin Liska <mliska@suse.cz>
9750 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9751 in message, remote space in between '_G' and '('.
9753 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9756 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9757 avx512f_vmcmp<mode>3<round_saeonly_name>,
9758 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9759 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9760 avx512f_rndscale<mode><round_saeonly_name>,
9761 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9762 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9763 Use %<iptr>2 instead of %2 for -masm=intel.
9764 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9765 avx512f_vcvttss2usi<round_saeonly_name>,
9766 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9768 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9769 avx512f_vcvttsd2usi<round_saeonly_name>,
9770 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9771 Use %q1 instead of %1 for -masm=intel.
9772 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9773 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9774 of %3 for -masm=intel.
9775 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9777 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9779 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9781 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9782 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9784 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9786 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9787 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9788 %g1 and one with %0 and %1.
9789 (avx512er_vmrcp28<mode><round_saeonly_name>,
9790 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9792 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9793 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9794 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9795 of %0 and %{%4%} for -masm=intel.
9796 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9797 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9798 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9799 order of %0 and %{%5%}%{z%} for -masm=intel.
9801 2018-04-17 Jan Hubicka <jh@suse.cz>
9804 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9806 2018-04-17 Martin Liska <mliska@suse.cz>
9809 * multiple_target.c (create_dispatcher_calls): Set apostrophes
9810 for target_clone error message. Make default implementation
9811 clone to be a local declaration.
9812 (separate_attrs): Add new argument and check for an empty
9814 (expand_target_clones): Handle it.
9815 (ipa_target_clone): Make redirection just for target_clones
9818 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
9819 Tom de Vries <tom@codesourcery.com>
9822 * omp-expand.c (expand_oacc_for): Add dummy false branch for
9823 tiled basic blocks without omp continue statements.
9825 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
9828 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9829 vec_extract expression as having side effects to make sure it gets
9832 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
9835 * config/i386/i386.c (get_builtin_code_for_version): Check
9838 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
9841 * config.gcc: Support "skylake".
9842 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9844 * config/i386/i386.c (m_SKYLAKE): Define.
9845 (processor_target_table): Add "skylake".
9846 (ix86_option_override_internal): Add "skylake".
9847 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9848 PROCESSOR_CANNONLAKE.
9849 (get_builtin_code_for_version): Fix priority for
9850 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9851 PROCESSOR_SKYLAKE-AVX512.
9852 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9853 (processor_type): Add PROCESSOR_SKYLAKE.
9855 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
9856 Jason Merrill <jason@redhat.com>
9859 * convert.c (convert_to_integer_1): Use direct recursion for
9860 enumeral types and types with a precision less than the number
9861 of bits in their mode.
9863 2018-04-16 Julia Koval <julia.koval@intel.com>
9866 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9867 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9869 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
9872 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9873 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9874 and -mno-direct-move.
9876 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
9879 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9880 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9881 Ensure negative shifts result in {0}.
9883 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
9885 PR rtl-optimization/79916
9886 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9887 regs (if any) to define how to gnerate SD moves when LRA is in
9890 2018-04-13 Jakub Jelinek <jakub@redhat.com>
9892 PR rtl-optimization/85393
9893 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9894 * except.c (expand_dw2_landing_pad_for_region): Make static.
9895 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9896 a label and unconditional jump to old_bb, rather than
9897 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9900 PR rtl-optimization/85376
9901 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9902 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9903 instead of a specific value.
9905 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9906 Bin Cheng <bin.cheng@arm.com>
9908 PR tree-optimization/82965
9909 PR tree-optimization/83991
9910 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9911 by_profile_only parameter.
9912 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9913 information if the loop was predicted to iterate too many times.
9914 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9916 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9919 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9922 2018-04-13 Martin Liska <mliska@suse.cz>
9923 Jakub Jelinek <jakub@redhat.com>
9926 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9927 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9928 * builtins.c (expand_builtin_memory_copy_args): Use
9929 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9930 handle dest_addr == pc_rtx.
9932 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
9935 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9936 asked to not generate direct moves.
9937 (fix_trunc<mode>si2_stfiwx): Similar.
9938 (fix_trunc<mode>si2_internal): Similar.
9940 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9943 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9944 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9945 lookup if dest in some wider mode is known to be const0_rtx and
9946 if so, record permanent equivalence for it to be ZERO_EXTEND of
9947 the narrower mode destination.
9949 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9951 * lto-streamer-out.c (output_function): Revert 259346.
9952 * omp-expand.c (expand_oacc_for): Likewise.
9954 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
9956 PR rtl-optimization/85354
9957 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9958 * sel-sched.c (sel_global_init): ... here.
9960 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
9963 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9964 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9965 mode for PE-COFF targets.
9966 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9967 (i386_pe_asm_lto_end): Likewise.
9968 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9969 (TARGET_ASM_LTO_END): Likewise.
9970 * config/i386/winnt.c (saved_debug_info_level): New static variable.
9971 (i386_pe_asm_lto_start): New function.
9972 (i386_pe_asm_lto_end): Likewise.
9974 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9975 Richard Biener <rguenther@suse.de>
9978 * lto-streamer-out.c (output_function): Fix CFG loop state before
9980 * omp-expand.c (expand_oacc_for): Handle calls to internal
9981 functions like regular functions.
9983 2018-04-12 Richard Biener <rguenther@suse.de>
9986 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9987 for the early LTO debug to properly generate references to it
9988 during DIE emission. Do not re-use that for the skeleton for
9990 (dwarf2out_early_finish): Likewise.
9992 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9995 * config/i386/sse.md
9996 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9997 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9998 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9999 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10000 and output is a reg, avoid creating invalid lowpart subreg, but
10001 instead split into a 512-bit move. Don't split if not AVX512VL,
10002 input is xmm16+ reg and output is a mem.
10003 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10004 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10005 xmm16+ reg and output is a mem.
10007 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10009 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10010 also for flag_dwarf2_cfi_asm.
10012 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10014 PR rtl-optimization/85342
10015 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10016 a bool scalar var inside of the loop instead. Don't try to update
10017 recog_data.operand after failed apply_change_group.
10019 2018-04-12 Tom de Vries <tom@codesourcery.com>
10022 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10023 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
10024 array with flexible array member as array without given dimension.
10025 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10026 argument for undefined param to true.
10028 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
10031 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10032 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10033 from PowerPC section.
10034 * config/rs6000/sysv4.opt (mcall-): Improve help text.
10035 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10036 help text that is too long.
10037 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10038 help text that is too long.
10039 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10040 help text that is too long.
10042 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
10044 * config/alpha/alpha.md (stack_probe_internal): Rename
10045 from "probe_stack". Update all callers.
10047 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10049 PR rtl-optimization/84566
10050 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10051 sched_macro_fuse_insns.
10053 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10056 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10057 (compute_block_dependences): ... from here.
10059 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10061 PR tree-optimization/85331
10062 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10063 from int to HOST_WIDE_INT.
10065 2018-04-11 Martin Jambor <mjambor@suse.cz>
10068 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10069 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10070 not the same as the source val.
10071 (cgraph_edge_brings_value_p): New parameter.
10072 (gather_edges_for_value): Pass destination value to
10073 cgraph_edge_brings_value_p.
10074 (perhaps_add_new_callers): Likewise.
10075 (get_info_about_necessary_edges): Likewise and exclude values brought
10076 only by self-recursive edges.
10077 (create_specialized_node): Redirect only clones of self-calling edges.
10078 (+self_recursive_pass_through_p): New function.
10079 (find_more_scalar_values_for_callers_subset): Use it.
10080 (find_aggregate_values_for_callers_subset): Likewise.
10081 (known_aggs_to_agg_replacement_list): Removed.
10082 (decide_whether_version_node): Re-calculate known constants for all
10083 remaining context clones.
10085 2018-04-11 Richard Biener <rguenther@suse.de>
10088 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10089 from early DWARF output.
10090 (dwarf2out_early_finish): Output line info unconditionally into
10091 early DWARF and add reference to it.
10093 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10096 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10097 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10098 other than V2DFmode using iptr mode attribute.
10099 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10101 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10103 PR rtl-optimization/84659
10104 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10106 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10109 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10111 (output_loc_list): Pass address of a dummy size variable even in the
10112 locview handling loop.
10113 (index_location_lists): Add comment on why skip_loc_list_entry can't
10116 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
10119 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10122 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
10125 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10126 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10127 and -mstring-compare-inline-limit.
10129 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10132 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10133 for stack clash protection in a register whenever we need it to be in
10136 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10138 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10139 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10141 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10144 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10146 (mlong-double-): Ditto.
10147 * config/rs6000/sysv4.opt (msdata=): Ditto.
10148 (mtls-size=): Ditto.
10150 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
10152 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10153 erroneous entries for
10154 "vector int vec_ldl (int, long int *)", and
10155 "vector unsigned int vec_ldl (int, unsigned long int *)".
10156 Add comments and entries for
10157 "vector bool char vec_ldl (int, bool char *)",
10158 "vector bool short vec_ldl (int, bool short *)",
10159 "vector bool int vec_ldl (int, bool int *)",
10160 "vector bool long long vec_ldl (int, bool long long *)",
10161 "vector pixel vec_ldl (int, pixel *)",
10162 "vector long long vec_ldl (int, long long *)",
10163 "vector unsigned long long vec_ldl (int, unsigned long long *)".
10164 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10165 type tree bool_long_long_type_node and correct definition of
10166 bool_V2DI_type_node to make reference to this new type tree.
10167 (rs6000_mangle_type): Replace erroneous reference to
10168 bool_long_type_node with bool_long_long_type_node.
10169 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10170 comments to emphasize sign distinctions for char and int types and
10171 replace RS6000_BTI_bool_long constant with
10172 RS6000_BTI_bool_long_long constant. Also add comment to restrict
10173 use of RS6000_BTI_pixel.
10174 (bool_long_type_node): Remove this macro definition.
10175 (bool_long_long_type_node): New macro definition
10177 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10179 PR rtl-optimization/85300
10180 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10181 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10182 simplify_unary_operation fails.
10184 2018-04-10 Martin Liska <mliska@suse.cz>
10186 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10187 cgraph_edge and ipa_ref.
10189 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10193 * config/i386/sse.md
10194 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10195 computation of the VEC_MERGE selector from mask.
10196 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10197 Fix decoding of the VEC_MERGE selector into mask.
10199 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10201 PR tree-optimization/85286
10202 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10204 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10206 * final.c (final_1): Set insn_last_address as well as
10207 insn_current_address.
10209 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10212 * explow.c (emit_stack_probe): Call validize_mem on memory location
10213 before passing it to gen_probe_stack. Create address operand and
10214 legitimize it for the probe_stack_address case.
10216 2018-04-09 Jan Hubicka <jh@suse.cz>
10219 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10220 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10221 * tree.c (free_lang_data_in_type): Fix handling of binfos;
10223 (free_lang_data): Rebuild type inheritance graph.
10225 2018-04-09 Martin Sebor <msebor@redhat.com>
10227 * invoke.texi (-finline-small-functions): Mention other optimization
10229 (-findirect-inlining, -fpartial-inlining): Same.
10230 (-finline-functions-called-once): Same.
10231 (-freorder-blocks-and-partition): Same.
10233 2018-04-09 Jan Hubicka <jh@suse.cz>
10236 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10237 jumps; choose last target that matches the criteria (i.e.
10238 no partition changes for non-crossing jumps).
10239 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10240 support for redirecting crossing jumps to non-crossing.
10242 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
10244 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10245 also for naked functions.
10247 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
10249 * config/arc/arc.md (add_shift): New pattern.
10250 (add_shift2): Likewise.
10251 (sub_shift): Likewise.
10252 (sub_shift_cmp0_noout): Likewise.
10253 (compare_si_ashiftsi): Likewise.
10254 (xbfu_cmp0_noout): New combine pattern.
10255 (xbfu_cmp0"): Likewise.
10256 (movsi_set_cc_insn): Place the predicable variant first.
10257 (commutative_binary_cmp0_noout): Remove clobber.
10258 (commutative_binary_cmp0): New pattern.
10259 (noncommutative_binary_cmp0): Likewise.
10260 (noncommutative_binary_cmp0_noout): Likewise.
10261 (noncommutative_binary_comparison_result_used): Removed.
10262 (rsub_cmp0): New pattern.
10263 (rsub_cmp0_noout): Likewise.
10264 (extzvsi): Changed, keep only meaningful variants.
10265 (SQH, SEZ): New iterators.
10266 (SQH_postfix): New mode attribute.
10267 (SEZ_prefix): New code attribute.
10268 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10269 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10270 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10271 of numerical value.
10272 (noncommutative_operator): Check the availability of barrel
10275 2018-04-09 Richard Biener <rguenther@suse.de>
10277 PR tree-optimization/85284
10278 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10279 Only use the niter constraining form of simple_iv when the exit
10280 is always executed.
10282 2018-04-09 Tom de Vries <tom@codesourcery.com>
10285 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10286 (define_expand "*memory_barrier"): New define_expand.
10287 (define_insn "memory_barrier"): New insn.
10289 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10291 PR rtl-optimization/80463
10292 PR rtl-optimization/83972
10293 PR rtl-optimization/83480
10295 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10296 correct producer for the insn.
10297 (tidy_control_flow): Fixup seqnos in case of debug insns.
10299 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10301 PR rtl-optimization/83913
10303 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10304 different sched-times when merging exprs.
10306 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10308 PR rtl-optimization/83962
10310 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10311 tidy_fallthru_edge and tidy_control_flow.
10313 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10315 PR rtl-optimization/83530
10317 * sel-sched.c (force_next_insn): New global variable.
10318 (remove_insn_for_debug): When force_next_insn is true, also leave only
10319 next insn in the ready list.
10320 (sel_sched_region): When the region wasn't scheduled, make another pass
10321 over it with force_next_insn set to 1.
10323 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10325 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10327 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10328 for interrupt control.
10329 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10330 functions for interrupt control.
10331 * config/nds32/nds32-intrinsic.md: Likewise.
10332 * config/nds32/nds32_intrinsic.h: Likewise.
10333 * config/nds32/nds32.h (nds32_builtins): Likewise.
10335 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10337 * config/nds32/nds32.c (nds32_init_machine_status,
10338 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10339 strict_aligned_p field.
10340 (nds32_expand_to_rtl_hook): New function.
10341 (TARGET_EXPAND_TO_RTL_HOOK): Define.
10342 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10344 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10345 Chung-Ju Wu <jasonwucj@gmail.com>
10347 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10348 * config/nds32/nds32-n7.md: New file.
10349 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10350 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10352 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10353 * config/nds32/nds32.md (pipeline_model): Add n7.
10354 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10355 * config/nds32/pipelines.md: Include n7 settings.
10357 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10358 Chung-Ju Wu <jasonwucj@gmail.com>
10360 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10361 * config/nds32/nds32-e8.md: New file.
10362 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10363 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10365 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10366 * config/nds32/nds32.md (pipeline_model): Add e8.
10367 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10368 * config/nds32/pipelines.md: Include e8 settings.
10370 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10371 Chung-Ju Wu <jasonwucj@gmail.com>
10373 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10374 * config/nds32/nds32-n8.md: New file.
10375 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10376 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10378 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10379 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10380 * config/nds32/nds32.md (pipeline_model): Add n8.
10381 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10382 * config/nds32/pipelines.md: Include n8 settings.
10384 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10385 Chung-Ju Wu <jasonwucj@gmail.com>
10387 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10388 * config/nds32/nds32-n9-2r1w.md: New file.
10389 * config/nds32/nds32-n9-3r2w.md: New file.
10390 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10391 nds32_register_ports): New or modify for cpu n9.
10392 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10394 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10395 * config/nds32/nds32-utils.c: New file.
10396 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10397 TARGET_MUL_SLOW): Define.
10398 * config/nds32/nds32.md (pipeline_model): New attribute.
10399 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10400 New options that support cpu n9.
10401 * config/nds32/pipelines.md: Include n9 settings.
10402 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10404 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10406 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10407 information if necessary.
10408 (output_cond_branch_compare_zero): Likewise.
10409 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10410 (nds32_target_alignment): Refine for alignment.
10411 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10412 (FUNCTION_BOUNDARY): Modify.
10413 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10415 * config/nds32/nds32.opt (malways-align, malign-functions): New.
10417 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10419 * config/nds32/constants.md (unspec_volatile_element): Add values for
10420 TLB operation and data prefetch.
10421 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10422 functions for TLB operation and data prefetch.
10423 * config/nds32/nds32-intrinsic.md: Likewise.
10424 * config/nds32/nds32_intrinsic.h: Likewise.
10425 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10426 (nds32_print_operand): Likewise.
10427 * config/nds32/nds32.h (nds32_builtins): Likewise.
10429 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
10430 Andrew Pinski <pinsika@gcc.gnu.org>
10432 PR middle-end/82976
10433 * match.pd: Use constant_boolean_node of correct type instead of
10434 boolean_true_node or boolean_false_node for simplifying
10435 pointer comparisons to zero.
10437 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10439 PR tree-optimization/80021
10440 * tree.c (verify_type_variant): Make error call in verify_variant_match
10441 translatable and remove final full stop.
10443 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10445 * config/nds32/constants.md (unspec_volatile_element): Add
10446 UNSPEC_VOLATILE_EH_RETURN.
10447 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10448 nds32_output_stack_pop): Support dwarf exception handling process.
10449 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10450 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10451 exception handling process.
10452 (nds32_compute_stack_frame): Likewise.
10453 (nds32_return_addr_rtx): Likewise.
10454 (nds32_initial_elimination_offset): Likewise.
10455 (nds32_expand_prologue): Likewise.
10456 (nds32_expand_epilogue): Likewise.
10457 (nds32_dynamic_chain_address): New function.
10458 * config/nds32/nds32.h (machine_function): Add fields for dwarf
10459 exception handling.
10460 (DYNAMIC_CHAIN_ADDRESS): Define.
10461 (EH_RETURN_DATA_REGNO): Define.
10462 (EH_RETURN_STACKADJ_RTX): Define.
10463 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10464 patterns for dwarf exception handling.
10466 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10468 * config/nds32/nds32.h: Clean up obsolete macros.
10470 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10472 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10473 Add enum values for particular instructions.
10474 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10475 particular intrinsic functions.
10476 * config/nds32/nds32-intrinsic.md: Likewise.
10477 * config/nds32/nds32_intrinsic.h: Likewise.
10478 * config/nds32/nds32.h (nds32_builtins): Likewise.
10479 * config/nds32/nds32.md (type): Add pbsad and pbsada.
10480 (btst, ave): New patterns for particular instructions.
10482 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10484 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10485 Add enum values for atomic load/store and memory sync.
10486 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10488 * config/nds32/nds32-intrinsic.md: Likewise.
10489 * config/nds32/nds32_intrinsic.h: Likewise.
10490 * config/nds32/nds32.h (nds32_builtins): Likewise.
10492 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10494 PR tree-optimization/85257
10495 * fold-const.c (native_encode_vector): If not all elts could fit
10496 and off is -1, return 0 rather than offset.
10497 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10498 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10499 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
10500 adjust buffer in native_interpret_expr call.
10502 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10504 * config/nds32/constants.md (unspec_volatile_element): Add cache
10505 control enum values.
10506 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10507 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10508 * config/nds32/nds32.c (nds32_cctl_names): New.
10509 (nds32_print_operand): Handle cache control register names.
10510 * config/nds32/nds32.h (nds32_builtins): New enum values.
10511 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10513 * config/nds32/nds32.md (type): Add mmu.
10514 * config/nds32/pipelines.md (simple_insn): Add mmu.
10516 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10518 * config/nds32/nds32.md (type): Remove call.
10519 * config/nds32/pipelines.md (simple_insn): Likewise.
10521 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10523 * config/nds32/constants.md (unspec_volatile_element): Add
10524 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10525 UNSPEC_VOLATILE_FMFCFG.
10526 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10527 description for fmfcfg and fmfcsr.
10528 (bdesc_1arg): Add fmtcsr.
10529 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10530 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10531 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10532 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10533 unspec_fmfcfg): New patterns.
10534 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10535 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10536 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10537 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10538 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10539 __nds32__fmfcfg): Define.
10541 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10543 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10544 intrinsic register names.
10545 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10546 intrinsic register enum values and macros.
10548 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10550 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10551 for load/store addressing form.
10552 (nds32_print_operand_address): Likewise.
10554 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
10557 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10558 based on LABEL_REF. Remove useless assertion.
10559 (pic_address_needs_scratch): Fix formatting.
10560 (sparc_legitimize_pic_address): Minor tweaks.
10561 (sparc_delegitimize_address): Adjust assertion accordingly.
10562 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10563 into symbolic_operand.
10564 (movsi_high_pic_label_ref): Likewise.
10565 (movsi_lo_sum_pic_label_ref): Likewise.
10566 (movdi_pic_label_ref): Likewise.
10567 (movdi_high_pic_label_ref): Likewise.
10568 (movdi_lo_sum_pic_label_ref): Likewise.
10570 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
10572 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10573 custom LIB_SPEC setup.
10575 2018-04-06 Ruslan Bukin <br@bsdpad.com>
10576 Kito Cheng <kito.cheng@gmail.com>
10578 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10579 * config/riscv/freebsd.h: New.
10581 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10583 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10584 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10587 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10588 Kito Cheng <kito.cheng@gmail.com>
10590 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10591 nds32_output_call, nds32_symbol_binds_local_p): New functions.
10592 * config/nds32/nds32-protos.h (nds32_output_call,
10593 nds32_output_return): Declare.
10594 * config/nds32/nds32.md: Refine all the call and return patterns.
10596 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10599 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10600 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10602 PR rtl-optimization/84872
10603 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10604 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10605 EDGE_CROSSING edge.
10607 2018-04-06 Tamar Christina <tamar.christina@arm.com>
10609 * expr.c (copy_blkmode_to_reg): Revert 254862.
10610 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10612 2018-04-06 Richard Biener <rguenther@suse.de>
10614 PR middle-end/85244
10615 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10616 after seeing a component reference with an adjacent field. Treat
10617 refs to arrays at struct end of external decls similar to
10618 refs to unconstrained commons.
10620 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10623 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10624 look through SAVE_EXPRs with non-side-effects argument. Adjust
10626 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10629 2018-04-06 Richard Biener <rguenther@suse.de>
10631 PR middle-end/85180
10632 * alias.c (find_base_term): New wrapper around find_base_term
10633 unwinding CSELIB_VAL_PTR changes.
10634 (find_base_term): Do not restore CSELIB_VAL_PTR during the
10637 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10639 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10641 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10642 constant definitions.
10643 ("nop"): lr 0,0 -> nopr r0
10644 ("nop_lr0", "nop_lr1"): New insn definitions.
10646 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10648 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10649 NDS32_V3PUSH_AVAILABLE_P macro.
10651 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
10652 Chung-Ju Wu <jasonwucj@gmail.com>
10654 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10655 (nds32*-*-*): Add float and fpu_config into supported_defaults.
10656 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10657 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10658 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10659 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10660 * config/nds32/constraints.md: New constraints and checking for hard
10661 float configuration.
10662 * config/nds32/iterators.md: New mode iterator and attribute for hard
10663 float configuration.
10664 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10666 * config/nds32/nds32-fpu.md: New file.
10667 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10668 deal with hard float code generation.
10669 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10671 (abi_type, float_reg_number): New enum type.
10672 * config/nds32/nds32-predicates.c: New predicates for hard float.
10673 * config/nds32/nds32-protos.h: Declare functions for hard float.
10674 * config/nds32/nds32.c: Implementation for hard float configuration.
10675 * config/nds32/nds32.h: Definitions for hard float configuration.
10676 * config/nds32/nds32.md: Include hard float machine description and
10677 modify patterns for hard float configuration.
10678 * config/nds32/nds32.opt: New options for hard float configuration.
10679 * config/nds32/predicates.md: New predicates for hard float
10682 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10684 * common/config/nds32/nds32-common.c
10685 (nds32_option_optimization_table): Enable -mreleax-hint by default.
10687 2018-04-05 Jakub Jelinek <jakub@redhat.com>
10689 PR middle-end/85195
10690 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10691 CONSTRUCTOR_ELT (ctor, ...)->value.
10693 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
10696 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10698 2018-04-05 Tom de Vries <tom@codesourcery.com>
10701 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10704 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10705 Kito Cheng <kito.cheng@gmail.com>
10707 * config/nds32/constraints.md (U33): Fine-tune checking condition.
10708 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10709 * config/nds32/nds32.h (nds32_16bit_address_type): Add
10710 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10712 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10713 Kito Cheng <kito.cheng@gmail.com>
10715 * config/nds32/constraints.md (Ufe): New memory constraint.
10716 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10717 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10718 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10720 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10721 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10723 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10725 * config/nds32/nds32.md: Use optimize_size in the condition for
10726 alu-shift instructions.
10728 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10730 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10732 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10734 * config/nds32/nds32.md (negsi2): Refine pattern.
10736 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10737 Chung-Ju Wu <jasonwucj@gmail.com>
10739 * config/nds32/iterators.md (shift_rotate): New code iterator.
10740 (shift): New code attribute.
10741 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10742 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10743 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10744 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10745 bit-wise operations.
10746 (andsi3, *andsi3): Ditto.
10747 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10748 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10749 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10750 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10751 nds32_ior_operand, nds32_xor_operand): New predicates.
10753 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10755 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10756 (addsi3, subsi3): ... this.
10758 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10760 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10762 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10764 * config/nds32/nds32.md: Adjust indention.
10766 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10768 * config/nds32/nds32.md (feature): New attribute.
10770 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10772 * config/nds32/nds32.md (subtype): New attribute.
10774 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
10777 * config/arm/arm-builtins.c (arm_expand_builtin): Change
10778 expansion to perform a bitwise AND of the argument followed by a
10779 boolean negation of the result.
10781 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
10783 PR rtl-optimization/84878
10784 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10785 the basic block. Assert the use reference is not artificial and that
10786 it has an associated insn.
10788 2018-04-04 Michael Matz <matz@suse.de>
10790 * builtins.c (compute_objsize): Pass correct operand
10791 to array_at_struct_end_p.
10793 2018-04-04 Richard Biener <rguenther@suse.de>
10796 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10797 from contexts for DINFO_LEVEL_TERSE and below.
10799 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10801 * config/nds32/nds32-doubleword.md (move_<mode>): Require
10802 resiter_operand condition.
10803 * config/nds32/nds32.md (*move<mode>): Ditto.
10805 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10806 Monk Chiang <sh.chiang04@gmail.com>
10808 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10810 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10812 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10814 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10815 Kito Cheng <kito.cheng@gmail.com>
10817 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10818 nds32_cond_code_str, output_cond_branch,
10819 output_cond_branch_compare_zero, nds32_expand_cbranch,
10820 nds32_expand_cstore, nds32_expand_movcc,
10821 nds32_output_cbranchsi4_equality_zero,
10822 nds32_output_cbranchsi4_equality_reg,
10823 nds32_output_cbranchsi4_equality_reg_or_const_int,
10824 nds32_output_cbranchsi4_greater_less_zero: New functions.
10825 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10826 nds32_expand_cstore, nds32_expand_movcc,
10827 nds32_output_cbranchsi4_equality_zero,
10828 nds32_output_cbranchsi4_equality_reg,
10829 nds32_output_cbranchsi4_equality_reg_or_const_int,
10830 nds32_output_cbranchsi4_greater_less_zero): Declare.
10831 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10832 nds32_rimm11s_operand): New predicates.
10833 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10834 * config/nds32/nds32.md: Rewrite all the branch and conditional move
10837 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10839 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10840 * config/nds32/nds32.md: Ditto.
10841 * config/nds32/pipelines.md: Ditto.
10843 2018-04-04 Richard Biener <rguenther@suse.de>
10845 PR tree-optimization/85168
10846 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10847 propagating abnormals.
10849 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10851 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10853 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10854 Kito Cheng <kito.cheng@gmail.com>
10856 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10857 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10858 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10859 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10860 * config/nds32/nds32.md (sibcall_internal): New.
10861 (sibcall_register): Remove.
10862 (sibcall_immediate): Remove.
10863 (sibcall_value_internal): New.
10864 (sibcall_value_register): Remove.
10865 (sibcall_value_immediate): Remove.
10866 * config/nds32/predicates.md (nds32_general_register_operand): New.
10867 (nds32_call_address_operand): New.
10869 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10871 PR rtl-optimization/85167
10872 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10873 bb_defs if *split_p, instead preinitialize it to NULL.
10875 PR tree-optimization/85156
10876 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10877 evaluating the argument multiple times.
10879 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
10881 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10883 (_mm_cvtpd_ps): Likewise.
10884 (_mm_cvttpd_epi32): Likewise.
10885 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10886 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10887 vector, pixel, and bool following altivec.h include.
10889 2018-04-03 Martin Sebor <msebor@redhat.com>
10891 * doc/extend.texi (Common Function Attributes): Clarify.
10892 (const attribute): Likewise.
10893 (pure attribute): Likewise.
10895 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10898 * config/i386/i386.c (ix86_expand_vector_set): Use
10899 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
10901 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
10903 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10904 instructions when changing rounding bits to preserve precision bits
10905 in the x87 control word.
10907 2018-04-03 Martin Liska <mliska@suse.cz>
10909 PR tree-optimization/82491
10910 * rtl.h (strip_offset_and_add): Replace += suboffset with
10911 poly_uint64 () + suboffset.
10913 2018-03-29 Martin Liska <mliska@suse.cz>
10914 Martin Jambor <mjambor@suse.cz>
10917 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10918 param_type is not an integral or pointer type.
10920 2018-04-03 Richard Biener <rguenther@suse.de>
10922 * sese.h (recompute_all_dominators): Remove.
10924 2018-04-02 Martin Sebor <msebor@redhat.com>
10926 * doc/invoke.texi (-Wrestrict): Fix typos.
10928 2018-04-02 Jim Wilson <jimw@sifive.com>
10930 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10931 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10932 (<optab>di3, <optab>si3_extend): Likewise.
10933 (<optab>si3_mask, <optab>si3_mask_1): New.
10934 (<optab>di3_mask, <optab>di3_mask_1): New.
10935 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10936 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10937 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10939 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
10941 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10944 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
10946 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10947 (nds32_canonicalize_comparison): New function.
10949 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10950 Kito Cheng <kito.cheng@gmail.com>
10951 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10953 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10954 * config/nds32/constants.md (unspec_volatile_element): Add
10955 UNSPEC_VOLATILE_RELAX_GROUP.
10956 * config/nds32/nds32-relax-opt.c: New file.
10957 * config/nds32/nds32-predicates.c
10958 (nds32_symbol_load_store_p): New function.
10959 * config/nds32/nds32-protos.h
10960 (nds32_symbol_load_store_p): Declare function.
10961 (make_pass_nds32_relax_opt): Declare new rtl pass function.
10962 * config/nds32/nds32.c
10963 (nds32_register_pass): New function to register pass.
10964 (nds32_register_passes): New function to register passes.
10965 * config/nds32/nds32.md (relax_group): New pattern.
10966 * config/nds32/nds32.opt (mrelax-hint): New option.
10967 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10969 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
10971 * config/nds32/t-nds32: Modify files dependency.
10973 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10975 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10976 (PROFILE_HOOK): Define its implementation.
10978 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10980 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10981 type and 32-bit size.
10983 2018-04-01 Jakub Jelinek <jakub@redhat.com>
10985 PR middle-end/85090
10986 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10987 (V_128_256): New mode iterator.
10988 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10989 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10990 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10992 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10993 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10995 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
10998 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10999 NaN inputs correctly.
11001 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
11004 * config/rs6000/vsx.md (??r): New mode attribute.
11005 (*vsx_mov<mode>_64bit): Use it.
11006 (*vsx_mov<mode>_32bit): Likewise.
11008 2018-03-30 Martin Sebor <msebor@redhat.com>
11010 PR tree-optimization/84818
11011 * builtins.c (check_access): Use warning_n.
11013 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11016 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11018 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11021 2018-03-30 Julia Koval <julia.koval@intel.com>
11024 * x86-tune.def (movx, partial_reg_dependency): Enable for
11027 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
11029 PR inline-asm/84985
11030 * lra-constraints.c (process_alt_operands): Move setting
11031 this_alternative_matches below.
11033 2018-03-29 Martin Liska <mliska@suse.cz>
11036 * doc/invoke.texi: Document how LTO works with debug info.
11037 Describe auto-load support of binutils. Mention 'x86-64'
11038 as valid option value of -march option.
11040 2018-03-29 Jakub Jelinek <jakub@redhat.com>
11042 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11045 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11046 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11047 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11050 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11053 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11054 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11055 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11056 for RS6000_BTM_POWERPC64.
11057 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11058 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11059 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11062 (DIVDEU): Likewise.
11064 2018-03-28 Carl Love <cel@us.ibm.com>
11067 2017-09-27 Carl Love <cel@us.ibm.com>
11069 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11070 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11071 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11074 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11076 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11077 instead of __vector bool.
11078 (_mm_max_pu8): Likewise.
11079 (_mm_min_pi16): Likewise.
11081 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11084 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11085 (DIVWEUO): Likewise.
11086 (DIVDEO): Likewise.
11087 (DIVDEUO): Likewise.
11088 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11089 DIVWEUO and DIVDEUO.
11090 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11091 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11092 (div_extend): Likewise.
11093 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11095 (__builtin_divweuo): Likewise.
11096 (__builtin_divdeo): Likewise.
11097 (__builtin_divdeuo): Likewise.
11099 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11102 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11103 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11105 PR tree-optimization/82004
11106 * gimple-match-head.c (optimize_pow_to_exp): New function.
11107 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11108 Don't fold to exp if optimize_pow_to_exp is false.
11110 2018-03-28 Martin Liska <mliska@suse.cz>
11113 * calls.c (initialize_argument_information): Fix trailing space.
11114 * common.opt: Fix typo and provide better explanation for
11115 -fsanitize-coverage option.
11116 * config/i386/i386.opt: Fix typo.
11118 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11119 Martin Liska <mliska@suse.cz>
11122 * gimplify.c (asan_poison_variable): Don't do the check for
11123 gimplify_omp_ctxp here.
11124 (gimplify_decl_expr): Do it here.
11125 (gimplify_target_expr): Likewise.
11127 2018-03-28 Martin Liska <mliska@suse.cz>
11130 * config/i386/i386.c (ix86_function_arg_advance): Do not call
11131 chkp_type_bounds_count if MPX is not enabled.
11133 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
11135 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11137 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
11140 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11141 function to create the function decl for complex long double
11142 multiply and divide for -mabi=ieeelongdouble.
11143 (init_float128_ieee): Call it.
11145 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
11148 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11149 -fcf-protection=branch -mibt.
11150 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11152 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11155 * config/arm/arm.c (arm_valid_symbolic_address): Handle
11156 arm_word_relocations.
11158 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
11161 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11162 extern array declarations.
11164 2018-03-27 Richard Biener <rguenther@suse.de>
11166 PR middle-end/84067
11167 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11168 explicit single_use checks.
11170 2018-03-27 Richard Biener <rguenther@suse.de>
11172 PR tree-optimization/85082
11173 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11176 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11178 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11179 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11180 Turn on fasynchronous-unwind-tables and funwind-tables.
11182 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
11185 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11186 (*bmi_blsr_<mode>_ccz): Ditto.
11188 2018-03-26 Tom de Vries <tom@codesourcery.com>
11190 PR tree-optimization/85063
11191 * omp-general.c (offloading_function_p): New function. Factor out
11193 * omp-offload.c (pass_omp_target_link::gate): ... here.
11194 * omp-general.h (offloading_function_p): Declare.
11195 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11196 with attribute omp declare target for offloading functions.
11198 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
11200 PR tree-optimization/84005
11201 * tree-data-ref.h (get_base_for_alignment): Declare.
11202 * tree-data-ref.c (get_base_for_alignment_1): New function.
11203 (get_base_for_alignment): Likewise.
11204 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11205 get_base_for_alignment to find a suitable base object, instead
11206 of always using drb->base_address.
11208 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11210 PR inline-asm/85022
11211 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11212 known size by default.
11214 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
11216 PR inline-asm/85030
11217 * lra-constraints.c (process_alt_operands): Don't match BLKmode
11218 and non BLKmode operands.
11220 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11223 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11224 Clean up attributes.
11226 2018-03-23 Richard Biener <rguenther@suse.de>
11229 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11230 we are going to emit early debug for LTO.
11232 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11234 PR inline-asm/85034
11235 * function.c (match_asm_constraints_1): Don't optimize if input
11236 doesn't satisfy general_operand predicate for output's mode.
11238 PR inline-asm/85022
11239 * alias.c (write_dependence_p): Don't require for x_canonicalized
11240 non-VOIDmode if x has VOIDmode.
11243 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11244 just don't try to optimize it rather than assert it never happens.
11246 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11248 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11249 macro expansions for definition of ST_INTERNAL_<mode> and
11250 LD_INTERNAL_<mode> builtins.
11251 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11253 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11255 (altivec_expand_st_builtin): Likewise.
11256 (altivec_expand_builtin): Remove calls to deleted functions.
11257 (rs6000_address_for_altivec): Delete this function.
11258 * config/rs6000/vector.md: Remove expands for
11259 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11261 2018-03-22 Sudakshina Das <sudi.das@arm.com>
11264 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11265 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11266 re-computing once computed.
11267 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11268 (arm_init_machine_status): Initialize
11269 machine->static_chain_stack_bytes.
11271 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11274 * doc/extend.texi: Add four new prototypes for vec_ld.
11275 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11276 definitions for more logical presentation.
11277 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11278 entries for V1TI variants of __builtin_altivec_ld builtin.
11279 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11280 handling of V1TI variant of LVX icode pattern.
11281 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11282 (rs6000_gimple_fold_builtin): Likewise.
11283 (altivec_init_builtins): Add code to define
11284 __builtin_altivec_lvx_v1ti function.
11286 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11288 PR inline-asm/84941
11289 * function.c (match_asm_constraints_1): Don't do the optimization
11290 if input isn't a REG, SUBREG, MEM or constant.
11292 2018-03-22 Tom de Vries <tom@codesourcery.com>
11294 PR tree-optimization/84956
11295 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11296 bb_has_abnormal_pred.
11298 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11301 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11302 DECL_INITIAL (decl) to decl at the end.
11303 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11304 adjust the comment.
11306 2018-03-21 Joseph Myers <joseph@codesourcery.com>
11308 * doc/extend.texi (__builtin_tgmath): Document when complex
11309 integer types are treated as _Complex _Float64.
11311 2018-03-21 Tom de Vries <tom@codesourcery.com>
11313 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11315 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11317 PR tree-optimization/84960
11318 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11319 if it is ENTRY block, move them into single succ of ENTRY in that case.
11321 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
11323 PR tree-optimization/84811
11324 * poly-int.h (poly_span_traits): Remove the T3 parameter and
11325 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11326 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11327 (known_subrange_p): Update accordingly. Cast each value involved
11328 in the size comparison, rather than casting the result of the
11331 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11333 PR tree-optimization/84982
11334 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11335 by flipping the least significant bit rather than all bits from
11336 bitpos to bitpos + bitsize - 1.
11338 2018-03-21 Nathan Sidwell <nathan@acm.org>
11340 * doc/extend.texi (Deprecated Features): Remove mention of
11341 long-deleted deprecations.
11343 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11346 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11347 * configure: Regenerate.
11349 2018-03-21 Tom de Vries <tom@codesourcery.com>
11351 PR tree-optimization/83126
11352 * tree-parloops.c (num_phis): New function.
11353 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11355 2018-03-21 Nathan Sidwell <nathan@acm.org>
11357 * doc/extend.texi (Deprecated Features): Update deprecated flags,
11358 mention anon-struct/union members and trailing attributes.
11360 2018-03-21 Bin Cheng <bin.cheng@arm.com>
11362 PR tree-optimization/84969
11363 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11364 builtin memset partitions if they set different rhs values.
11366 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11368 PR rtl-optimization/84989
11369 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11370 VEC_DUPLICATE with scalar result mode.
11372 2018-03-21 Martin Liska <mliska@suse.cz>
11375 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11376 not intended return statement.
11378 2018-03-21 Martin Liska <mliska@suse.cz>
11381 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11382 (chkp_find_bound_slots_1): Limit number of iterations.
11384 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
11387 * Minor grammar fixes for x86 options.
11389 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11392 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11393 holding REG_CFA_RESTORE notes, instead turn them into a USE.
11395 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
11398 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11399 (altivec_lvx_<mode>_1op): Likewise.
11400 (altivec_stvx_<mode>_2op): Likewise.
11401 (altivec_stvx_<mode>_1op): Likewise.
11402 (altivec_lvx_<VM2:mode>): New define_expand.
11403 (altivec_stvx_<VM2:mode>): Likewise.
11404 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11405 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11406 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11407 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11408 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11409 (rs6000_gen_lvx): Likewise.
11410 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11411 (altivec_expand_stv_builtin): Likewise.
11412 (altivec_expand_builtin): Likewise.
11413 * config/rs6000/vector.md: Likewise.
11415 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11418 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11421 2018-03-20 Richard Biener <rguenther@suse.de>
11424 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11425 sign-conversions as zero, fall back to standard scalar_stmt
11428 2018-03-20 Martin Liska <mliska@suse.cz>
11431 * predict.c (rebuild_frequencies): Handle case when we have
11432 PROFILE_ABSENT, but flag_guess_branch_prob is false.
11434 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11437 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11438 flag_section_anchors.
11439 * varasm.c (use_blocks_for_decl_p): Remove hack for
11440 dw2_force_const_mem.
11443 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11445 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
11446 be created, use lowpart_subreg of operands[0] rather than operands[0]
11448 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11449 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11450 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11451 and n constraint instead of aarch64_shift_imm_di and Usd.
11452 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11453 (*aarch64_<optab>_reg_minus<mode>3): ... this.
11455 2018-03-20 Sudakshina Das <sudi.das@arm.com>
11458 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11459 to favor GPR over NEON registers.
11460 (<shift>di3_neon): Likewise.
11462 2018-03-20 Tom de Vries <tom@codesourcery.com>
11465 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11466 (nvptx_process_pars): Emit bar.sync asap and alap.
11468 2018-03-20 Tom de Vries <tom@codesourcery.com>
11471 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11472 seen_label if seen_label is already set.
11474 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11477 * config/i386/i386.c (fold_builtin_cpu): For features above 31
11478 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11479 Use 1U instead of 1. Formatting fixes.
11482 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11483 instead of TREE_TYPE (s1) for the return value.
11485 2018-03-19 Jakub Jelinek <jakub@redhat.com>
11487 PR tree-optimization/84946
11488 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11489 bitsize + bitsize in poly_uint64 rather than poly_int64.
11492 * dwarf2asm.c: Include fold-const.c.
11493 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11494 of decl rather than decl itself.
11496 PR rtl-optimization/84643
11497 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11499 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
11502 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11503 calling assemble_variable.
11505 2018-03-19 Sudakshina Das <sudi.das@arm.com>
11508 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11509 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11511 2018-03-19 Jim Wilson <jimw@sifive.com>
11514 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11515 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11516 (riscv_first_stack_step): Likewise.
11517 (riscv_option_override): Use STACK_BOUNDARY instead of
11518 MIN_STACK_BOUNDARY.
11519 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11520 MIN_STACK_BOUNDARY.
11521 (BIGGEST_ALIGNMENT): Set to 128.
11522 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11523 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11526 2018-03-19 Richard Biener <rguenther@suse.de>
11528 PR tree-optimization/84933
11529 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11530 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11532 2018-03-19 Richard Biener <rguenther@suse.de>
11534 PR tree-optimization/84859
11535 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11536 (cond_if_else_store_replacement): Perform sinking operation on
11537 single-store BBs regardless of MAX_STORES_TO_SINK setting.
11538 Generalize what a BB with a single eligible store is.
11540 2018-03-19 Richard Biener <rguenther@suse.de>
11542 PR tree-optimization/84929
11543 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11544 chrec_is_positive against non-chrec arg.
11546 2018-03-19 Tamar Christina <tamar.christina@arm.com>
11549 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11551 2018-03-18 Martin Liska <mliska@suse.cz>
11553 PR rtl-optimization/84635
11554 * regrename.c (build_def_use): Use matches_mode only when
11557 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
11559 PR tree-optimization/84913
11560 * tree-vect-loop.c (vectorizable_reduction): Don't try to
11561 vectorize chains of COND_EXPRs.
11563 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11565 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11567 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11569 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11571 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11573 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11575 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11576 Kito Cheng <kito.cheng@gmail.com>
11578 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11579 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11580 (nds32_adjust_reg_alloc_order): New function.
11581 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11583 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
11585 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11586 nds32_print_operand, nds32_print_operand_address): Use
11587 HOST_WIDE_INT_PRINT_DEC instead.
11589 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11591 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11593 2018-03-17 Jakub Jelinek <jakub@redhat.com>
11596 * config/i386/i386.c (initial_ix86_tune_features,
11597 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11598 unsigned long long.
11599 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11600 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11601 rather than 1u << ix86_tune. Formatting fix.
11602 (ix86_option_override_internal): Change ix86_arch_mask from
11603 unsigned int to unsigned HOST_WIDE_INT, initialize to
11604 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11605 (ix86_function_specific_restore): Likewise.
11607 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11610 * postreload.c (reload_combine_recognize_pattern): Perform
11611 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11612 truncate_int_for_mode the result for the destination's mode.
11615 * hsa-gen.c (mem_type_for_type): Fix comment typo.
11616 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11618 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11621 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
11624 * lra-assigns.c (lra_split_hard_reg_for): Don't use
11625 regno_allocno_class_array and sorted_pseudos.
11626 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11627 insns where regno is used.
11629 2018-03-16 Martin Liska <mliska@suse.cz>
11632 * multiple_target.c (create_dispatcher_calls): Redirect
11633 reference in the symbol table.
11635 2018-03-16 Martin Liska <mliska@suse.cz>
11638 * multiple_target.c (create_dispatcher_calls): Redirect also
11641 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11645 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11646 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11647 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11649 2018-03-16 Julia Koval <julia.koval@intel.com>
11651 * doc/invoke.texi (Skylake Server): Add CLWB.
11652 Cannonlake): Remove CLWB.
11654 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11656 PR tree-optimization/84841
11657 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11659 (FLOAT_ONE_CONST_TYPE): Define.
11660 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11661 (sort_by_operand_rank): Put entries with higher constant_type last
11662 rather than first to match comments.
11664 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
11666 * config/nios2/nios2.md (movsi_internal): Fix thinko in
11669 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11672 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11673 check and use address of target always.
11675 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
11678 * config/i386/i386.c (indirect_thunk_needed): Update comments.
11679 (indirect_thunk_bnd_needed): Likewise.
11680 (indirect_thunks_used): Likewise.
11681 (indirect_thunks_bnd_used): Likewise.
11682 (indirect_return_needed): New.
11683 (indirect_return_bnd_needed): Likewise.
11684 (output_indirect_thunk_function): Add a bool argument for
11686 (output_indirect_thunk_function): Don't generate alias for
11687 function return thunk.
11688 (ix86_code_end): Call output_indirect_thunk_function to generate
11689 function return thunks.
11690 (ix86_output_function_return): Set indirect_return_bnd_needed
11691 and indirect_return_needed instead of indirect_thunk_bnd_needed
11692 and indirect_thunk_needed.
11694 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
11696 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11697 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11698 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11700 2018-03-15 David Malcolm <dmalcolm@redhat.com>
11701 Paul Hua <paul.hua.gm@gmail.com>
11704 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11706 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
11708 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11709 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11710 resp. SFmode cases.
11712 2018-03-15 Tamar Christina <tamar.christina@arm.com>
11715 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11716 instead of GET_MODE_SIZE when comparing Units.
11718 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11721 * varasm.c (hash_section): Return an unchangeble hash value
11722 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11723 Return !aarch64_can_use_per_function_literal_pools_p ().
11725 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11728 * optabs.c (emit_conditional_move): Pass address of cmode's copy
11729 rather than address of cmode as last argument to prepare_cmp_insn.
11731 2018-03-15 Julia Koval <julia.koval@intel.com>
11733 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11734 F_AVX512VNNI, F_AVX512BITALG): New.
11736 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
11739 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
11740 insn for floating-point loads and stores.
11742 2018-03-14 Carl Love <cel@us.ibm.com>
11744 * config/rs6000/rs6000-c.c: Add macro definitions for
11745 ALTIVEC_BUILTIN_VEC_PERMXOR.
11746 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11747 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11748 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11749 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11751 * config/doc/extend.texi: Add prototypes for vec_permxor.
11753 2018-03-14 David Malcolm <dmalcolm@redhat.com>
11756 * diagnostic-show-locus.c (class layout_point): Convert m_line
11757 from int to linenum_type.
11758 (line_span::comparator): Use linenum "compare" function when
11759 comparing line numbers.
11760 (test_line_span): New function.
11761 (layout_range::contains_point): Convert param "row" from int to
11763 (layout_range::intersects_line_p): Likewise.
11764 (layout::will_show_line_p): Likewise.
11765 (layout::print_source_line): Likewise.
11766 (layout::should_print_annotation_line_p): Likewise.
11767 (layout::print_annotation_line): Likewise.
11768 (layout::print_leading_fixits): Likewise.
11769 (layout::annotation_line_showed_range_p): Likewise.
11770 (struct line_corrections): Likewise for field m_row.
11771 (line_corrections::line_corrections): Likewise for param "row".
11772 (layout::print_trailing_fixits): Likewise.
11773 (layout::get_state_at_point): Likewise.
11774 (layout::get_x_bound_for_row): Likewise.
11775 (layout::print_line): Likewise.
11776 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11777 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11778 * input.c (selftest::test_linenum_comparisons): New function.
11779 (selftest::input_c_tests): Call it.
11780 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11781 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11782 * selftest.h (ASSERT_GT): New macro.
11783 (ASSERT_GT_AT): New macro.
11784 (ASSERT_LT): New macro.
11785 (ASSERT_LT_AT): New macro.
11787 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
11789 PR rtl-optimization/84780
11790 * combine.c (distribute_links): Don't make a link based on pc_rtx.
11792 2018-03-14 Martin Liska <mliska@suse.cz>
11794 * tree.c (record_node_allocation_statistics): Use
11795 get_stats_node_kind.
11796 (get_stats_node_kind): New function extracted from
11797 record_node_allocation_statistics.
11798 (free_node): Use get_stats_node_kind.
11800 2018-03-14 Richard Biener <rguenther@suse.de>
11802 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11803 that the value-set of ANTIC_IN doesn't grow.
11806 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11808 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11809 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11811 2018-03-14 Julia Koval <julia.koval@intel.com>
11813 * config.gcc (icelake-client, icelake-server): New.
11815 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11816 (initial_ix86_arch_features): Ditto.
11817 (PTA_SKYLAKE): Add SGX.
11818 (PTA_ICELAKE): Remove.
11819 (PTA_ICELAKE_CLIENT): New.
11820 (PTA_ICELAKE_SERVER): New.
11821 (ix86_option_override_internal): Split up icelake on icelake client and
11823 (get_builtin_code_for_version): Ditto.
11824 (fold_builtin_cpu): Ditto.
11825 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11826 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11827 * config/i386/i386.h (processor_type): Ditto.
11828 * doc/invoke.texi: Ditto.
11830 2018-03-14 Jakub Jelinek <jakub@redhat.com>
11833 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11834 INTEGER_CST offset, add it together with bitpos / 8 and
11835 sign extend based on POINTER_SIZE.
11839 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
11842 * config/i386/constraints.md (Yc): New register constraint.
11843 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11844 Use Yc constraint for alternative 2 of operand 0. Remove
11845 preferred_for_speed attribute.
11847 2018-03-14 Richard Biener <rguenther@suse.de>
11849 PR tree-optimization/84830
11850 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11851 with the old one to avoid oscillations.
11853 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
11856 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11858 (assign_by_spills): Return a flag of reload assignment failure.
11859 Do not process the reload assignment failures. Do not spill other
11860 reload pseudos if they has the same reg class. Update n if
11862 (lra_assign): Add a return arg. Set up from the result of
11863 assign_by_spills call.
11864 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11865 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11866 usage_insns if it is not NULL.
11867 (spill_hard_reg_in_range): New function.
11868 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11869 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11870 function prototypes.
11871 (lra_assign): Change prototype.
11872 * lra.c (lra): Add code to deal with fails by splitting hard reg
11875 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
11877 * config/riscv/riscv.opt (mrelax): New option.
11878 * config/riscv/riscv.c (riscv_file_start): Emit ".option
11879 "norelax" when riscv_mrelax is disabled.
11880 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11882 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11885 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11886 reassociation for int modes.
11888 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11890 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11891 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11893 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11894 * config/aarch64/aarch64-sve.md
11895 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11896 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11897 (*extend<mode><Vwide>2): Rename to...
11898 (aarch64_sve_extend<mode><Vwide>2): ...this.
11899 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11900 renaming the old pattern to...
11901 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
11903 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11904 define_expand, renaming the old pattern to...
11905 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11906 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11907 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11908 account when deciding which SVE instruction the optab should use.
11909 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11911 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11913 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11914 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11915 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11916 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11917 (tlsdesc_small_<mode>): Turn a define_expand and use
11918 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
11919 (tlsdesc_small_advsimd_<mode>): ...this.
11920 (tlsdesc_small_sve_<mode>): New pattern.
11922 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11924 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11925 (UNSPEC_UMUL_HIGHPART): New constants.
11926 (MUL_HIGHPART): New int iteraor.
11927 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11928 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11930 (*<su>mul<mode>3_highpart): New define_insn.
11932 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11935 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11938 2018-03-13 Martin Liska <mliska@suse.cz>
11941 * (sem_item_optimizer::sem_item_optimizer): Initialize new
11943 (sem_item_optimizer::~sem_item_optimizer): Release it.
11944 (sem_item_optimizer::merge_classes): Register variable aliases.
11945 (sem_item_optimizer::fixup_pt_set): New function.
11946 (sem_item_optimizer::fixup_points_to_sets): Likewise.
11947 * ipa-icf.h: Declare new variables and functions.
11949 2018-03-13 Jakub Jelinek <jakub@redhat.com>
11951 PR middle-end/84834
11952 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11953 integer_pow2p@2 and test integer_pow2p in condition.
11954 (A < 0 ? C : 0): Similarly for @1.
11956 PR middle-end/84831
11957 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11958 characters starting at p contain '\0' character, don't look beyond
11962 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11963 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11966 * reg-stack.c (change_stack): Change update_end var from int to
11967 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11968 also call set_block_for_insn on the newly added insns and rescan.
11971 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11972 on the last operand.
11975 * tree.c (stabilize_reference_1): Return save_expr (e) for
11976 STATEMENT_LIST even if it doesn't have side-effects.
11978 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
11980 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11982 2018-03-12 Renlin Li <renlin.li@arm.com>
11984 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11985 aarch64_output_scalar_simd_mov_immediate.
11987 2018-03-12 Martin Sebor <msebor@redhat.com>
11989 PR tree-optimization/83456
11990 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11991 for perfectly overlapping calls to memcpy.
11992 (gimple_fold_builtin_memory_chk): Same.
11993 (gimple_fold_builtin_strcpy): Handle no-warning.
11994 (gimple_fold_builtin_stxcpy_chk): Same.
11995 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11997 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11999 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12000 parameter. Use it for SFmode.
12001 (rs6000_function_arg_advance_1): Adjust.
12002 (rs6000_function_arg): Adjust.
12003 (rs6000_gimplify_va_arg): Pass false for that new parameter.
12005 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12007 PR rtl-optimization/84169
12008 PR rtl-optimization/84780
12009 * combine.c (can_combine_p): Check for a 2-insn combination whether
12010 the destination register is used between the two insns, too.
12012 2018-03-12 Richard Biener <rguenther@suse.de>
12014 PR tree-optimization/84803
12015 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12016 for refs DR analysis didn't process.
12018 2018-03-12 Richard Biener <rguenther@suse.de>
12020 PR tree-optimization/84777
12021 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12022 force-vectorize loops ignore whether we are optimizing for size.
12024 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
12026 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12027 (TARGET_MD_ASM_ADJUST): Define.
12029 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
12030 Kito Cheng <kito.cheng@gmail.com>
12031 Chung-Ju Wu <jasonwucj@gmail.com>
12033 * config/nds32/nds32.c (nds32_compute_stack_frame,
12034 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12035 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12036 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12037 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12038 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12039 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12040 * config/nds32/nds32.md (prologue, epilogue): Use macro
12041 NDS32_V3PUSH_AVAILABLE_P to do checking.
12043 2018-03-11 Jakub Jelinek <jakub@redhat.com>
12046 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12047 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12048 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
12049 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
12050 addition of most attributes on !orig_type_die or the attribute not
12051 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12053 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12054 Chung-Ju Wu <jasonwucj@gmail.com>
12056 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12057 __NDS32_VH__ macro.
12058 * config/nds32/nds32.opt (mvh): New option.
12060 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12061 Chung-Ju Wu <jasonwucj@gmail.com>
12063 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12065 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12066 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12069 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12070 Chung-Ju Wu <jasonwucj@gmail.com>
12072 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12074 * config/nds32/nds32-multiple.md (strlensi): New pattern.
12075 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12077 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
12078 Kito Cheng <kito.cheng@gmail.com>
12079 Chung-Ju Wu <jasonwucj@gmail.com>
12081 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12082 UNSPEC_FFMISM and UNSPEC_FLMISM.
12083 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12084 for ffb, ffmism and flmism.
12085 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12086 (unspec_ffmism): Ditto.
12087 (unspec_flmism): Ditto.
12088 (nds32_expand_builtin_impl): Check if string extension is available.
12089 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12090 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12092 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
12095 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12098 * lra-assigns.c (assign_by_spills): Return a flag of reload
12099 assignment failure. Do not process the reload assignment
12100 failures. Do not spill other reload pseudos if they has the same
12102 (lra_assign): Add a return arg. Set up from the result of
12103 assign_by_spills call.
12104 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12105 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12106 usage_insns if it is not NULL.
12107 (spill_hard_reg_in_range): New function.
12108 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12109 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12110 function prototypes.
12111 (lra_assign): Change prototype.
12112 * lra.c (lra): Add code to deal with fails by splitting hard reg
12115 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
12118 * config/i386/i386.opt: Replace Enforcment with Enforcement.
12120 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
12123 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12124 (dw_val_node): Add val_symbolic_view.
12125 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12126 (symview_upper_bound): New.
12127 (new_line_info_table): Initialize symviews_since_reset.
12128 (dwarf2out_source_line): Count symviews_since_reset and set
12129 symview_upper_bound.
12130 (dw_val_equal_p): Handle symview.
12131 (add_AT_symview): New.
12132 (print_dw_val): Handle symview.
12133 (attr_checksum, attr_checksum_ordered): Likewise.
12134 (same_dw_val_p, size_of_die): Likewise.
12135 (value_format, output_die): Likewise.
12136 (add_high_low_attributes): Use add_AT_symview for entry_view.
12137 (dwarf2out_finish): Reset symview_upper_bound, clear
12140 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
12143 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12144 Add strict argument and use it.
12145 (rs6000_split_multireg_move): Update for new strict argument.
12146 (mem_operand_gpr): Disallow all non-offsettable addresses.
12147 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12149 2018-03-09 Jakub Jelinek <jakub@redhat.com>
12152 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12153 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12154 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12157 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12158 decl, use remap_type if we want to use the type.
12160 2018-03-09 Martin Sebor <msebor@redhat.com>
12162 PR tree-optimization/84526
12163 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12165 (builtin_access::generic_overlap): Be prepared to handle non-array
12168 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
12170 PR rtl-optimization/84682
12171 * lra-constraints.c (process_address_1): Check is_address flag
12172 for address constraints.
12173 (process_alt_operands): Likewise.
12174 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12175 preprocess_constraints.
12176 * recog.h (preprocess_constraints): Add oploc parameter.
12178 * recog.c (preprocess_constraints): Test address_operand for
12179 CT_ADDRESS constraints.
12181 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12184 * lra-assigns.c (assign_by_spills): Return a flag of reload
12185 assignment failure. Do not process the reload assignment
12186 failures. Do not spill other reload pseudos if they has the same
12188 (lra_assign): Add a return arg. Set up from the result of
12189 assign_by_spills call.
12190 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12191 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12192 usage_insns if it is not NULL.
12193 (spill_hard_reg_in_range): New function.
12194 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12195 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12196 function prototypes.
12197 (lra_assign): Change prototype.
12198 * lra.c (lra): Add code to deal with fails by splitting hard reg
12201 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12204 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12205 Accept complain bool parameter. Only emit errors if it is true.
12206 (arm_parse_cpu_option_name): Likewise.
12207 (arm_target_thumb_only): Adjust callers of the above.
12208 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12209 prototype to take a default true bool parameter.
12210 (arm_parse_arch_option_name): Likewise.
12212 2018-03-09 David Malcolm <dmalcolm@redhat.com>
12213 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12217 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12218 * configure: Regenerate.
12219 * configure.ac ("linker --version-script option"): New.
12220 ("linker soname option"): New.
12222 2018-03-09 Richard Biener <rguenther@suse.de>
12224 PR tree-optimization/84775
12225 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12226 immediate uses of predicate stmts and mark them modified.
12229 PR tree-optimization/84178
12230 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12232 (version_loop_for_if_conversion): Delay update_ssa call.
12233 (tree_if_conversion): Delay update_ssa until after predicate
12236 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
12239 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12240 when the function accesses prior frames.
12242 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12245 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12246 gen_llsym, otherwise call maybe_gen_llsym.
12248 PR inline-asm/84742
12249 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12250 has ',' character inside of it.
12252 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12255 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12256 as clobbering CC_REGNUM.
12258 2018-03-08 Richard Biener <rguenther@suse.de>
12260 PR middle-end/84552
12261 * tree-scalar-evolution.c: Include tree-into-ssa.h.
12262 (follow_copies_to_constant): Do not follow SSA names registered
12265 2018-03-08 Richard Biener <rguenther@suse.de>
12267 PR tree-optimization/84178
12268 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12270 (version_loop_for_if_conversion): Delay update_ssa call.
12271 (tree_if_conversion): Delay update_ssa until after predicate
12274 2018-03-08 David Malcolm <dmalcolm@redhat.com>
12276 PR tree-optimization/84178
12277 * tree-if-conv.c (release_bb_predicate): Remove the
12278 the assertion that the stmts have NULL use_ops.
12279 Discard the statements, asserting that they haven't
12280 yet been added to a BB.
12282 2018-03-08 Richard Biener <rguenther@suse.de>
12284 PR tree-optimization/84746
12285 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12286 (phi_translate): Pass in destination ANTIC_OUT set.
12287 (phi_translate_1): Likewise. For a simplified result lookup
12288 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12289 (phi_translate_set): Adjust.
12290 (do_pre_regular_insertion): Likewise.
12291 (do_pre_partial_partial_insertion): Likewise.
12293 2018-03-08 Martin Liska <mliska@suse.cz>
12295 PR gcov-profile/84735
12296 * doc/gcov.texi: Document usage of profile files.
12297 * gcov-io.h: Document changes in the format.
12299 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
12303 * dwarf2out.c (struct dw_line_info_table): Update comments for
12305 (FORCE_RESET_NEXT_VIEW): New.
12306 (FORCE_RESETTING_VIEW_P): New.
12307 (RESETTING_VIEW_P): Check for -1 too.
12308 (ZERO_VIEW_P): Likewise.
12309 (new_line_info_table): Force-reset next view.
12310 (dwarf2out_begin_function): Likewise.
12311 (dwarf2out_source_line): Simplify zero_view_p initialization.
12312 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12313 view directly. Omit view when omitting .loc at line 0.
12315 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12317 PR tree-optimization/84740
12318 * tree-switch-conversion.c (process_switch): Call build_constructors
12319 only if info.phi_count is non-zero.
12321 PR tree-optimization/84739
12322 * tree-tailcall.c (find_tail_calls): Check call arguments against
12323 DECL_ARGUMENTS (current_function_decl) rather than
12324 DECL_ARGUMENTS (func) when checking for tail recursion.
12326 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12328 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12329 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12330 Volker Reichelt's entry and add entries for people that perform
12331 GCC fuzzy testing and report numerous bugs.
12333 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
12336 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12337 readonly data in sdata, if that is disabled.
12338 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12339 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12340 -mreadonly-in-sdata option.
12342 2018-03-07 Martin Sebor <msebor@redhat.com>
12344 PR tree-optimization/84468
12345 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12346 basic block when looking for nul assignment.
12348 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
12351 * except.h (output_function_exception_table): Adjust prototype.
12352 * except.c (output_function_exception_table): Remove FNNAME parameter
12353 and add SECTION parameter. Ouput one part of the table at a time.
12354 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12355 the first part of the exception table and emit unwind directives.
12356 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12357 (i386_pe_seh_cold_init): Likewise.
12358 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12359 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12360 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12361 (ix86_output_call_insn): Emit a nop in one more case for SEH.
12362 * config/i386/winnt.c: Include except.h.
12363 (struct seh_frame_state): Add reg_offset, after_prologue and
12364 in_cold_section fields.
12365 (i386_pe_seh_end_prologue): Set seh->after_prologue.
12366 (i386_pe_seh_cold_init): New function.
12367 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12368 to seh->in_cold_section.
12369 (seh_emit_push): Record the offset of the push.
12370 (seh_emit_save): Record the offet of the save.
12371 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12372 Test seh->after_prologue to disregard the epilogue.
12373 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12374 (i386_pe_end_cold_function): New function.
12376 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12379 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12380 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12383 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12385 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12386 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12388 PR middle-end/84723
12389 * multiple_target.c: Include tree-inline.h and intl.h.
12390 (expand_target_clones): Diagnose and fail if node->definition and
12391 !tree_versionable_function_p (node->decl).
12393 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
12395 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12397 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12398 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12399 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12401 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12404 * combine.c (try_combine): Use reg_or_subregno instead of handling
12405 just paradoxical SUBREGs and REGs.
12407 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
12409 * config/arc/arc.c (arc_finalize_pic): Remove function.
12410 (arc_must_save_register): We use single base PIC register, remove
12411 checks to save/restore the PIC register.
12412 (arc_expand_prologue): Likewise.
12413 * config/arc/arc-protos.h (arc_set_default_type_attributes):
12415 (arc_verify_short): Likewise.
12416 (arc_attr_type): Likewise.
12417 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12418 (walk_stores): Likewise.
12419 (arc_address_cost): Make it static.
12420 (arc_verify_short): Likewise.
12421 (branch_dest): Likewise.
12422 (arc_attr_type): Likewise.
12423 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12424 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12425 (arc_final_prescan_insn): Remove inserting the nops due to
12426 hardware hazards. It is done in reorg step.
12427 (insn_length_variant_t): Remove.
12428 (insn_length_parameters_t): Likewise.
12429 (arc_insn_length_parameters): Likewise.
12430 (arc_get_insn_variants): Likewise.
12431 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12433 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12435 PR inline-asm/84683
12436 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12439 PR tree-optimization/84687
12440 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12442 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12444 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12446 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12447 Rename to ppc_speculation_barrier.
12448 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12449 __builtin_ppc_speculation_barrier.
12451 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12454 * combine.c (combine_simplify_rtx): Don't try to simplify if
12455 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12458 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
12460 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12461 to 32 bytes when compiling for POWER9.
12463 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12466 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12467 regparm >= 3 with no arg reg available also for calls with
12468 flag_force_indirect_call. Pass decl to ix86_function_regparm.
12471 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12473 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
12475 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
12478 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12480 2018-03-05 Richard Biener <rguenther@suse.de>
12482 PR tree-optimization/84486
12483 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12484 When inserting a __builtin_assume_aligned call set the LHS
12485 SSA name alignment info accordingly.
12487 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
12489 PR tree-optimization/84114
12490 * config/aarch64/aarch64.c (aarch64_reassociation_width)
12491 Avoid reassociation of FLOAT_MODE addition.
12493 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
12495 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12496 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12497 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12498 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12499 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12500 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12501 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12503 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12504 __builtin_ia32_wbinvd): New builtins.
12505 (SPECIAL_ARGS2): New.
12506 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12507 (SPECIAL_ARGS2): New.
12508 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12509 (ix86_valid_target_attribute_inner_p): Ditto.
12510 (ix86_init_mmx_sse_builtins): Add special_args2.
12511 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12512 TARGET_WBNOINVD_P): New.
12513 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12514 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12515 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12516 * config/i386/immintrin.h (_wbinvd): New intrinsic.
12517 * config/i386/pconfigintrin.h: New file.
12518 * config/i386/wbnoinvdintrin.h: Ditto.
12519 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12521 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12523 2018-03-05 Richard Biener <rguenther@suse.de>
12525 PR tree-optimization/84670
12526 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12528 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12529 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12530 (compute_antic_aux): Only assert the number of values in ANTIC_IN
12531 doesn't grow if all successors (recursively) were visited at least
12534 2018-03-05 Richard Biener <rguenther@suse.de>
12536 PR tree-optimization/84650
12537 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12538 if executed in the loop pipeline.
12540 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
12542 * doc/configfiles.texi (Configuration Files): Move info about
12543 conditionalizing $target-protos.h to...
12544 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
12545 differs from $target-protos.h.
12547 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
12548 Chung-Ju Wu <jasonwucj@gmail.com>
12550 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12551 * config/nds32/nds32-multiple.md (setmemsi): Define.
12552 * config/nds32/nds32-memory-manipulation.c
12553 (nds32_gen_dup_4_byte_to_word_value): New.
12554 (emit_setmem_word_loop): New.
12555 (emit_setmem_byte_loop): New.
12556 (nds32_expand_setmem_loop): New.
12557 (nds32_expand_setmem_loop_v3m): New.
12558 (nds32_expand_setmem_unroll): New.
12559 (nds32_expand_setmem): New.
12561 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12562 Chung-Ju Wu <jasonwucj@gmail.com>
12564 * config/nds32/nds32-memory-manipulation.c
12565 (nds32_emit_load_store): New.
12566 (nds32_emit_post_inc_load_store): New.
12567 (nds32_emit_mem_move): New.
12568 (nds32_emit_mem_move_block): New.
12569 (nds32_expand_movmemsi_loop_unknown_size): New.
12570 (nds32_expand_movmemsi_loop_known_size): New.
12571 (nds32_expand_movmemsi_loop): New.
12572 (nds32_expand_movmemsi_unroll): New.
12573 (nds32_expand_movmemqi): Rename ...
12574 (nds32_expand_movmemsi): ... to this.
12575 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12576 (movmemsi): ... to this.
12577 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12578 (nds32_expand_movmemsi): ... to this.
12580 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12581 Monk Chiang <sh.chiang04@gmail.com>
12582 Chung-Ju Wu <jasonwucj@gmail.com>
12584 * config/nds32/nds32-protos.h
12585 (nds32_expand_load_multiple): New arguments.
12586 (nds32_expand_store_multiple): Ditto.
12587 (nds32_valid_multiple_load_store): Rename ...
12588 (nds32_valid_multiple_load_store_p): ... to this.
12589 * config/nds32/nds32-memory-manipulation.c
12590 (nds32_expand_load_multiple): Refine implementation.
12591 (nds32_expand_store_multiple): Ditto.
12592 * config/nds32/nds32-multiple.md
12593 (load_multiple): Update nds32_expand_load_multiple interface.
12594 (store_multiple): Update nds32_expand_store_multiple interface.
12595 * config/nds32/nds32-predicates.c
12596 (nds32_valid_multiple_load_store): Rename ...
12597 (nds32_valid_multiple_load_store_p): ... to this and refine
12599 * config/nds32/predicates.md
12600 (nds32_load_multiple_and_update_address_operation): New predicate.
12601 (nds32_store_multiple_and_update_address_operation): New predicate.
12603 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12604 Chung-Ju Wu <jasonwucj@gmail.com>
12606 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12607 (combo): New attribute.
12608 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12610 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
12612 * config/nds32/nds32.opt: Change -mcmodel= default value.
12614 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
12615 Monk Chiang <sh.chiang04@gmail.com>
12616 Chung-Ju Wu <jasonwucj@gmail.com>
12618 * config/nds32/constants.md (unspec_element): New enum.
12619 * config/nds32/constraints.md (Umw): New constraint.
12620 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12621 * config/nds32/nds32-intrinsic.md: Likewise.
12622 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12623 (nds32_valid_smw_lwm_base_p): New.
12624 (nds32_output_smw_single_word): New.
12625 (nds32_output_lmw_single_word): New.
12626 (nds32_expand_unaligned_load): New.
12627 (nds32_expand_unaligned_store): New.
12628 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12629 (nds32_output_smw_single_word): Declare.
12630 (nds32_output_lmw_single_word): Declare.
12631 (nds32_expand_unaligned_load): Declare.
12632 (nds32_expand_unaligned_store): Declare.
12633 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12634 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12635 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12636 NDS32_BUILTIN_UASTORE_DW.
12637 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12640 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
12641 Kito Cheng <kito.cheng@gmail.com>
12642 Chung-Ju Wu <jasonwucj@gmail.com>
12644 * config/nds32/nds32-intrinsic.c
12645 (nds32_expand_builtin_null_ftype_reg): Delete.
12646 (nds32_expand_builtin_reg_ftype_imm): Ditto.
12647 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12648 (nds32_read_argument): New.
12649 (nds32_legitimize_target): Ditto.
12650 (nds32_legitimize_argument): Ditto.
12651 (nds32_check_constant_argument): Ditto.
12652 (nds32_expand_unop_builtin): Ditto.
12653 (nds32_expand_unopimm_builtin): Ditto.
12654 (nds32_expand_binop_builtin): Ditto.
12655 (nds32_builtin_decl_impl): Ditto.
12656 (builtin_description): Ditto.
12657 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12658 (nds32_init_builtins_impl): Ditto.
12659 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12660 (nds32_builtin_decl): New.
12661 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12662 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12664 2018-03-02 Jeff Law <law@redhat.com>
12666 * reorg.c (stop_search_p): Handle DEBUG_INSN.
12667 (redundant_insn, fill_simple_delay_slots): Likewise.
12668 (fill_slots_from_thread): Likewise.
12669 * resource.c (mark_referenced_resources): Likewise.
12670 (mark_set_resources, find_dead_or_set_registers): Likewise.
12672 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12674 * substring-locations.h (format_warning_va): Formatting fix for
12675 ATTRIBUTE_GCC_DIAG.
12676 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12678 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12679 * substring-locations.c: Include intl.h.
12680 (format_warning_va): Turned into small wrapper around
12681 format_warning_n_va, renamed to ...
12682 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12683 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12685 (format_warning_at_substring_n): New function.
12686 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12687 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
12688 format_warning_at_substring with just a shorter name instead of
12689 const function pointer.
12690 (fmtwarn_n): New function.
12691 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12692 appropriate, get rid of all the fmtstr temporaries, move conditionals
12693 with G_() wrapped string literals directly into fmtwarn arguments,
12694 cast dir.len to (int), formatting fixes.
12696 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
12698 * doc/invoke.texi: Remove "Cilk Plus" references.
12700 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12701 Richard Biener <rguenther@suse.de>
12704 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12705 for error or warning attributes if CALL_FROM_THUNK_P is set.
12708 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12711 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12712 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12715 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12716 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12718 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12719 instead of -1U in last predictors element's probability member.
12721 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12724 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12725 arguments if they are comparable.
12727 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12729 PR tree-optimization/84634
12730 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12731 masks and masked_loop_p with a single loop_masks, making sure it's
12732 null for bb vectorization.
12734 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12736 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12737 (vect_analyze_data_ref_access): Use loop->safe_len rather than
12738 loop->force_vectorize to check whether there is no alias.
12740 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12743 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12745 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12747 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12748 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12749 instead of a loop around prev_real_insn.
12750 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12753 PR inline-asm/84625
12754 * config/i386/i386.c (ix86_print_operand): Use conditional
12755 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12758 2018-03-02 Richard Biener <rguenther@suse.de>
12760 PR tree-optimization/84427
12761 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12762 (bitmap_set_subtract_values): Rewrite to handle multiple
12765 (prune_clobbered_mems): Likewise.
12766 (phi_translate): Take edge instead of pred/phiblock.
12767 (phi_translate_1): Likewise.
12768 (phi_translate_set): Likewise. Insert all translated
12769 exprs for a value into the set, keeping possibly multiple
12770 expressions per value.
12771 (compute_antic_aux): Adjust for phi_translate changes.
12772 When intersecting union the expressions and prune those
12773 not in the final value set, keeping possibly multiple
12774 expressions per value. Do not use value-insertion
12775 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12776 all expressions. Add verification that the value-sets
12777 only shrink during iteration.
12778 (compute_partial_antic_aux): Adjust for the phi_translate changes.
12779 (do_pre_regular_insertion): Likewise.
12780 (do_pre_partial_partial_insertion): Likewise.
12782 2018-03-02 Richard Biener <rguenther@suse.de>
12785 * config/darwin.c (saved_debug_info_level): New static global.
12786 (darwin_asm_lto_start): Disable debug info generation for LTO out.
12787 (darwin_asm_lto_end): Restore debug info generation settings.
12789 2018-03-01 Martin Liska <mliska@suse.cz>
12792 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12793 volatile arguments.
12795 2018-03-01 Richard Biener <rguenther@suse.de>
12798 * dwarf2out.c (gen_variable_die): Properly handle late VLA
12799 type annotation with LTO when debug was disabled at compile-time.
12801 2018-03-01 Matthew Fortune <mfortune@gmail.com>
12803 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12805 (mips_final_postscan_insn): Likewise.
12807 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
12809 PR rtl-optimization/84528
12810 * alias.c (init_alias_target): Add commentary.
12811 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12812 a unique base value if the frame pointer is not eliminated
12813 to the stack pointer.
12815 2018-03-01 Tom de Vries <tom@codesourcery.com>
12817 PR rtl-optimization/83327
12818 * lra-int.h (hard_regs_spilled_into): Declare.
12819 * lra.c (hard_regs_spilled_into): Define.
12820 (init_reg_info): Init hard_regs_spilled_into.
12821 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12822 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12823 (process_bb_lives): Handle hard_regs_spilled_into.
12824 (lra_create_live_ranges_1): Before doing liveness propagation, clear
12825 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12827 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
12829 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12830 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12831 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12832 * config/rs6000/aix72.h: New file.
12834 2018-02-28 Jakub Jelinek <jakub@redhat.com>
12836 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12837 instead of warning_at with conditional singular and plural messages
12841 * stor-layout.c (update_alignment_for_field): For
12842 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12843 && !DECL_PACKED (field), do the alignment update, just use
12844 only desired_align instead of MAX (type_align, desired_align)
12846 (place_field): Don't do known_align < desired_align handling
12847 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12848 is non-NULL, instead do it after rli->prev_field handling and
12849 only if not within a bitfield word. For DECL_PACKED (field)
12850 use type_align of BITS_PER_UNIT.
12852 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
12854 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12855 superfluous parentheses and trailing spaces.
12857 2018-02-28 Richard Biener <rguenther@suse.de>
12859 PR tree-optimization/84584
12860 * graphite-scop-detection.c (scop_detection::add_scop): Discard
12861 SCoPs with fake exit edge.
12863 2018-02-28 Martin Liska <mliska@suse.cz>
12866 * timevar.c (timer::print): Fix format to properly print 100%
12869 2018-02-28 Richard Biener <rguenther@suse.de>
12871 PR middle-end/84607
12872 * genmatch.c (capture_info::walk_match): Do not mark
12873 captured expressions without operands as expr_p given
12874 they act more like predicates and should be subject to
12875 "lost tail" side-effect preserving.
12877 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
12879 PR rtl-optimization/81611
12880 * auto-inc-dec.c (attempt_change): Move dead note from
12881 mem_insn if it's the next use of regno
12882 (find_address): Take address use of reg holding
12883 non-incremented value. Add parm to limit search to the named
12885 (merge_in_block): Attempt to use a mem insn that is the next
12886 use of the original regno.
12888 2018-02-27 Martin Sebor <msebor@redhat.com>
12891 * doc/invoke.texi (-Wmissing-attributes): New option.
12892 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
12894 2018-02-27 Martin Sebor <msebor@redhat.com>
12896 PR translation/84207
12897 * diagnostic-core.h (warning_n, error_n, inform_n): Change
12898 n argument to unsigned HOST_WIDE_INT.
12899 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12900 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
12901 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12902 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12904 2018-02-27 Richard Biener <rguenther@suse.de>
12906 PR tree-optimization/84512
12907 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12908 Do not use the estimate returned from record_stmt_cost for
12909 the scalar iteration cost but sum properly using add_stmt_cost.
12911 2018-02-27 Richard Biener <rguenther@suse.de>
12913 PR tree-optimization/84466
12914 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12915 Adjust last change to less strictly validate use operands.
12917 2018-02-27 Martin Liska <mliska@suse.cz>
12919 PR gcov-profile/84548
12920 * gcov.c (process_file): Allow partial overlap and consider it
12921 also as group functions.
12922 (output_lines): Properly calculate range of lines for a group.
12924 2018-02-27 Martin Liska <mliska@suse.cz>
12926 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12927 'ggc' suffixes. Change first column width.
12928 (timer::print): Fix formatting of the column.
12930 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
12932 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12933 preserve inline entry blocks for the sake of debug inline
12934 entry point markers alone.
12935 (remove_unused_locals): Suggest in comments a better place to
12936 force the preservation of inline entry blocks that are
12937 otherwise unused, but do not preserve them.
12939 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12941 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12943 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12946 * config/i386/constraints.md (Bs): Replace
12947 ix86_indirect_branch_register with
12948 TARGET_INDIRECT_BRANCH_REGISTER.
12950 * config/i386/i386.md (indirect_jump): Likewise.
12951 (tablejump): Likewise.
12952 (*sibcall_memory): Likewise.
12953 (*sibcall_value_memory): Likewise.
12954 Peepholes of indirect call and jump via memory: Likewise.
12955 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12956 (*sibcall_value_GOT_32): Likewise.
12957 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12958 (GOT_memory_operand): Likewise.
12959 (call_insn_operand): Likewise.
12960 (sibcall_insn_operand): Likewise.
12961 (GOT32_symbol_operand): Likewise.
12962 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12964 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12966 PR rtl-optimization/83496
12967 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12968 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
12969 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12970 redundant insn, if any.
12971 (relax_delay_slots): Likewise.
12972 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12974 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
12976 PR tree-optimization/83965
12977 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12978 that grouped statements are part of a reduction chain. Return
12979 true if the statement is not marked as a reduction itself but
12980 is part of a group.
12981 (vect_recog_dot_prod_pattern): Don't check whether the statement
12982 is part of a group here.
12983 (vect_recog_sad_pattern): Likewise.
12984 (vect_recog_widen_sum_pattern): Likewise.
12986 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12989 * final.c (rest_of_clean_state): Also look for calls inside sequences.
12991 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12994 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12996 (ix86_output_indirect_function_return): New prototype.
12997 (ix86_split_simple_return_pop_internal): Likewise.
12998 * config/i386/i386.c (indirect_return_via_cx): New.
12999 (indirect_return_via_cx_bnd): Likewise.
13000 (indirect_thunk_name): Handle return va CX_REG.
13001 (output_indirect_thunk_function): Create alias for
13002 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13003 (ix86_output_indirect_jmp): Remove the bool argument.
13004 (ix86_output_indirect_function_return): New function.
13005 (ix86_split_simple_return_pop_internal): Likewise.
13006 * config/i386/i386.md (*indirect_jump): Don't pass false
13007 to ix86_output_indirect_jmp.
13008 (*tablejump_1): Likewise.
13009 (simple_return_pop_internal): Change it to define_insn_and_split.
13010 Call ix86_split_simple_return_pop_internal to split it for
13011 -mfunction-return=.
13012 (simple_return_indirect_internal): Call
13013 ix86_output_indirect_function_return instead of
13014 ix86_output_indirect_jmp.
13016 2018-02-26 Jakub Jelinek <jakub@redhat.com>
13019 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13020 memset and value initialization afterwards.
13022 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
13024 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13026 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13029 * common/config/aarch64/aarch64-common.c
13030 (aarch_option_optimization_table[]): Switch
13031 off fomit-frame-pointer
13033 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13034 Chung-Ju Wu <jasonwucj@gmail.com>
13036 * config/nds32/nds32-multiple.md (load_multiple): Disallow
13038 (store_multiple): Ditto.
13040 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13042 * config.gcc: Add --with-cpu support for nds32 target.
13043 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13044 * config/nds32/nds32.opt: Add -mcpu= option.
13046 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
13048 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13049 isel=yes): Warn for these deprecated options.
13051 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
13053 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13054 ISA_2_5_MASKS_EMBEDDED.
13056 2018-02-23 Jakub Jelinek <jakub@redhat.com>
13058 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13059 p->max as pointers rather than using iterative_hash_expr.
13061 2018-02-23 Carl Love <cel@us.ibm.com>
13063 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13064 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13066 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13067 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13068 P8V_BUILTIN_VEC_VUNSIGNED2.
13070 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
13073 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13074 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13076 * lra-constraints.c (curr_insn_transform): Set up
13077 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
13079 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13080 * lra-eliminations.c (spill_pseudos): Ditto.
13081 (process_insn_for_elimination): Ditto.
13082 * lra-lives.c (reg_early_clobber_p): Use the new macros.
13083 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13084 LRA_NON_CLOBBERED_ALT.
13086 2018-02-22 Martin Sebor <msebor@redhat.com>
13088 PR tree-optimization/84480
13089 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13090 to maybe_diag_stxncpy_trunc. Call it.
13091 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13092 from gimple_fold_builtin_strcpy. Print inlining stack.
13093 (handle_builtin_stxncpy): Print inlining stack.
13094 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13096 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
13099 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13100 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13101 and -fcheck-pointer-bounds are used together.
13102 (indirect_thunk_prefix): New enum.
13103 (indirect_thunk_need_prefix): New function.
13104 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
13105 "_nt" instead of "_bnd" for NOTRACK prefix.
13106 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13107 (output_indirect_thunk_function): Likewise.
13109 (ix86_code_end): Update output_indirect_thunk_function calls.
13110 (ix86_output_indirect_branch_via_reg): Replace
13111 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13112 (ix86_output_indirect_branch_via_push): Likewise.
13113 (ix86_output_function_return): Likewise.
13114 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13115 incompatible with -fcf-protection=branch and
13116 -fcheck-pointer-bounds.
13118 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13121 * config/aarch64/aarch64.c (aarch64_print_address_internal):
13122 Change gcc_assert call to output_operand_lossage.
13124 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13126 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13128 2018-02-22 DJ Delorie <dj@redhat.com>
13129 Sebastian Perta <sebastian.perta@renesas.com>
13130 Oleg Endo <olegendo@gcc.gnu.org>
13132 * config/rx/rx.c (rx_rtx_costs): New function.
13133 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13135 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
13137 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13139 2018-02-22 Martin Liska <mliska@suse.cz>
13142 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13143 Add "native" as a possible value.
13145 2018-02-22 Martin Liska <mliska@suse.cz>
13148 * config/i386/i386.c (ix86_option_override_internal):
13149 Add "native" as a possible value for -march and -mtune.
13151 2018-02-22 Jakub Jelinek <jakub@redhat.com>
13154 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13155 to all type variants.
13157 PR tree-optimization/84503
13158 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13159 width as info->bitpos + info->bitsize - start.
13160 (merged_store_group::merge_overlapping): Simplify width computation.
13161 (check_no_overlap): New function.
13162 (imm_store_chain_info::try_coalesce_bswap): Compute expected
13163 start + width and last_order of the group, fail if check_no_overlap
13165 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13166 to group if check_no_overlap fails.
13168 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13170 * config/rs6000/altivec.md: Delete contraint arguments to
13171 define_expand, define_split, and define_peephole2, and in
13172 define_insn_and_split if always unused.
13173 * config/rs6000/darwin.md: Ditto.
13174 * config/rs6000/dfp.md: Ditto.
13175 * config/rs6000/rs6000.md: Ditto.
13176 * config/rs6000/sync.md: Ditto.
13177 * config/rs6000/vector.md: Ditto.
13178 * config/rs6000/vsx.md: Ditto.
13180 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13182 * config/rs6000/altivec.md: Write output control strings as braced
13183 blocks instead of double-quoted strings.
13184 * config/rs6000/darwin.md: Ditto.
13185 * config/rs6000/rs6000.md: Ditto.
13186 * config/rs6000/vector.md: Ditto.
13187 * config/rs6000/vsx.md: Ditto.
13189 2018-02-21 Jason Merrill <jason@redhat.com>
13191 PR c++/84314 - ICE with templates and fastcall attribute.
13192 * attribs.c (build_type_attribute_qual_variant): Remove assert.
13194 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13196 * ipa-cp.c (determine_versionability): Fix comment typos.
13198 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13201 * ipa-cp.c (determine_versionability): Do not version functions caling
13204 2018-02-21 Martin Liska <mliska@suse.cz>
13207 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13208 Add "native" as a possible value.
13209 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
13210 the macro when native cpu detection is available.
13212 2018-02-21 Martin Liska <mliska@suse.cz>
13215 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13216 Add "native" as a possible value.
13217 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13218 when native cpu detection is available.
13220 2018-02-21 Jakub Jelinek <jakub@redhat.com>
13221 Martin Sebor <msebor@redhat.com>
13223 PR tree-optimization/84478
13224 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13226 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13227 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13228 support which is conservatively correct, for 2 only stay conservative
13229 for maxlen. Formatting and comment capitalization fixes. Add STRICT
13230 argument to the 2 argument get_range_strlen, adjust 6 arg
13231 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13233 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13234 (gimple_fold_builtin_strlen): Pass true as last argument to
13237 2018-02-20 Martin Sebor <msebor@redhat.com>
13239 PR middle-end/84095
13240 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13241 (builtin_memref::set_base_and_offset): Same. Handle inner references.
13242 (builtin_memref::builtin_memref): Factor out parts into
13243 set_base_and_offset and call it.
13245 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13247 PR middle-end/84406
13248 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13249 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13250 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
13251 search at the associated MODE_INT.
13253 2018-02-20 Jeff Law <law@redhat.com>
13255 PR middle-end/82123
13256 PR tree-optimization/81592
13257 PR middle-end/79257
13258 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13259 for range data rather than using global data.
13260 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13261 range data rather than using global data.
13262 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13263 pass it to children as needed.
13264 (struct directive::fmtresult): Similarly.
13265 (struct directive::set_width): Similarly.
13266 (struct directive::set_precision): Similarly.
13267 (format_integer, format_directive, parse_directive): Similarly.
13268 (format_none): Accept unnamed vr_values parameter.
13269 (format_percent, format_floating, format_character): Similarly.
13270 (format_string, format_plain): Similarly.
13271 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13272 the EVRP range analyzer for range data rather than using global data.
13273 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13274 gimple-ssa-evrp-analyze.h
13275 (class sprintf_dom_walker): Add after_dom_children member function.
13276 Add evrp_range_analyzer member.
13277 (sprintf_dom_walker::before_dom_children): Call into the EVRP
13278 range analyzer as needed.
13279 (sprintf_dom_walker::after_dom_children): New member function.
13280 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13282 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13283 (evrp_range_analyzer::pop_to_marker): Likewise.
13285 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13287 PR tree-optimization/84419
13288 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13289 with the required type if its current type is compatible but
13292 2018-02-20 Jakub Jelinek <jakub@redhat.com>
13294 PR middle-end/82004
13295 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13296 after vectorization.
13298 2018-02-20 Martin Liska <mliska@suse.cz>
13301 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13302 possible values if we don't have a hint.
13304 2018-02-20 Martin Liska <mliska@suse.cz>
13308 * final.c (shorten_branches): Build align_tab array with one
13310 * opts.c (finish_options): Add alignment option limit check.
13311 (MAX_CODE_ALIGN): Likewise.
13312 (MAX_CODE_ALIGN_VALUE): Likewise.
13313 * doc/invoke.texi: Document maximum allowed option value for
13314 all -falign-* options.
13316 2018-02-19 Jakub Jelinek <jakub@redhat.com>
13319 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13320 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13321 * var-tracking.c (emit_note_insn_var_location): Remove all references
13322 to NOTE_INSN_CALL_ARG_LOCATION.
13323 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13324 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13325 Use copy_rtx_if_shared.
13326 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13327 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13328 (dwarf2out_var_location): Remove handling of
13329 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13331 * final.c (final_scan_insn): Remove all references to
13332 NOTE_INSN_CALL_ARG_LOCATION.
13333 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
13334 before dumping final insns.
13335 * except.c (emit_note_eh_region_end): Remove all references to
13336 NOTE_INSN_CALL_ARG_LOCATION.
13337 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13338 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13339 * config/arc/arc.c (hwloop_optimize): Likewise.
13340 * config/arm/arm.c (create_fix_barrier): Likewise.
13341 * config/s390/s390.c (s390_chunkify_start): Likewise.
13342 * config/sh/sh.c (find_barrier): Likewise.
13343 * config/i386/i386.c (rest_of_insert_endbranch,
13344 ix86_seh_fixup_eh_fallthru): Likewise.
13345 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13346 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13347 * config/frv/frv.c (frv_function_prologue): Likewise.
13348 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
13350 (note_outside_basic_block_p): Remove all references to
13351 NOTE_INSN_CALL_ARG_LOCATION.
13352 * gengtype.c (adjust_field_rtx_def): Likewise.
13353 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13355 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13356 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13359 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13362 PR tree-optimization/84452
13363 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13364 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13367 2018-02-19 Martin Liska <mliska@suse.cz>
13370 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13372 2018-02-19 Martin Liska <mliska@suse.cz>
13373 Richard Sandiford <richard.sandiford@linaro.org>
13375 PR tree-optimization/82491
13376 * gimple-fold.c (get_base_constructor): Make earlier bail out
13379 2018-02-19 Carl Love <cel@us.ibm.com>
13381 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13382 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13384 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13385 P8V_BUILTIN_VEC_NEG.
13387 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
13389 * config/rl78/rl78.md (movdf): New define expand.
13391 2018-02-19 Martin Liska <mliska@suse.cz>
13394 * doc/invoke.texi: Fix typo.
13395 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13397 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
13399 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13400 handle rs6000_single_float and rs6000_double_float specially for
13403 2018-02-16 Jeff Law <law@redhat.com>
13405 * config/rx/rx.c (add_pop_cfi_notes): New function.;
13406 (pop_regs): Use it.
13408 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13411 * ipa-inline.c (inline_small_functions): Fix a typo.
13413 2018-02-16 Nathan Sidwell <nathan@acm.org>
13415 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13417 2018-02-16 Carl Love <cel@us.ibm.com>
13419 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13420 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13421 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13422 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13423 expansion to P8V_BUILTIN_VEC_FLOAT2.
13425 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
13427 PR rtl-optimization/70023
13428 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13429 src_regno into account.
13431 2018-02-16 Carl Love <cel@us.ibm.com>
13433 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13434 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13435 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13436 * config/rs6000/rs6000.c: Remove case statements for
13437 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13438 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13439 and P9V_BUILTIN_VEC_VINSERT4B.
13440 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13441 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13442 * config/rs6000/vsx.md:
13443 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13446 2018-02-16 Carl Love <cel@us.ibm.com>
13448 * config/rs6000/altivec.h: Add builtin names vec_extract4b
13450 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13452 * config/rs6000/rs6000-c.c: Add the definitions for
13453 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13454 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13455 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13456 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
13457 definition for insert4b and define insn *insert3b_internal.
13458 * doc/extend.texi: Add documentation for vec_extract4b.
13460 2018-02-16 Nathan Sidwell <nathan@acm.org>
13462 * doc/extend.texi (Backwards Compatibility): Mention friend
13463 injection. Note for-scope is deprecated.
13464 * doc/invoke.texi (-ffriend-injection): Deprecate.
13466 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
13468 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13469 that moved to I2, also allow destinations that are a paradoxical
13470 subreg (instead of a normal reg).
13472 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
13475 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13478 2018-02-16 Richard Biener <rguenther@suse.de>
13480 PR tree-optimization/84037
13481 PR tree-optimization/84016
13483 * config/i386/i386.c (ix86_builtin_vectorization_cost):
13484 Adjust vec_construct for the fact we need additional higher latency
13485 128bit inserts for AVX256 and AVX512 vector builds.
13486 (ix86_add_stmt_cost): Scale vector construction cost for
13489 2018-02-16 Richard Biener <rguenther@suse.de>
13491 PR tree-optimization/84417
13492 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13493 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13494 (non_rewritable_lvalue_p): Likewise, use poly-ints.
13496 2018-02-16 Martin Liska <mliska@suse.cz>
13499 * internal-fn.def (ASAN_CHECK): Set proper flags.
13500 (ASAN_MARK): Likewise.
13502 2018-02-16 Julia Koval <julia.koval@intel.com>
13504 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13505 from PTA_CANNONLAKE.
13507 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13510 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13511 Use ++iter rather than iter++ for std::list iterators.
13512 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
13513 defer deleting them until all nodes in the forest are processed. Do
13514 free even leaf nodes. Change to_process into auto_vec.
13517 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13518 * vec.h (vec_default_construct): Use memset instead of placement new
13519 if BROKEN_VALUE_INITIALIZATION is defined.
13520 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13521 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13524 PR rtl-optimization/83723
13525 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13526 * lra.c (lra_substitute_pseudo): Likewise. If true, use
13527 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
13529 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13531 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13533 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
13535 PR rtl-optimization/81443
13536 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13537 from inner REGs to paradoxical SUBREGs.
13539 2018-02-16 Richard Biener <rguenther@suse.de>
13541 PR tree-optimization/84399
13542 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13543 For operands we can analyze at their definition make sure we can
13544 analyze them at each use as well.
13546 2018-02-16 Richard Biener <rguenther@suse.de>
13548 PR tree-optimization/84190
13549 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13550 volatile accesses if the decl isn't volatile.
13552 2018-02-15 Jason Merrill <jason@redhat.com>
13554 PR c++/84314 - ICE with templates and fastcall attribute.
13555 * attribs.c (build_type_attribute_qual_variant): Don't clobber
13556 TYPE_CANONICAL on an existing type.
13558 2018-02-15 Jakub Jelinek <jakub@redhat.com>
13560 PR tree-optimization/84383
13561 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13562 dstoff nor call operand_equal_p if dstbase is NULL.
13564 PR tree-optimization/84334
13565 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13566 also a CONSTANT_CLASS_P, punt.
13568 2018-02-14 Jim Wilson <jimw@sifive.com>
13570 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13571 first SMALL_OPERAND check. New local min_second_step. Move assert
13572 to where locals are set. Add TARGET_RVC support.
13573 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13575 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
13577 * doc/invoke.texi: Correct -Wformat-overflow code sample.
13579 2018-02-14 Martin Sebor <msebor@redhat.com>
13581 PR tree-optimization/83698
13582 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13583 arrays constrain the offset range to their bounds.
13584 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13585 (builtin_access::overlap): Avoid setting the size of overlap if it's
13587 (maybe_diag_overlap): Also consider arrays when deciding what values
13588 of offsets to include in diagnostics.
13590 2018-02-14 Martin Sebor <msebor@redhat.com>
13593 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13594 that correspond to the kind of a declaration.
13596 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
13599 * config/pa/pa.md: Load address of PIC label using the linkage table
13600 if the label is nonlocal.
13602 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
13604 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13605 warning message if user requests -maltivec=be.
13606 * doc/invoke.texi: Document deprecation of -maltivec=be.
13608 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
13611 * config/rs6000/rs6000-c.c: Update definitions for
13612 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13613 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13615 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13618 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13619 add _get_ssp intrinsics. Remove argument from
13620 __builtin_ia32_rdssp[d|q].
13621 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13622 * config/i386/i386-builtin.def: Remove argument from
13623 __builtin_ia32_rdssp[d|q].
13624 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13625 ix86_expand_special_args_builtin for _rdssp[d|q].
13626 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13627 Clear register before usage.
13628 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13629 Add documentation for new _get_ssp and _inc_ssp intrinsics.
13631 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
13633 PR tree-optimization/84357
13634 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13635 operand 1 of an ARRAY_REF too.
13637 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
13640 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13641 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13643 (set_of_reg): New struct.
13644 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13645 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13646 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13648 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13649 Split into bitclr, bitset, bitinvert patterns if appropriate.
13650 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13651 use rx_fuse_in_memory_bitop.
13652 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13653 to named insn, correct maximum insn length.
13655 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
13658 * machmode.def: Define a complex mode for PARTIAL_INT.
13659 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13661 * doc/rtl.texi: Document CSPImode.
13662 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13664 (msp430_hard_regno_nregs_with_padding): Likewise.
13666 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
13669 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13671 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
13673 PR rtl-optimization/84169
13674 * combine.c (try_combine): New variable split_i2i3. Set it to true if
13675 we generated a parallel as new i3 and we split that to new i2 and i3
13676 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
13677 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
13678 those to i2, not i1. Partially rewrite this scan code.
13680 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13683 * stor-layout.c (place_field): For variable length fields, adjust
13684 offset_align afterwards not just based on the field's alignment,
13685 but also on the size.
13687 PR middle-end/84309
13688 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13689 of exps and logs in the use_exp2 case.
13691 2018-02-13 Jeff Law <law@redhat.com>
13693 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13694 entry for "vector".
13696 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13699 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
13703 * common.opt (gas-loc-support, gas-locview-support): New.
13704 (ginline-points, ginternal-reset-location-views): New.
13705 * doc/invoke.texi: Document them. Use @itemx where intended.
13706 (gvariable-location-views): Adjust.
13707 * target.def (reset_location_view): New.
13708 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13709 (TARGET_RESET_LOCATION_VIEW): New.
13710 * doc/tm.texi: Rebuilt.
13711 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13712 (dwarf2out_default_as_locview_support): New.
13713 (output_asm_line_debug_info): Use option variables.
13714 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13715 (output_loc_list): Likewise.
13716 (add_high_low_attributes): Check option variables.
13717 Don't output entry view attribute in strict mode.
13718 (gen_inlined_subroutine_die): Check option variables.
13719 (dwarf2out_inline_entry): Likewise.
13720 (init_sections_and_labels): Likewise.
13721 (dwarf2out_early_finish): Likewise.
13722 (maybe_reset_location_view): New, from...
13723 (dwarf2out_var_location): ... here. Call it.
13724 * debug.h (dwarf2out_default_as_loc_support): Declare.
13725 (dwarf2out_default_as_locview_support): Declare.
13726 * hooks.c (hook_int_rtx_insn_0): New.
13727 * hooks.h (hook_int_rtx_insn_0): Declare.
13728 * toplev.c (process_options): Take -gas-loc-support and
13729 -gas-locview-support from dwarf2out. Enable
13730 -gvariable-location-views by default only with locview
13731 assembler support. Enable -ginternal-reset-location-views by
13732 default only if the target defines the corresponding hook.
13733 Enable -ginline-points by default if location views are
13734 enabled; force it disabled if statement frontiers are
13736 * tree-inline.c (expand_call_inline): Check option variables.
13737 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13739 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
13741 PR tree-optimization/84321
13742 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13743 handling. Also check whether the anti-range contains any values
13744 that satisfy the mask; switch to a VR_RANGE if not.
13746 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
13749 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13751 2018-02-13 Martin Jambor <mjambor@suse.cz>
13754 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13755 of call statements, also set location of a load to a temporary.
13757 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
13759 * config/rl78/rl78.c (add_vector_labels): New function.
13760 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13761 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13762 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13763 which checks that no arguments are passed.
13764 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13765 * doc/extend.texi: Documentation for the new attribute.
13767 2018-02-13 Andreas Schwab <schwab@suse.de>
13769 * config/riscv/linux.h (CPP_SPEC): Define.
13771 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13774 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13775 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13776 OPTION_MASK_ISA_AES as first argument to def_builtin_const
13777 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13778 instead of OPTION_MASK_ISA_PCLMUL as first argument to
13779 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13780 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13781 temporarily for AES and PCLMUL builtins.
13783 PR tree-optimization/84339
13784 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13785 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13788 PR middle-end/84309
13789 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13790 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13791 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13793 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13795 * omp-simd-clone.h: New file.
13796 * omp-simd-clone.c: Include omp-simd-clone.h.
13797 (expand_simd_clones): No longer static.
13798 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13799 cgraph.h and omp-simd-clone.h.
13800 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13801 (vect_recog_widen_shift_pattern): Formatting fix.
13802 (vect_pattern_recog_1): Don't check optab for calls.
13805 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13806 operands[2] into a REG before using gen_lowpart on it.
13808 2018-02-12 Jeff Law <law@redhat.com>
13811 * config/sh/sh.c (find_barrier): Consider a sibling call
13814 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13815 successfully back substituting a reg.
13817 2018-02-12 Richard Biener <rguenther@suse.de>
13819 PR tree-optimization/84037
13820 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13821 parameter, move visited init to caller.
13822 (vect_slp_analyze_operations): Separate cost from validity
13823 check, initialize visited once for all instances.
13824 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13826 * tree-vect-stmts.c (vect_model_simple_cost): Make early
13828 (vect_model_promotion_demotion_cost): Likewise.
13829 (vectorizable_bswap): Guard cost modeling with !slp_node
13830 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13832 (vectorizable_call): Likewise.
13833 (vectorizable_conversion): Likewise.
13834 (vectorizable_assignment): Likewise.
13835 (vectorizable_shift): Likewise.
13836 (vectorizable_operation): Likewise.
13837 (vectorizable_store): Likewise.
13838 (vectorizable_load): Likewise.
13839 (vectorizable_condition): Likewise.
13840 (vectorizable_comparison): Likewise.
13842 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
13845 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13846 (ASAN_MARK): Fix fnspec to account for return value, change pointer
13847 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13849 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13851 PR middle-end/83665
13852 * params.def (inline-min-speedup): Increase from 8 to 15.
13853 (max-inline-insns-auto): Decrease from 40 to 30.
13854 * ipa-split.c (consider_split): Add some buffer for function to
13855 be considered inlining candidate.
13856 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13859 2018-02-12 Richard Biener <rguenther@suse.de>
13861 PR tree-optimization/84037
13862 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13863 matched stmts if we cannot swap the non-matched ones.
13865 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13867 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13868 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13869 _mm_maskz_scalef_round_ss): New intrinsics.
13870 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13871 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13872 __builtin_ia32_scalefss_round): Remove.
13873 (__builtin_ia32_scalefsd_mask_round,
13874 __builtin_ia32_scalefss_mask_round): New intrinsics.
13875 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13876 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13877 ((match_operand:VF_128 2 "<round_nimm_predicate>"
13878 "<round_constraint>")): Changed to ...
13879 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13880 "<round_scalar_constraint>")): ... this.
13881 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13882 %0, %1, %2<round_op3>}"): Changed to ...
13883 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13884 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13885 %2<round_scalar_mask_op3>}"): ... this.
13886 * config/i386/subst.md (round_scalar_nimm_predicate): New.
13888 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13890 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13891 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13892 (_mm_maskz_sqrt_round_ss): New intrinsics.
13893 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13894 (__builtin_ia32_sqrtsd_mask_round)
13895 (__builtin_ia32_sqrtss_mask_round): New builtins.
13896 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13897 (__builtin_ia32_sqrtss_round): Remove.
13898 (__builtin_ia32_sqrtsd_mask_round)
13899 (__builtin_ia32_sqrtss_mask_round): New builtins.
13900 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13901 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13902 ((match_operand:VF_128 1 "vector_operand"
13903 "xBm,<round_constraint>")): Changed to ...
13904 ((match_operand:VF_128 1 "vector_operand"
13905 "xBm,<round_scalar_constraint>")): ... this.
13906 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13907 %0, %2, %<iptr>1<round_op3>}): Changed to ...
13908 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13909 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13910 %<iptr>1<round_scalar_mask_op3>}): ... this.
13911 ((set_attr "prefix" "<round_prefix>")): Changed to ...
13912 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13914 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
13917 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13918 Cast vec_cmpeq result to correct type.
13919 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13920 Cast vec_cmpgt result to correct type.
13922 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
13924 * final.c (final_scan_insn_1): Renamed from...
13925 (final_scan_insn): ... this. New wrapper, to recover
13926 seen from the outermost call in recursive ones.
13927 * config/sparc/sparc.c (output_return): Drop seen from call.
13928 (output_sibcall): Likewise.
13929 * config/visium/visium.c (output_branch): Likewise.
13931 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
13933 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13936 2018-02-10 Alan Modra <amodra@gmail.com>
13939 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13940 Specify LR as an input.
13942 2018-02-10 Jakub Jelinek <jakub@redhat.com>
13945 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13946 remove_member_access_dummy_vars): New functions.
13947 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13948 lower_omp_1, execute_lower_omp): Use them.
13950 PR rtl-optimization/84308
13951 * shrink-wrap.c (spread_components): Release todo vector.
13953 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
13955 PR rtl-optimization/57193
13956 * ira-color.c (struct allocno_color_data): Add member
13957 conflict_allocno_hard_prefs.
13958 (update_conflict_allocno_hard_prefs): New.
13959 (bucket_allocno_compare_func): Add a preference based on
13960 conflict_allocno_hard_prefs.
13961 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13962 (color_allocnos): Remove a dead code. Initiate
13963 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
13965 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13968 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13969 constraint from =wa to wa. Avoid a subreg on the output operand,
13970 instead use a pseudo and subreg it in a move.
13971 (p9_xxbrd_<mode>): Changed to ...
13972 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13973 (p9_xxbrd_v2df): New expander.
13974 (p9_xxbrw_<mode>): Changed to ...
13975 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13976 (p9_xxbrw_v4sf): New expander.
13978 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13980 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13982 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
13985 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13986 multiply in 32-bit mode.
13987 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13988 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13991 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13993 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13994 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13995 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13996 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13998 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
14001 * dwarf2out.c (is_trivial_indirect_ref): New function.
14002 (dwarf2out_late_global_decl): Do not generate a location
14003 attribute for variables that have a non-trivial DECL_VALUE_EXPR
14004 and that are not defined in the current unit.
14006 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14008 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14009 instead of a libcall for UNORDERED.
14011 2018-02-09 Tamar Christina <tamar.christina@arm.com>
14014 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14015 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14017 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14020 * config/s390/s390.c (s390_set_current_function): Invoke
14021 s390_indirect_branch_settings also if fndecl didn't change.
14023 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14025 * config/rs6000/rs6000.md (blockage): Set length to zero.
14027 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14029 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14031 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14034 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14035 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14039 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14040 PARALLEL incoming that failed vt_get_decl_and_offset check.
14042 PR middle-end/84237
14043 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14044 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14046 (get_variable_section): For decls in named .bss* sections pass true as
14047 second argument to bss_initializer_p.
14049 2018-02-09 Marek Polacek <polacek@redhat.com>
14050 Jakub Jelinek <jakub@redhat.com>
14053 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14054 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
14055 Sync some changes from cxx_fold_indirect_ref.
14057 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14059 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14061 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14062 (BLOCK_INLINE_ENTRY_LABEL): New.
14063 (dwarf2out_var_location): Disregard inline entry markers.
14064 (inline_entry_data): New struct.
14065 (inline_entry_data_hasher): New hashtable type.
14066 (inline_entry_data_hasher::hash): New.
14067 (inline_entry_data_hasher::equal): New.
14068 (inline_entry_data_table): New variable.
14069 (add_high_low_attributes): Add DW_AT_entry_pc and
14070 DW_AT_GNU_entry_view attributes if a pending entry is found
14071 in inline_entry_data_table. Add old entry_pc attribute only
14072 if debug nonbinding markers are disabled.
14073 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14074 markers are enabled.
14075 (block_within_block_p, dwarf2out_inline_entry): New.
14076 (dwarf2out_finish): Check that no entries remained in
14077 inline_entry_data_table.
14078 * final.c (reemit_insn_block_notes): Handle inline entry notes.
14079 (final_scan_insn, notice_source_line): Likewise.
14080 (rest_of_clean_state): Skip inline entry markers.
14081 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14083 * gimple.c (gimple_build_debug_inline_entry): New.
14084 * gimple.h (enum gimple_debug_subcode): Add
14085 GIMPLE_DEBUG_INLINE_ENTRY.
14086 (gimple_build_debug_inline_entry): Declare.
14087 (gimple_debug_inline_entry_p): New.
14088 (gimple_debug_nonbind_marker_p): Adjust.
14089 * insn-notes.def (INLINE_ENTRY): New.
14090 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14091 inline entry marker notes.
14092 (print_insn): Likewise.
14093 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14094 (INSN_DEBUG_MARKER_KIND): Likewise.
14095 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14096 * tree-inline.c (expand_call_inline): Build and insert
14097 debug_inline_entry stmt.
14098 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14099 inline entry blocks early, if nonbind markers are enabled.
14100 (dump_scope_block): Dump fragment info.
14101 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14102 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14103 (gimple_build_debug_inline_entry): New.
14104 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14105 Enable/disable inline entry points too.
14106 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14107 (DEBUG_INSN): Describe inline entry markers.
14109 * common.opt (gvariable-location-views): New.
14110 (gvariable-location-views=incompat5): New.
14111 * config.in: Rebuilt.
14112 * configure: Rebuilt.
14113 * configure.ac: Test assembler for view support.
14114 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14115 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14116 * dwarf2out.c (var_loc_view): New typedef.
14117 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14118 (dwarf2out_locviews_in_attribute): New.
14119 (dwarf2out_locviews_in_loclist): New.
14120 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14121 (enum dw_line_info_opcode): Add LI_adv_address.
14122 (struct dw_line_info_table): Add view.
14123 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14124 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14125 (zero_view_p): New variable.
14126 (ZERO_VIEW_P): New macro.
14127 (output_asm_line_debug_info): New.
14128 (struct var_loc_node): Add view.
14129 (add_AT_view_list, AT_loc_list): New.
14130 (add_var_loc_to_decl): Add view param. Test it against last.
14131 (new_loc_list): Add view params. Record them.
14132 (AT_loc_list_ptr): Handle loc and view lists.
14133 (view_list_to_loc_list_val_node): New.
14134 (print_dw_val): Handle dw_val_class_view_list.
14135 (size_of_die): Likewise.
14136 (value_format): Likewise.
14137 (loc_list_has_views): New.
14138 (gen_llsym): Set vl_symbol too.
14139 (maybe_gen_llsym, skip_loc_list_entry): New.
14140 (dwarf2out_maybe_output_loclist_view_pair): New.
14141 (output_loc_list): Output view list or entries too.
14142 (output_view_list_offset): New.
14143 (output_die): Handle dw_val_class_view_list.
14144 (output_dwarf_version): New.
14145 (output_compilation_unit_header): Use it.
14146 (output_skeleton_debug_sections): Likewise.
14147 (output_rnglists, output_line_info): Likewise.
14148 (output_pubnames, output_aranges): Update version comments.
14149 (output_one_line_info_table): Output view numbers in asm comments.
14150 (dw_loc_list): Determine current endview, pass it to new_loc_list.
14151 Call maybe_gen_llsym.
14152 (loc_list_from_tree_1): Adjust.
14153 (add_AT_location_description): Create view list attribute if
14154 needed, check it's absent otherwise.
14155 (convert_cfa_to_fb_loc_list): Adjust.
14156 (maybe_emit_file): Call output_asm_line_debug_info for test.
14157 (dwarf2out_var_location): Reset views as needed. Precompute
14158 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
14159 attribute. Set view.
14160 (new_line_info_table): Reset next view.
14161 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14162 (dwarf2out_source_line): Likewise. Output view resets and labels to
14163 the assembler, or select appropriate line info opcodes.
14164 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14165 (optimize_string_length): Catch it. Adjust.
14166 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
14167 dw_val_class_view_list, and remove it if no longer needed.
14168 (hash_loc_list): Hash view numbers.
14169 (loc_list_hasher::equal): Compare them.
14170 (optimize_location_lists): Check whether a view list symbol is
14171 needed, and whether the locview attribute is present, and
14172 whether they match. Remove the locview attribute if no longer
14174 (index_location_lists): Call skip_loc_list_entry for test.
14175 (dwarf2out_finish): Call output_asm_line_debug_info for test.
14176 Use output_dwarf_version.
14177 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14178 (struct dw_val_node): Add val_view_list.
14179 * final.c (SEEN_NEXT_VIEW): New.
14180 (set_next_view_needed): New.
14181 (clear_next_view_needed): New.
14182 (maybe_output_next_view): New.
14183 (final_start_function): Rename to...
14184 (final_start_function_1): ... this. Take pointer to FIRST,
14185 add SEEN parameter. Emit param bindings in the initial view.
14186 (final_start_function): Reintroduce SEEN-less interface.
14187 (final): Rename to...
14188 (final_1): ... this. Take SEEN parameter. Output final pending
14189 next view at the end.
14190 (final): Reintroduce seen-less interface.
14191 (final_scan_insn): Output pending next view before switching
14192 sections or ending a block. Mark the next view as needed when
14193 outputting variable locations. Notify debug backend of section
14194 changes, and of location view changes.
14195 (rest_of_handle_final): Adjust.
14196 * toplev.c (process_options): Autodetect value for debug variable
14197 location views option. Warn on incompat5 without -gdwarf-5.
14198 * doc/invoke.texi (gvariable-location-views): New.
14199 (gvariable-location-views=incompat5): New.
14200 (gno-variable-location-views): New.
14202 2018-02-08 David Malcolm <dmalcolm@redhat.com>
14204 PR tree-optimization/84136
14205 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14206 that the result of find_edge is non-NULL.
14208 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14211 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14212 storing integer register in SImode. Fix cost of 256 and 512
14213 byte aligned SSE register store.
14215 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14217 * config/i386/i386.c (ix86_multiplication_cost): Fix
14218 multiplication cost for TARGET_AVX512DQ.
14220 2018-02-08 Marek Polacek <polacek@redhat.com>
14222 PR tree-optimization/84238
14223 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14226 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14228 PR tree-optimization/84265
14229 * tree-vect-stmts.c (vectorizable_store): Don't treat
14230 VMAT_CONTIGUOUS accesses as grouped.
14231 (vectorizable_load): Likewise.
14233 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14235 PR tree-optimization/81635
14236 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14237 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14238 (test_round_for_mask): New functions.
14239 (wide_int_cc_tests): Call test_round_for_mask.
14240 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14241 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14242 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14243 range returned by get_range_info.
14245 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14248 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14249 * symtab.c: Include builtins.h
14250 (symtab_node::output_to_lto_symbol_table_p): Move here
14251 from lto-streamer-out.c:output_symbol_p.
14252 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14253 (output_symbol_p): Move all logic to symtab.c
14254 (produce_symtab): Update.
14256 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14258 * config/s390/s390-opts.h (enum indirect_branch): Define.
14259 * config/s390/s390-protos.h (s390_return_addr_from_memory)
14260 (s390_indirect_branch_via_thunk)
14261 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14262 (enum s390_indirect_branch_type): Define.
14263 * config/s390/s390.c (struct s390_frame_layout, struct
14264 machine_function): Remove.
14265 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14266 (indirect_branch_table_label_no, indirect_branch_table_name):
14268 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14269 (enum s390_indirect_branch_option): Define.
14270 (s390_return_addr_from_memory): New function.
14271 (s390_handle_string_attribute): New function.
14272 (s390_attribute_table): Add new attribute handler.
14273 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14274 (s390_indirect_branch_via_thunk): New function.
14275 (s390_indirect_branch_via_inline_thunk): New function.
14276 (s390_function_ok_for_sibcall): When jumping via thunk disallow
14277 sibling call optimization for non z10 compiles.
14278 (s390_emit_call): Force indirect branch target to be a single
14279 register. Add r1 clobber for non-z10 compiles.
14280 (s390_emit_epilogue): Emit return jump via return_use expander.
14281 (s390_reorg): Handle JUMP_INSNs as execute targets.
14282 (s390_option_override_internal): Perform validity checks for the
14283 new command line options.
14284 (s390_indirect_branch_attrvalue): New function.
14285 (s390_indirect_branch_settings): New function.
14286 (s390_set_current_function): Invoke s390_indirect_branch_settings.
14287 (s390_output_indirect_thunk_function): New function.
14288 (s390_code_end): Implement target hook.
14289 (s390_case_values_threshold): Implement target hook.
14290 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14292 * config/s390/s390.h (struct s390_frame_layout)
14293 (struct machine_function): Move here from s390.c.
14294 (TARGET_INDIRECT_BRANCH_NOBP_RET)
14295 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14296 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14297 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14298 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14299 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14300 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14301 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14302 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14303 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14304 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14305 (mnemonic attribute): Add values which aren't recognized
14307 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14308 pattern for branch conversion. Fix mnemonic attribute.
14309 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14310 indirect branch via thunk if requested.
14311 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14312 ("*indirect_jump"): Disable for branch conversion using out of
14314 ("indirect_jump_via_thunk<mode>_z10")
14315 ("indirect_jump_via_thunk<mode>")
14316 ("indirect_jump_via_inlinethunk<mode>_z10")
14317 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14318 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14319 ("casesi_jump_via_inlinethunk<mode>_z10")
14320 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14321 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14322 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14323 ("*indirect2_jump"): Disable for branch conversion.
14324 ("casesi_jump"): Turn into expander and expand patterns for branch
14326 ("return_use"): New expander.
14327 ("*return"): Emit return via thunk and rename it to ...
14328 ("*return<mode>"): ... this one.
14329 * config/s390/s390.opt: Add new options and and enum for the
14332 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14334 * lra-constraints.c (match_reload): Unconditionally use
14335 gen_lowpart_SUBREG, rather than selecting between that
14336 and equivalent gen_rtx_SUBREG code.
14338 2018-02-08 Richard Biener <rguenther@suse.de>
14340 PR tree-optimization/84233
14341 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14342 changed flag instead of boguously re-using phi_inserted.
14344 2018-02-08 Martin Jambor <mjambor@suse.cz>
14346 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14347 static local variables.
14349 2018-02-08 Richard Biener <rguenther@suse.de>
14351 PR tree-optimization/84278
14352 * tree-vect-stmts.c (vectorizable_store): When looking for
14353 smaller vector types to perform grouped strided loads/stores
14354 make sure the mode is supported by the target.
14355 (vectorizable_load): Likewise.
14357 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14359 * config/aarch64/aarch64.c (aarch64_components_for_bb):
14360 Increase LDP/STP opportunities by adding adjacent callee-saves.
14362 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14364 PR rtl-optimization/84068
14365 PR rtl-optimization/83459
14366 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14368 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
14370 PR tree-optimization/84224
14371 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14372 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14373 non-zero arguments.
14375 2018-02-07 Iain Sandoe <iain@codesourcery.com>
14378 * config/rs6000/altivec.md (*restore_world): Remove LR use.
14379 * config/rs6000/predicates.md (restore_world_operation): Adjust op
14380 count, remove one USE.
14382 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
14384 * doc/install.texi (Configuration): Document the
14385 --with-long-double-format={ibm,ieee} PowerPC configuration
14389 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14390 Convert from define_expand to be define_insn_and_split. Rework
14391 float/double/_Float128 conversions to QI/HI/SImode to work with
14392 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
14393 conversions to QI/HImode types did a store and then a load to
14394 truncate the value. For conversions to VSX registers, don't split
14395 the insn, instead emit the code directly. Use the code iterator
14396 any_fix to combine signed and unsigned conversions.
14397 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14398 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14399 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14400 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14401 (fix_<mode>di2_hw): Likewise.
14402 (fixuns_<mode>di2_hw): Likewise.
14403 (fix_<mode>si2_hw): Likewise.
14404 (fixuns_<mode>si2_hw): Likewise.
14405 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14406 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14407 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14408 fix<uns>_trunc<SFDF:mode>si2_p8.
14409 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14410 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14411 (fix<uns>_<mode>_mem): Likewise.
14412 (fctiw<u>z_<mode>_mem): Likewise.
14413 (fix<uns>_<mode>_mem): Likewise.
14414 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14415 the register allocator from doing a direct move to the GPRs to do
14416 a store, and instead use the ISA 3.0 store byte/half-word from
14417 vector register instruction. For IEEE 128-bit floating point,
14418 also optimize stores of 32-bit ints.
14419 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14421 2018-02-07 Alan Hayward <alan.hayward@arm.com>
14423 * genextract.c (push_pathstr_operand): New function to support
14425 (walk_rtx): Call push_pathstr_operand.
14426 (print_path): Support [a-zA-Z].
14428 2018-02-07 Richard Biener <rguenther@suse.de>
14430 PR tree-optimization/84037
14431 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14432 (cse_and_gimplify_to_preheader): Declare.
14433 (vect_get_place_in_interleaving_chain): Likewise.
14434 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14436 (_loop_vec_info::~_loop_vec_info): Delete it.
14437 (cse_and_gimplify_to_preheader): New function.
14438 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14439 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14440 (vectorizable_load): Likewise. For grouped stores always base
14441 the IV on the first element.
14442 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14443 condition before gimplifying.
14445 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14447 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14448 *DIV_EXPR and *MOD_EXPR.
14450 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
14453 * config/i386/i386.c (ix86_option_override_internal): Mask out
14454 the CF_SET bit when checking -fcf-protection.
14456 2018-02-07 Tom de Vries <tom@codesourcery.com>
14459 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14462 2018-02-07 Richard Biener <rguenther@suse.de>
14464 PR tree-optimization/84204
14465 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14468 PR tree-optimization/84205
14469 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14470 special-case isl_ast_op_zdiv_r.
14472 PR tree-optimization/84223
14473 * graphite-scop-detection.c (gather_bbs::before_dom_children):
14474 Only add conditions from within the region.
14475 (gather_bbs::after_dom_children): Adjust.
14477 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
14480 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14481 * config/avr/avr.md: Only post-reload split REG-REG moves if
14482 either register is GENERAL_REG_P.
14484 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14486 PR tree-optimization/84235
14487 * tree-ssa-scopedtables.c
14488 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14489 if the subtraction is performed in floating point type where NaNs are
14490 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14491 build 1. Formatting fix.
14493 2018-02-06 Jakub Jelinek <jakub@redhat.com>
14496 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14497 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14498 and skip it regardless of bb boundaries. Use CALL_P macro,
14499 don't test INSN_P (insn) together with CALL_P or JUMP_P check
14500 unnecessarily, formatting fix.
14502 2018-02-06 Michael Collison <michael.collison@arm.com>
14504 * config/arm/thumb2.md:
14505 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14506 (*thumb_mov_notscc): Ditto.
14508 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
14511 * config/rs6000/rs6000.md (su code attribute): Use "u" for
14512 unsigned_fix, not "s".
14514 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14516 * configure.ac (gcc_fn_eh_frame_ro): New function.
14517 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14518 correct .eh_frame permissions.
14519 * configure: Regenerate.
14521 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
14523 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14524 irrelevant options.
14526 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14528 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14529 Display warning message for -mno-speculate-indirect-jumps.
14531 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
14533 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14535 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14537 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
14539 PR tree-optimization/84225
14540 * tree-eh.c (find_trapping_overflow): Only call
14541 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14543 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14546 * config/i386/i386.c: Reimplement the check of possible options
14547 -mibt/-mshstk conbination. Change error messages.
14548 * doc/invoke.texi: Fix a typo: remove extra '='.
14550 2018-02-06 Marek Polacek <polacek@redhat.com>
14552 PR tree-optimization/84228
14553 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14555 2018-02-06 Tamar Christina <tamar.christina@arm.com>
14558 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14559 emitted arch directives.
14560 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14561 __ARM_FEATURE_COPROC before changing architectures.
14563 2018-02-06 Richard Biener <rguenther@suse.de>
14565 * config/i386/i386.c (print_reg): Fix typo.
14566 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14568 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
14570 * configure: Regenerate.
14572 2018-02-05 Martin Sebor <msebor@redhat.com>
14574 PR tree-optimization/83369
14575 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14578 2018-02-05 Martin Liska <mliska@suse.cz>
14580 * doc/invoke.texi: Cherry-pick upstream r323995.
14582 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
14584 * ira.c (ira_init_register_move_cost): Adjust comment.
14586 2018-02-05 Martin Liska <mliska@suse.cz>
14588 PR gcov-profile/84137
14589 * doc/gcov.texi: Fix typo in documentation.
14591 2018-02-05 Martin Liska <mliska@suse.cz>
14593 PR gcov-profile/83879
14594 * doc/gcov.texi: Document necessity of --dynamic-list-data when
14595 using dlopen functionality.
14597 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
14599 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14600 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14601 _mm_maskz_range_ss, _mm_mask_range_round_ss,
14602 _mm_maskz_range_round_ss): New intrinsics.
14603 (__builtin_ia32_rangesd128_round)
14604 (__builtin_ia32_rangess128_round): Remove.
14605 (__builtin_ia32_rangesd128_mask_round,
14606 __builtin_ia32_rangess128_mask_round): New builtins.
14607 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14608 __builtin_ia32_rangess128_round): Remove.
14609 (__builtin_ia32_rangesd128_mask_round,
14610 __builtin_ia32_rangess128_mask_round): New builtins.
14611 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14612 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14613 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14614 "<round_saeonly_constraint>")): Changed to ...
14615 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14616 "<round_saeonly_scalar_constraint>")): ... this.
14617 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14618 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14619 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14620 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14621 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14623 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
14625 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14627 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14628 Remove all values except native, 8540 and 8548.
14630 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
14632 * config/i386/i386.c (ix86_output_function_return): Pass
14633 INVALID_REGNUM, instead of -1, as invalid register number to
14634 indirect_thunk_name and output_indirect_thunk.
14636 2018-02-02 Julia Koval <julia.koval@intel.com>
14638 * config.gcc: Add -march=icelake.
14639 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14640 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14641 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14642 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14643 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14644 (processor_target_table): Add icelake.
14645 (ix86_option_override_internal): Handle new PTAs.
14646 (get_builtin_code_for_version): Handle icelake.
14647 (M_INTEL_COREI7_ICELAKE): New.
14648 (fold_builtin_cpu): Handle icelake.
14649 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14650 * doc/invoke.texi: Add -march=icelake.
14652 2018-02-02 Julia Koval <julia.koval@intel.com>
14654 * config/i386/i386.c (ix86_option_override_internal): Change flags type
14655 to wide_int_bitmask.
14656 * wide-int-bitmask.h: New.
14658 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14661 * config/i386/i386.md: Replace Pmode with word_mode in
14662 builtin_setjmp_setup and builtin_longjmp to support x32.
14664 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
14668 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14670 (rs6000_supported_cpu_names): New static variable.
14671 (linux_cpu_translation_table): Likewise.
14672 (elf_platform) <cpu>: Define new static variable and use it.
14673 Translate kernel AT_PLATFORM name to canonical name if needed.
14674 Error if platform name is unknown.
14676 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
14679 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14681 2018-02-01 Jeff Law <law@redhat.com>
14684 * config/i386/i386.c (release_scratch_register_on_entry): Add new
14685 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
14686 the scratch if RELEASE_VIA_POP is false.
14687 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14688 If we have to save a temporary register, decrement SIZE appropriately.
14689 Pass new arguments to release_scratch_register_on_entry.
14690 (ix86_adjust_stack_and_probe): Likewise.
14691 (ix86_emit_probe_stack_range): Pass new arguments to
14692 release_scratch_register_on_entry.
14694 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
14696 PR rtl-optimization/84157
14697 * combine.c (change_zero_ext): Use REG_P predicate in
14698 front of HARD_REGISTER_P predicate.
14700 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
14702 * config/avr/avr.c (avr_option_override): Move disabling of
14703 -fdelete-null-pointer-checks to...
14704 * common/config/avr/avr-common.c (avr_option_optimization_table):
14707 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14709 PR tree-optimization/81635
14710 * tree-data-ref.c (split_constant_offset_1): For types that
14711 wrap on overflow, try to use range info to prove that wrapping
14714 2018-02-01 Renlin Li <renlin.li@arm.com>
14717 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14718 TAILCALL_ADDR_REGS.
14719 (aarch64_register_move_cost): Likewise.
14720 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14721 TAILCALL_ADDR_REGS.
14722 (REG_CLASS_NAMES): Likewise.
14723 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14724 TAILCALL_ADDR_REGS. Remove IP registers.
14725 * config/aarch64/aarch64.md (Ucs): Update register constraint.
14727 2018-02-01 Richard Biener <rguenther@suse.de>
14729 * domwalk.h (dom_walker::dom_walker): Add additional constructor
14730 for specifying RPO order and allow NULL for that.
14731 * domwalk.c (dom_walker::dom_walker): Likewise.
14732 (dom_walker::walk): Handle NULL RPO order.
14733 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14735 (rewrite_update_dom_walker): Likewise.
14736 (mark_def_dom_walker): Likewise.
14738 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14740 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14741 (aarch64_maybe_expand_sve_subreg_move): Declare.
14742 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14743 * config/aarch64/predicates.md (aarch64_any_register_operand): New
14745 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14746 that are semantically a reverse operation.
14747 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14748 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14749 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14751 (aarch64_can_change_mode_class): For big-endian, forbid changes
14752 between two SVE modes if they have different element sizes.
14754 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14756 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14757 the TImode handling for big-endian targets.
14759 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14761 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14762 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
14764 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14765 Remove BSWAP handing for big-endian targets and use the form of
14766 LD1RQ appropariate for the mode.
14768 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14770 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14771 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14772 duplicated element.
14774 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14777 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14778 check for operands that need to go through aarch64_sve_reload_be.
14780 2018-02-01 Jakub Jelinek <jakub@redhat.com>
14782 PR tree-optimization/81661
14783 PR tree-optimization/84117
14784 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14785 * tree-eh.c: Include gimplify.h.
14786 (find_trapping_overflow, replace_trapping_overflow,
14787 rewrite_to_non_trapping_overflow): New functions.
14788 * tree-vect-loop.c: Include tree-eh.h.
14789 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14790 * tree-data-ref.c: Include tree-eh.h.
14791 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14793 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
14795 PR rtl-optimization/84123
14796 * combine.c (change_zero_ext): Check if hard register satisfies
14797 can_change_dest_mode before calling gen_lowpart_SUBREG.
14799 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
14802 * ira.c (ira_init_register_move_cost): Remove assert.
14804 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14806 PR rtl-optimization/84071
14807 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14808 * doc/tm.texi: Regenerate.
14810 2018-01-31 Richard Biener <rguenther@suse.de>
14812 PR tree-optimization/84132
14813 * tree-data-ref.c (analyze_miv_subscript): Properly
14814 check whether evolution_function_is_affine_multivariate_p
14815 before calling gcd_of_steps_may_divide_p.
14817 2018-01-31 Julia Koval <julia.koval@intel.com>
14820 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14821 * config/i386/i386.md (rdpid_rex64) New.
14822 (rdpid): Make 32bit only.
14824 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
14827 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14828 an IDENTIFIER_NODE for FUNCTION_TYPE's.
14830 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14833 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14835 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14837 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14839 PR rtl-optimization/84071
14840 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14841 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14843 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14845 * config/arc/arc.c (arc_handle_aux_attribute): New function.
14846 (arc_attribute_table): Add 'aux' attribute.
14847 (arc_in_small_data_p): Consider aux like variables.
14848 (arc_is_aux_reg_p): New function.
14849 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14850 (arc_get_aux_arg): New function.
14851 (prepare_move_operands): Handle aux-register access.
14852 (arc_handle_aux_attribute): New function.
14853 * doc/extend.texi (ARC Variable attributes): Add subsection.
14855 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14857 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14858 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14859 (arc_attribute_table): Add 'uncached' attribute.
14860 (arc_print_operand): Print '.di' flag for uncached memory
14862 (arc_in_small_data_p): Do not consider for small data the uncached
14864 (arc_is_uncached_mem_p): New function.
14865 * config/arc/predicates.md (compact_store_memory_operand): Check
14866 for uncached memory accesses.
14867 (nonvol_nonimm_operand): Likewise.
14868 * doc/extend.texi (ARC Type Attribute): New subsection.
14870 2018-01-31 Jakub Jelinek <jakub@redhat.com>
14873 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14874 falign-loops=): Add Optimization flag.
14876 2018-01-30 Jeff Law <law@redhat.com>
14879 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14880 INT_REGISTERS_SAVED. Check it prior to calling
14881 get_scratch_register_on_entry.
14882 (ix86_adjust_stack_and_probe): Similarly.
14883 (ix86_emit_probe_stack_range): Similarly.
14884 (ix86_expand_prologue): Corresponding changes.
14886 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14889 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14890 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14892 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
14895 * lra-constraints.c (curr_insn_transform): Process AND in the
14898 2018-01-30 Jakub Jelinek <jakub@redhat.com>
14900 PR rtl-optimization/83986
14901 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14902 dependence against last_pending_memory_flush in addition to
14903 pending_jump_insns.
14905 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
14907 PR tree-optimization/81611
14908 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14911 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14914 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14917 2018-01-30 Richard Biener <rguenther@suse.de>
14918 Jakub Jelinek <jakub@redhat.com>
14920 PR tree-optimization/84111
14921 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14922 inner loops added during recursion, as they don't have up-to-date
14925 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14928 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14929 (can_inline_edge_by_limits_p): ... here.
14930 (can_early_inline_edge_p, check_callers,
14931 update_caller_keys, update_callee_keys, recursive_inlining,
14932 add_new_edges_to_heap, speculation_useful_p,
14933 inline_small_functions,
14934 inline_small_functions, flatten_function,
14935 inline_to_all_callers_1): Update.
14937 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14939 * profile-count.c (profile_count::combine_with_ipa_count): Handle
14942 2018-01-30 Richard Biener <rguenther@suse.de>
14944 PR tree-optimization/83008
14945 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14946 invariant and constant vector uses in stmts when they need
14947 more than one stmt.
14949 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14952 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14953 * configure: Regenerate.
14955 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14957 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14959 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14960 Use gen_rtx_REG rather than gen_lowpart.
14962 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14964 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14965 rather than 0 when creating partial subregs.
14967 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14969 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14972 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
14975 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14976 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14977 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14978 flags. This restores the settings used before the 2017-07-24.
14979 Turning off pre increment/decrement/modify allows IVOPTS to
14980 optimize DF/SF loops where the index is an int.
14982 2018-01-29 Richard Biener <rguenther@suse.de>
14983 Kelvin Nilsen <kelvin@gcc.gnu.org>
14986 * tree-vect-stmts.c (vectorizable_call): Don't call
14987 targetm.vectorize_builtin_md_vectorized_function if callee is
14990 2018-01-22 Carl Love <cel@us.ibm.com>
14992 * doc/extend.tex: Fix typo in second arg in
14993 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14995 2018-01-29 Richard Biener <rguenther@suse.de>
14997 PR tree-optimization/84086
14998 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14999 (flush_ssaname_freelist): When SSA names were released reset
15000 the SCEV hash table.
15002 2018-01-29 Richard Biener <rguenther@suse.de>
15004 PR tree-optimization/84057
15005 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15006 removed paths when removing edges.
15008 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
15010 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15011 -mfunction-return=@var{choice}.
15013 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
15015 PR diagnostic/84034
15016 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15017 Handle CR like TAB.
15018 (layout::print_source_line): Likewise.
15019 (test_get_line_width_without_trailing_whitespace): Add test cases.
15021 2018-01-27 Jakub Jelinek <jakub@redhat.com>
15023 PR middle-end/84040
15024 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15027 2018-01-26 Jim Wilson <jimw@sifive.com>
15029 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15031 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15034 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15036 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15037 and CMP + SUB-immediate -> SUBS.
15039 2018-01-26 Martin Sebor <msebor@redhat.com>
15041 PR tree-optimization/83896
15042 * tree-ssa-strlen.c (get_string_len): Rename...
15043 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
15044 Avoid assuming length is constant.
15045 (handle_char_store): Use HOST_WIDE_INT for string length.
15047 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
15050 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15051 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15053 2018-01-26 Richard Biener <rguenther@suse.de>
15055 PR rtl-optimization/84003
15056 * dse.c (record_store): Only record redundant stores when
15057 the earlier store aliases at least all accesses the later one does.
15059 2018-01-26 Jakub Jelinek <jakub@redhat.com>
15061 PR rtl-optimization/83985
15062 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15063 REG_CFA_RESTORE insns.
15064 (delete_unmarked_insns): Don't ignore separate shrink wrapping
15065 REG_CFA_RESTORE insns here.
15068 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15069 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15071 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15073 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15074 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15075 (arc_init): Likewise.
15076 (arc_override_options): Likewise.
15077 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15079 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15081 * config/arc/arc.h (TARGET_DBNZ): Define.
15082 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15083 properly set the tune attribute.
15084 (dbnz): Use TARGET_DBNZ guard.
15085 * config/arc/arc.opt (mtune): Add core3 option.
15087 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15089 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15090 recognize new pic like addresses.
15091 (arc_delegitimize_address): Clean up.
15093 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15095 * config/arc/arc-arches.def: Option mrf16 valid for all
15097 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15098 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15099 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15100 * config/arc/arc-tables.opt: Regenerate.
15101 * config/arc/arc.c (arc_conditional_register_usage): Handle
15102 reduced register file case.
15103 (arc_file_start): Set must have build attributes.
15104 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15105 mrf16 option value.
15106 * config/arc/arc.opt (mrf16): Add new option.
15107 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15108 * config/arc/genmultilib.awk: Handle new mrf16 option.
15109 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15110 * config/arc/t-multilib: Regenerate.
15111 * doc/invoke.texi (ARC Options): Document mrf16 option.
15113 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15115 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15116 * config/arc/arc.c (arc_handle_secure_attribute): New function.
15117 (arc_attribute_table): Add 'secure_call' attribute.
15118 (arc_print_operand): Print secure call operand.
15119 (arc_function_ok_for_sibcall): Don't optimize tail calls when
15121 (arc_is_secure_call_p): New function. * config/arc/arc.md
15122 (call_i): Add support for sjli instruction.
15123 (call_value_i): Likewise.
15124 * config/arc/constraints.md (Csc): New constraint.
15126 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15127 John Eric Martin <John.Martin@emmicro-us.com>
15129 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15130 * config/arc/arc.c (_arc_jli_section): New struct.
15131 (arc_jli_section): New type.
15132 (rc_jli_sections): New static variable.
15133 (arc_handle_jli_attribute): New function.
15134 (arc_attribute_table): Add jli_always and jli_fixed attribute.
15135 (arc_file_end): New function.
15136 (TARGET_ASM_FILE_END): Define.
15137 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15138 (arc_add_jli_section): New function.
15139 (jli_call_scan): Likewise.
15140 (arc_reorg): Call jli_call_scan.
15141 (arc_output_addsi): Remove 'S' from printing asm operand.
15142 (arc_is_jli_call_p): New function.
15143 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15145 (movhi_insn): Likewise.
15146 (movsi_insn): Likewise.
15147 (movsi_set_cc_insn): Likewise.
15148 (loadqi_update): Likewise.
15149 (load_zeroextendqisi_update): Likewise.
15150 (load_signextendqisi_update): Likewise.
15151 (loadhi_update): Likewise.
15152 (load_zeroextendhisi_update): Likewise.
15153 (load_signextendhisi_update): Likewise.
15154 (loadsi_update): Likewise.
15155 (loadsf_update): Likewise.
15156 (movsicc_insn): Likewise.
15157 (bset_insn): Likewise.
15158 (bxor_insn): Likewise.
15159 (bclr_insn): Likewise.
15160 (bmsk_insn): Likewise.
15161 (bicsi3_insn): Likewise.
15162 (cmpsi_cc_c_insn): Likewise.
15163 (movsi_ne): Likewise.
15164 (movsi_cond_exec): Likewise.
15165 (clrsbsi2): Likewise.
15166 (norm_f): Likewise.
15176 (call_i): Remove 'S' asm letter, add jli instruction.
15177 (call_value_i): Likewise.
15178 * config/arc/arc.op (mjli-always): New option.
15179 * config/arc/constraints.md (Cji): New constraint.
15180 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15182 (subsf3_fpx): Likewise.
15183 (mulsf3_fpx): Likewise.
15184 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15186 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15187 function attrbutes.
15188 * doc/invoke.texi (ARC): Document mjli-always option.
15190 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
15192 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15193 avoid addition with 0 and use incw and decw where possible.
15195 2018-01-26 Richard Biener <rguenther@suse.de>
15197 PR tree-optimization/81082
15198 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15199 association if it requires casting to unsigned.
15200 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15201 from fold_plusminus_mult_expr to catch important cases late when
15202 range info is available.
15204 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15206 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15207 * configure.ac (hidden_linkonce): New test.
15208 * configure: Regenerate.
15209 * config.in: Regenerate.
15211 2018-01-26 Julia Koval <julia.koval@intel.com>
15213 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15214 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15215 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15216 _mm_mask_bitshuffle_epi64_mask): Fix type.
15217 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15218 USI_FTYPE_V4DI_V4DI_USI): Remove.
15219 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15220 __builtin_ia32_vpshufbitqmb256_mask,
15221 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15222 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15223 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15225 2018-01-26 Alan Modra <amodra@gmail.com>
15228 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15229 UNSPEC_VBPERMQ. Sort other unspecs.
15231 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
15233 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15235 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
15237 PR middle-end/83055
15238 * predict.c (drop_profile): Do not push/pop cfun; update also
15240 (handle_missing_profiles): Fix logic looking for zero profiles.
15242 2018-01-25 Jakub Jelinek <jakub@redhat.com>
15244 PR middle-end/83977
15245 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15246 on functions with #pragma omp declare simd or functions with simd
15248 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15249 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15250 Remove trailing \n from warning_at calls.
15252 2018-01-25 Tom de Vries <tom@codesourcery.com>
15255 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15256 for neutered workers.
15258 2018-01-24 Joseph Myers <joseph@codesourcery.com>
15261 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15262 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15264 2018-01-24 Jeff Law <law@redhat.com>
15267 * i386.c (get_probe_interval): Move to earlier point.
15268 (ix86_compute_frame_layout): If -fstack-clash-protection and
15269 the frame is larger than the probe interval, then use pushes
15270 to save registers rather than reg->mem moves.
15271 (ix86_expand_prologue): Remove conditional for int_registers_saved
15274 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
15277 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15278 min/max for never referenced object.
15280 2018-01-24 Jakub Jelinek <jakub@redhat.com>
15282 PR middle-end/83977
15283 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15285 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15286 attributes from DECL_ATTRIBUTES (decl) without affecting
15287 DECL_ATTRIBUTES (current_function_decl).
15288 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15289 functions with non-NULL DECL_ABSTRACT_ORIGIN.
15291 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
15293 PR tree-optimization/83979
15294 * fold-const.c (fold_comparison): Use constant_boolean_node
15295 instead of boolean_{true,false}_node.
15297 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
15299 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15302 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15304 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15305 Simplify the clause that sets the length attribute.
15306 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15307 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15308 clause that sets the length attribute.
15309 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15311 2018-01-24 Tom de Vries <tom@codesourcery.com>
15314 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15315 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15316 Add strict parameter.
15317 (prevent_branch_around_nothing): Insert dummy insn between branch to
15318 label and label with no ptx insn inbetween.
15319 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15321 2018-01-24 Tom de Vries <tom@codesourcery.com>
15324 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15325 for neutered threads in warp.
15326 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15328 2018-01-24 Richard Biener <rguenther@suse.de>
15330 PR tree-optimization/83176
15331 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15334 2018-01-24 Richard Biener <rguenther@suse.de>
15336 PR tree-optimization/82819
15337 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15338 code generating pluses that are no-ops in the target precision.
15340 2018-01-24 Richard Biener <rguenther@suse.de>
15342 PR middle-end/84000
15343 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15345 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15347 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15348 to merge probabilities.
15349 * predict.c (probably_never_executed): Also mark as cold functions
15350 with global 0 profile and guessed local profile.
15351 * profile-count.c (profile_probability::combine_with_count): New
15353 * profile-count.h (profile_probability::operator*,
15354 profile_probability::operator*=, profile_probability::operator/,
15355 profile_probability::operator/=): Reduce precision to adjusted
15356 and set value to guessed on contradictory divisions.
15357 (profile_probability::combine_with_freq): Remove.
15358 (profile_probability::combine_wiht_count): Declare.
15359 (profile_count::force_nonzero):: Set to adjusted.
15360 (profile_count::probability_in):: Set quality to adjusted.
15361 * tree-ssa-tail-merge.c (replace_block_by): Use
15362 combine_with_count.
15364 2018-01-23 Andrew Waterman <andrew@sifive.com>
15365 Jim Wilson <jimw@sifive.com>
15367 * config/riscv/riscv.c (riscv_stack_boundary): New.
15368 (riscv_option_override): Set riscv_stack_boundary. Handle
15369 riscv_preferred_stack_boundary_arg.
15370 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15371 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15372 (STACK_BOUNDARY): Set to riscv_stack_boundary.
15373 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15374 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15375 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15377 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
15380 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15381 of struct ix86_frame.
15382 (ix86_expand_epilogue): Likewise. Add a local variable for
15383 the reg_save_offset field in struct ix86_frame.
15385 2018-01-23 Bin Cheng <bin.cheng@arm.com>
15387 PR tree-optimization/82604
15388 * tree-loop-distribution.c (enum partition_kind): New enum item
15389 PKIND_PARTIAL_MEMSET.
15390 (partition_builtin_p): Support above new enum item.
15391 (generate_code_for_partition): Ditto.
15392 (compute_access_range): Differentiate cases that equality can be
15393 proven at all loops, the innermost loops or no loops.
15394 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15395 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
15396 (finalize_partitions, distribute_loop): Don't fuse partition of
15397 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15398 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15399 parloop is enabled.
15401 2018-01-23 Martin Liska <mliska@suse.cz>
15403 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15404 order to ignore the predictor.
15405 (PRED_POLYMORPHIC_CALL): Likewise.
15406 (PRED_RECURSIVE_CALL): Likewise.
15408 2018-01-23 Martin Liska <mliska@suse.cz>
15410 * tree-profile.c (tree_profiling): Print function header to
15411 aware reader which function we are working on.
15412 * value-prof.c (gimple_find_values_to_profile): Do not print
15413 not interesting value histograms.
15415 2018-01-23 Martin Liska <mliska@suse.cz>
15417 * profile-count.h (enum profile_quality): Add
15418 profile_uninitialized as the first value. Do not number values
15419 as they are zero based.
15420 (profile_count::verify): Update sanity check.
15421 (profile_probability::verify): Likewise.
15423 2018-01-23 Nathan Sidwell <nathan@acm.org>
15425 * doc/invoke.texi (ffor-scope): Deprecate.
15427 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15429 PR tree-optimization/83510
15430 * domwalk.c (set_all_edges_as_executable): New function.
15431 (dom_walker::dom_walker): Convert bool param
15432 "skip_unreachable_blocks" to enum reachability. Move setup of
15433 edge flags to set_all_edges_as_executable and only do it when
15434 reachability is REACHABLE_BLOCKS.
15435 * domwalk.h (enum dom_walker::reachability): New enum.
15436 (dom_walker::dom_walker): Convert bool param
15437 "skip_unreachable_blocks" to enum reachability.
15438 (set_all_edges_as_executable): New decl.
15439 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
15440 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15442 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15443 but converting true to REACHABLE_BLOCKS.
15444 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15446 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15447 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15448 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15450 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15451 if check_all_array_refs will be called.
15453 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15455 * tree.c (selftest::test_location_wrappers): Add more test
15458 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15460 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15461 (selftest::test_bit_in_range): Likewise.
15463 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15466 * doc/sourcebuild.texi (vect_float): Say that the selector
15467 only describes the situation when -funsafe-math-optimizations is on.
15468 (vect_float_strict): Document.
15470 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15472 PR tree-optimization/83965
15473 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15474 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15475 instead of checking only for a reduction.
15476 (vect_recog_widen_sum_pattern): Likewise.
15478 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15480 * predict.c (probably_never_executed): Only use precise profile info.
15481 (compute_function_frequency): Skip after inlining hack since we now
15482 have quality checking.
15484 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15486 * profile-count.h (profile_probability::very_unlikely,
15487 profile_probability::unlikely, profile_probability::even): Set
15488 precision to guessed.
15490 2018-01-23 Richard Biener <rguenther@suse.de>
15492 PR tree-optimization/83963
15493 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15494 Properly terminate dominator walk when crossing the exit edge not
15495 when visiting its source block.
15497 2018-01-23 Jakub Jelinek <jakub@redhat.com>
15500 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15501 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15503 2018-01-22 Jakub Jelinek <jakub@redhat.com>
15505 PR tree-optimization/83957
15506 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
15507 semicolon after for body surrounded by braces.
15509 PR tree-optimization/83081
15510 * profile-count.h (profile_probability::split): New method.
15511 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15512 Use profile_probability::split.
15513 (do_compare_rtx_and_jump): Fix adjustment of probabilities
15514 when splitting a single conditional jump into 2.
15516 2018-01-22 David Malcolm <dmalcolm@redhat.com>
15518 PR tree-optimization/69452
15519 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15522 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15524 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15525 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15526 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15528 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15530 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15532 * config/rl78/rl78.md (movdi): New define_expand.
15533 * config/rl78/rl78.c (rl78_split_movdi): New function.
15535 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
15538 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15540 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15541 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15542 128-bit to produce an UNSPEC move to get the double word with the
15543 signbit and then a shift directly to do signbit.
15544 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15545 implementation with a new version that just does either a direct
15546 move or a regular move. Move memory interface to separate insns.
15547 Move insns so they are next to the expander.
15548 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15549 with signbit move. Split big and little endian case.
15550 (signbit<mode>2_dm_mem_le): Likewise.
15551 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15552 (signbit<mode>2_dm2): Likewise.
15554 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15556 * config/rl78/rl78.md (anddi3): New define_expand.
15558 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15560 * config/rl78/rl78.md (umindi3): New define_expand.
15562 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15564 * config/rl78/rl78.md (smindi3): New define_expand.
15566 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15568 * config/rl78/rl78.md (smaxdi3): New define_expand.
15570 2018-01-22 Carl Love <cel@us.ibm.com>
15572 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15573 LVX_V1TI): Add macro expansion.
15574 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15575 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15576 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15577 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15578 Change check to determine if the instruction is a byte reversing
15579 entry. Fix typo in comment.
15580 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15581 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15582 Add def_builtin calls for new builtins.
15583 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15584 Add define_insn expansion.
15586 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15588 * config/rl78/rl78.md (umaxdi3): New define_expand.
15590 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15592 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15593 for non-QImode registers.
15595 2018-01-22 Richard Biener <rguenther@suse.de>
15597 PR tree-optimization/83963
15598 * graphite-scop-detection.c (scop_detection::get_sese): Delay
15599 including the loop exit block.
15600 (scop_detection::merge_sese): Likewise.
15601 (scop_detection::add_scop): Do it here instead.
15603 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15605 * doc/sourcebuild.texi (arm_softfloat): Document.
15607 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
15610 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15611 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15612 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15614 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15615 David Edelsohn <dje.gcc@gmail.com>
15618 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15619 Change "crset eq" to "crset 2".
15620 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15621 (*call_indirect_aix<mode>_nospec): Likewise.
15622 (*call_value_indirect_aix<mode>_nospec): Likewise.
15623 (*call_indirect_elfv2<mode>_nospec): Likewise.
15624 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15625 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15626 change assembly output from . to $.
15627 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15628 (indirect_jump<mode>_nospec): Change assembly output from . to $.
15629 (*tablejump<mode>_internal1_nospec): Likewise.
15631 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
15634 * config/sh/sh_optimize_sett_clrt.cc:
15635 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15637 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
15639 PR tree-optimization/83940
15640 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15641 offset_dt to vect_constant_def rather than vect_unknown_def_type.
15642 (vect_check_load_store_mask): Add a mask_dt_out parameter and
15643 use it to pass back the definition type.
15644 (vect_check_store_rhs): Likewise rhs_dt_out.
15645 (vect_build_gather_load_calls): Add a mask_dt argument and use
15646 it instead of a call to vect_is_simple_use.
15647 (vectorizable_store): Update calls to vect_check_load_store_mask
15648 and vect_check_store_rhs. Use the dt returned by the latter instead
15649 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
15650 instead of calls to vect_is_simple_use. Pass the scalar rather
15651 than the vector operand to vect_is_simple_use when handling
15652 second and subsequent copies of an rhs value.
15653 (vectorizable_load): Update calls to vect_check_load_store_mask
15654 and vect_build_gather_load_calls. Use the cached mask_dt and
15655 gs_info.offset_dt instead of calls to vect_is_simple_use.
15657 2018-01-20 Jakub Jelinek <jakub@redhat.com>
15659 PR middle-end/83945
15660 * tree-emutls.c: Include gimplify.h.
15661 (lower_emutls_2): New function.
15662 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15663 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15664 it before further processing.
15667 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15668 UINTVAL (trueop1) instead of INTVAL (op1).
15670 2018-01-19 Jakub Jelinek <jakub@redhat.com>
15674 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15675 INCOMING_FRAME_SP_OFFSET if not defined.
15676 (scan_trace): Add ENTRY argument. If true and
15677 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15678 emit a note to adjust the CFA offset.
15679 (create_cfi_notes): Adjust scan_trace callers.
15680 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15681 INCOMING_FRAME_SP_OFFSET in the CIE.
15682 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15683 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15685 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15686 * doc/tm.texi: Regenerated.
15688 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15690 PR rtl-optimization/83147
15691 * lra-constraints.c (remove_inheritance_pseudos): Use
15692 lra_substitute_pseudo_within_insn.
15694 2018-01-19 Tom de Vries <tom@codesourcery.com>
15695 Cesar Philippidis <cesar@codesourcery.com>
15698 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15700 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
15703 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15704 spaces for function labels.
15706 2018-01-19 Martin Liska <mliska@suse.cz>
15708 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15709 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15710 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15711 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15712 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15713 (PRED_CONST_RETURN): Change from 69 to 65.
15714 (PRED_NULL_RETURN): Change from 91 to 71.
15715 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15716 (PRED_LOOP_GUARD): Change from 66 to 73.
15718 2018-01-19 Martin Liska <mliska@suse.cz>
15720 * predict.c (predict_insn_def): Add new assert.
15721 (struct branch_predictor): Change type to signed integer.
15722 (test_prediction_value_range): Amend test to cover
15723 PROB_UNINITIALIZED.
15724 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15725 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15726 (PRED_LOOP_ITERATIONS_MAX): Likewise.
15727 (PRED_LOOP_IV_COMPARE): Likewise.
15728 * predict.h (PROB_UNINITIALIZED): Define new constant.
15730 2018-01-19 Martin Liska <mliska@suse.cz>
15732 * predict.c (dump_prediction): Add new format for
15733 analyze_brprob.py script which is enabled with -details
15735 * profile-count.h (precise_p): New function.
15737 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15739 PR tree-optimization/83922
15740 * tree-vect-loop.c (vect_verify_full_masking): Return false if
15741 there are no statements that need masking.
15742 (vect_active_double_reduction_p): New function.
15743 (vect_analyze_loop_operations): Use it when handling phis that
15744 are not in the loop header.
15746 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15748 PR tree-optimization/83914
15749 * tree-vect-loop.c (vectorizable_induction): Don't convert
15750 init_expr or apply the peeling adjustment for inductions
15751 that are nested within the vectorized loop.
15753 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15755 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15758 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15762 * function.h (gimplify_parameters): Add gimple_seq * argument.
15763 * function.c: Include gimple.h and options.h.
15764 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15765 for the added local temporaries if needed.
15766 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15767 if there are any parameter cleanups, wrap whole body into a
15768 try/finally with the cleanups.
15770 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
15773 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15774 Use GET_MODE_CLASS for scalar floating point.
15776 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15780 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15781 Fix call of call_cgraph_insertion_hooks.
15783 2018-01-18 Martin Sebor <msebor@redhat.com>
15785 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15787 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15790 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15793 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
15796 * common.opt: (-ffile-prefix-map): New option.
15797 * opts.c (common_handle_option): Defer it.
15798 * opts-global.c (handle_common_deferred_options): Handle it.
15799 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15800 * file-prefix-map.h: New file.
15801 (remap_debug_filename, add_debug_prefix_map): ...here.
15802 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15803 * final.c (debug_prefix_map, add_debug_prefix_map
15804 remap_debug_filename): Move to...
15805 * file-prefix-map.c: New file.
15806 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15807 generalize, get rid of alloca(), use strrchr() instead of strchr().
15808 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15809 Implement in terms of add_prefix_map().
15810 (remap_macro_filename, remap_debug_filename): Implement in term of
15812 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15813 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15814 * dbxout.c: Include file-prefix-map.h.
15815 * varasm.c: Likewise.
15816 * vmsdbgout.c: Likewise.
15817 * xcoffout.c: Likewise.
15818 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15819 * doc/cppopts.texi (-fmacro-prefix-map): Document.
15820 * doc/invoke.texi (-ffile-prefix-map): Document.
15821 (-fdebug-prefix-map): Update description.
15823 2018-01-18 Martin Liska <mliska@suse.cz>
15825 * config/i386/i386.c (indirect_thunk_name): Document that also
15827 (output_indirect_thunk): Document why both instructions
15828 (pause and lfence) are generated.
15830 2018-01-18 Richard Biener <rguenther@suse.de>
15832 PR tree-optimization/83887
15833 * graphite-scop-detection.c
15834 (scop_detection::get_nearest_dom_with_single_entry): Remove.
15835 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15836 (scop_detection::merge_sese): Re-implement with a flood-fill
15837 algorithm that properly finds a SESE region if it exists.
15839 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15842 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15843 pointer_diff optimizations use view_convert instead of convert.
15845 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15847 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15848 Generate different code for -mno-speculate-indirect-jumps.
15849 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15850 (*call_indirect_aix<mode>): Disable for
15851 -mno-speculate-indirect-jumps.
15852 (*call_indirect_aix<mode>_nospec): New define_insn.
15853 (*call_value_indirect_aix<mode>): Disable for
15854 -mno-speculate-indirect-jumps.
15855 (*call_value_indirect_aix<mode>_nospec): New define_insn.
15856 (*sibcall_nonlocal_sysv<mode>): Generate different code for
15857 -mno-speculate-indirect-jumps.
15858 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15860 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15862 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15863 long double type, set the flags for noting the default long double
15864 type, even if we don't pass or return a long double type.
15866 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
15869 * ipa-inline.c (flatten_function): Do not overwrite final inlining
15872 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
15874 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15875 support for merge[hl].
15876 (fold_mergehl_helper): New helper function.
15877 (tree-vector-builder.h): New #include for tree_vector_builder usage.
15878 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15879 (altivec_vmrglw_direct): Add xxmrglw insn.
15881 2018-01-17 Andrew Waterman <andrew@sifive.com>
15883 * config/riscv/riscv.c (riscv_conditional_register_usage): If
15884 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15886 2018-01-17 David Malcolm <dmalcolm@redhat.com>
15889 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15890 call the lto_location_cache before reading the
15891 DECL_SOURCE_LOCATION of the types.
15893 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
15894 Richard Sandiford <richard.sandiford@linaro.org>
15896 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15897 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15898 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15899 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15900 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15902 * config/aarch64/constraints.md (aarch64_movti_operand):
15904 * config/aarch64/predicates.md (Uti): Add new constraint.
15906 2018-01-17 Carl Love <cel@us.ibm.com>
15908 * config/rs6000/vsx.md (define_expand xl_len_r,
15909 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15910 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15912 (define_expand, define_insn): Move the shift left from the
15913 define_insn to the define_expand for lxvl and stxvl instructions.
15914 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15915 and XL_LEN_R definitions to PURE.
15917 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
15919 * config/i386/i386.c (indirect_thunk_name): Declare regno
15920 as unsigned int. Compare regno with INVALID_REGNUM.
15921 (output_indirect_thunk): Ditto.
15922 (output_indirect_thunk_function): Ditto.
15923 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
15924 in the call to output_indirect_thunk_function.
15926 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
15928 PR middle-end/83884
15929 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15930 rather than the size of inner_type to determine the stack slot size
15931 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15933 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
15936 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15939 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
15941 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15942 endian Linux systems to optionally enable multilibs for selecting
15943 the long double type if the user configured an explicit type.
15944 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15945 have no long double multilibs if not defined.
15946 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15947 warn if the user used -mabi={ieee,ibm}longdouble and we built
15948 multilibs for long double.
15949 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15950 appropriate multilib option.
15951 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15953 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15954 for building long double multilibs.
15955 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15957 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
15959 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15962 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15964 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15967 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15970 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15973 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15975 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15976 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15978 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
15980 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15981 different rtl trees depending on TARGET_64BIT.
15982 (rs6000_gen_lvx): Likewise.
15984 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15986 * config/visium/visium.md (nop): Tweak comment.
15987 (hazard_nop): Likewise.
15989 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15991 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15992 -mspeculate-indirect-jumps.
15993 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15994 for -mno-speculate-indirect-jumps.
15995 (*call_indirect_elfv2<mode>_nospec): New define_insn.
15996 (*call_value_indirect_elfv2<mode>): Disable for
15997 -mno-speculate-indirect-jumps.
15998 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15999 (indirect_jump): Emit different RTL for
16000 -mno-speculate-indirect-jumps.
16001 (*indirect_jump<mode>): Disable for
16002 -mno-speculate-indirect-jumps.
16003 (*indirect_jump<mode>_nospec): New define_insn.
16004 (tablejump): Emit different RTL for
16005 -mno-speculate-indirect-jumps.
16006 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16007 (tablejumpsi_nospec): New define_expand.
16008 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16009 (tablejumpdi_nospec): New define_expand.
16010 (*tablejump<mode>_internal1): Disable for
16011 -mno-speculate-indirect-jumps.
16012 (*tablejump<mode>_internal1_nospec): New define_insn.
16013 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16016 2018-01-16 Artyom Skrobov tyomitch@gmail.com
16018 * caller-save.c (insert_save): Drop unnecessary parameter. All
16021 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16022 Richard Biener <rguenth@suse.de>
16025 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16026 return early, inline manually is_gimple_sizepos. Make sure if we
16027 call gimplify_expr we don't end up with a gimple constant.
16028 * tree.c (variably_modified_type_p): Don't return true for
16029 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
16030 * gimplify.h (is_gimple_sizepos): Remove.
16032 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16034 PR tree-optimization/83857
16035 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16036 vectorizable_live_operation for pure SLP statements.
16037 (vectorizable_live_operation): Handle PHIs.
16039 2018-01-16 Richard Biener <rguenther@suse.de>
16041 PR tree-optimization/83867
16042 * tree-vect-stmts.c (vect_transform_stmt): Precompute
16043 nested_in_vect_loop_p since the scalar stmt may get invalidated.
16045 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16048 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16049 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16050 If off is not INTEGER_CST, issue a may not be aligned warning
16051 rather than isn't aligned. Use isn%'t rather than isn't.
16052 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16054 <case MULT_EXPR>: Improve the case when bottom and one of the
16055 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16056 operand, in that case check if the other operand is multiple of
16057 bottom divided by the INTEGER_CST operand.
16059 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16062 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16063 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16064 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16065 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16066 * config/pa/pa.c (pa_function_arg_advance): Likewise.
16067 (pa_function_arg, pa_arg_partial_bytes): Likewise.
16068 (pa_function_arg_size): New function.
16070 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16072 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16073 in a separate statement.
16075 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16077 PR tree-optimization/83847
16078 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16079 group gathers and scatters.
16081 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16083 PR rtl-optimization/86620
16084 * params.def (max-sched-ready-insns): Bump minimum value to 1.
16086 PR rtl-optimization/83213
16087 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16088 to last if both are JUMP_INSNs.
16090 PR tree-optimization/83843
16091 * gimple-ssa-store-merging.c
16092 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16093 store_immediate_info for bswap/nop orig_stores.
16095 2018-01-15 Andrew Waterman <andrew@sifive.com>
16097 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16099 <UDIV>: Increase cost if !TARGET_DIV.
16101 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
16103 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16104 (define_attr "cr_logical_3op"): New.
16105 (cceq_ior_compare): Adjust.
16106 (cceq_ior_compare_complement): Adjust.
16107 (*cceq_rev_compare): Adjust.
16108 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16109 (is_cracked_insn): Adjust.
16110 (insn_must_be_first_in_group): Adjust.
16111 * config/rs6000/40x.md: Adjust.
16112 * config/rs6000/440.md: Adjust.
16113 * config/rs6000/476.md: Adjust.
16114 * config/rs6000/601.md: Adjust.
16115 * config/rs6000/603.md: Adjust.
16116 * config/rs6000/6xx.md: Adjust.
16117 * config/rs6000/7450.md: Adjust.
16118 * config/rs6000/7xx.md: Adjust.
16119 * config/rs6000/8540.md: Adjust.
16120 * config/rs6000/cell.md: Adjust.
16121 * config/rs6000/e300c2c3.md: Adjust.
16122 * config/rs6000/e500mc.md: Adjust.
16123 * config/rs6000/e500mc64.md: Adjust.
16124 * config/rs6000/e5500.md: Adjust.
16125 * config/rs6000/e6500.md: Adjust.
16126 * config/rs6000/mpc.md: Adjust.
16127 * config/rs6000/power4.md: Adjust.
16128 * config/rs6000/power5.md: Adjust.
16129 * config/rs6000/power6.md: Adjust.
16130 * config/rs6000/power7.md: Adjust.
16131 * config/rs6000/power8.md: Adjust.
16132 * config/rs6000/power9.md: Adjust.
16133 * config/rs6000/rs64.md: Adjust.
16134 * config/rs6000/titan.md: Adjust.
16136 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16138 * config/i386/predicates.md (indirect_branch_operand): Rewrite
16139 ix86_indirect_branch_register logic.
16141 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16143 * config/i386/constraints.md (Bs): Update
16144 ix86_indirect_branch_register check. Don't check
16145 ix86_indirect_branch_register with GOT_memory_operand.
16147 * config/i386/predicates.md (GOT_memory_operand): Don't check
16148 ix86_indirect_branch_register here.
16149 (GOT32_symbol_operand): Likewise.
16151 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16153 * config/i386/predicates.md (constant_call_address_operand):
16154 Rewrite ix86_indirect_branch_register logic.
16155 (sibcall_insn_operand): Likewise.
16157 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16159 * config/i386/constraints.md (Bs): Replace
16160 ix86_indirect_branch_thunk_register with
16161 ix86_indirect_branch_register.
16163 * config/i386/i386.md (indirect_jump): Likewise.
16164 (tablejump): Likewise.
16165 (*sibcall_memory): Likewise.
16166 (*sibcall_value_memory): Likewise.
16167 Peepholes of indirect call and jump via memory: Likewise.
16168 * config/i386/i386.opt: Likewise.
16169 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16170 (GOT_memory_operand): Likewise.
16171 (call_insn_operand): Likewise.
16172 (sibcall_insn_operand): Likewise.
16173 (GOT32_symbol_operand): Likewise.
16175 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16177 PR middle-end/83837
16178 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16179 type rather than type addr's type points to.
16180 (expand_omp_atomic_mutex): Likewise.
16181 (expand_omp_atomic): Likewise.
16183 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16186 * config/i386/i386.c (output_indirect_thunk_function): Use
16187 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16188 for __x86_return_thunk.
16190 2018-01-15 Richard Biener <rguenther@suse.de>
16192 PR middle-end/83850
16193 * expmed.c (extract_bit_field_1): Fix typo.
16195 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16198 * config/arm/iterators.md (VF): New mode iterator.
16199 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16200 Remove integer-related logic from pattern.
16201 (neon_vabd<mode>_3): Likewise.
16203 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16205 PR middle-end/82694
16206 * common.opt (fstrict-overflow): No longer an alias.
16207 (fwrapv-pointer): New option.
16208 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16209 also for pointer types based on flag_wrapv_pointer.
16210 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16211 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16212 opts->x_flag_wrapv got set.
16213 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16214 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16215 POINTER_TYPE_OVERFLOW_UNDEFINED.
16216 * match.pd: Likewise in address comparison pattern.
16217 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16219 2018-01-15 Richard Biener <rguenther@suse.de>
16222 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16223 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
16224 Reset type names to their identifier if their TYPE_DECL doesn't
16225 have linkage (and thus is used for ODR and devirt).
16226 (save_debug_info_for_decl): Remove.
16227 (save_debug_info_for_type): Likewise.
16228 (add_tree_to_fld_list): Adjust.
16229 * tree-pretty-print.c (dump_generic_node): Make dumping of
16230 type names more robust.
16232 2018-01-15 Richard Biener <rguenther@suse.de>
16234 * BASE-VER: Bump to 8.0.1.
16236 2018-01-14 Martin Sebor <msebor@redhat.com>
16239 * builtins.c (check_access): Avoid warning when the no-warning bit
16242 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
16244 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16245 * ira-color (allocno_hard_regs_compare): Likewise.
16247 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
16250 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16251 Use .pushsection/.popsection.
16253 2018-01-14 Martin Sebor <msebor@redhat.com>
16256 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16258 2018-01-14 Jakub Jelinek <jakub@redhat.com>
16260 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16261 entry from extra_headers.
16262 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16263 extra_headers, make the list bitwise identical to the i?86-*-* one.
16265 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16267 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16268 -mcmodel=large with -mindirect-branch=thunk,
16269 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16270 -mfunction-return=thunk-extern.
16271 * doc/invoke.texi: Document -mcmodel=large is incompatible with
16272 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16273 -mfunction-return=thunk and -mfunction-return=thunk-extern.
16275 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16277 * config/i386/i386.c (print_reg): Print the name of the full
16278 integer register without '%'.
16279 (ix86_print_operand): Handle 'V'.
16280 * doc/extend.texi: Document 'V' modifier.
16282 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16284 * config/i386/constraints.md (Bs): Disallow memory operand for
16285 -mindirect-branch-register.
16287 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16288 (GOT_memory_operand): Likewise.
16289 (call_insn_operand): Likewise.
16290 (sibcall_insn_operand): Likewise.
16291 (GOT32_symbol_operand): Likewise.
16292 * config/i386/i386.md (indirect_jump): Call convert_memory_address
16293 for -mindirect-branch-register.
16294 (tablejump): Likewise.
16295 (*sibcall_memory): Likewise.
16296 (*sibcall_value_memory): Likewise.
16297 Disallow peepholes of indirect call and jump via memory for
16298 -mindirect-branch-register.
16299 (*call_pop): Replace m with Bw.
16300 (*call_value_pop): Likewise.
16301 (*sibcall_pop_memory): Replace m with Bs.
16302 * config/i386/i386.opt (mindirect-branch-register): New option.
16303 * doc/invoke.texi: Document -mindirect-branch-register option.
16305 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16307 * config/i386/i386-protos.h (ix86_output_function_return): New.
16308 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16309 set function_return_type.
16310 (indirect_thunk_name): Add ret_p to indicate thunk for function
16312 (output_indirect_thunk_function): Pass false to
16313 indirect_thunk_name.
16314 (ix86_output_indirect_branch_via_reg): Likewise.
16315 (ix86_output_indirect_branch_via_push): Likewise.
16316 (output_indirect_thunk_function): Create alias for function
16317 return thunk if regno < 0.
16318 (ix86_output_function_return): New function.
16319 (ix86_handle_fndecl_attribute): Handle function_return.
16320 (ix86_attribute_table): Add function_return.
16321 * config/i386/i386.h (machine_function): Add
16322 function_return_type.
16323 * config/i386/i386.md (simple_return_internal): Use
16324 ix86_output_function_return.
16325 (simple_return_internal_long): Likewise.
16326 * config/i386/i386.opt (mfunction-return=): New option.
16327 (indirect_branch): Mention -mfunction-return=.
16328 * doc/extend.texi: Document function_return function attribute.
16329 * doc/invoke.texi: Document -mfunction-return= option.
16331 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16333 * config/i386/i386-opts.h (indirect_branch): New.
16334 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16335 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16336 with local indirect jump when converting indirect call and jump.
16337 (ix86_set_indirect_branch_type): New.
16338 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16339 (indirectlabelno): New.
16340 (indirect_thunk_needed): Likewise.
16341 (indirect_thunk_bnd_needed): Likewise.
16342 (indirect_thunks_used): Likewise.
16343 (indirect_thunks_bnd_used): Likewise.
16344 (INDIRECT_LABEL): Likewise.
16345 (indirect_thunk_name): Likewise.
16346 (output_indirect_thunk): Likewise.
16347 (output_indirect_thunk_function): Likewise.
16348 (ix86_output_indirect_branch_via_reg): Likewise.
16349 (ix86_output_indirect_branch_via_push): Likewise.
16350 (ix86_output_indirect_branch): Likewise.
16351 (ix86_output_indirect_jmp): Likewise.
16352 (ix86_code_end): Call output_indirect_thunk_function if needed.
16353 (ix86_output_call_insn): Call ix86_output_indirect_branch if
16355 (ix86_handle_fndecl_attribute): Handle indirect_branch.
16356 (ix86_attribute_table): Add indirect_branch.
16357 * config/i386/i386.h (machine_function): Add indirect_branch_type
16358 and has_local_indirect_jump.
16359 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16361 (tablejump): Likewise.
16362 (*indirect_jump): Use ix86_output_indirect_jmp.
16363 (*tablejump_1): Likewise.
16364 (simple_return_indirect_internal): Likewise.
16365 * config/i386/i386.opt (mindirect-branch=): New option.
16366 (indirect_branch): New.
16369 (thunk-inline): Likewise.
16370 (thunk-extern): Likewise.
16371 * doc/extend.texi: Document indirect_branch function attribute.
16372 * doc/invoke.texi: Document -mindirect-branch= option.
16374 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
16377 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16379 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
16381 * ipa-inline.c (want_inline_small_function_p): Return false if
16382 inlining has already failed with CIF_FINAL_ERROR.
16383 (update_caller_keys): Call want_inline_small_function_p before
16385 (update_callee_keys): Likewise.
16387 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
16389 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16391 (rs6000_quadword_masked_address_p): Likewise.
16392 (quad_aligned_load_p): Likewise.
16393 (quad_aligned_store_p): Likewise.
16394 (const_load_sequence_p): Add comment to describe the outer-most loop.
16395 (mimic_memory_attributes_and_flags): New function.
16396 (rs6000_gen_stvx): Likewise.
16397 (replace_swapped_aligned_store): Likewise.
16398 (rs6000_gen_lvx): Likewise.
16399 (replace_swapped_aligned_load): Likewise.
16400 (replace_swapped_load_constant): Capitalize argument name in
16401 comment describing this function.
16402 (rs6000_analyze_swaps): Add a third pass to search for vector loads
16403 and stores that access quad-word aligned addresses and replace
16404 with stvx or lvx instructions when appropriate.
16405 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16406 New function prototype.
16407 (rs6000_quadword_masked_address_p): Likewise.
16408 (rs6000_gen_lvx): Likewise.
16409 (rs6000_gen_stvx): Likewise.
16410 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16411 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16412 when memory address is aligned.
16413 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16414 this split to select lvx instruction when memory address is aligned.
16415 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16416 instruction when memory address is aligned.
16417 (*vsx_le_perm_load_v16qi): Likewise.
16418 (four unnamed splitters): Modify to select the stvx instruction
16419 when memory is aligned.
16421 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
16423 * predict.c (determine_unlikely_bbs): Handle correctly BBs
16424 which appears in the queue multiple times.
16426 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16427 Alan Hayward <alan.hayward@arm.com>
16428 David Sherwood <david.sherwood@arm.com>
16430 * tree-vectorizer.h (vec_lower_bound): New structure.
16431 (_loop_vec_info): Add check_nonzero and lower_bounds.
16432 (LOOP_VINFO_CHECK_NONZERO): New macro.
16433 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16434 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16435 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16436 fields. Make seg_len the distance travelled, not including the
16438 (dr_direction_indicator): Declare.
16439 (dr_zero_step_indicator): Likewise.
16440 (dr_known_forward_stride_p): Likewise.
16441 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16443 (runtime_alias_check_p): Allow runtime alias checks with
16445 (operator ==): Compare access_size and align.
16446 (prune_runtime_alias_test_list): Rework for new distinction between
16447 the access_size and seg_len.
16448 (create_intersect_range_checks_index): Likewise. Cope with polynomial
16450 (get_segment_min_max): New function.
16451 (create_intersect_range_checks): Use it.
16452 (dr_step_indicator): New function.
16453 (dr_direction_indicator): Likewise.
16454 (dr_zero_step_indicator): Likewise.
16455 (dr_known_forward_stride_p): Likewise.
16456 * tree-loop-distribution.c (data_ref_segment_size): Return
16457 DR_STEP * (niters - 1).
16458 (compute_alias_check_pairs): Update call to the dr_with_seg_len
16460 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16461 (vect_preserves_scalar_order_p): New function, split out from...
16462 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
16463 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16464 (vect_vfa_access_size): New function.
16465 (vect_vfa_align): Likewise.
16466 (vect_compile_time_alias): Take access_size_a and access_b arguments.
16467 (dump_lower_bound): New function.
16468 (vect_check_lower_bound): Likewise.
16469 (vect_small_gap_p): Likewise.
16470 (vectorizable_with_step_bound_p): Likewise.
16471 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16472 depencies if the vectorization factor is 1. Convert the checks
16473 for nonzero steps into checks on the bounds of DR_STEP. Try using
16474 a bunds check for variable steps if the minimum required step is
16475 relatively small. Update calls to the dr_with_seg_len
16476 constructor and to vect_compile_time_alias.
16477 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16479 (vect_loop_versioning): Call it.
16480 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16482 (vect_estimate_min_profitable_iters): Account for any bounds checks.
16484 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16485 Alan Hayward <alan.hayward@arm.com>
16486 David Sherwood <david.sherwood@arm.com>
16488 * doc/sourcebuild.texi (vect_scatter_store): Document.
16489 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16491 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16493 * genopinit.c (main): Add supports_vec_scatter_store and
16494 supports_vec_scatter_store_cached to target_optabs.
16495 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16496 IFN_MASK_SCATTER_STORE.
16497 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16499 * internal-fn.h (internal_store_fn_p): Declare.
16500 (internal_fn_stored_value_index): Likewise.
16501 * internal-fn.c (scatter_store_direct): New macro.
16502 (expand_scatter_store_optab_fn): New function.
16503 (direct_scatter_store_optab_supported_p): New macro.
16504 (internal_store_fn_p): New function.
16505 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16506 IFN_MASK_SCATTER_STORE.
16507 (internal_fn_mask_index): Likewise.
16508 (internal_fn_stored_value_index): New function.
16509 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16510 for scatter stores.
16511 * optabs-query.h (supports_vec_scatter_store_p): Declare.
16512 * optabs-query.c (supports_vec_scatter_store_p): New function.
16513 * tree-vectorizer.h (vect_get_store_rhs): Declare.
16514 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16515 true for scatter stores.
16516 (vect_gather_scatter_fn_p): Handle scatter stores too.
16517 (vect_check_gather_scatter): Consider using scatter stores if
16518 supports_vec_scatter_store_p.
16519 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16520 scatter stores too.
16521 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16522 internal_fn_stored_value_index.
16523 (check_load_store_masking): Handle scatter stores too.
16524 (vect_get_store_rhs): Make public.
16525 (vectorizable_call): Use internal_store_fn_p.
16526 (vectorizable_store): Handle scatter store internal functions.
16527 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16528 when deciding whether the end of the group has been reached.
16529 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16530 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16531 (mask_scatter_store<mode>): New insns.
16533 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16534 Alan Hayward <alan.hayward@arm.com>
16535 David Sherwood <david.sherwood@arm.com>
16537 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16538 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16539 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16541 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16542 Use vect_truncate_gather_scatter_offset if we can't treat the
16543 operation as a normal gather load or scatter store.
16544 (get_group_load_store_type): Take the gather_scatter_info
16545 as argument. Try using a gather load or scatter store for
16546 single-element groups.
16547 (get_load_store_type): Update calls to get_group_load_store_type
16548 and vect_use_strided_gather_scatters_p.
16550 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16551 Alan Hayward <alan.hayward@arm.com>
16552 David Sherwood <david.sherwood@arm.com>
16554 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16555 optional tree argument.
16556 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16558 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16559 but continue to use the current value as a fallback.
16560 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16561 to compare the updates.
16562 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16563 (get_load_store_type): Use it when handling a strided access.
16564 (vect_get_strided_load_store_ops): New function.
16565 (vect_get_data_ptr_increment): Likewise.
16566 (vectorizable_load): Handle strided gather loads. Always pass
16567 a step to vect_create_data_ref_ptr and bump_vector_ptr.
16569 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16570 Alan Hayward <alan.hayward@arm.com>
16571 David Sherwood <david.sherwood@arm.com>
16573 * doc/md.texi (gather_load@var{m}): Document.
16574 (mask_gather_load@var{m}): Likewise.
16575 * genopinit.c (main): Add supports_vec_gather_load and
16576 supports_vec_gather_load_cached to target_optabs.
16577 * optabs-tree.c (init_tree_optimization_optabs): Use
16578 ggc_cleared_alloc to allocate target_optabs.
16579 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16580 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16582 * internal-fn.h (internal_load_fn_p): Declare.
16583 (internal_gather_scatter_fn_p): Likewise.
16584 (internal_fn_mask_index): Likewise.
16585 (internal_gather_scatter_fn_supported_p): Likewise.
16586 * internal-fn.c (gather_load_direct): New macro.
16587 (expand_gather_load_optab_fn): New function.
16588 (direct_gather_load_optab_supported_p): New macro.
16589 (direct_internal_fn_optab): New function.
16590 (internal_load_fn_p): Likewise.
16591 (internal_gather_scatter_fn_p): Likewise.
16592 (internal_fn_mask_index): Likewise.
16593 (internal_gather_scatter_fn_supported_p): Likewise.
16594 * optabs-query.c (supports_at_least_one_mode_p): New function.
16595 (supports_vec_gather_load_p): Likewise.
16596 * optabs-query.h (supports_vec_gather_load_p): Declare.
16597 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16598 and memory_type field.
16599 (NUM_PATTERNS): Bump to 15.
16600 * tree-vect-data-refs.c: Include internal-fn.h.
16601 (vect_gather_scatter_fn_p): New function.
16602 (vect_describe_gather_scatter_call): Likewise.
16603 (vect_check_gather_scatter): Try using internal functions for
16604 gather loads. Recognize existing calls to a gather load function.
16605 (vect_analyze_data_refs): Consider using gather loads if
16606 supports_vec_gather_load_p.
16607 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16608 (vect_get_gather_scatter_offset_type): Likewise.
16609 (vect_convert_mask_for_vectype): Likewise.
16610 (vect_add_conversion_to_patterm): Likewise.
16611 (vect_try_gather_scatter_pattern): Likewise.
16612 (vect_recog_gather_scatter_pattern): New pattern recognizer.
16613 (vect_vect_recog_func_ptrs): Add it.
16614 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16615 internal_fn_mask_index and internal_gather_scatter_fn_p.
16616 (check_load_store_masking): Take the gather_scatter_info as an
16617 argument and handle gather loads.
16618 (vect_get_gather_scatter_ops): New function.
16619 (vectorizable_call): Check internal_load_fn_p.
16620 (vectorizable_load): Likewise. Handle gather load internal
16622 (vectorizable_store): Update call to check_load_store_masking.
16623 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16624 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16625 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16626 (aarch64_gather_scale_operand_d): New predicates.
16627 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16628 (mask_gather_load<mode>): New insns.
16630 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16631 Alan Hayward <alan.hayward@arm.com>
16632 David Sherwood <david.sherwood@arm.com>
16634 * optabs.def (fold_left_plus_optab): New optab.
16635 * doc/md.texi (fold_left_plus_@var{m}): Document.
16636 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16637 * internal-fn.c (fold_left_direct): Define.
16638 (expand_fold_left_optab_fn): Likewise.
16639 (direct_fold_left_optab_supported_p): Likewise.
16640 * fold-const-call.c (fold_const_fold_left): New function.
16641 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16642 * tree-parloops.c (valid_reduction_p): New function.
16643 (gather_scalar_reductions): Use it.
16644 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16645 (vect_finish_replace_stmt): Declare.
16646 * tree-vect-loop.c (fold_left_reduction_fn): New function.
16647 (needs_fold_left_reduction_p): New function, split out from...
16648 (vect_is_simple_reduction): ...here. Accept reductions that
16649 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16650 (vect_force_simple_reduction): Also store the reduction type in
16651 the assignment's STMT_VINFO_REDUC_TYPE.
16652 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16653 (merge_with_identity): New function.
16654 (vect_expand_fold_left): Likewise.
16655 (vectorize_fold_left_reduction): Likewise.
16656 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
16657 scalar phi in place for it. Check for target support and reject
16658 cases that would reassociate the operation. Defer the transform
16659 phase to vectorize_fold_left_reduction.
16660 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16661 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16662 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16664 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16666 * tree-if-conv.c (predicate_mem_writes): Remove redundant
16667 call to ifc_temp_var.
16669 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16670 Alan Hayward <alan.hayward@arm.com>
16671 David Sherwood <david.sherwood@arm.com>
16673 * target.def (legitimize_address_displacement): Take the original
16674 offset as a poly_int.
16675 * targhooks.h (default_legitimize_address_displacement): Update
16677 * targhooks.c (default_legitimize_address_displacement): Likewise.
16678 * doc/tm.texi: Regenerate.
16679 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16680 as an argument, moving assert of ad->disp == ad->disp_term to...
16681 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
16682 Try calling targetm.legitimize_address_displacement before expanding
16683 the address rather than afterwards, and adjust for the new interface.
16684 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16685 Match the new hook interface. Handle SVE addresses.
16686 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16687 new hook interface.
16689 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16691 * Makefile.in (OBJS): Add early-remat.o.
16692 * target.def (select_early_remat_modes): New hook.
16693 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16694 * doc/tm.texi: Regenerate.
16695 * targhooks.h (default_select_early_remat_modes): Declare.
16696 * targhooks.c (default_select_early_remat_modes): New function.
16697 * timevar.def (TV_EARLY_REMAT): New timevar.
16698 * passes.def (pass_early_remat): New pass.
16699 * tree-pass.h (make_pass_early_remat): Declare.
16700 * early-remat.c: New file.
16701 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16703 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16705 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16706 Alan Hayward <alan.hayward@arm.com>
16707 David Sherwood <david.sherwood@arm.com>
16709 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16710 vfm1 with a bound_epilog parameter.
16711 (vect_do_peeling): Update calls accordingly, and move the prologue
16712 call earlier in the function. Treat the base bound_epilog as 0 for
16713 fully-masked loops and retain vf - 1 for other loops. Add 1 to
16714 this base when peeling for gaps.
16715 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16716 with fully-masked loops.
16717 (vect_estimate_min_profitable_iters): Handle the single peeled
16718 iteration in that case.
16720 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16721 Alan Hayward <alan.hayward@arm.com>
16722 David Sherwood <david.sherwood@arm.com>
16724 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16725 single-element interleaving even if the size is not a power of 2.
16726 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16727 accesses for single-element interleaving if the group size is
16730 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16731 Alan Hayward <alan.hayward@arm.com>
16732 David Sherwood <david.sherwood@arm.com>
16734 * doc/md.texi (fold_extract_last_@var{m}): Document.
16735 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16736 * optabs.def (fold_extract_last_optab): New optab.
16737 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16738 * internal-fn.c (fold_extract_direct): New macro.
16739 (expand_fold_extract_optab_fn): Likewise.
16740 (direct_fold_extract_optab_supported_p): Likewise.
16741 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16742 * tree-vect-loop.c (vect_model_reduction_cost): Handle
16743 EXTRACT_LAST_REDUCTION.
16744 (get_initial_def_for_reduction): Do not create an initial vector
16745 for EXTRACT_LAST_REDUCTION reductions.
16746 (vectorizable_reduction): Leave the scalar phi in place for
16747 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
16748 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
16749 epilogue code for EXTRACT_LAST_REDUCTION and defer the
16750 transform phase to vectorizable_condition.
16751 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16753 (vect_finish_stmt_generation): ...here.
16754 (vect_finish_replace_stmt): New function.
16755 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16756 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16758 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
16760 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16761 Alan Hayward <alan.hayward@arm.com>
16762 David Sherwood <david.sherwood@arm.com>
16764 * doc/md.texi (extract_last_@var{m}): Document.
16765 * optabs.def (extract_last_optab): New optab.
16766 * internal-fn.def (EXTRACT_LAST): New internal function.
16767 * internal-fn.c (cond_unary_direct): New macro.
16768 (expand_cond_unary_optab_fn): Likewise.
16769 (direct_cond_unary_optab_supported_p): Likewise.
16770 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16771 loops using EXTRACT_LAST.
16772 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16773 (extract_last_<mode>): ...this optab.
16774 (vec_extract<mode><Vel>): Update accordingly.
16776 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16777 Alan Hayward <alan.hayward@arm.com>
16778 David Sherwood <david.sherwood@arm.com>
16780 * target.def (empty_mask_is_expensive): New hook.
16781 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16782 * doc/tm.texi: Regenerate.
16783 * targhooks.h (default_empty_mask_is_expensive): Declare.
16784 * targhooks.c (default_empty_mask_is_expensive): New function.
16785 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16786 if the target says that empty masks are expensive.
16787 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16789 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16791 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16792 Alan Hayward <alan.hayward@arm.com>
16793 David Sherwood <david.sherwood@arm.com>
16795 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16796 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16797 (vect_use_loop_mask_for_alignment_p): New function.
16798 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16799 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16800 niters_skip argument. Make sure that the first niters_skip elements
16801 of the first iteration are inactive.
16802 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16803 Update call to vect_set_loop_masks_directly.
16804 (get_misalign_in_elems): New function, split out from...
16805 (vect_gen_prolog_loop_niters): ...here.
16806 (vect_update_init_of_dr): Take a code argument that specifies whether
16807 the adjustment should be added or subtracted.
16808 (vect_update_init_of_drs): Likewise.
16809 (vect_prepare_for_masked_peels): New function.
16810 (vect_do_peeling): Skip prologue peeling if we're using a mask
16811 instead. Update call to vect_update_inits_of_drs.
16812 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16814 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16815 alignment. Do not include the number of peeled iterations in
16816 the minimum threshold in that case.
16817 (vectorizable_induction): Adjust the start value down by
16818 LOOP_VINFO_MASK_SKIP_NITERS iterations.
16819 (vect_transform_loop): Call vect_prepare_for_masked_peels.
16820 Take the number of skipped iterations into account when calculating
16822 * tree-vect-stmts.c (vect_gen_while_not): New function.
16824 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16825 Alan Hayward <alan.hayward@arm.com>
16826 David Sherwood <david.sherwood@arm.com>
16828 * doc/sourcebuild.texi (vect_fully_masked): Document.
16829 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16830 default value to 0.
16831 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16833 (vect_analyze_loop_2): ...here. Don't check the vectorization
16834 factor against the number of loop iterations if the loop is
16837 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16838 Alan Hayward <alan.hayward@arm.com>
16839 David Sherwood <david.sherwood@arm.com>
16841 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16842 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16843 (dump_groups): Update accordingly.
16844 (iv_use::mem_type): New member variable.
16845 (address_p): New function.
16846 (record_use): Add a mem_type argument and initialize the new
16848 (record_group_use): Add a mem_type argument. Use address_p.
16849 Remove obsolete null checks of base_object. Update call to record_use.
16850 (find_interesting_uses_op): Update call to record_group_use.
16851 (find_interesting_uses_cond): Likewise.
16852 (find_interesting_uses_address): Likewise.
16853 (get_mem_type_for_internal_fn): New function.
16854 (find_address_like_use): Likewise.
16855 (find_interesting_uses_stmt): Try find_address_like_use before
16856 calling find_interesting_uses_op.
16857 (addr_offset_valid_p): Use the iv mem_type field as the type
16858 of the addressed memory.
16859 (add_autoinc_candidates): Likewise.
16860 (get_address_cost): Likewise.
16861 (split_small_address_groups_p): Use address_p.
16862 (split_address_groups): Likewise.
16863 (add_iv_candidate_for_use): Likewise.
16864 (autoinc_possible_for_pair): Likewise.
16865 (rewrite_groups): Likewise.
16866 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16867 (determine_group_iv_cost): Update after split of USE_ADDRESS.
16868 (get_alias_ptr_type_for_ptr_address): New function.
16869 (rewrite_use_address): Rewrite address uses in calls that were
16870 identified by find_address_like_use.
16872 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16873 Alan Hayward <alan.hayward@arm.com>
16874 David Sherwood <david.sherwood@arm.com>
16876 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16878 * gimple-expr.h (is_gimple_addressable: Likewise.
16879 * gimple-expr.c (is_gimple_address): Likewise.
16880 * internal-fn.c (expand_call_mem_ref): New function.
16881 (expand_mask_load_optab_fn): Use it.
16882 (expand_mask_store_optab_fn): Likewise.
16884 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16885 Alan Hayward <alan.hayward@arm.com>
16886 David Sherwood <david.sherwood@arm.com>
16888 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16889 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16890 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16891 (cond_umax@var{mode}): Document.
16892 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16893 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16894 (cond_umin_optab, cond_umax_optab): New optabs.
16895 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16896 (COND_IOR, COND_XOR): New internal functions.
16897 * internal-fn.h (get_conditional_internal_fn): Declare.
16898 * internal-fn.c (cond_binary_direct): New macro.
16899 (expand_cond_binary_optab_fn): Likewise.
16900 (direct_cond_binary_optab_supported_p): Likewise.
16901 (get_conditional_internal_fn): New function.
16902 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16903 Cope with reduction statements that are vectorized as calls rather
16905 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16906 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16907 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16908 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16909 (UNSPEC_COND_EOR): New unspecs.
16910 (optab): Add mappings for them.
16911 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16912 (sve_int_op, sve_fp_op): New int attributes.
16914 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16915 Alan Hayward <alan.hayward@arm.com>
16916 David Sherwood <david.sherwood@arm.com>
16918 * optabs.def (while_ult_optab): New optab.
16919 * doc/md.texi (while_ult@var{m}@var{n}): Document.
16920 * internal-fn.def (WHILE_ULT): New internal function.
16921 * internal-fn.h (direct_internal_fn_supported_p): New override
16922 that takes two types as argument.
16923 * internal-fn.c (while_direct): New macro.
16924 (expand_while_optab_fn): New function.
16925 (convert_optab_supported_p): Likewise.
16926 (direct_while_optab_supported_p): New macro.
16927 * wide-int.h (wi::udiv_ceil): New function.
16928 * tree-vectorizer.h (rgroup_masks): New structure.
16929 (vec_loop_masks): New typedef.
16930 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16931 and fully_masked_p.
16932 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16933 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16934 (vect_max_vf): New function.
16935 (slpeel_make_loop_iterate_ntimes): Delete.
16936 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16937 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16938 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16939 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16940 internal-fn.h, stor-layout.h and optabs-query.h.
16941 (vect_set_loop_mask): New function.
16942 (add_preheader_seq): Likewise.
16943 (add_header_seq): Likewise.
16944 (interleave_supported_p): Likewise.
16945 (vect_maybe_permute_loop_masks): Likewise.
16946 (vect_set_loop_masks_directly): Likewise.
16947 (vect_set_loop_condition_masked): Likewise.
16948 (vect_set_loop_condition_unmasked): New function, split out from
16949 slpeel_make_loop_iterate_ntimes.
16950 (slpeel_make_loop_iterate_ntimes): Rename to..
16951 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
16952 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16953 (vect_do_peeling): Update call accordingly.
16954 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16956 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16957 mask_compare_type, can_fully_mask_p and fully_masked_p.
16958 (release_vec_loop_masks): New function.
16959 (_loop_vec_info): Use it to free the loop masks.
16960 (can_produce_all_loop_masks_p): New function.
16961 (vect_get_max_nscalars_per_iter): Likewise.
16962 (vect_verify_full_masking): Likewise.
16963 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16964 retries, and free the mask rgroups before retrying. Check loop-wide
16965 reasons for disallowing fully-masked loops. Make the final decision
16966 about whether use a fully-masked loop or not.
16967 (vect_estimate_min_profitable_iters): Do not assume that peeling
16968 for the number of iterations will be needed for fully-masked loops.
16969 (vectorizable_reduction): Disable fully-masked loops.
16970 (vectorizable_live_operation): Likewise.
16971 (vect_halve_mask_nunits): New function.
16972 (vect_double_mask_nunits): Likewise.
16973 (vect_record_loop_mask): Likewise.
16974 (vect_get_loop_mask): Likewise.
16975 (vect_transform_loop): Handle the case in which the final loop
16976 iteration might handle a partial vector. Call vect_set_loop_condition
16977 instead of slpeel_make_loop_iterate_ntimes.
16978 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16979 (check_load_store_masking): New function.
16980 (prepare_load_store_mask): Likewise.
16981 (vectorizable_store): Handle fully-masked loops.
16982 (vectorizable_load): Likewise.
16983 (supportable_widening_operation): Use vect_halve_mask_nunits for
16985 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16986 (vect_gen_while): New function.
16987 * config/aarch64/aarch64.md (umax<mode>3): New expander.
16988 (aarch64_uqdec<mode>): New insn.
16990 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16991 Alan Hayward <alan.hayward@arm.com>
16992 David Sherwood <david.sherwood@arm.com>
16994 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16995 (reduc_xor_scal_optab): New optabs.
16996 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16997 (reduc_xor_scal_@var{m}): Document.
16998 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16999 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17000 internal functions.
17001 * fold-const-call.c (fold_const_call): Handle them.
17002 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17003 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17004 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17005 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17006 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17007 (UNSPEC_XORV): New unspecs.
17008 (optab): Add entries for them.
17009 (BITWISEV): New int iterator.
17010 (bit_reduc_op): New int attributes.
17012 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17013 Alan Hayward <alan.hayward@arm.com>
17014 David Sherwood <david.sherwood@arm.com>
17016 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17017 * internal-fn.def (VEC_SHL_INSERT): New internal function.
17018 * optabs.def (vec_shl_insert_optab): New optab.
17019 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17020 (duplicate_and_interleave): Likewise.
17021 * tree-vect-loop.c: Include internal-fn.h.
17022 (neutral_op_for_slp_reduction): New function, split out from
17023 get_initial_defs_for_reduction.
17024 (get_initial_def_for_reduction): Handle option 2 for variable-length
17025 vectors by loading the neutral value into a vector and then shifting
17026 the initial value into element 0.
17027 (get_initial_defs_for_reduction): Replace the code argument with
17028 the neutral value calculated by neutral_op_for_slp_reduction.
17029 Use gimple_build_vector for constant-length vectors.
17030 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17031 but the first group_size elements have a neutral value.
17032 Use duplicate_and_interleave otherwise.
17033 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17034 Update call to get_initial_defs_for_reduction. Handle SLP
17035 reductions for variable-length vectors by creating one vector
17036 result for each scalar result, with the elements associated
17037 with other scalar results stubbed out with the neutral value.
17038 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17039 Require IFN_VEC_SHL_INSERT for double reductions on
17040 variable-length vectors, or SLP reductions that have
17041 a neutral value. Require can_duplicate_and_interleave_p
17042 support for variable-length unchained SLP reductions if there
17043 is no neutral value, such as for MIN/MAX reductions. Also require
17044 the number of vector elements to be a multiple of the number of
17045 SLP statements when doing variable-length unchained SLP reductions.
17046 Update call to vect_create_epilog_for_reduction.
17047 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17048 and remove initial values.
17049 (duplicate_and_interleave): Make public.
17050 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17051 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17053 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17054 Alan Hayward <alan.hayward@arm.com>
17055 David Sherwood <david.sherwood@arm.com>
17057 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17058 (can_duplicate_and_interleave_p): New function.
17059 (vect_get_and_check_slp_defs): Take the vector of statements
17060 rather than just the current one. Remove excess parentheses.
17061 Restriction rejectinon of vect_constant_def and vect_external_def
17062 for variable-length vectors to boolean types, or types for which
17063 can_duplicate_and_interleave_p is false.
17064 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17065 (duplicate_and_interleave): New function.
17066 (vect_get_constant_vectors): Use gimple_build_vector for
17067 constant-length vectors and suitable variable-length constant
17068 vectors. Use duplicate_and_interleave for other variable-length
17069 vectors. Don't defer the update when inserting new statements.
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 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17076 min_profitable_iters doesn't go negative.
17078 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17079 Alan Hayward <alan.hayward@arm.com>
17080 David Sherwood <david.sherwood@arm.com>
17082 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17083 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17084 * optabs.def (vec_mask_load_lanes_optab): New optab.
17085 (vec_mask_store_lanes_optab): Likewise.
17086 * internal-fn.def (MASK_LOAD_LANES): New internal function.
17087 (MASK_STORE_LANES): Likewise.
17088 * internal-fn.c (mask_load_lanes_direct): New macro.
17089 (mask_store_lanes_direct): Likewise.
17090 (expand_mask_load_optab_fn): Handle masked operations.
17091 (expand_mask_load_lanes_optab_fn): New macro.
17092 (expand_mask_store_optab_fn): Handle masked operations.
17093 (expand_mask_store_lanes_optab_fn): New macro.
17094 (direct_mask_load_lanes_optab_supported_p): Likewise.
17095 (direct_mask_store_lanes_optab_supported_p): Likewise.
17096 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17098 (vect_load_lanes_supported): Likewise.
17099 * tree-vect-data-refs.c (strip_conversion): New function.
17100 (can_group_stmts_p): Likewise.
17101 (vect_analyze_data_ref_accesses): Use it instead of checking
17102 for a pair of assignments.
17103 (vect_store_lanes_supported): Take a masked_p parameter.
17104 (vect_load_lanes_supported): Likewise.
17105 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17106 vect_store_lanes_supported and vect_load_lanes_supported.
17107 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17108 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17109 parameter. Don't allow gaps for masked accesses.
17110 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
17111 and vect_load_lanes_supported.
17112 (get_load_store_type): Take a masked_p parameter and update
17113 call to get_group_load_store_type.
17114 (vectorizable_store): Update call to get_load_store_type.
17115 Handle IFN_MASK_STORE_LANES.
17116 (vectorizable_load): Update call to get_load_store_type.
17117 Handle IFN_MASK_LOAD_LANES.
17119 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17120 Alan Hayward <alan.hayward@arm.com>
17121 David Sherwood <david.sherwood@arm.com>
17123 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17125 * config/aarch64/aarch64-protos.h
17126 (aarch64_sve_struct_memory_operand_p): Declare.
17127 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17128 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17129 (VPRED, vpred): Handle SVE structure modes.
17130 * config/aarch64/constraints.md (Utx): New constraint.
17131 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17132 (aarch64_sve_struct_nonimmediate_operand): New predicates.
17133 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17134 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17135 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17136 structure modes. Split into pieces after RA.
17137 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17138 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17140 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17141 SVE structure modes.
17142 (aarch64_classify_address): Likewise.
17143 (sizetochar): Move earlier in file.
17144 (aarch64_print_operand): Handle SVE register lists.
17145 (aarch64_array_mode): New function.
17146 (aarch64_sve_struct_memory_operand_p): Likewise.
17147 (TARGET_ARRAY_MODE): Redefine.
17149 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17150 Alan Hayward <alan.hayward@arm.com>
17151 David Sherwood <david.sherwood@arm.com>
17153 * target.def (array_mode): New target hook.
17154 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17155 * doc/tm.texi: Regenerate.
17156 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17157 * hooks.c (hook_optmode_mode_uhwi_none): New function.
17158 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17159 targetm.array_mode.
17160 * stor-layout.c (mode_for_array): Likewise. Support polynomial
17163 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17164 Alan Hayward <alan.hayward@arm.com>
17165 David Sherwood <david.sherwood@arm.com>
17167 * fold-const.c (fold_binary_loc): Check the argument types
17168 rather than the result type when testing for a vector operation.
17170 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17172 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17173 * doc/tm.texi: Regenerate.
17175 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17176 Alan Hayward <alan.hayward@arm.com>
17177 David Sherwood <david.sherwood@arm.com>
17179 * doc/invoke.texi (-msve-vector-bits=): Document new option.
17180 (sve): Document new AArch64 extension.
17181 * doc/md.texi (w): Extend the description of the AArch64
17182 constraint to include SVE vectors.
17183 (Upl, Upa): Document new AArch64 predicate constraints.
17184 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17186 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17187 (msve-vector-bits=): New option.
17188 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17189 SVE when these are disabled.
17190 (sve): New extension.
17191 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17192 modes. Adjust their number of units based on aarch64_sve_vg.
17193 (MAX_BITSIZE_MODE_ANY_MODE): Define.
17194 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17195 aarch64_addr_query_type.
17196 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17197 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17198 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17199 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17200 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17201 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17202 (aarch64_simd_imm_zero_p): Delete.
17203 (aarch64_check_zero_based_sve_index_immediate): Declare.
17204 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17205 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17206 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17207 (aarch64_sve_float_mul_immediate_p): Likewise.
17208 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17209 rather than an rtx.
17210 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17211 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17212 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17213 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17214 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17215 (aarch64_regmode_natural_size): Likewise.
17216 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17217 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17219 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17220 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17221 for VG and the SVE predicate registers.
17222 (V_ALIASES): Add a "z"-prefixed alias.
17223 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17224 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17225 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17226 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17227 (REG_CLASS_NAMES): Add entries for them.
17228 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
17229 and the predicate registers.
17230 (aarch64_sve_vg): Declare.
17231 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17232 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17233 (REGMODE_NATURAL_SIZE): Define.
17234 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17236 * config/aarch64/aarch64.c: Include cfgrtl.h.
17237 (simd_immediate_info): Add a constructor for series vectors,
17238 and an associated step field.
17239 (aarch64_sve_vg): New variable.
17240 (aarch64_dbx_register_number): Handle VG and the predicate registers.
17241 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17242 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17243 (VEC_ANY_DATA, VEC_STRUCT): New constants.
17244 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17245 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17246 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17247 (aarch64_get_mask_mode): New functions.
17248 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17249 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17250 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
17251 predicate modes and predicate registers. Explicitly restrict
17252 GPRs to modes of 16 bytes or smaller. Only allow FP registers
17253 to store a vector mode if it is recognized by
17254 aarch64_classify_vector_mode.
17255 (aarch64_regmode_natural_size): New function.
17256 (aarch64_hard_regno_caller_save_mode): Return the original mode
17258 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17259 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17260 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17261 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17263 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
17264 does not overlap dest if the function is frame-related. Handle
17266 (aarch64_split_add_offset): New function.
17267 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17268 them aarch64_add_offset.
17269 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17270 and update call to aarch64_sub_sp.
17271 (aarch64_add_cfa_expression): New function.
17272 (aarch64_expand_prologue): Pass extra temporary registers to the
17273 functions above. Handle the case in which we need to emit new
17274 DW_CFA_expressions for registers that were originally saved
17275 relative to the stack pointer, but now have to be expressed
17276 relative to the frame pointer.
17277 (aarch64_output_mi_thunk): Pass extra temporary registers to the
17279 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
17280 IP0 and IP1 values for SVE frames.
17281 (aarch64_expand_vec_series): New function.
17282 (aarch64_expand_sve_widened_duplicate): Likewise.
17283 (aarch64_expand_sve_const_vector): Likewise.
17284 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17285 Handle SVE constants. Use emit_move_insn to move a force_const_mem
17286 into the register, rather than emitting a SET directly.
17287 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17288 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17289 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17290 (offset_9bit_signed_scaled_p): New functions.
17291 (aarch64_replicate_bitmask_imm): New function.
17292 (aarch64_bitmask_imm): Use it.
17293 (aarch64_cannot_force_const_mem): Reject expressions involving
17294 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
17295 (aarch64_classify_index): Handle SVE indices, by requiring
17296 a plain register index with a scale that matches the element size.
17297 (aarch64_classify_address): Handle SVE addresses. Assert that
17298 the mode of the address is VOIDmode or an integer mode.
17299 Update call to aarch64_classify_symbol.
17300 (aarch64_classify_symbolic_expression): Update call to
17301 aarch64_classify_symbol.
17302 (aarch64_const_vec_all_in_range_p): New function.
17303 (aarch64_print_vector_float_operand): Likewise.
17304 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
17305 "vN" for FP registers with SVE modes. Handle (const ...) vectors
17306 and the FP immediates 1.0 and 0.5.
17307 (aarch64_print_address_internal): Handle SVE addresses.
17308 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17309 (aarch64_regno_regclass): Handle predicate registers.
17310 (aarch64_secondary_reload): Handle big-endian reloads of SVE
17312 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17313 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17314 (aarch64_convert_sve_vector_bits): New function.
17315 (aarch64_override_options): Use it to handle -msve-vector-bits=.
17316 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17317 rather than an rtx.
17318 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17319 Handle SVE vector and predicate modes. Accept VL-based constants
17320 that need only one temporary register, and VL offsets that require
17321 no temporary registers.
17322 (aarch64_conditional_register_usage): Mark the predicate registers
17323 as fixed if SVE isn't available.
17324 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17325 Return true for SVE vector and predicate modes.
17326 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17327 rather than an unsigned int. Handle SVE modes.
17328 (aarch64_preferred_simd_mode): Update call accordingly. Handle
17330 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17332 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17333 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17334 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17335 (aarch64_sve_float_mul_immediate_p): New functions.
17336 (aarch64_sve_valid_immediate): New function.
17337 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17338 Explicitly reject structure modes. Check for INDEX constants.
17339 Handle PTRUE and PFALSE constants.
17340 (aarch64_check_zero_based_sve_index_immediate): New function.
17341 (aarch64_simd_imm_zero_p): Delete.
17342 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17343 vector modes. Accept constants in the range of CNT[BHWD].
17344 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17345 ask for an Advanced SIMD mode.
17346 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17347 (aarch64_simd_vector_alignment): Handle SVE predicates.
17348 (aarch64_vectorize_preferred_vector_alignment): New function.
17349 (aarch64_simd_vector_alignment_reachable): Use it instead of
17351 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17352 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17354 (MAX_VECT_LEN): Delete.
17355 (expand_vec_perm_d): Add a vec_flags field.
17356 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17357 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17358 (aarch64_evpc_ext): Don't apply a big-endian lane correction
17360 (aarch64_evpc_rev): Rename to...
17361 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
17362 (aarch64_evpc_rev_global): New function.
17363 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17364 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17366 (aarch64_evpc_sve_tbl): New function.
17367 (aarch64_expand_vec_perm_const_1): Update after rename of
17368 aarch64_evpc_rev. Handle SVE permutes too, trying
17369 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17370 than aarch64_evpc_tbl.
17371 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17372 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17373 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17374 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17375 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17376 (aarch64_expand_sve_vcond): New functions.
17377 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17378 of aarch64_vector_mode_p.
17379 (aarch64_dwarf_poly_indeterminate_value): New function.
17380 (aarch64_compute_pressure_classes): Likewise.
17381 (aarch64_can_change_mode_class): Likewise.
17382 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17383 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17384 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17385 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17386 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17387 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17388 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17389 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17391 (Dn, Dl, Dr): Accept const as well as const_vector.
17392 (Dz): Likewise. Compare against CONST0_RTX.
17393 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17394 of "vector" where appropriate.
17395 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17396 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17397 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17398 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17399 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17400 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17401 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17402 (v_int_equiv): Extend to SVE modes.
17403 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17405 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17406 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17407 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17408 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17409 (SVE_COND_FP_CMP): New int iterators.
17410 (perm_hilo): Handle the new unpack unspecs.
17411 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17413 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17414 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17415 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17416 (aarch64_equality_operator, aarch64_constant_vector_operand)
17417 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17418 (aarch64_sve_nonimmediate_operand): Likewise.
17419 (aarch64_sve_general_operand): Likewise.
17420 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17421 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17422 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17423 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17424 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17425 (aarch64_sve_float_arith_immediate): Likewise.
17426 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17427 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17428 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17429 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17430 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17431 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17432 (aarch64_sve_float_arith_operand): Likewise.
17433 (aarch64_sve_float_arith_with_sub_operand): Likewise.
17434 (aarch64_sve_float_mul_operand): Likewise.
17435 (aarch64_sve_vec_perm_operand): Likewise.
17436 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17437 (aarch64_mov_operand): Accept const_poly_int and const_vector.
17438 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17439 as well as const_vector.
17440 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17441 in file. Use CONST0_RTX and CONSTM1_RTX.
17442 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
17443 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17444 Use aarch64_simd_imm_zero.
17445 * config/aarch64/aarch64-sve.md: New file.
17446 * config/aarch64/aarch64.md: Include it.
17447 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17448 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17449 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17450 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17451 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17452 (sve): New attribute.
17453 (enabled): Disable instructions with the sve attribute unless
17455 (movqi, movhi): Pass CONST_POLY_INT operaneds through
17456 aarch64_expand_mov_immediate.
17457 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17458 CNT[BHSD] immediates.
17459 (movti): Split CONST_POLY_INT moves into two halves.
17460 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17461 Split additions that need a temporary here if the destination
17462 is the stack pointer.
17463 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17464 (*add<mode>3_poly_1): New instruction.
17465 (set_clobber_cc): New expander.
17467 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17469 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17470 parameter and use it instead of GET_MODE_SIZE (innermode). Use
17471 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17472 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17473 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
17474 Change innermode from fixed_mode_size to machine_mode.
17475 (simplify_subreg): Update call accordingly. Handle a constant-sized
17476 subreg of a variable-length CONST_VECTOR.
17478 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17479 Alan Hayward <alan.hayward@arm.com>
17480 David Sherwood <david.sherwood@arm.com>
17482 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17483 (add_offset_to_base): New function, split out from...
17484 (create_mem_ref): ...here. When handling a scale other than 1,
17485 check first whether the address is valid without the offset.
17486 Add it into the base if so, leaving the index and scale as-is.
17488 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17491 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17492 fold_for_warn before checking if arg2 is INTEGER_CST.
17494 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
17496 * config/rs6000/predicates.md (load_multiple_operation): Delete.
17497 (store_multiple_operation): Delete.
17498 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17499 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17500 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17501 guarded by TARGET_STRING.
17502 (rs6000_output_load_multiple): Delete.
17503 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17504 OPTION_MASK_STRING / TARGET_STRING handling.
17505 (print_operand) <'N', 'O'>: Add comment that these are unused now.
17506 (const rs6000_opt_masks) <"string">: Change mask to 0.
17507 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17508 (MASK_STRING): Delete.
17509 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17511 (load_multiple): Delete.
17518 (store_multiple): Delete.
17525 (movmemsi_8reg): Delete.
17526 (corresponding unnamed define_insn): Delete.
17527 (movmemsi_6reg): Delete.
17528 (corresponding unnamed define_insn): Delete.
17529 (movmemsi_4reg): Delete.
17530 (corresponding unnamed define_insn): Delete.
17531 (movmemsi_2reg): Delete.
17532 (corresponding unnamed define_insn): Delete.
17533 (movmemsi_1reg): Delete.
17534 (corresponding unnamed define_insn): Delete.
17535 * config/rs6000/rs6000.opt (mno-string): New.
17536 (mstring): Replace by deprecation warning stub.
17537 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17539 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17541 * regrename.c (regrename_do_replace): If replacing the same
17542 reg multiple times, try to reuse last created gen_raw_REG.
17545 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17546 main to workaround a bug in GDB.
17548 2018-01-12 Tom de Vries <tom@codesourcery.com>
17551 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17553 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
17555 PR rtl-optimization/80481
17556 * ira-color.c (get_cap_member): New function.
17557 (allocnos_conflict_by_live_ranges_p): Use it.
17558 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17559 (setup_slot_coalesced_allocno_live_ranges): Ditto.
17561 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
17564 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17565 (*saddl_se_1): Ditto.
17566 (*ssubsi_1): Ditto.
17567 (*ssubl_se_1): Ditto.
17569 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17571 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17572 rather than wi::to_widest for DR_INITs.
17573 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17574 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17575 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17577 (vect_analyze_group_access_1): Note that here.
17579 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17581 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17582 polynomial type sizes.
17584 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17586 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17587 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17588 (gimple_add_tmp_var): Likewise.
17590 2018-01-12 Martin Liska <mliska@suse.cz>
17592 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17593 (gimple_alloc_sizes): Likewise.
17594 (dump_gimple_statistics): Use PRIu64 in printf format.
17595 * gimple.h: Change uint64_t to int.
17597 2018-01-12 Martin Liska <mliska@suse.cz>
17599 * tree-core.h: Use uint64_t instead of int.
17600 * tree.c (tree_node_counts): Likewise.
17601 (tree_node_sizes): Likewise.
17602 (dump_tree_statistics): Use PRIu64 in printf format.
17604 2018-01-12 Martin Liska <mliska@suse.cz>
17606 * Makefile.in: As qsort_chk is implemented in vec.c, add
17607 vec.o to linkage of gencfn-macros.
17608 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17609 passing the info to record_node_allocation_statistics.
17610 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17612 * ggc-common.c (struct ggc_usage): Add operator== and use
17613 it in operator< and compare function.
17614 * mem-stats.h (struct mem_usage): Likewise.
17615 * vec.c (struct vec_usage): Remove operator< and compare
17616 function. Can be simply inherited.
17618 2018-01-12 Martin Jambor <mjambor@suse.cz>
17621 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17622 * tree-ssa-math-opts.c: Include domwalk.h.
17623 (convert_mult_to_fma_1): New function.
17624 (fma_transformation_info): New type.
17625 (fma_deferring_state): Likewise.
17626 (cancel_fma_deferring): New function.
17627 (result_of_phi): Likewise.
17628 (last_fma_candidate_feeds_initial_phi): Likewise.
17629 (convert_mult_to_fma): Added deferring logic, split actual
17630 transformation to convert_mult_to_fma_1.
17631 (math_opts_dom_walker): New type.
17632 (math_opts_dom_walker::after_dom_children): New method, body moved
17633 here from pass_optimize_widening_mul::execute, added deferring logic
17635 (pass_optimize_widening_mul::execute): Moved most of code to
17636 math_opts_dom_walker::after_dom_children.
17637 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17638 * config/i386/i386.c (ix86_option_override_internal): Added
17639 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17641 2018-01-12 Richard Biener <rguenther@suse.de>
17644 * dwarf2out.c (gen_variable_die): Do not reset old_die for
17645 inline instance vars.
17647 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
17650 * config/rx/rx.c (rx_is_restricted_memory_address):
17651 Handle SUBREG case.
17653 2018-01-12 Richard Biener <rguenther@suse.de>
17655 PR tree-optimization/80846
17656 * target.def (split_reduction): New target hook.
17657 * targhooks.c (default_split_reduction): New function.
17658 * targhooks.h (default_split_reduction): Declare.
17659 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17660 target requests first reduce vectors by combining low and high
17662 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17663 (get_vectype_for_scalar_type_and_size): Export.
17664 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17665 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17666 * doc/tm.texi: Regenerate.
17667 * config/i386/i386.c (ix86_split_reduction): Implement
17668 TARGET_VECTORIZE_SPLIT_REDUCTION.
17670 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17673 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17674 in PIC mode except for TARGET_VXWORKS_RTP.
17675 * config/sparc/sparc.c: Include cfgrtl.h.
17676 (TARGET_INIT_PIC_REG): Define.
17677 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17678 (sparc_pic_register_p): New predicate.
17679 (sparc_legitimate_address_p): Use it.
17680 (sparc_legitimize_pic_address): Likewise.
17681 (sparc_delegitimize_address): Likewise.
17682 (sparc_mode_dependent_address_p): Likewise.
17683 (gen_load_pcrel_sym): Remove 4th parameter.
17684 (load_got_register): Adjust call to above. Remove obsolete stuff.
17685 (sparc_expand_prologue): Do not call load_got_register here.
17686 (sparc_flat_expand_prologue): Likewise.
17687 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17688 (sparc_use_pseudo_pic_reg): New function.
17689 (sparc_init_pic_reg): Likewise.
17690 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17691 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17693 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
17695 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17696 Add item for branch_cost.
17698 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17700 PR rtl-optimization/83565
17701 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17702 not extend the result to a larger mode for rotate operations.
17703 (num_sign_bit_copies1): Likewise.
17705 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17708 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17710 Use values-Xc.o for -pedantic.
17711 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17713 2018-01-12 Martin Liska <mliska@suse.cz>
17716 * ipa-devirt.c (final_warning_record::grow_type_warnings):
17718 (possible_polymorphic_call_targets): Use it.
17719 (ipa_devirt): Likewise.
17721 2018-01-12 Martin Liska <mliska@suse.cz>
17723 * profile-count.h (enum profile_quality): Use 0 as invalid
17724 enum value of profile_quality.
17726 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
17728 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17729 -mext-string options.
17731 2018-01-12 Richard Biener <rguenther@suse.de>
17733 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17734 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17735 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17737 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17739 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17741 * configure.ac (--with-long-double-format): Add support for the
17742 configuration option to change the default long double format on
17744 * config.gcc (powerpc*-linux*-*): Likewise.
17745 * configure: Regenerate.
17746 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17747 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17748 used without modification.
17750 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17752 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17753 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17754 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17755 MISC_BUILTIN_SPEC_BARRIER.
17756 (rs6000_init_builtins): Likewise.
17757 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17759 (speculation_barrier): New define_insn.
17760 * doc/extend.texi: Document __builtin_speculation_barrier.
17762 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17765 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17766 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17767 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17769 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
17770 integral modes instead of "ss" and "sd".
17771 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17772 vectors with 32-bit and 64-bit elements.
17773 (vecdupssescalarmodesuffix): New mode attribute.
17774 (vec_dup<mode>): Use it.
17776 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
17779 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17780 frame if argument is passed on stack.
17782 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17785 * ree.c (combine_reaching_defs): Optimize also
17786 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17787 reg2=any_extend(exp); reg1=reg2;, formatting fix.
17789 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17791 PR middle-end/83189
17792 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17794 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17796 PR middle-end/83718
17797 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17798 after they are computed.
17800 2018-01-11 Bin Cheng <bin.cheng@arm.com>
17802 PR tree-optimization/83695
17803 * gimple-loop-linterchange.cc
17804 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17805 reset cached scev information after interchange.
17806 (pass_linterchange::execute): Remove call to scev_reset_htab.
17808 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17810 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17811 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17812 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17813 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17814 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17815 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17816 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17817 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17818 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17819 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17820 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17821 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17822 (V_lane_reg): Likewise.
17823 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17825 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17826 (vfmal_lane_low<mode>_intrinsic,
17827 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17828 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17829 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17830 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17831 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17832 vfmsl_lane_high<mode>_intrinsic): New define_insns.
17834 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17836 * config/arm/arm-cpus.in (fp16fml): New feature.
17837 (ALL_SIMD): Add fp16fml.
17838 (armv8.2-a): Add fp16fml as an option.
17839 (armv8.3-a): Likewise.
17840 (armv8.4-a): Add fp16fml as part of fp16.
17841 * config/arm/arm.h (TARGET_FP16FML): Define.
17842 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17844 * config/arm/arm-modes.def (V2HF): Define.
17845 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17846 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17847 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17848 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17849 vfmsl_low, vfmsl_high): New set of builtins.
17850 * config/arm/iterators.md (PLUSMINUS): New code iterator.
17851 (vfml_op): New code attribute.
17852 (VFMLHALVES): New int iterator.
17853 (VFML, VFMLSEL): New mode attributes.
17854 (V_reg): Define mapping for V2HF.
17855 (V_hi, V_lo): New mode attributes.
17856 (VF_constraint): Likewise.
17857 (vfml_half, vfml_half_selector): New int attributes.
17858 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17860 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17861 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17863 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17864 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17865 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17866 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
17868 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17869 Document new effective target and option set.
17871 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17873 * config/arm/arm-cpus.in (armv8_4): New feature.
17874 (ARMv8_4a): New fgroup.
17875 (armv8.4-a): New arch.
17876 * config/arm/arm-tables.opt: Regenerate.
17877 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17878 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17879 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17880 Add matching rules for -march=armv8.4-a and extensions.
17881 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17883 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
17886 * config/rx/rx.md (BW): New mode attribute.
17887 (sync_lock_test_and_setsi): Add mode suffix to insn output.
17889 2018-01-11 Richard Biener <rguenther@suse.de>
17891 PR tree-optimization/83435
17892 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17893 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17894 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17896 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17897 Alan Hayward <alan.hayward@arm.com>
17898 David Sherwood <david.sherwood@arm.com>
17900 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17902 (aarch64_classify_address): Initialize it. Track polynomial offsets.
17903 (aarch64_print_address_internal): Use it to check for a zero offset.
17905 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17906 Alan Hayward <alan.hayward@arm.com>
17907 David Sherwood <david.sherwood@arm.com>
17909 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17910 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17911 Return a poly_int64 rather than a HOST_WIDE_INT.
17912 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17913 rather than a HOST_WIDE_INT.
17914 * config/aarch64/aarch64.h (aarch64_frame): Protect with
17915 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
17916 hard_fp_offset, frame_size, initial_adjust, callee_offset and
17917 final_offset from HOST_WIDE_INT to poly_int64.
17918 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17919 to_constant when getting the number of units in an Advanced SIMD
17921 (aarch64_builtin_vectorized_function): Check for a constant number
17923 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17925 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17926 attribute instead of GET_MODE_NUNITS.
17927 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17928 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17929 GET_MODE_SIZE for fixed-size registers.
17930 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17931 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17932 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17933 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17934 (aarch64_print_operand, aarch64_print_address_internal)
17935 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17936 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17937 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17938 Handle polynomial GET_MODE_SIZE.
17939 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
17940 wider than SImode without modification.
17941 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17942 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17943 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17944 passing and returning SVE modes.
17945 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17946 rather than GEN_INT.
17947 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17948 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17949 (aarch64_allocate_and_probe_stack_space): Likewise.
17950 (aarch64_layout_frame): Cope with polynomial offsets.
17951 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17952 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
17953 polynomial offsets.
17954 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17955 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17956 poly_int64 rather than a HOST_WIDE_INT.
17957 (aarch64_get_separate_components, aarch64_process_components)
17958 (aarch64_expand_prologue, aarch64_expand_epilogue)
17959 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17960 (aarch64_anchor_offset): New function, split out from...
17961 (aarch64_legitimize_address): ...here.
17962 (aarch64_builtin_vectorization_cost): Handle polynomial
17963 TYPE_VECTOR_SUBPARTS.
17964 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17966 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17967 number of elements from the PARALLEL rather than the mode.
17968 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17969 rather than GET_MODE_BITSIZE.
17970 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17971 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17972 (aarch64_expand_vec_perm_const_1): Handle polynomial
17973 d->perm.length () and d->perm elements.
17974 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
17975 Apply to_constant to d->perm elements.
17976 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17977 polynomial CONST_VECTOR_NUNITS.
17978 (aarch64_move_pointer): Take amount as a poly_int64 rather
17980 (aarch64_progress_pointer): Avoid temporary variable.
17981 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17982 the mode attribute instead of GET_MODE.
17984 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17985 Alan Hayward <alan.hayward@arm.com>
17986 David Sherwood <david.sherwood@arm.com>
17988 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17989 x exists before using it.
17990 (aarch64_add_constant_internal): Rename to...
17991 (aarch64_add_offset_1): ...this. Replace regnum with separate
17992 src and dest rtxes. Handle the case in which they're different,
17993 including when the offset is zero. Replace scratchreg with an rtx.
17994 Use 2 additions if there is no spare register into which we can
17995 move a 16-bit constant.
17996 (aarch64_add_constant): Delete.
17997 (aarch64_add_offset): Replace reg with separate src and dest
17998 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
17999 Use aarch64_add_offset_1.
18000 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18001 an rtx rather than an int. Take the delta as a poly_int64
18002 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
18003 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18004 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18005 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18006 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18007 and aarch64_add_sp.
18008 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18009 aarch64_add_constant.
18011 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18013 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18014 Use scalar_float_mode.
18016 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18018 * config/aarch64/aarch64-simd.md
18019 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18020 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18021 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18022 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18023 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18024 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18025 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18026 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18027 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18028 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18030 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18033 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18034 targ_options->x_arm_arch_string is non NULL.
18036 2018-01-11 Tamar Christina <tamar.christina@arm.com>
18038 * config/aarch64/aarch64.h
18039 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
18041 2018-01-11 Sudakshina Das <sudi.das@arm.com>
18044 * expmed.c (emit_store_flag_force): Swap if const op0
18045 and change VOIDmode to mode of op0.
18047 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18049 PR rtl-optimization/83761
18050 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18051 than bytes to mode_for_size.
18053 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18055 PR middle-end/83189
18056 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18057 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18060 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18062 PR middle-end/83575
18063 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18064 when in layout mode.
18065 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18066 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18069 2018-01-10 Michael Collison <michael.collison@arm.com>
18071 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18072 * config/aarch64/aarch64-option-extension.def: Add
18073 AARCH64_OPT_EXTENSION of 'fp16fml'.
18074 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18075 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18076 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18077 * config/aarch64/constraints.md (Ui7): New constraint.
18078 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18079 (VFMLA_SEL_W): Ditto.
18082 (VFMLA16_LOW): New int iterator.
18083 (VFMLA16_HIGH): Ditto.
18084 (UNSPEC_FMLAL): New unspec.
18085 (UNSPEC_FMLSL): Ditto.
18086 (UNSPEC_FMLAL2): Ditto.
18087 (UNSPEC_FMLSL2): Ditto.
18088 (f16mac): New code attribute.
18089 * config/aarch64/aarch64-simd-builtins.def
18090 (aarch64_fmlal_lowv2sf): Ditto.
18091 (aarch64_fmlsl_lowv2sf): Ditto.
18092 (aarch64_fmlalq_lowv4sf): Ditto.
18093 (aarch64_fmlslq_lowv4sf): Ditto.
18094 (aarch64_fmlal_highv2sf): Ditto.
18095 (aarch64_fmlsl_highv2sf): Ditto.
18096 (aarch64_fmlalq_highv4sf): Ditto.
18097 (aarch64_fmlslq_highv4sf): Ditto.
18098 (aarch64_fmlal_lane_lowv2sf): Ditto.
18099 (aarch64_fmlsl_lane_lowv2sf): Ditto.
18100 (aarch64_fmlal_laneq_lowv2sf): Ditto.
18101 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18102 (aarch64_fmlalq_lane_lowv4sf): Ditto.
18103 (aarch64_fmlsl_lane_lowv4sf): Ditto.
18104 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18105 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18106 (aarch64_fmlal_lane_highv2sf): Ditto.
18107 (aarch64_fmlsl_lane_highv2sf): Ditto.
18108 (aarch64_fmlal_laneq_highv2sf): Ditto.
18109 (aarch64_fmlsl_laneq_highv2sf): Ditto.
18110 (aarch64_fmlalq_lane_highv4sf): Ditto.
18111 (aarch64_fmlsl_lane_highv4sf): Ditto.
18112 (aarch64_fmlalq_laneq_highv4sf): Ditto.
18113 (aarch64_fmlsl_laneq_highv4sf): Ditto.
18114 * config/aarch64/aarch64-simd.md:
18115 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18116 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18117 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18118 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18119 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18120 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18121 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18122 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18123 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18124 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18125 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18126 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18127 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18128 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18129 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18130 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18131 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18132 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18133 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18134 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18135 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18136 (vfmlsl_low_u32): Ditto.
18137 (vfmlalq_low_u32): Ditto.
18138 (vfmlslq_low_u32): Ditto.
18139 (vfmlal_high_u32): Ditto.
18140 (vfmlsl_high_u32): Ditto.
18141 (vfmlalq_high_u32): Ditto.
18142 (vfmlslq_high_u32): Ditto.
18143 (vfmlal_lane_low_u32): Ditto.
18144 (vfmlsl_lane_low_u32): Ditto.
18145 (vfmlal_laneq_low_u32): Ditto.
18146 (vfmlsl_laneq_low_u32): Ditto.
18147 (vfmlalq_lane_low_u32): Ditto.
18148 (vfmlslq_lane_low_u32): Ditto.
18149 (vfmlalq_laneq_low_u32): Ditto.
18150 (vfmlslq_laneq_low_u32): Ditto.
18151 (vfmlal_lane_high_u32): Ditto.
18152 (vfmlsl_lane_high_u32): Ditto.
18153 (vfmlal_laneq_high_u32): Ditto.
18154 (vfmlsl_laneq_high_u32): Ditto.
18155 (vfmlalq_lane_high_u32): Ditto.
18156 (vfmlslq_lane_high_u32): Ditto.
18157 (vfmlalq_laneq_high_u32): Ditto.
18158 (vfmlslq_laneq_high_u32): Ditto.
18159 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18160 (AARCH64_FL_FOR_ARCH8_4): New.
18161 (AARCH64_ISA_F16FML): New ISA flag.
18162 (TARGET_F16FML): New feature flag for fp16fml.
18163 (doc/invoke.texi): Document new fp16fml option.
18165 2018-01-10 Michael Collison <michael.collison@arm.com>
18167 * config/aarch64/aarch64-builtins.c:
18168 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18169 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18170 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18171 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18172 (AARCH64_ISA_SHA3): New ISA flag.
18173 (TARGET_SHA3): New feature flag for sha3.
18174 * config/aarch64/iterators.md (sha512_op): New int attribute.
18175 (CRYPTO_SHA512): New int iterator.
18176 (UNSPEC_SHA512H): New unspec.
18177 (UNSPEC_SHA512H2): Ditto.
18178 (UNSPEC_SHA512SU0): Ditto.
18179 (UNSPEC_SHA512SU1): Ditto.
18180 * config/aarch64/aarch64-simd-builtins.def
18181 (aarch64_crypto_sha512hqv2di): New builtin.
18182 (aarch64_crypto_sha512h2qv2di): Ditto.
18183 (aarch64_crypto_sha512su0qv2di): Ditto.
18184 (aarch64_crypto_sha512su1qv2di): Ditto.
18185 (aarch64_eor3qv8hi): Ditto.
18186 (aarch64_rax1qv2di): Ditto.
18187 (aarch64_xarqv2di): Ditto.
18188 (aarch64_bcaxqv8hi): Ditto.
18189 * config/aarch64/aarch64-simd.md:
18190 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18191 (aarch64_crypto_sha512su0qv2di): Ditto.
18192 (aarch64_crypto_sha512su1qv2di): Ditto.
18193 (aarch64_eor3qv8hi): Ditto.
18194 (aarch64_rax1qv2di): Ditto.
18195 (aarch64_xarqv2di): Ditto.
18196 (aarch64_bcaxqv8hi): Ditto.
18197 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18198 (vsha512h2q_u64): Ditto.
18199 (vsha512su0q_u64): Ditto.
18200 (vsha512su1q_u64): Ditto.
18201 (veor3q_u16): Ditto.
18202 (vrax1q_u64): Ditto.
18203 (vxarq_u64): Ditto.
18204 (vbcaxq_u16): Ditto.
18205 * config/arm/types.md (crypto_sha512): New type attribute.
18206 (crypto_sha3): Ditto.
18207 (doc/invoke.texi): Document new sha3 option.
18209 2018-01-10 Michael Collison <michael.collison@arm.com>
18211 * config/aarch64/aarch64-builtins.c:
18212 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18213 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18214 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18215 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18216 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18217 (AARCH64_ISA_SM4): New ISA flag.
18218 (TARGET_SM4): New feature flag for sm4.
18219 * config/aarch64/aarch64-simd-builtins.def
18220 (aarch64_sm3ss1qv4si): Ditto.
18221 (aarch64_sm3tt1aq4si): Ditto.
18222 (aarch64_sm3tt1bq4si): Ditto.
18223 (aarch64_sm3tt2aq4si): Ditto.
18224 (aarch64_sm3tt2bq4si): Ditto.
18225 (aarch64_sm3partw1qv4si): Ditto.
18226 (aarch64_sm3partw2qv4si): Ditto.
18227 (aarch64_sm4eqv4si): Ditto.
18228 (aarch64_sm4ekeyqv4si): Ditto.
18229 * config/aarch64/aarch64-simd.md:
18230 (aarch64_sm3ss1qv4si): Ditto.
18231 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18232 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18233 (aarch64_sm4eqv4si): Ditto.
18234 (aarch64_sm4ekeyqv4si): Ditto.
18235 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18236 (sm3part_op): Ditto.
18237 (CRYPTO_SM3TT): Ditto.
18238 (CRYPTO_SM3PART): Ditto.
18239 (UNSPEC_SM3SS1): New unspec.
18240 (UNSPEC_SM3TT1A): Ditto.
18241 (UNSPEC_SM3TT1B): Ditto.
18242 (UNSPEC_SM3TT2A): Ditto.
18243 (UNSPEC_SM3TT2B): Ditto.
18244 (UNSPEC_SM3PARTW1): Ditto.
18245 (UNSPEC_SM3PARTW2): Ditto.
18246 (UNSPEC_SM4E): Ditto.
18247 (UNSPEC_SM4EKEY): Ditto.
18248 * config/aarch64/constraints.md (Ui2): New constraint.
18249 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18250 * config/arm/types.md (crypto_sm3): New type attribute.
18251 (crypto_sm4): Ditto.
18252 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18253 (vsm3tt1aq_u32): Ditto.
18254 (vsm3tt1bq_u32): Ditto.
18255 (vsm3tt2aq_u32): Ditto.
18256 (vsm3tt2bq_u32): Ditto.
18257 (vsm3partw1q_u32): Ditto.
18258 (vsm3partw2q_u32): Ditto.
18259 (vsm4eq_u32): Ditto.
18260 (vsm4ekeyq_u32): Ditto.
18261 (doc/invoke.texi): Document new sm4 option.
18263 2018-01-10 Michael Collison <michael.collison@arm.com>
18265 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18266 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18267 (AARCH64_FL_FOR_ARCH8_4): New.
18268 (AARCH64_FL_V8_4): New flag.
18269 (doc/invoke.texi): Document new armv8.4-a option.
18271 2018-01-10 Michael Collison <michael.collison@arm.com>
18273 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18274 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18275 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18276 * config/aarch64/aarch64-option-extension.def: Add
18277 AARCH64_OPT_EXTENSION of 'sha2'.
18278 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18279 (crypto): Disable sha2 and aes if crypto disabled.
18280 (crypto): Enable aes and sha2 if enabled.
18281 (simd): Disable sha2 and aes if simd disabled.
18282 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18284 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18285 (TARGET_SHA2): New feature flag for sha2.
18286 (TARGET_AES): New feature flag for aes.
18287 * config/aarch64/aarch64-simd.md:
18288 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18289 conditional on TARGET_AES.
18290 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18291 (aarch64_crypto_sha1hsi): Make pattern conditional
18293 (aarch64_crypto_sha1hv4si): Ditto.
18294 (aarch64_be_crypto_sha1hv4si): Ditto.
18295 (aarch64_crypto_sha1su1v4si): Ditto.
18296 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18297 (aarch64_crypto_sha1su0v4si): Ditto.
18298 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18299 (aarch64_crypto_sha256su0v4si): Ditto.
18300 (aarch64_crypto_sha256su1v4si): Ditto.
18301 (doc/invoke.texi): Document new aes and sha2 options.
18303 2018-01-10 Martin Sebor <msebor@redhat.com>
18305 PR tree-optimization/83781
18306 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18309 2018-01-11 Martin Sebor <msebor@gmail.com>
18310 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18312 PR tree-optimization/83501
18313 PR tree-optimization/81703
18315 * tree-ssa-strlen.c (get_string_cst): Rename...
18316 (get_string_len): ...to this. Handle global constants.
18317 (handle_char_store): Adjust.
18319 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
18320 Jim Wilson <jimw@sifive.com>
18322 * config/riscv/riscv-protos.h (riscv_output_return): New.
18323 * config/riscv/riscv.c (struct machine_function): New naked_p field.
18324 (riscv_attribute_table, riscv_output_return),
18325 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18326 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18327 (riscv_compute_frame_info): Only compute frame->mask if not a naked
18329 (riscv_expand_prologue): Add early return for naked function.
18330 (riscv_expand_epilogue): Likewise.
18331 (riscv_function_ok_for_sibcall): Return false for naked function.
18332 (riscv_set_current_function): New.
18333 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18334 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18335 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18336 * doc/extend.texi (RISC-V Function Attributes): New.
18338 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18340 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18341 check for 128-bit long double before checking TCmode.
18342 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18343 128-bit long doubles before checking TFmode or TCmode.
18344 (FLOAT128_IBM_P): Likewise.
18346 2018-01-10 Martin Sebor <msebor@redhat.com>
18348 PR tree-optimization/83671
18349 * builtins.c (c_strlen): Unconditionally return zero for the empty
18351 Use -Warray-bounds for warnings.
18352 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18353 for non-constant array indices with COMPONENT_REF, arrays of
18354 arrays, and pointers to arrays.
18355 (gimple_fold_builtin_strlen): Determine and set length range for
18356 non-constant character arrays.
18358 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
18360 PR middle-end/81897
18361 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18364 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
18366 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18368 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18371 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18372 VECTOR_MEM_ALTIVEC_OR_VSX_P.
18373 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18374 indexed_or_indirect_operand predicate.
18375 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18376 (*vsx_le_perm_load_v8hi): Likewise.
18377 (*vsx_le_perm_load_v16qi): Likewise.
18378 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18379 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18380 (*vsx_le_perm_store_v8hi): Likewise.
18381 (*vsx_le_perm_store_v16qi): Likewise.
18382 (eight unnamed splitters): Likewise.
18384 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18386 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18387 * config/rs6000/emmintrin.h: Likewise.
18388 * config/rs6000/mmintrin.h: Likewise.
18389 * config/rs6000/xmmintrin.h: Likewise.
18391 2018-01-10 David Malcolm <dmalcolm@redhat.com>
18394 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18396 * tree.c (tree_nop_conversion): Return true for location wrapper
18398 (maybe_wrap_with_location): New function.
18399 (selftest::check_strip_nops): New function.
18400 (selftest::test_location_wrappers): New function.
18401 (selftest::tree_c_tests): Call it.
18402 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18403 (maybe_wrap_with_location): New decl.
18404 (EXPR_LOCATION_WRAPPER_P): New macro.
18405 (location_wrapper_p): New inline function.
18406 (tree_strip_any_location_wrapper): New inline function.
18408 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
18411 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18412 stack_realign_offset for the largest alignment of stack slot
18414 (ix86_find_max_used_stack_alignment): New function.
18415 (ix86_finalize_stack_frame_flags): Use it. Set
18416 max_used_stack_alignment if we don't realign stack.
18417 * config/i386/i386.h (machine_function): Add
18418 max_used_stack_alignment.
18420 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
18422 * config/arm/arm.opt (-mbranch-cost): New option.
18423 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18426 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
18429 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18430 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18432 2018-01-10 Richard Biener <rguenther@suse.de>
18435 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18436 early out so it also covers the case where we have a non-NULL
18439 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18441 PR tree-optimization/83753
18442 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18443 for non-strided grouped accesses if the number of elements is 1.
18445 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18448 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18449 * i386.h (TARGET_USE_GATHER): Define.
18450 * x86-tune.def (X86_TUNE_USE_GATHER): New.
18452 2018-01-10 Martin Liska <mliska@suse.cz>
18455 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18456 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18458 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18459 CLEANUP_NO_PARTITIONING is not set.
18461 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18463 * doc/rtl.texi: Remove documentation of (const ...) wrappers
18464 for vectors, as a partial revert of r254296.
18465 * rtl.h (const_vec_p): Delete.
18466 (const_vec_duplicate_p): Don't test for vector CONSTs.
18467 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18468 * expmed.c (make_tree): Likewise.
18471 * common.md (E, F): Use CONSTANT_P instead of checking for
18473 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18474 checking for CONST_VECTOR.
18476 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18478 PR middle-end/83575
18479 * predict.c (force_edge_cold): Handle in more sane way edges
18480 with no prediction.
18482 2018-01-09 Carl Love <cel@us.ibm.com>
18484 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18486 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18487 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18488 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18489 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
18490 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18491 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
18492 * config/rs6000/rs6000-protos.h: Add extern defition for
18493 rs6000_generate_float2_double_code.
18494 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18496 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18497 (float2_v2df): Add define_expand.
18499 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
18502 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18503 op_mode in the force_to_mode call.
18505 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18507 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18508 instead of checking each element individually.
18509 (aarch64_evpc_uzp): Likewise.
18510 (aarch64_evpc_zip): Likewise.
18511 (aarch64_evpc_ext): Likewise.
18512 (aarch64_evpc_rev): Likewise.
18513 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18514 instead of checking each element individually. Return true without
18516 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18517 whether all selected elements come from the same input, instead of
18518 checking each element individually. Remove calls to gen_rtx_REG,
18519 start_sequence and end_sequence and instead assert that no rtl is
18522 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18524 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18525 order of HIGH and CONST checks.
18527 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18529 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18530 if the destination isn't an SSA_NAME.
18532 2018-01-09 Richard Biener <rguenther@suse.de>
18534 PR tree-optimization/83668
18535 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18537 (canonicalize_loop_form): ... here, renamed from ...
18538 (canonicalize_loop_closed_ssa_form): ... this and amended to
18539 swap successor edges for loop exit blocks to make us use
18540 the RPO order we need for initial schedule generation.
18542 2018-01-09 Joseph Myers <joseph@codesourcery.com>
18544 PR tree-optimization/64811
18545 * match.pd: When optimizing comparisons with Inf, avoid
18546 introducing or losing exceptions from comparisons with NaN.
18548 2018-01-09 Martin Liska <mliska@suse.cz>
18551 * asan.c (shadow_mem_size): Add gcc_assert.
18553 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
18555 Don't save registers in main().
18558 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18559 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18560 * config/avr/avr.c (avr_set_current_function): Don't error if
18561 naked, OS_task or OS_main are specified at the same time.
18562 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18564 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18566 * common/config/avr/avr-common.c (avr_option_optimization_table):
18567 Switch on -mmain-is-OS_task for optimizing compilations.
18569 2018-01-09 Richard Biener <rguenther@suse.de>
18571 PR tree-optimization/83572
18572 * graphite.c: Include cfganal.h.
18573 (graphite_transform_loops): Connect infinite loops to exit
18574 and remove fake edges at the end.
18576 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18578 * ipa-inline.c (edge_badness): Revert accidental checkin.
18580 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18583 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18584 symbols; not inline clones.
18586 2018-01-09 Jakub Jelinek <jakub@redhat.com>
18589 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18590 hard registers. Formatting fixes.
18592 PR preprocessor/83722
18593 * gcc.c (try_generate_repro): Pass
18594 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18595 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18598 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
18599 Kito Cheng <kito.cheng@gmail.com>
18601 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18602 (riscv_leaf_function_p): Delete.
18603 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18605 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18607 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18609 (do_ifelse): New function.
18610 (do_isel): New function.
18611 (do_sub3): New function.
18612 (do_add3): New function.
18613 (do_load_mask_compare): New function.
18614 (do_overlap_load_compare): New function.
18615 (expand_compare_loop): New function.
18616 (expand_block_compare): Call expand_compare_loop() when appropriate.
18617 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18618 option description.
18619 (-mblock-compare-inline-loop-limit): New option.
18621 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18624 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18625 Reverse order of second and third operands in first alternative.
18626 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18627 of first and second elements in UNSPEC_VPERMR vector.
18628 (altivec_expand_vec_perm_le): Likewise.
18630 2018-01-08 Jeff Law <law@redhat.com>
18632 PR rtl-optimizatin/81308
18633 * tree-switch-conversion.c (cfg_altered): New file scoped static.
18634 (process_switch): If group_case_labels makes a change, then set
18636 (pass_convert_switch::execute): If a switch is converted, then
18637 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
18639 PR rtl-optimization/81308
18640 * recog.c (split_all_insns): Conditionally cleanup the CFG after
18643 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
18645 PR target/83663 - Revert r255946
18646 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18647 generation for cases where splatting a value is not useful.
18648 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18649 across a vec_duplicate and a paradoxical subreg forming a vector
18650 mode to a vec_concat.
18652 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18654 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18655 -march=armv8.3-a variants.
18656 * config/arm/t-multilib: Likewise.
18657 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
18659 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18661 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18663 (cceq_ior_compare_complement): Give it a name so I can use it, and
18664 change boolean_or_operator predicate to boolean_operator so it can
18665 be used to generate a crand.
18666 (eqne): New code iterator.
18667 (bd/bd_neg): New code_attrs.
18668 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18669 a single define_insn.
18670 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18671 decrement (bdnzt/bdnzf/bdzt/bdzf).
18672 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18673 with the new names of the branch decrement patterns, and added the
18674 names of the branch decrement conditional patterns.
18676 2018-01-08 Richard Biener <rguenther@suse.de>
18678 PR tree-optimization/83563
18679 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18682 2018-01-08 Richard Biener <rguenther@suse.de>
18684 PR middle-end/83713
18685 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18687 2018-01-08 Richard Biener <rguenther@suse.de>
18689 PR tree-optimization/83685
18690 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18691 references to abnormals.
18693 2018-01-08 Richard Biener <rguenther@suse.de>
18696 * dwarf2out.c (output_indirect_strings): Handle empty
18697 skeleton_debug_str_hash.
18698 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18700 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18702 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18703 (emit_store_direct): Likewise.
18704 (arc_trampoline_adjust_address): Likewise.
18705 (arc_asm_trampoline_template): New function.
18706 (arc_initialize_trampoline): Use asm_trampoline_template.
18707 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18708 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18709 * config/arc/arc.md (flush_icache): Delete pattern.
18711 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18713 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18714 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18717 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18720 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18721 by not USED_FOR_TARGET.
18722 (make_pass_resolve_sw_modes): Likewise.
18724 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18726 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18729 2018-01-08 Richard Biener <rguenther@suse.de>
18731 PR middle-end/83580
18732 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18734 2018-01-08 Richard Biener <rguenther@suse.de>
18736 PR middle-end/83517
18737 * match.pd ((t * 2) / 2) -> t): Add missing :c.
18739 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
18741 PR middle-end/81897
18742 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18743 basic blocks with a small number of successors.
18744 (convert_control_dep_chain_into_preds): Improve handling of
18746 (dump_predicates): Split apart into...
18747 (dump_pred_chain): ...here...
18748 (dump_pred_info): ...and here.
18749 (can_one_predicate_be_invalidated_p): Add debugging printfs.
18750 (can_chain_union_be_invalidated_p): Improve check for invalidation
18752 (uninit_uses_cannot_happen): Avoid unnecessary if
18753 convert_control_dep_chain_into_preds yielded nothing.
18755 2018-01-06 Martin Sebor <msebor@redhat.com>
18757 PR tree-optimization/83640
18758 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18759 subtracting negative offset from size.
18760 (builtin_access::overlap): Adjust offset bounds of the access to fall
18761 within the size of the object if possible.
18763 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
18765 PR rtl-optimization/83699
18766 * expmed.c (extract_bit_field_1): Restrict the vector usage of
18767 extract_bit_field_as_subreg to cases in which the extracted
18768 value is also a vector.
18770 * lra-constraints.c (process_alt_operands): Test for the equivalence
18771 substitutions when detecting a possible reload cycle.
18773 2018-01-06 Jakub Jelinek <jakub@redhat.com>
18776 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18777 by default if flag_selective_schedling{,2}. Formatting fixes.
18779 PR rtl-optimization/83682
18780 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18781 if it has non-VECTOR_MODE element mode.
18782 (vec_duplicate_p): Likewise.
18784 PR middle-end/83694
18785 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18786 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18788 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18791 * config/i386/i386-builtin.def
18792 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18793 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18794 Require also OPTION_MASK_ISA_AVX512F in addition to
18795 OPTION_MASK_ISA_GFNI.
18796 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18797 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18798 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18799 to OPTION_MASK_ISA_GFNI.
18800 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18801 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18802 OPTION_MASK_ISA_AVX512BW.
18803 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18804 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18805 addition to OPTION_MASK_ISA_GFNI.
18806 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18807 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18808 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18809 to OPTION_MASK_ISA_GFNI.
18810 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18811 a requirement for all ISAs rather than any of them with a few
18813 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18815 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18816 bitmasks to be enabled with 3 exceptions, instead of requiring any
18817 enabled ISA with lots of exceptions.
18818 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18819 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18820 Change avx512bw in isa attribute to avx512f.
18821 * config/i386/sgxintrin.h: Add license boilerplate.
18822 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
18823 to __AVX512F__ and __AVX512VL to __AVX512VL__.
18824 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18825 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18827 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18828 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18829 temporarily sse2 rather than sse if not enabled already.
18832 * config/i386/sse.md (VI248_VLBW): Rename to ...
18833 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
18834 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18835 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18836 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18837 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18838 mode iterator instead of VI248_VLBW.
18840 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
18842 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18843 (record_modified): Skip clobbers; add debug output.
18844 (param_change_prob): Use sreal frequencies.
18846 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18848 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18849 punt for user-aligned variables.
18851 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18853 * tree-chrec.c (chrec_contains_symbols): Return true for
18856 2018-01-05 Sudakshina Das <sudi.das@arm.com>
18859 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18860 of (x|y) == x for BICS pattern.
18862 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18864 PR tree-optimization/83605
18865 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18866 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18869 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
18871 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18872 * config/epiphany/rtems.h: New file.
18874 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18875 Uros Bizjak <ubizjak@gmail.com>
18878 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18879 QIreg_operand instead of register_operand predicate.
18880 * config/i386/i386.c (ix86_rop_should_change_byte_p,
18881 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18882 comments instead of -fmitigate[-_]rop.
18884 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18887 * cgraphunit.c (symbol_table::compile): Switch to text_section
18888 before calling assembly_start debug hook.
18889 * run-rtl-passes.c (run_rtl_passes): Likewise.
18892 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18894 * tree-vrp.c (extract_range_from_binary_expr_1): Check
18895 range_int_cst_p rather than !symbolic_range_p before calling
18896 extract_range_from_multiplicative_op_1.
18898 2018-01-04 Jeff Law <law@redhat.com>
18900 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18901 redundant test in assertion.
18903 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18905 * doc/rtl.texi: Document machine_mode wrapper classes.
18907 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18909 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18910 using tree_to_uhwi.
18912 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18914 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18915 the VEC_PERM_EXPR fold to fail.
18917 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18920 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18921 to switched_sections.
18923 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18926 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18927 test for d.testing.
18929 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
18932 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18933 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18935 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18938 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18939 is BLKmode and bitpos not zero or mode change is needed.
18941 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18944 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18947 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
18950 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18951 instead of MULT rtx. Update all corresponding splitters.
18952 (*saddl_se): Ditto.
18953 (*ssub<modesuffix>): Ditto.
18954 (*ssubl_se): Ditto.
18955 (*cmp_sadd_di): Update split patterns.
18956 (*cmp_sadd_si): Ditto.
18957 (*cmp_sadd_sidi): Ditto.
18958 (*cmp_ssub_di): Ditto.
18959 (*cmp_ssub_si): Ditto.
18960 (*cmp_ssub_sidi): Ditto.
18961 * config/alpha/predicates.md (const23_operand): New predicate.
18962 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18963 Look for ASHIFT, not MULT inner operand.
18964 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18966 2018-01-04 Martin Liska <mliska@suse.cz>
18968 PR gcov-profile/83669
18969 * gcov.c (output_intermediate_file): Add version to intermediate
18971 * doc/gcov.texi: Document new field 'version' in intermediate
18972 file format. Fix location of '-k' option of gcov command.
18974 2018-01-04 Martin Liska <mliska@suse.cz>
18977 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18979 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18981 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18983 2018-01-03 Martin Sebor <msebor@redhat.com>
18985 PR tree-optimization/83655
18986 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18987 checking calls with invalid arguments.
18989 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18991 * tree-vect-stmts.c (vect_get_store_rhs): New function.
18992 (vectorizable_mask_load_store): Delete.
18993 (vectorizable_call): Return false for masked loads and stores.
18994 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
18995 instead of gimple_assign_rhs1.
18996 (vectorizable_load): Handle IFN_MASK_LOAD.
18997 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18999 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19001 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19003 (vectorizable_mask_load_store): ...here.
19004 (vectorizable_load): ...and here.
19006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19008 * tree-vect-stmts.c (vect_build_all_ones_mask)
19009 (vect_build_zero_merge_argument): New functions, split out from...
19010 (vectorizable_load): ...here.
19012 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19014 * tree-vect-stmts.c (vect_check_store_rhs): New function,
19016 (vectorizable_mask_load_store): ...here.
19017 (vectorizable_store): ...and here.
19019 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19021 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19023 (vectorizable_mask_load_store): ...here.
19025 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19027 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19028 (vect_model_store_cost): Take a vec_load_store_type instead of a
19030 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19031 (vect_model_store_cost): Take a vec_load_store_type instead of a
19033 (vectorizable_mask_load_store): Update accordingly.
19034 (vectorizable_store): Likewise.
19035 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19039 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19040 IFN_MASK_LOAD calls here rather than...
19041 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19044 Alan Hayward <alan.hayward@arm.com>
19045 David Sherwood <david.sherwood@arm.com>
19047 * expmed.c (extract_bit_field_1): For vector extracts,
19048 fall back to extract_bit_field_as_subreg if vec_extract
19051 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19052 Alan Hayward <alan.hayward@arm.com>
19053 David Sherwood <david.sherwood@arm.com>
19055 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19056 they are variable or constant sized.
19057 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19058 slots for constant-sized data.
19060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19061 Alan Hayward <alan.hayward@arm.com>
19062 David Sherwood <david.sherwood@arm.com>
19064 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19065 handling COND_EXPRs with boolean comparisons, try to find a better
19066 basis for the mask type than the boolean itself.
19068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19070 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19071 is calculated and how it can be overridden.
19072 * genmodes.c (max_bitsize_mode_any_mode): New variable.
19073 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19075 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19078 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19079 Alan Hayward <alan.hayward@arm.com>
19080 David Sherwood <david.sherwood@arm.com>
19082 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19083 Remove the mode argument.
19084 (aarch64_simd_valid_immediate): Remove the mode and inverse
19086 * config/aarch64/iterators.md (bitsize): New iterator.
19087 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19088 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19089 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19090 aarch64_simd_valid_immediate.
19091 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19092 (aarch64_reg_or_bic_imm): Likewise.
19093 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19094 with an insn_type enum and msl with a modifier_type enum.
19095 Replace element_width with a scalar_mode. Change the shift
19096 to unsigned int. Add constructors for scalar_float_mode and
19097 scalar_int_mode elements.
19098 (aarch64_vect_float_const_representable_p): Delete.
19099 (aarch64_can_const_movi_rtx_p)
19100 (aarch64_simd_scalar_immediate_valid_for_move)
19101 (aarch64_simd_make_constant): Update call to
19102 aarch64_simd_valid_immediate.
19103 (aarch64_advsimd_valid_immediate_hs): New function.
19104 (aarch64_advsimd_valid_immediate): Likewise.
19105 (aarch64_simd_valid_immediate): Remove mode and inverse
19106 arguments. Rewrite to use the above. Use const_vec_duplicate_p
19107 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19108 and aarch64_float_const_representable_p on the result.
19109 (aarch64_output_simd_mov_immediate): Remove mode argument.
19110 Update call to aarch64_simd_valid_immediate and use of
19111 simd_immediate_info.
19112 (aarch64_output_scalar_simd_mov_immediate): Update call
19115 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19116 Alan Hayward <alan.hayward@arm.com>
19117 David Sherwood <david.sherwood@arm.com>
19119 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19120 (mode_nunits): Likewise CONST_MODE_NUNITS.
19121 * machmode.def (ADJUST_NUNITS): Document.
19122 * genmodes.c (mode_data::need_nunits_adj): New field.
19123 (blank_mode): Update accordingly.
19124 (adj_nunits): New variable.
19125 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19127 (emit_mode_size_inline): Set need_bytesize_adj for all modes
19128 listed in adj_nunits.
19129 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19130 listed in adj_nunits. Don't emit case statements for such modes.
19131 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19132 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
19133 nothing if adj_nunits is nonnull.
19134 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19135 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19136 (emit_mode_fbit): Update use of print_maybe_const_decl.
19137 (emit_move_size): Likewise. Treat the array as non-const
19139 (emit_mode_adjustments): Handle adj_nunits.
19141 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19143 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19144 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19145 (VECTOR_MODES): Use it.
19146 (make_vector_modes): Take the prefix as an argument.
19148 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19149 Alan Hayward <alan.hayward@arm.com>
19150 David Sherwood <david.sherwood@arm.com>
19152 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19153 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19154 for MODE_VECTOR_BOOL.
19155 * machmode.def (VECTOR_BOOL_MODE): Document.
19156 * genmodes.c (VECTOR_BOOL_MODE): New macro.
19157 (make_vector_bool_mode): New function.
19158 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19160 * lto-streamer-in.c (lto_input_mode_table): Likewise.
19161 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19163 * stor-layout.c (int_mode_for_mode): Likewise.
19164 * tree.c (build_vector_type_for_mode): Likewise.
19165 * varasm.c (output_constant_pool_2): Likewise.
19166 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19167 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
19168 for MODE_VECTOR_BOOL.
19169 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19170 of mode class checks.
19171 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19172 instead of a list of mode class checks.
19173 (expand_vector_scalar_condition): Likewise.
19174 (type_for_widest_vector_mode): Handle BImode as an inner mode.
19176 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19177 Alan Hayward <alan.hayward@arm.com>
19178 David Sherwood <david.sherwood@arm.com>
19180 * machmode.h (mode_size): Change from unsigned short to
19182 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19183 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19184 or if measurement_type is not polynomial.
19185 (fixed_size_mode::includes_p): Check for constant-sized modes.
19186 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19187 return a poly_uint16 rather than an unsigned short.
19188 (emit_mode_size): Change the type of mode_size from unsigned short
19189 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
19190 (emit_mode_adjustments): Cope with polynomial vector sizes.
19191 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19193 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19195 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19196 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19197 * caller-save.c (setup_save_areas): Likewise.
19198 (replace_reg_with_saved_mem): Likewise.
19199 * calls.c (emit_library_call_value_1): Likewise.
19200 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19201 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19202 (gen_lowpart_for_combine): Likewise.
19203 * convert.c (convert_to_integer_1): Likewise.
19204 * cse.c (equiv_constant, cse_insn): Likewise.
19205 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19206 (cselib_subst_to_values): Likewise.
19207 * dce.c (word_dce_process_block): Likewise.
19208 * df-problems.c (df_word_lr_mark_ref): Likewise.
19209 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19210 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19211 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19212 (rtl_for_decl_location): Likewise.
19213 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19214 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19215 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19216 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19217 (expand_expr_real_1): Likewise.
19218 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19219 (pad_below): Likewise.
19220 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19221 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19222 * ira.c (get_subreg_tracking_sizes): Likewise.
19223 * ira-build.c (ira_create_allocno_objects): Likewise.
19224 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19225 (ira_sort_regnos_for_alter_reg): Likewise.
19226 * ira-costs.c (record_operand_costs): Likewise.
19227 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19228 (resolve_simple_move): Likewise.
19229 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19230 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19231 (lra_constraints): Likewise.
19232 (CONST_POOL_OK_P): Reject variable-sized modes.
19233 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19234 (add_pseudo_to_slot, lra_spill): Likewise.
19235 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19236 * optabs-query.c (get_best_extraction_insn): Likewise.
19237 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19238 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19239 (expand_mult_highpart, valid_multiword_target_p): Likewise.
19240 * recog.c (offsettable_address_addr_space_p): Likewise.
19241 * regcprop.c (maybe_mode_change): Likewise.
19242 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19243 * regrename.c (build_def_use): Likewise.
19244 * regstat.c (dump_reg_info): Likewise.
19245 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19246 (find_reloads, find_reloads_subreg_address): Likewise.
19247 * reload1.c (eliminate_regs_1): Likewise.
19248 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19249 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19250 (simplify_binary_operation_1, simplify_subreg): Likewise.
19251 * targhooks.c (default_function_arg_padding): Likewise.
19252 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19253 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19254 (verify_gimple_assign_ternary): Likewise.
19255 * tree-inline.c (estimate_move_cost): Likewise.
19256 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19257 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19258 (get_address_cost_ainc): Likewise.
19259 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19260 (vect_supportable_dr_alignment): Likewise.
19261 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19262 (vectorizable_reduction): Likewise.
19263 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19264 (vectorizable_operation, vectorizable_load): Likewise.
19265 * tree.c (build_same_sized_truth_vector_type): Likewise.
19266 * valtrack.c (cleanup_auto_inc_dec): Likewise.
19267 * var-tracking.c (emit_note_insn_var_location): Likewise.
19268 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19269 (ADDR_VEC_ALIGN): Likewise.
19271 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19272 Alan Hayward <alan.hayward@arm.com>
19273 David Sherwood <david.sherwood@arm.com>
19275 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19277 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19278 or if measurement_type is polynomial.
19279 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19280 * combine.c (make_extraction): Likewise.
19281 * dse.c (find_shift_sequence): Likewise.
19282 * dwarf2out.c (mem_loc_descriptor): Likewise.
19283 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19284 (extract_bit_field, extract_low_bits): Likewise.
19285 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19286 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19287 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19288 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19289 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19290 * reload.c (find_reloads): Likewise.
19291 * reload1.c (alter_reg): Likewise.
19292 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19293 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19294 * tree-if-conv.c (predicate_mem_writes): Likewise.
19295 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19296 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19297 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19298 * valtrack.c (dead_debug_insert_temp): Likewise.
19299 * varasm.c (mergeable_constant_section): Likewise.
19300 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19302 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19303 Alan Hayward <alan.hayward@arm.com>
19304 David Sherwood <david.sherwood@arm.com>
19306 * expr.c (expand_assignment): Cope with polynomial mode sizes
19307 when assigning to a CONCAT.
19309 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19310 Alan Hayward <alan.hayward@arm.com>
19311 David Sherwood <david.sherwood@arm.com>
19313 * machmode.h (mode_precision): Change from unsigned short to
19315 (mode_to_precision): Return a poly_uint16 rather than an unsigned
19317 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19318 or if measurement_type is not polynomial.
19319 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
19320 in which the mode is already known to be a scalar_int_mode.
19321 * genmodes.c (emit_mode_precision): Change the type of mode_precision
19322 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
19324 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19325 for GET_MODE_PRECISION.
19326 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19327 for GET_MODE_PRECISION.
19328 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19330 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19331 (expand_field_assignment, make_extraction): Likewise.
19332 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19333 (get_last_value): Likewise.
19334 * convert.c (convert_to_integer_1): Likewise.
19335 * cse.c (cse_insn): Likewise.
19336 * expr.c (expand_expr_real_1): Likewise.
19337 * lra-constraints.c (simplify_operand_subreg): Likewise.
19338 * optabs-query.c (can_atomic_load_p): Likewise.
19339 * optabs.c (expand_atomic_load): Likewise.
19340 (expand_atomic_store): Likewise.
19341 * ree.c (combine_reaching_defs): Likewise.
19342 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19343 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19344 * tree.h (type_has_mode_precision_p): Likewise.
19345 * ubsan.c (instrument_si_overflow): 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.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19352 polynomial numbers of units.
19353 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19354 (valid_vector_subparts_p): New function.
19355 (build_vector_type): Remove temporary shim and take the number
19356 of units as a poly_uint64 rather than an int.
19357 (build_opaque_vector_type): Take the number of units as a
19358 poly_uint64 rather than an int.
19359 * tree.c (build_vector_from_ctor): Handle polynomial
19360 TYPE_VECTOR_SUBPARTS.
19361 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19362 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19363 (build_vector_from_val): If the number of units is variable,
19364 use build_vec_duplicate_cst for constant operands and
19365 VEC_DUPLICATE_EXPR otherwise.
19366 (make_vector_type): Remove temporary is_constant ().
19367 (build_vector_type, build_opaque_vector_type): Take the number of
19368 units as a poly_uint64 rather than an int.
19369 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19371 * cfgexpand.c (expand_debug_expr): Likewise.
19372 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19373 (store_constructor, expand_expr_real_1): Likewise.
19374 (const_scalar_mask_from_tree): Likewise.
19375 * fold-const-call.c (fold_const_reduction): Likewise.
19376 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19377 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19378 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19379 (fold_relational_const): Likewise.
19380 (native_interpret_vector): Likewise. Change the size from an
19381 int to an unsigned int.
19382 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19383 TYPE_VECTOR_SUBPARTS.
19384 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19385 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19386 duplicating a non-constant operand into a variable-length vector.
19387 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19388 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19389 * ipa-icf.c (sem_variable::equals): Likewise.
19390 * match.pd: Likewise.
19391 * omp-simd-clone.c (simd_clone_subparts): Likewise.
19392 * print-tree.c (print_node): Likewise.
19393 * stor-layout.c (layout_type): Likewise.
19394 * targhooks.c (default_builtin_vectorization_cost): Likewise.
19395 * tree-cfg.c (verify_gimple_comparison): Likewise.
19396 (verify_gimple_assign_binary): Likewise.
19397 (verify_gimple_assign_ternary): Likewise.
19398 (verify_gimple_assign_single): Likewise.
19399 * tree-pretty-print.c (dump_generic_node): Likewise.
19400 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19401 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19402 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19403 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19404 (vect_shift_permute_load_chain): Likewise.
19405 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19406 (expand_vector_condition, optimize_vector_constructor): Likewise.
19407 (lower_vec_perm, get_compute_type): Likewise.
19408 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19409 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19410 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19411 (vect_recog_mask_conversion_pattern): Likewise.
19412 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19413 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19414 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19415 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19416 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19417 (vectorizable_shift, vectorizable_operation, vectorizable_store)
19418 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19419 (supportable_widening_operation): Likewise.
19420 (supportable_narrowing_operation): Likewise.
19421 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19423 * varasm.c (output_constant): Likewise.
19425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19426 Alan Hayward <alan.hayward@arm.com>
19427 David Sherwood <david.sherwood@arm.com>
19429 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19430 so that both the length == 3 and length != 3 cases set up their
19431 own permute vectors. Add comments explaining why we know the
19432 number of elements is constant.
19433 (vect_permute_load_chain): Likewise.
19435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19436 Alan Hayward <alan.hayward@arm.com>
19437 David Sherwood <david.sherwood@arm.com>
19439 * machmode.h (mode_nunits): Change from unsigned char to
19441 (ONLY_FIXED_SIZE_MODES): New macro.
19442 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19443 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19444 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19446 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19447 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19448 or if measurement_type is not polynomial.
19449 * genmodes.c (ZERO_COEFFS): New macro.
19450 (emit_mode_nunits_inline): Make mode_nunits_inline return a
19452 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19453 Use ZERO_COEFFS when emitting initializers.
19454 * data-streamer.h (bp_pack_poly_value): New function.
19455 (bp_unpack_poly_value): Likewise.
19456 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19457 for GET_MODE_NUNITS.
19458 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19459 for GET_MODE_NUNITS.
19460 * tree.c (make_vector_type): Remove temporary shim and make
19461 the real function take the number of units as a poly_uint64
19462 rather than an int.
19463 (build_vector_type_for_mode): Handle polynomial nunits.
19464 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19465 * emit-rtl.c (const_vec_series_p_1): Likewise.
19466 (gen_rtx_CONST_VECTOR): Likewise.
19467 * fold-const.c (test_vec_duplicate_folding): Likewise.
19468 * genrecog.c (validate_pattern): Likewise.
19469 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19470 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19471 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19472 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19473 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19474 * rtlanal.c (subreg_get_info): Likewise.
19475 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19476 (vect_grouped_load_supported): Likewise.
19477 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19478 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19479 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19480 (simplify_const_unary_operation, simplify_binary_operation_1)
19481 (simplify_const_binary_operation, simplify_ternary_operation)
19482 (test_vector_ops_duplicate, test_vector_ops): Likewise.
19483 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19484 instead of CONST_VECTOR_NUNITS.
19485 * varasm.c (output_constant_pool_2): Likewise.
19486 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19487 explicit-encoded elements in the XVEC for variable-length vectors.
19489 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19491 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19494 Alan Hayward <alan.hayward@arm.com>
19495 David Sherwood <david.sherwood@arm.com>
19497 * coretypes.h (fixed_size_mode): Declare.
19498 (fixed_size_mode_pod): New typedef.
19499 * builtins.h (target_builtins::x_apply_args_mode)
19500 (target_builtins::x_apply_result_mode): Change type to
19501 fixed_size_mode_pod.
19502 * builtins.c (apply_args_size, apply_result_size, result_vector)
19503 (expand_builtin_apply_args_1, expand_builtin_apply)
19504 (expand_builtin_return): Update accordingly.
19506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19508 * cse.c (hash_rtx_cb): Hash only the encoded elements.
19509 * cselib.c (cselib_hash_rtx): Likewise.
19510 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19511 CONST_VECTOR encoding.
19513 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19514 Jeff Law <law@redhat.com>
19517 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19518 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19519 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19520 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19523 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19524 explicitly probe *sp in a noreturn function if there were any callee
19525 register saves or frame pointer is needed.
19527 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19530 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19531 BLKmode for ternary, binary or unary expressions.
19534 * var-tracking.c (delete_vta_debug_insn): New inline function.
19535 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19536 insns from get_insns () to NULL instead of each bb separately.
19537 Use delete_vta_debug_insn. No longer static.
19538 (vt_debug_insns_local, variable_tracking_main_1): Adjust
19539 delete_vta_debug_insns callers.
19540 * rtl.h (delete_vta_debug_insns): Declare.
19541 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19542 instead of variable_tracking_main.
19544 2018-01-03 Martin Sebor <msebor@redhat.com>
19546 PR tree-optimization/83603
19547 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19548 arguments past the endof the argument list in functions declared
19549 without a prototype.
19550 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19551 Avoid checking when arguments are null.
19553 2018-01-03 Martin Sebor <msebor@redhat.com>
19556 * doc/extend.texi (attribute const): Fix a typo.
19557 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19558 issuing -Wsuggest-attribute for void functions.
19560 2018-01-03 Martin Sebor <msebor@redhat.com>
19562 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19563 offset_int::from instead of wide_int::to_shwi.
19564 (maybe_diag_overlap): Remove assertion.
19565 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19566 * gimple-ssa-sprintf.c (format_directive): Same.
19567 (parse_directive): Same.
19568 (sprintf_dom_walker::compute_format_length): Same.
19569 (try_substitute_return_value): Same.
19571 2018-01-03 Jeff Law <law@redhat.com>
19573 PR middle-end/83654
19574 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19575 non-constant residual for zero at runtime and avoid probing in
19576 that case. Reorganize code for trailing problem to mirror handling
19579 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19581 PR tree-optimization/83501
19582 * tree-ssa-strlen.c (get_string_cst): New.
19583 (handle_char_store): Call get_string_cst.
19585 2018-01-03 Martin Liska <mliska@suse.cz>
19587 PR tree-optimization/83593
19588 * tree-ssa-strlen.c: Include tree-cfg.h.
19589 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19590 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19591 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19593 (strlen_dom_walker::before_dom_children): Call
19594 gimple_purge_dead_eh_edges. Dump tranformation with details
19596 (strlen_dom_walker::before_dom_children): Update call by adding
19597 new argument cleanup_eh.
19598 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19600 2018-01-03 Martin Liska <mliska@suse.cz>
19603 * cif-code.def (VARIADIC_THUNK): New enum value.
19604 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19607 2018-01-03 Jan Beulich <jbeulich@suse.com>
19609 * sse.md (mov<mode>_internal): Tighten condition for when to use
19610 vmovdqu<ssescalarsize> for TI and OI modes.
19612 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19614 Update copyright years.
19616 2018-01-03 Martin Liska <mliska@suse.cz>
19619 * ipa-visibility.c (function_and_variable_visibility): Skip
19620 functions with noipa attribure.
19622 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19624 * gcc.c (process_command): Update copyright notice dates.
19625 * gcov-dump.c (print_version): Ditto.
19626 * gcov.c (print_version): Ditto.
19627 * gcov-tool.c (print_version): Ditto.
19628 * gengtype.c (create_file): Ditto.
19629 * doc/cpp.texi: Bump @copying's copyright year.
19630 * doc/cppinternals.texi: Ditto.
19631 * doc/gcc.texi: Ditto.
19632 * doc/gccint.texi: Ditto.
19633 * doc/gcov.texi: Ditto.
19634 * doc/install.texi: Ditto.
19635 * doc/invoke.texi: Ditto.
19637 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19639 * vector-builder.h (vector_builder::m_full_nelts): Change from
19640 unsigned int to poly_uint64.
19641 (vector_builder::full_nelts): Update prototype accordingly.
19642 (vector_builder::new_vector): Likewise.
19643 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19644 (vector_builder::operator ==): Likewise.
19645 (vector_builder::finalize): Likewise.
19646 * int-vector-builder.h (int_vector_builder::int_vector_builder):
19647 Take the number of elements as a poly_uint64 rather than an
19649 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19650 from unsigned int to poly_uint64.
19651 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19652 (vec_perm_indices::new_vector): Likewise.
19653 (vec_perm_indices::length): Likewise.
19654 (vec_perm_indices::nelts_per_input): Likewise.
19655 (vec_perm_indices::input_nelts): Likewise.
19656 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19657 number of elements per input as a poly_uint64 rather than an
19658 unsigned int. Use the original encoding for variable-length
19659 vectors, rather than clamping each individual element.
19660 For the second and subsequent elements in each pattern,
19661 clamp the step and base before clamping their sum.
19662 (vec_perm_indices::series_p): Handle polynomial element counts.
19663 (vec_perm_indices::all_in_range_p): Likewise.
19664 (vec_perm_indices_to_tree): Likewise.
19665 (vec_perm_indices_to_rtx): Likewise.
19666 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19667 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19668 (tree_vector_builder::new_binary_operation): Handle polynomial
19669 element counts. Return false if we need to know the number
19670 of elements at compile time.
19671 * fold-const.c (fold_vec_perm): Punt if the number of elements
19672 isn't known at compile time.
19674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19676 * vec-perm-indices.h (vec_perm_builder): Change element type
19677 from HOST_WIDE_INT to poly_int64.
19678 (vec_perm_indices::element_type): Update accordingly.
19679 (vec_perm_indices::clamp): Handle polynomial element_types.
19680 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19681 (vec_perm_indices::all_in_range_p): Likewise.
19682 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19684 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19685 polynomial vec_perm_indices element types.
19686 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19687 * fold-const.c (fold_vec_perm): Likewise.
19688 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19689 * tree-vect-generic.c (lower_vec_perm): Likewise.
19690 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19691 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19692 element type to HOST_WIDE_INT.
19694 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19695 Alan Hayward <alan.hayward@arm.com>
19696 David Sherwood <david.sherwood@arm.com>
19698 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19699 rather than an int. Use plus_constant.
19700 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19701 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19703 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19704 Alan Hayward <alan.hayward@arm.com>
19705 David Sherwood <david.sherwood@arm.com>
19707 * calls.c (emit_call_1, expand_call): Change struct_value_size from
19708 a HOST_WIDE_INT to a poly_int64.
19710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19711 Alan Hayward <alan.hayward@arm.com>
19712 David Sherwood <david.sherwood@arm.com>
19714 * calls.c (load_register_parameters): Cope with polynomial
19715 mode sizes. Require a constant size for BLKmode parameters
19716 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
19717 forces a parameter to be padded at the lsb end in order to
19718 fill a complete number of words, require the parameter size
19719 to be ordered wrt UNITS_PER_WORD.
19721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19722 Alan Hayward <alan.hayward@arm.com>
19723 David Sherwood <david.sherwood@arm.com>
19725 * reload1.c (spill_stack_slot_width): Change element type
19726 from unsigned int to poly_uint64_pod.
19727 (alter_reg): Treat mode sizes as polynomial.
19729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19730 Alan Hayward <alan.hayward@arm.com>
19731 David Sherwood <david.sherwood@arm.com>
19733 * reload.c (complex_word_subreg_p): New function.
19734 (reload_inner_reg_of_subreg, push_reload): Use it.
19736 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19737 Alan Hayward <alan.hayward@arm.com>
19738 David Sherwood <david.sherwood@arm.com>
19740 * lra-constraints.c (process_alt_operands): Reject matched
19741 operands whose sizes aren't ordered.
19742 (match_reload): Refer to this check here.
19744 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19745 Alan Hayward <alan.hayward@arm.com>
19746 David Sherwood <david.sherwood@arm.com>
19748 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19749 that the mode size is in the set {1, 2, 4, 8, 16}.
19751 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19752 Alan Hayward <alan.hayward@arm.com>
19753 David Sherwood <david.sherwood@arm.com>
19755 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19756 Use plus_constant instead of gen_rtx_PLUS.
19758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19759 Alan Hayward <alan.hayward@arm.com>
19760 David Sherwood <david.sherwood@arm.com>
19762 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19763 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19764 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19765 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19766 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19767 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19768 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19769 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19770 * config/i386/i386.c (ix86_push_rounding): ...this new function.
19771 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19773 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19774 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19775 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19776 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19777 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19778 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19779 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19780 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19781 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19782 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19784 * expr.c (emit_move_resolve_push): Treat the input and result
19785 of PUSH_ROUNDING as a poly_int64.
19786 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19787 (emit_push_insn): Likewise.
19788 * lra-eliminations.c (mark_not_eliminable): Likewise.
19789 * recog.c (push_operand): Likewise.
19790 * reload1.c (elimination_effects): Likewise.
19791 * rtlanal.c (nonzero_bits1): Likewise.
19792 * calls.c (store_one_arg): Likewise. Require the padding to be
19793 known at compile time.
19795 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19796 Alan Hayward <alan.hayward@arm.com>
19797 David Sherwood <david.sherwood@arm.com>
19799 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19800 Use plus_constant instead of gen_rtx_PLUS.
19802 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19803 Alan Hayward <alan.hayward@arm.com>
19804 David Sherwood <david.sherwood@arm.com>
19806 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19807 rather than an int.
19809 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19810 Alan Hayward <alan.hayward@arm.com>
19811 David Sherwood <david.sherwood@arm.com>
19813 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19814 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19815 via stack temporaries. Treat the mode size as polynomial too.
19817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19818 Alan Hayward <alan.hayward@arm.com>
19819 David Sherwood <david.sherwood@arm.com>
19821 * expr.c (expand_expr_real_2): When handling conversions involving
19822 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19823 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
19824 as a poly_uint64 too.
19826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19827 Alan Hayward <alan.hayward@arm.com>
19828 David Sherwood <david.sherwood@arm.com>
19830 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19833 Alan Hayward <alan.hayward@arm.com>
19834 David Sherwood <david.sherwood@arm.com>
19836 * combine.c (can_change_dest_mode): Handle polynomial
19837 REGMODE_NATURAL_SIZE.
19838 * expmed.c (store_bit_field_1): Likewise.
19839 * expr.c (store_constructor): Likewise.
19840 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19841 and polynomial REGMODE_NATURAL_SIZE.
19842 (gen_lowpart_common): Likewise.
19843 * reginfo.c (record_subregs_of_mode): Likewise.
19844 * rtlanal.c (read_modify_subreg_p): Likewise.
19846 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19847 Alan Hayward <alan.hayward@arm.com>
19848 David Sherwood <david.sherwood@arm.com>
19850 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19851 numbers of elements.
19853 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19854 Alan Hayward <alan.hayward@arm.com>
19855 David Sherwood <david.sherwood@arm.com>
19857 * match.pd: Cope with polynomial numbers of vector elements.
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 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19864 in a POINTER_PLUS_EXPR.
19866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19867 Alan Hayward <alan.hayward@arm.com>
19868 David Sherwood <david.sherwood@arm.com>
19870 * omp-simd-clone.c (simd_clone_subparts): New function.
19871 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19872 (ipa_simd_modify_function_body): Likewise.
19874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19875 Alan Hayward <alan.hayward@arm.com>
19876 David Sherwood <david.sherwood@arm.com>
19878 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19879 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19880 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19881 (expand_vector_condition, vector_element): Likewise.
19882 (subparts_gt): New function.
19883 (get_compute_type): Use subparts_gt.
19884 (count_type_subparts): Delete.
19885 (expand_vector_operations_1): Use subparts_gt instead of
19886 count_type_subparts.
19888 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19889 Alan Hayward <alan.hayward@arm.com>
19890 David Sherwood <david.sherwood@arm.com>
19892 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19893 (vect_compile_time_alias): ...this new function. Do the calculation
19894 on poly_ints rather than trees.
19895 (vect_prune_runtime_alias_test_list): Update call accordingly.
19897 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19898 Alan Hayward <alan.hayward@arm.com>
19899 David Sherwood <david.sherwood@arm.com>
19901 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19903 (vect_schedule_slp_instance): Likewise.
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-slp.c (vect_get_and_check_slp_defs): Reject
19910 constant and extern definitions for variable-length vectors.
19911 (vect_get_constant_vectors): Note that the number of units
19912 is known to be constant.
19914 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19915 Alan Hayward <alan.hayward@arm.com>
19916 David Sherwood <david.sherwood@arm.com>
19918 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19919 of units as polynomial. Choose between WIDE and NARROW based
19922 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19923 Alan Hayward <alan.hayward@arm.com>
19924 David Sherwood <david.sherwood@arm.com>
19926 * tree-vect-stmts.c (simd_clone_subparts): New function.
19927 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19930 Alan Hayward <alan.hayward@arm.com>
19931 David Sherwood <david.sherwood@arm.com>
19933 * tree-vect-stmts.c (vectorizable_call): Treat the number of
19934 vectors as polynomial. Use build_index_vector for
19935 IFN_GOMP_SIMD_LANE.
19937 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19938 Alan Hayward <alan.hayward@arm.com>
19939 David Sherwood <david.sherwood@arm.com>
19941 * tree-vect-stmts.c (get_load_store_type): Treat the number of
19942 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19943 for variable-length vectors.
19944 (vectorizable_mask_load_store): Treat the number of units as
19945 polynomial, asserting that it is constant if the condition has
19946 already been enforced.
19947 (vectorizable_store, vectorizable_load): Likewise.
19949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19950 Alan Hayward <alan.hayward@arm.com>
19951 David Sherwood <david.sherwood@arm.com>
19953 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19954 of units as polynomial. Punt if we can't tell at compile time
19955 which vector contains the final result.
19957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19958 Alan Hayward <alan.hayward@arm.com>
19959 David Sherwood <david.sherwood@arm.com>
19961 * tree-vect-loop.c (vectorizable_induction): Treat the number
19962 of units as polynomial. Punt on SLP inductions. Use an integer
19963 VEC_SERIES_EXPR for variable-length integer reductions. Use a
19964 cast of such a series for variable-length floating-point
19967 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19968 Alan Hayward <alan.hayward@arm.com>
19969 David Sherwood <david.sherwood@arm.com>
19971 * tree.h (build_index_vector): Declare.
19972 * tree.c (build_index_vector): New function.
19973 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19974 of units as polynomial, forcibly converting it to a constant if
19975 vectorizable_reduction has already enforced the condition.
19976 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
19977 to create a {1,2,3,...} vector.
19978 (vectorizable_reduction): Treat the number of units as polynomial.
19979 Choose vectype_in based on the largest scalar element size rather
19980 than the smallest number of units. Enforce the restrictions
19983 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19984 Alan Hayward <alan.hayward@arm.com>
19985 David Sherwood <david.sherwood@arm.com>
19987 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19988 number of units as polynomial.
19990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19991 Alan Hayward <alan.hayward@arm.com>
19992 David Sherwood <david.sherwood@arm.com>
19994 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19995 * target.def (autovectorize_vector_sizes): Return the vector sizes
19996 by pointer, using vector_sizes rather than a bitmask.
19997 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19998 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19999 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20001 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20002 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20003 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20004 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20005 * omp-general.c (omp_max_vf): Likewise.
20006 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20007 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20008 * tree-vect-loop.c (vect_analyze_loop): Likewise.
20009 * tree-vect-slp.c (vect_slp_bb): Likewise.
20010 * doc/tm.texi: Regenerate.
20011 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20013 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20014 the vector size as a poly_uint64 rather than an unsigned int.
20015 (current_vector_size): Change from an unsigned int to a poly_uint64.
20016 (get_vectype_for_scalar_type): Update accordingly.
20017 * tree.h (build_truth_vector_type): Take the size and number of
20018 units as a poly_uint64 rather than an unsigned int.
20019 (build_vector_type): Add a temporary overload that takes
20020 the number of units as a poly_uint64 rather than an unsigned int.
20021 * tree.c (make_vector_type): Likewise.
20022 (build_truth_vector_type): Take the number of units as a poly_uint64
20023 rather than an unsigned int.
20025 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20026 Alan Hayward <alan.hayward@arm.com>
20027 David Sherwood <david.sherwood@arm.com>
20029 * target.def (get_mask_mode): Take the number of units and length
20030 as poly_uint64s rather than unsigned ints.
20031 * targhooks.h (default_get_mask_mode): Update accordingly.
20032 * targhooks.c (default_get_mask_mode): Likewise.
20033 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20034 * doc/tm.texi: Regenerate.
20036 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20037 Alan Hayward <alan.hayward@arm.com>
20038 David Sherwood <david.sherwood@arm.com>
20040 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20041 * omp-general.c (omp_max_vf): Likewise.
20042 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20043 (expand_omp_simd): Handle polynomial safelen.
20044 * omp-low.c (omplow_simd_context): Add a default constructor.
20045 (omplow_simd_context::max_vf): Change from int to poly_uint64.
20046 (lower_rec_simd_input_clauses): Update accordingly.
20047 (lower_rec_input_clauses): Likewise.
20049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20050 Alan Hayward <alan.hayward@arm.com>
20051 David Sherwood <david.sherwood@arm.com>
20053 * tree-vectorizer.h (vect_nunits_for_cost): New function.
20054 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20055 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20056 (vect_analyze_slp_cost): Likewise.
20057 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20058 (vect_model_load_cost): Likewise.
20060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20061 Alan Hayward <alan.hayward@arm.com>
20062 David Sherwood <david.sherwood@arm.com>
20064 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20065 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20066 from an unsigned int * to a poly_uint64_pod *.
20067 (calculate_unrolling_factor): New function.
20068 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
20070 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20071 Alan Hayward <alan.hayward@arm.com>
20072 David Sherwood <david.sherwood@arm.com>
20074 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20075 from an unsigned int to a poly_uint64.
20076 (_loop_vec_info::slp_unrolling_factor): Likewise.
20077 (_loop_vec_info::vectorization_factor): Change from an int
20079 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20080 (vect_get_num_vectors): New function.
20081 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20082 (vect_get_num_copies): Use vect_get_num_vectors.
20083 (vect_analyze_data_ref_dependences): Change max_vf from an int *
20084 to an unsigned int *.
20085 (vect_analyze_data_refs): Change min_vf from an int * to a
20087 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20088 than an unsigned HOST_WIDE_INT.
20089 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20090 (vect_analyze_data_ref_dependence): Change max_vf from an int *
20091 to an unsigned int *.
20092 (vect_analyze_data_ref_dependences): Likewise.
20093 (vect_compute_data_ref_alignment): Handle polynomial vf.
20094 (vect_enhance_data_refs_alignment): Likewise.
20095 (vect_prune_runtime_alias_test_list): Likewise.
20096 (vect_shift_permute_load_chain): Likewise.
20097 (vect_supportable_dr_alignment): Likewise.
20098 (dependence_distance_ge_vf): Take the vectorization factor as a
20099 poly_uint64 rather than an unsigned HOST_WIDE_INT.
20100 (vect_analyze_data_refs): Change min_vf from an int * to a
20102 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20103 vfm1 as a poly_uint64 rather than an int. Make the same change
20104 for the returned bound_scalar.
20105 (vect_gen_vector_loop_niters): Handle polynomial vf.
20106 (vect_do_peeling): Likewise. Update call to
20107 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20108 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20110 * tree-vect-loop.c (vect_determine_vectorization_factor)
20111 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20112 (vect_get_known_peeling_cost): Likewise.
20113 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20114 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20115 (vect_transform_loop): Likewise. Use the lowest possible VF when
20116 updating the upper bounds of the loop.
20117 (vect_min_worthwhile_factor): Make static. Return an unsigned int
20118 rather than an int.
20119 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20120 polynomial unroll factors.
20121 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20122 (vect_make_slp_decision): Likewise.
20123 (vect_supported_load_permutation_p): Likewise, and polynomial
20125 (vect_analyze_slp_cost): Handle polynomial vf.
20126 (vect_slp_analyze_node_operations): Likewise.
20127 (vect_slp_analyze_bb_1): Likewise.
20128 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20129 than an unsigned HOST_WIDE_INT.
20130 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20131 (vectorizable_load): Handle polynomial vf.
20132 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20134 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20136 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20137 Alan Hayward <alan.hayward@arm.com>
20138 David Sherwood <david.sherwood@arm.com>
20140 * match.pd: Handle bit operations involving three constants
20141 and try to fold one pair.
20143 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20145 * tree-vect-loop-manip.c: Include gimple-fold.h.
20146 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20147 niters_maybe_zero parameters. Handle other cases besides a step of 1.
20148 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20149 Add a path that uses a step of VF instead of 1, but disable it
20151 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20152 and niters_no_overflow parameters. Update calls to
20153 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20154 Create a new SSA name if the latter choses to use a ste other
20155 than zero, and return it via niters_vector_mult_vf_var.
20156 * tree-vect-loop.c (vect_transform_loop): Update calls to
20157 vect_do_peeling, vect_gen_vector_loop_niters and
20158 slpeel_make_loop_iterate_ntimes.
20159 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20160 (vect_gen_vector_loop_niters): Update declarations after above changes.
20162 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
20164 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20165 128-bit round to integer instructions.
20166 (ceil<mode>2): Likewise.
20167 (btrunc<mode>2): Likewise.
20168 (round<mode>2): Likewise.
20170 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20172 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20173 unaligned VSX load/store on P8/P9.
20174 (expand_block_clear): Allow the use of unaligned VSX
20175 load/store on P8/P9.
20177 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20179 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20181 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20182 swap associated with both a load and a store.
20184 2018-01-02 Andrew Waterman <andrew@sifive.com>
20186 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20187 * config/riscv/riscv.md (clear_cache): Use it.
20189 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
20191 * web.c: Remove out-of-date comment.
20193 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20195 * expr.c (fixup_args_size_notes): Check that any existing
20196 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20197 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20198 (emit_single_push_insn): ...here.
20200 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20202 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20203 (const_vector_encoded_nelts): New function.
20204 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20205 (const_vector_int_elt, const_vector_elt): Declare.
20206 * emit-rtl.c (const_vector_int_elt_1): New function.
20207 (const_vector_elt): Likewise.
20208 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20209 of CONST_VECTOR_ELT.
20211 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20213 * expr.c: Include rtx-vector-builder.h.
20214 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20215 directly on the tree encoding.
20216 (const_vector_from_tree): Likewise.
20217 * optabs.c: Include rtx-vector-builder.h.
20218 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20219 sequence of "u" values.
20220 * vec-perm-indices.c: Include rtx-vector-builder.h.
20221 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20222 directly on the vec_perm_indices encoding.
20224 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20226 * doc/rtl.texi (const_vector): Describe new encoding scheme.
20227 * Makefile.in (OBJS): Add rtx-vector-builder.o.
20228 * rtx-vector-builder.h: New file.
20229 * rtx-vector-builder.c: Likewise.
20230 * rtl.h (rtx_def::u2): Add a const_vector field.
20231 (CONST_VECTOR_NPATTERNS): New macro.
20232 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20233 (CONST_VECTOR_DUPLICATE_P): Likewise.
20234 (CONST_VECTOR_STEPPED_P): Likewise.
20235 (CONST_VECTOR_ENCODED_ELT): Likewise.
20236 (const_vec_duplicate_p): Check for a duplicated vector encoding.
20237 (unwrap_const_vec_duplicate): Likewise.
20238 (const_vec_series_p): Check for a non-duplicated vector encoding.
20239 Say that the function only returns true for integer vectors.
20240 * emit-rtl.c: Include rtx-vector-builder.h.
20241 (gen_const_vec_duplicate_1): Delete.
20242 (gen_const_vector): Call gen_const_vec_duplicate instead of
20243 gen_const_vec_duplicate_1.
20244 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20245 (gen_const_vec_duplicate): Use rtx_vector_builder.
20246 (gen_const_vec_series): Likewise.
20247 (gen_rtx_CONST_VECTOR): Likewise.
20248 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20249 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20250 Build a new vector rather than modifying a CONST_VECTOR in-place.
20251 (handle_special_swappables): Update call accordingly.
20252 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20253 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20254 Build a new vector rather than modifying a CONST_VECTOR in-place.
20255 (handle_special_swappables): Update call accordingly.
20257 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20259 * simplify-rtx.c (simplify_const_binary_operation): Use
20260 CONST_VECTOR_ELT instead of XVECEXP.
20262 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20264 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20265 the selector elements to be different from the data elements
20266 if the selector is a VECTOR_CST.
20267 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20268 ssizetype for the selector.
20270 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20272 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20273 before testing each element individually.
20274 * tree-vect-generic.c (lower_vec_perm): Likewise.
20276 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20278 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20279 * selftest-run-tests.c (selftest::run_tests): Call it.
20280 * vector-builder.h (vector_builder::operator ==): New function.
20281 (vector_builder::operator !=): Likewise.
20282 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20283 (vec_perm_indices::all_from_input_p): New function.
20284 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20285 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20286 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20287 instead of reading the VECTOR_CST directly. Detect whether both
20288 vector inputs are the same before constructing the vec_perm_indices,
20289 and update the number of inputs argument accordingly. Use the
20290 utility functions added above. Only construct sel2 if we need to.
20292 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20294 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20295 the broadcast of the low byte.
20296 (expand_mult_highpart): Use an explicit encoding for the permutes.
20297 * optabs-query.c (can_mult_highpart_p): Likewise.
20298 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20299 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20300 (vectorizable_bswap): Likewise.
20301 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20302 explicit encoding for the power-of-2 permutes.
20303 (vect_permute_store_chain): Likewise.
20304 (vect_grouped_load_supported): Likewise.
20305 (vect_permute_load_chain): Likewise.
20307 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20309 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20310 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20311 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20312 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20313 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20314 (vect_gen_perm_mask_any): Likewise.
20316 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20318 * int-vector-builder.h: New file.
20319 * vec-perm-indices.h: Include int-vector-builder.h.
20320 (vec_perm_indices): Redefine as an int_vector_builder.
20321 (auto_vec_perm_indices): Delete.
20322 (vec_perm_builder): Redefine as a stand-alone class.
20323 (vec_perm_indices::vec_perm_indices): New function.
20324 (vec_perm_indices::clamp): Likewise.
20325 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20326 (vec_perm_indices::new_vector): New function.
20327 (vec_perm_indices::new_expanded_vector): Update for new
20328 vec_perm_indices class.
20329 (vec_perm_indices::rotate_inputs): New function.
20330 (vec_perm_indices::all_in_range_p): Operate directly on the
20331 encoded form, without computing elided elements.
20332 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20333 encoding. Update for new vec_perm_indices class.
20334 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20335 the given vec_perm_builder.
20336 (expand_vec_perm_var): Update vec_perm_builder constructor.
20337 (expand_mult_highpart): Use vec_perm_builder instead of
20338 auto_vec_perm_indices.
20339 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20340 vec_perm_indices instead of auto_vec_perm_indices. Use a single
20341 or double series encoding as appropriate.
20342 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20343 vec_perm_indices instead of auto_vec_perm_indices.
20344 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20345 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20346 (vect_permute_store_chain): Likewise.
20347 (vect_grouped_load_supported): Likewise.
20348 (vect_permute_load_chain): Likewise.
20349 (vect_shift_permute_load_chain): Likewise.
20350 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20351 (vect_transform_slp_perm_load): Likewise.
20352 (vect_schedule_slp_instance): Likewise.
20353 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20354 (vectorizable_mask_load_store): Likewise.
20355 (vectorizable_bswap): Likewise.
20356 (vectorizable_store): Likewise.
20357 (vectorizable_load): Likewise.
20358 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20359 vec_perm_indices instead of auto_vec_perm_indices. Use
20360 tree_to_vec_perm_builder to read the vector from a tree.
20361 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20362 vec_perm_builder instead of a vec_perm_indices.
20363 (have_whole_vector_shift): Use vec_perm_builder and
20364 vec_perm_indices instead of auto_vec_perm_indices. Leave the
20365 truncation to calc_vec_perm_mask_for_shift.
20366 (vect_create_epilog_for_reduction): Likewise.
20367 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20368 from auto_vec_perm_indices to vec_perm_indices.
20369 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20370 instead of changing individual elements.
20371 (aarch64_vectorize_vec_perm_const): Use new_vector to install
20372 the vector in d.perm.
20373 * config/arm/arm.c (expand_vec_perm_d::perm): Change
20374 from auto_vec_perm_indices to vec_perm_indices.
20375 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20376 instead of changing individual elements.
20377 (arm_vectorize_vec_perm_const): Use new_vector to install
20378 the vector in d.perm.
20379 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20380 Update vec_perm_builder constructor.
20381 (rs6000_expand_interleave): Likewise.
20382 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20383 (rs6000_expand_interleave): Likewise.
20385 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20387 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20388 to qimode could truncate the indices.
20389 * optabs.c (expand_vec_perm_var): Likewise.
20391 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20393 * Makefile.in (OBJS): Add vec-perm-indices.o.
20394 * vec-perm-indices.h: New file.
20395 * vec-perm-indices.c: Likewise.
20396 * target.h (vec_perm_indices): Replace with a forward class
20398 (auto_vec_perm_indices): Move to vec-perm-indices.h.
20399 * optabs.h: Include vec-perm-indices.h.
20400 (expand_vec_perm): Delete.
20401 (selector_fits_mode_p, expand_vec_perm_var): Declare.
20402 (expand_vec_perm_const): Declare.
20403 * target.def (vec_perm_const_ok): Replace with...
20404 (vec_perm_const): ...this new hook.
20405 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20406 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20407 * doc/tm.texi: Regenerate.
20408 * optabs.def (vec_perm_const): Delete.
20409 * doc/md.texi (vec_perm_const): Likewise.
20410 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20411 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20412 expand_vec_perm for constant permutation vectors. Assert that
20413 the mode of variable permutation vectors is the integer equivalent
20414 of the mode that is being permuted.
20415 * optabs-query.h (selector_fits_mode_p): Declare.
20416 * optabs-query.c: Include vec-perm-indices.h.
20417 (selector_fits_mode_p): New function.
20418 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20419 is defined, instead of checking whether the vec_perm_const_optab
20420 exists. Use targetm.vectorize.vec_perm_const instead of
20421 targetm.vectorize.vec_perm_const_ok. Check whether the indices
20422 fit in the vector mode before using a variable permute.
20423 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20424 vec_perm_indices instead of an rtx.
20425 (expand_vec_perm): Replace with...
20426 (expand_vec_perm_const): ...this new function. Take the selector
20427 as a vec_perm_indices rather than an rtx. Also take the mode of
20428 the selector. Update call to shift_amt_for_vec_perm_mask.
20429 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20430 Use vec_perm_indices::new_expanded_vector to expand the original
20431 selector into bytes. Check whether the indices fit in the vector
20432 mode before using a variable permute.
20433 (expand_vec_perm_var): Make global.
20434 (expand_mult_highpart): Use expand_vec_perm_const.
20435 * fold-const.c: Includes vec-perm-indices.h.
20436 * tree-ssa-forwprop.c: Likewise.
20437 * tree-vect-data-refs.c: Likewise.
20438 * tree-vect-generic.c: Likewise.
20439 * tree-vect-loop.c: Likewise.
20440 * tree-vect-slp.c: Likewise.
20441 * tree-vect-stmts.c: Likewise.
20442 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20444 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20445 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20446 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20447 (aarch64_vectorize_vec_perm_const): ...this new function.
20448 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20449 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20450 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20451 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20452 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20453 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20454 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20456 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
20457 check for NEON modes.
20458 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20459 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20460 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20461 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20463 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
20464 the old VEC_PERM_CONST conditions.
20465 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20466 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20467 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20468 (ia64_vectorize_vec_perm_const_ok): Merge into...
20469 (ia64_vectorize_vec_perm_const): ...this new function.
20470 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20471 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20472 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20473 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20474 * config/mips/mips.c (mips_expand_vec_perm_const)
20475 (mips_vectorize_vec_perm_const_ok): Merge into...
20476 (mips_vectorize_vec_perm_const): ...this new function.
20477 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20478 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20479 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20480 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20481 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20482 (rs6000_expand_vec_perm_const): Delete.
20483 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20485 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20486 (altivec_expand_vec_perm_const_le): Take each operand individually.
20487 Operate on constant selectors rather than rtxes.
20488 (altivec_expand_vec_perm_const): Likewise. Update call to
20489 altivec_expand_vec_perm_const_le.
20490 (rs6000_expand_vec_perm_const): Delete.
20491 (rs6000_vectorize_vec_perm_const_ok): Delete.
20492 (rs6000_vectorize_vec_perm_const): New function.
20493 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20494 an element count and rtx array.
20495 (rs6000_expand_extract_even): Update call accordingly.
20496 (rs6000_expand_interleave): Likewise.
20497 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20498 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20499 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20500 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20501 (rs6000_expand_vec_perm_const): Delete.
20502 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20503 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20504 (altivec_expand_vec_perm_const_le): Take each operand individually.
20505 Operate on constant selectors rather than rtxes.
20506 (altivec_expand_vec_perm_const): Likewise. Update call to
20507 altivec_expand_vec_perm_const_le.
20508 (rs6000_expand_vec_perm_const): Delete.
20509 (rs6000_vectorize_vec_perm_const_ok): Delete.
20510 (rs6000_vectorize_vec_perm_const): New function. Remove stray
20511 reference to the SPE evmerge intructions.
20512 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20513 an element count and rtx array.
20514 (rs6000_expand_extract_even): Update call accordingly.
20515 (rs6000_expand_interleave): Likewise.
20516 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20517 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20519 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20521 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20523 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20524 vector mode and that that mode matches the mode of the data
20526 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20527 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
20528 directly using expand_vec_perm_1 when forcing selectors into
20530 (expand_vec_perm_var): New function, split out from expand_vec_perm.
20532 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20534 * optabs-query.h (can_vec_perm_p): Delete.
20535 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20536 * optabs-query.c (can_vec_perm_p): Split into...
20537 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20538 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20539 particular selector is valid.
20540 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20541 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20542 (vect_grouped_load_supported): Likewise.
20543 (vect_shift_permute_load_chain): Likewise.
20544 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20545 (vect_transform_slp_perm_load): Likewise.
20546 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20547 (vectorizable_bswap): Likewise.
20548 (vect_gen_perm_mask_checked): Likewise.
20549 * fold-const.c (fold_ternary_loc): Likewise. Don't take
20550 implementations of variable permutation vectors into account
20551 when deciding which selector to use.
20552 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20553 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20554 with a false third argument.
20555 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20556 to test whether the constant selector is valid and can_vec_perm_var_p
20557 to test whether a variable selector is valid.
20559 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20561 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20562 * optabs-query.c (can_vec_perm_p): Likewise.
20563 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20564 instead of vec_perm_indices.
20565 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20566 (vect_gen_perm_mask_checked): Likewise,
20567 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20568 (vect_gen_perm_mask_checked): Likewise,
20570 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20572 * optabs-query.h (qimode_for_vec_perm): Declare.
20573 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20574 (qimode_for_vec_perm): ...this new function.
20575 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20577 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20579 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20580 does not have a conditional at the top.
20582 2018-01-02 Richard Biener <rguenther@suse.de>
20584 * ipa-inline.c (big_speedup_p): Fix expression.
20586 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20589 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20592 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20596 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20597 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20598 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20599 cond_taken_branch_cost 3->4.
20601 2018-01-01 Jakub Jelinek <jakub@redhat.com>
20603 PR tree-optimization/83581
20604 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20605 TODO_cleanup_cfg if any changes have been made.
20607 PR middle-end/83608
20608 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20609 convert_modes if target mode has the right side, but different mode
20612 PR middle-end/83609
20613 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20614 last argument when extracting from CONCAT. If either from_real or
20615 from_imag is NULL, use expansion through memory. If result is not
20616 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20617 the parts directly to inner mode, if even that fails, use expansion
20620 PR middle-end/83623
20621 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20622 check for bswap in mode rather than HImode and use that in expand_unop
20625 Copyright (C) 2018 Free Software Foundation, Inc.
20627 Copying and distribution of this file, with or without modification,
20628 are permitted in any medium without royalty provided the copyright
20629 notice and this notice are preserved.