1 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3 PR tree-optimization/86636
4 * json.cc (json::object::set): Fix comment. Add assertions.
5 (json::array::append): Move here from json.h. Add comment and an
7 (json::string::string): Likewise.
8 * json.h (json::array::append): Move to json.cc.
9 (json::string::string): Likewise.
10 * optinfo-emit-json.cc
11 (optrecord_json_writer::impl_location_to_json): Assert that we
12 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
13 wrapper around it. Expand the location once, rather than three
15 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
16 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
18 (optrecord_json_writer::optinfo_to_json): Likewise, in four
19 places. Fix some overlong lines.
21 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
23 * config/aarch64/aarch64-simd.md
24 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
25 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
26 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
27 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
28 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
29 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
30 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
31 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
32 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
34 2018-07-24 Jakub Jelinek <jakub@redhat.com>
37 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
38 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
39 and abs_d == d, do the power of two handling if profitable.
41 2018-07-24 Richard Biener <rguenther@suse.de>
43 * match.pd: Add BIT_FIELD_REF canonicalizations.
45 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
48 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
50 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
52 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
53 terminated STRING_CST object.
55 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
57 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
59 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
61 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
62 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
63 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
64 the elements into a register.
65 (rs6000_split_v4si_init_di_reg): Delete.
66 (rs6000_split_v4si_init): Delete.
67 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
68 (vsx_init_v4si): Rewrite as a define_expand.
70 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
72 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
73 zero_extend argument from memory): New.
75 2018-07-22 Martin Sebor <msebor@redhat.com>
78 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
79 diagnosing calls with unknown arguments unless -Walloca-larger-than
80 is restricted to less than PTRDIFF_MAX bytes.
82 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
84 * doc/gcov.texi (Invoking Gcov): Editorial changes.
86 2018-07-20 David Malcolm <dmalcolm@redhat.com>
88 * pretty-print.c (text_info::set_location): Remove redundant
89 "line_table" parameter from call to rich_location::set_range.
91 2018-07-20 Martin Sebor <msebor@redhat.com>
94 * builtins.c (expand_builtin_alloca): Adjust.
95 * calls.c (alloc_max_size): Simplify.
96 * cgraphunit.c (cgraph_node::expand): Adjust.
97 * common.opt (larger_than_size, warn_frame_larger_than): Remove
99 (frame_larger_than_size): Same.
100 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
101 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
103 * doc/invoke.texi (GCC Command Options): Document option arguments.
104 Explain byte-size arguments and suffixes.
105 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
106 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
107 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
108 * doc/options.texi (UInteger): Expand.
109 (Host_Wide_Int, ByteSize): Document new properties.
110 * final.c (final_start_function_1): Include sizes in an error message.
111 * function.c (frame_offset_overflow): Same.
112 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
113 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
114 Diagnose unbounded alloca calls only for limits of less than
116 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
117 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
119 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
120 only for limits of less than PTRDIFF_MAX.
121 * langhooks-def.h (lhd_handle_option): Change function argument
123 * langhooks.c (lhd_handle_option): Same.
124 * langhooks.h (handle_option): Same.
125 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
127 (var_type, var_type_struct): Same.
128 (var_set): Handle ByteSize flag.
129 * optc-gen.awk: Add comments to output to ease debugging. Make
130 use of HOST_WIDE_INT where appropriate.
131 * opts-gen-save.awk: Use %lx to format unsigned long.
132 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
133 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
134 arguments. Parse bytes-size suffixes.
135 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
136 (enum_value_to_arg): Same.
137 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
138 (handle_option): Adjust.
139 (generate_option): Change function argument to HOST_WIDE_INT.
140 (cmdline_handle_error): Adjust.
141 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
142 (set_option): Change function argument to HOST_WIDE_INT.
143 (option_enabled): Handle cl_host_wide_int.
144 (get_option_state): Handle CLVC_SIZE.
145 (control_warning_option): Same.
146 * opts.c (common_handle_option): Change function argument to
147 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
148 OPT_Wvla_larger_than_.
149 * opts.h (enum cl_var_type): Add an enumerator.
150 * stor-layout.c (layout_decl): Print a more meaningful warning.
151 * toplev.c (output_stack_usage): Adjust.
153 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
155 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
156 call to inline_expand_builtin_string_cmp.
157 (expand_builtin_strcmp): Likewise.
158 (expand_builtin_strncmp): Likewise.
159 (inline_string_cmp): Delete the last parameter, change char_type_node
160 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
162 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
163 the inlining expansion on target where the type of the call has same or
164 narrower precision than unsigned char.
166 2018-07-20 David Malcolm <dmalcolm@redhat.com>
168 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
169 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
170 * common.opt (fsave-optimization-record): New option.
171 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
172 * doc/invoke.texi (-fsave-optimization-record): New option.
173 * dumpfile.c: Include "optinfo-emit-json.h".
174 (struct kv_pair): Move to coretypes.h.
175 (optgroup_options): Make non-static.
176 (dump_context::end_scope): Call
177 optimization_records_maybe_pop_dump_scope.
178 * dumpfile.h (optgroup_options): New decl.
181 * optinfo-emit-json.cc: New file.
182 * optinfo-emit-json.h: New file.
183 * optinfo.cc: Include "optinfo-emit-json.h".
184 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
185 (optinfo_enabled_p): Check optimization_records_enabled_p.
186 (optinfo_wants_inlining_info_p): Likewise.
187 * optinfo.h: Update comment.
188 * profile-count.c (profile_quality_as_string): New function.
189 * profile-count.h (profile_quality_as_string): New decl.
190 (profile_count::quality): New accessor.
191 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
192 and optinfo_emit_json_cc_tests.
193 * selftest.h (selftest::json_cc_tests): New decl.
194 (selftest::optinfo_emit_json_cc_tests): New decl.
195 * toplev.c: Include "optinfo-emit-json.h".
196 (compile_file): Call optimization_records_finish.
197 (do_compile): Call optimization_records_start.
198 * tree-ssa-live.c: Include optinfo.h.
199 (remove_unused_scope_block_p): Retain inlining information if
200 optinfo_wants_inlining_info_p returns true.
202 2018-07-20 Richard Biener <rguenther@suse.de>
205 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
206 to cover -flto-partition=none.
208 2018-07-20 Martin Liska <mliska@suse.cz>
210 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
211 (get_decl_source_range): Remove unused function.
213 2018-07-20 Richard Biener <rguenther@suse.de>
215 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
216 (struct vn_phi_s): Likewise.
217 (struct vn_reference_s): Likewise.
218 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
219 for searching the slot of an entry known to be in the hash itself.
220 (vn_phi_hasher::equal): Likewise.
221 (vn_reference_hasher::equal): Likewise.
222 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
224 (optimistic_info, current_info): Remove, keeping only valid_info.
225 (vn_reference_lookup_1): Remove fallback lookup.
226 (vn_reference_lookup_2): Likewise.
227 (vn_nary_op_lookup_1): Likewise.
228 (vn_phi_lookup): Likewise.
229 (vn_nary_build_or_lookup_1): Make sure to not chain the built
231 (vn_reference_insert): Adjust, chain the inserted hash element
232 at last_inserted_ref.
233 (vn_reference_insert_pieces): Likewise.
234 (visit_reference_op_call): Likewise.
235 (vn_nary_op_insert_into): Chain the inserted hash element at
237 (vn_nary_op_insert_pieces): Adjust.
238 (vn_nary_op_insert): Likewise.
239 (vn_nary_op_insert_stmt): Likewise.
240 (vn_phi_insert): Adjust, chain the inserted hash element at
242 (process_scc): Remove clearing and copying the optimistic
243 table. Instead remove elements inserted during an optimistic
244 iteration from the single table we maintain.
245 (init_scc_vn): Adjust.
246 (free_scc_vn): Likewise.
247 (sccvn_dom_walker::record_cond): Likewise.
248 (sccvn_dom_walker::after_dom_children): Likewise.
250 2018-07-19 Martin Sebor <msebor@redhat.com>
252 PR tree-optimization/84047
253 PR tree-optimization/83776
254 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
255 (check_array_bounds): Call it.
257 2018-07-19 Martin Sebor <msebor@redhat.com>
259 * align.h (align_flags): Use member initialization.
261 2018-07-19 David Malcolm <dmalcolm@redhat.com>
263 * Makefile.in (OBJS): Add optinfo.o.
264 * coretypes.h (class symtab_node): New forward decl.
265 (struct cgraph_node): New forward decl.
266 (class varpool_node): New forward decl.
267 * dump-context.h: New file.
268 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
270 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
271 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
272 (set_alt_dump_file): Likewise.
273 (dump_context::~dump_context): New dtor.
274 (dump_gimple_stmt): Move implementation to...
275 (dump_context::dump_gimple_stmt): ...this new member function.
276 Add the stmt to any pending optinfo, creating one if need be.
277 (dump_gimple_stmt_loc): Move implementation to...
278 (dump_context::dump_gimple_stmt_loc): ...this new member function.
279 Start a new optinfo and add the stmt to it.
280 (dump_gimple_expr): Move implementation to...
281 (dump_context::dump_gimple_expr): ...this new member function.
282 Add the stmt to any pending optinfo, creating one if need be.
283 (dump_gimple_expr_loc): Move implementation to...
284 (dump_context::dump_gimple_expr_loc): ...this new member function.
285 Start a new optinfo and add the stmt to it.
286 (dump_generic_expr): Move implementation to...
287 (dump_context::dump_generic_expr): ...this new member function.
288 Add the tree to any pending optinfo, creating one if need be.
289 (dump_generic_expr_loc): Move implementation to...
290 (dump_context::dump_generic_expr_loc): ...this new member
291 function. Add the tree to any pending optinfo, creating one if
293 (dump_printf): Move implementation to...
294 (dump_context::dump_printf_va): ...this new member function. Add
295 the text to any pending optinfo, creating one if need be.
296 (dump_printf_loc): Move implementation to...
297 (dump_context::dump_printf_loc_va): ...this new member function.
298 Start a new optinfo and add the stmt to it.
299 (dump_dec): Move implementation to...
300 (dump_context::dump_dec): ...this new member function. Add the
301 value to any pending optinfo, creating one if need be.
302 (dump_context::dump_symtab_node): New member function.
303 (dump_context::get_scope_depth): New member function.
304 (dump_context::begin_scope): New member function.
305 (dump_context::end_scope): New member function.
306 (dump_context::ensure_pending_optinfo): New member function.
307 (dump_context::begin_next_optinfo): New member function.
308 (dump_context::end_any_optinfo): New member function.
309 (dump_context::s_current): New global.
310 (dump_context::s_default): New global.
311 (dump_scope_depth): Delete global.
312 (dumpfile_ensure_any_optinfo_are_flushed): New function.
313 (dump_symtab_node): New function.
314 (get_dump_scope_depth): Reimplement in terms of dump_context.
315 (dump_begin_scope): Likewise.
316 (dump_end_scope): Likewise.
317 (selftest::temp_dump_context::temp_dump_context): New ctor.
318 (selftest::temp_dump_context::~temp_dump_context): New dtor.
319 (selftest::verify_item): New function.
320 (ASSERT_IS_TEXT): New macro.
321 (ASSERT_IS_TREE): New macro.
322 (ASSERT_IS_GIMPLE): New macro.
323 (selftest::test_capture_of_dump_calls): New test.
324 (selftest::dumpfile_c_tests): Call it.
325 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
326 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
327 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
329 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
330 (dump_node, dump_bb): Move these unrelated decls.
331 (class dump_manager): Add leading comment.
332 * optinfo.cc: New file.
333 * optinfo.h: New file.
335 2018-07-19 Michael Collison <michael.collison@arm.com>
336 Richard Henderson <rth@redhat.com>
338 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
339 (subti): Handle op1 zero.
340 (subvti4, usub4ti4): New.
341 (*sub<GPI>3_compare1_imm): New.
342 (sub<GPI>3_carryinCV): New.
343 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
344 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
346 2018-07-19 Michael Collison <michael.collison@arm.com>
347 Richard Henderson <rth@redhat.com>
349 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
350 (addti3): Create simpler code if low part is already known to be 0.
351 (addvti4, uaddvti4): New.
352 (*add<GPI>3_compareC_cconly_imm): New.
353 (*add<GPI>3_compareC_cconly): New.
354 (*add<GPI>3_compareC_imm): New.
355 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
356 handle constants within this pattern..
357 (*add<GPI>3_compareV_cconly_imm): New.
358 (*add<GPI>3_compareV_cconly): New.
359 (*add<GPI>3_compareV_imm): New.
360 (add<GPI>3_compareV): New.
361 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
362 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
363 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
364 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
365 with 'comparison' operator.
366 (*add<GPI>3_compareV_cconly_imm): Ditto.
367 (*add<GPI>3_compareV_cconly): Ditto.
368 (*add<GPI>3_compareV_imm): Ditto.
369 (add<GPI>3_compareV): Ditto.
370 (add<mode>3_carryinC): Ditto.
371 (*add<mode>3_carryinC_zero): Ditto.
372 (*add<mode>3_carryinC): Ditto.
373 (add<mode>3_carryinV): Ditto.
374 (*add<mode>3_carryinV_zero): Ditto.
375 (*add<mode>3_carryinV): Ditto.
377 2018-07-19 Michael Collison <michael.collison@arm.com>
378 Richard Henderson <rth@redhat.com>
380 * config/aarch64/aarch64-modes.def (CC_V): New.
381 * config/aarch64/aarch64-protos.h
382 (aarch64_addti_scratch_regs): Declare
383 (aarch64_subvti_scratch_regs): Declare.
384 (aarch64_expand_subvti): Declare.
385 (aarch64_gen_unlikely_cbranch): Declare
386 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
387 for signed overflow using CC_Vmode.
388 (aarch64_get_condition_code_1): Handle CC_Vmode.
389 (aarch64_gen_unlikely_cbranch): New function.
390 (aarch64_addti_scratch_regs): New function.
391 (aarch64_subvti_scratch_regs): New function.
392 (aarch64_expand_subvti): New function.
394 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
396 * config/aarch64/aarch64-option-extensions.def: New entry for profile
398 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
399 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
402 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
405 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
406 address check not strict.
408 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
410 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
412 (store_pair_lanes<mode>): Likewise.
413 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
414 enum value 'ADDR_QUERY_LDP_STP_N'.
415 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
416 (aarch64_print_address_internal): Add declaration.
417 (aarch64_print_ldpstp_address): Remove.
418 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
419 (aarch64_print_operand): Change printing of 'y'.
420 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
421 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
422 'true' rather than '1'.
423 * config/aarch64/constraints.md (Uml): Likewise.
424 (Uml): Rename to Umn.
427 2018-07-19 Richard Biener <rguenther@suse.de>
429 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
431 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
432 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
433 (vn_reference_hasher): Likewise.
434 (struct vn_tables_s): Remove obstack and alloc-pool members.
435 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
436 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
437 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
438 (vn_reference_insert_pieces): Likewise.
439 (alloc_vn_nary_op_noinit): Adjust.
440 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
442 (shared_lookup_phiargs): Remove.
443 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
444 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
445 (visit_reference_op_call): Likewise.
446 (copy_nary, copy_phi, copy_reference): Remove.
447 (process_scc): Rewind the obstack when iterating. Do not
448 copy the elements to valid_info but just move them from one
449 hashtable to the other.
450 (allocate_vn_table): Adjust.
451 (free_vn_table): Likewise.
452 (init_scc_vn): Likewise.
453 (free_scc_vn): Likewise.
455 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
458 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
459 indirect_return as function type attribute.
460 (ix86_attribute_table): Change indirect_return to function
462 * doc/extend.texi: Update indirect_return attribute.
464 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
466 * wide-int.h (widest2_int): New.
467 * gimple-fold.c (arith_overflowed_p): Use it.
468 * tree.h (widest2_int_cst): New.
469 * tree-vrp.c (wide_int_binop_overflow): Rename from
471 Rewrite to work on trees.
472 (extract_range_from_multiplicative_op_1): Abstract code to...
473 (wide_int_range_min_max): ...here.
474 (wide_int_range_cross_product): ...and here.
475 (extract_range_from_binary_expr_1): Abstract overflow code to...
476 (wide_int_range_mult_wrapping): ...here.
477 * tree-vrp.h (wide_int_range_cross_product): New.
478 (wide_int_range_mult_wrapping): New.
480 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
481 Julia Koval <julia.koval@intel.com>
483 * config/i386/x86-tune-costs.h (skylake_memcpy,
484 skylake_memset): Replace rep_prefix with unrolling for size 512.
486 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
489 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
492 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
494 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
495 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
496 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
497 previously known as "PowerPC AltiVec Built-in Functions". Move
498 some material to new subsubsections "PowerPC AltiVec Built-in
499 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
501 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
502 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
503 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
504 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
506 2018-07-18 Richard Biener <rguenther@suse.de>
508 PR tree-optimization/86557
509 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
512 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
514 * config/s390/s390.c (s390_function_profiler): Generate CFI.
516 2018-07-17 Jeff Law <law@redhat.com>
518 * config/arm/arm.c (get_label_padding): Update for recent
519 changes to label_to_alignment.
521 PR tree-optimization/86010
522 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
524 * config/mips/mips.c (vr4130_align_insns): Update for recent
525 changes to label_to_alignment.
527 * config/frv/frv.c (frv_label_align): Update for recent changes
528 to label_to_alignment.
530 * config/nios2/nios2.c (nios2_label_align): Update for recent
531 changes which dropped ALIGN_LABELS_LOG.
533 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
535 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
536 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
538 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
540 * config/arc/arc.c (arc_label_align): Use align_labels instead of
541 deprecated align_labels_log.
543 2018-07-17 Richard Biener <rguenther@suse.de>
546 * dwarf2out.c (init_sections_and_labels): Always generate
547 a debug_line_str_section for early LTO debug.
548 (dwarf2out_finish): Reset debug_line_str_hash output early.
549 Bump counter for extra dwarf5 .debug_loc labels to not conflict
551 (dwarf2out_early_finish): Output debug_line_str.
553 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
555 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
556 index register on z196 or later.
558 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
560 * config/s390/s390.c (s390_default_align): Set default function
562 (s390_override_options_after_change): Call s390_default align.
563 (s390_option_override_internal): Call s390_default_align.
564 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
566 2018-07-17 Jakub Jelinek <jakub@redhat.com>
569 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
570 to _looptemp_ clauses, other than the first two.
572 2018-07-17 Martin Liska <mliska@suse.cz>
574 * opts.c: Do not enable OPT_falign_* for -Os.
576 2018-07-17 Martin Liska <mliska@suse.cz>
578 * align.h (MAX_CODE_ALIGN): New.
579 (MAX_CODE_ALIGN_VALUE): New.
580 * common/config/i386/i386-common.c (ix86_handle_option):
581 (MAX_CODE_ALIGN): Moved to align.h.
582 * final.c (MAX_CODE_ALIGN): Likewise.
583 * opts.c (parse_and_check_align_values):
584 (MAX_CODE_ALIGN): Likewise.
585 (MAX_CODE_ALIGN_VALUE): Likewise.
587 2018-07-17 Martin Liska <mliska@suse.cz>
589 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
590 in order to fulfil coding style.
591 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
592 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
593 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
594 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
595 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
596 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
597 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
598 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
599 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
601 2018-07-17 Martin Liska <mliska@suse.cz>
604 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
605 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
606 align_flags of label_to_alignment.
607 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
609 * config/m68k/m68k.c: Do not use removed align_labels_value and
611 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
612 (LOOP_ALIGN): Likewise.
613 (LABEL_ALIGN): Likewise.
614 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
615 Remove not used macro.
616 (rs6000_loop_align): Change return type to align_flags.
617 (rs6000_loop_align_max_skip): Remove.
618 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
619 Change return type to align_flags.
620 * config/rs6000/rs6000.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/rx/rx.h (JUMP_ALIGN): Wrap integer values
625 * config/rx/rx-protos.h (rx_align_for_label): Make it
627 * config/rx/rx.c (rx_align_for_label): Change return type
629 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
631 into align_flags class.
632 (LABEL_ALIGN): Likewise.
633 (LOOP_ALIGN): Likewise.
634 * config/s390/s390.c (s390_label_align): Use align_flags
636 (s390_asm_output_function_label): Likewise.
637 * config/sh/sh.c (sh_override_options_after_change):
638 Use align_flags class directly without macros.
639 (find_barrier): Likewise.
640 (barrier_align): Likewise.
641 (sh_loop_align): Likewise.
642 * config/spu/spu.c (spu_option_override):
643 Use align_flags_tuple::get_value instead of removed macros.
644 (spu_sched_init): Likewise.
645 * config/spu/spu.h (GTY): Likewise.
646 * config/visium/visium.c (visium_option_override):
647 Set "8" as default secondary alignment.
648 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
649 in order to guarantee secondary alignment of 8.
650 * coretypes.h: Include align.h header file.
651 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
652 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
653 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
654 * doc/tm.texi.in: Likewise.
655 * final.c (struct label_alignment): Remove not used structure.
656 (LABEL_ALIGN): Change type to align_flags.
657 (LOOP_ALIGN): Likewise.
658 (JUMP_ALIGN): Likewise.
659 (default_loop_align_max_skip): Remove.
660 (default_label_align_max_skip): Likewise.
661 (default_jump_align_max_skip): Likewise.
662 (default_label_align_after_barrier_max_skip):
663 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
664 (LABEL_TO_MAX_SKIP): Remove.
665 (label_to_alignment): Return align_flags type instead of integer.
666 (label_to_max_skip): Remove.
667 (align_fuzz): Use align_flags type.
668 (compute_alignments): Use align_flags type and use align_flags::max
669 to combine multiple alignments.
670 (grow_label_align): Grow vec instead of C array.
671 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
672 (shorten_branches): Use align_flags type and use align_flags::max
673 to combine multiple alignments.
674 (final_scan_insn_1): Remove usage of secondary alignment that comes
675 from label alignment, but instead use proper secondary alignment
676 which is computed in grow_label_align.
677 * flags.h (struct align_flags_tuple): Move to align.h.
678 (struct align_flags): Likewise.
679 (state_align_loops): Rename to align_loops.
680 (state_align_jumps): Rename to align_jumps.
681 (state_align_labels): Rename to align_labels.
682 (state_align_functions): Rename to align_functions.
683 (align_loops_log): Remove.
684 (align_jumps_log): Remove.
685 (align_labels_log): Remove.
686 (align_functions_log): Remove.
687 (align_loops_max_skip): Remove.
688 (align_jumps_max_skip): Remove.
689 (align_labels_max_skip): Remove.
690 (align_functions_max_skip): Remove.
691 (align_loops_value): Remove.
692 (align_jumps_value): Remove.
693 (align_labels_value): Remove.
694 (align_functions_value): Remove.
695 * output.h (label_to_alignment): Change return type to align_flags.
696 (label_to_max_skip): Remove.
697 * target.def: Remove loop_align_max_skip, label_align_max_skip,
698 jump_align_max_skip macros.
699 * targhooks.h (default_loop_align_max_skip): Remove.
700 (default_label_align_max_skip): Likewise.
701 (default_jump_align_max_skip): Likewise.
702 (default_label_align_after_barrier_max_skip): Remove.
703 * toplev.c (read_log_maxskip): Use ::normalize function.
704 (parse_N_M): Remove not used argument and also call ::normalize.
705 (parse_alignment_opts): Do not pass unused arguments.
706 * varasm.c (assemble_start_function): Use directly align_functions
707 instead of removed macros.
708 * system.h: Do not poison removed macros.
710 2018-07-17 Jakub Jelinek <jakub@redhat.com>
713 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
714 and cond temporaries don't have reference type if iterator has
715 pointer type. For init use &for_pre_body instead of pre_p if
716 for_pre_body is non-empty.
718 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
720 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
721 double-double modes to SFmode directly directly.
722 (trunc<mode>sf2_fprs): Delete.
724 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
726 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
727 for conversions between IFmode and the decimal floating point modes.
728 (init_float128_ieee): Use the correct names for conversions between
729 KFmode and the decimal floating point modes.
731 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
733 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
734 for the conversions between TDmode and IFmode.
735 (init_float128_ieee): Use more correct names for the conversions
736 between TDmode and KFmode.
738 2018-07-16 Jakub Jelinek <jakub@redhat.com>
740 PR tree-optimization/86526
741 * builtins.c (expand_builtin_memcmp): Formatting fixes.
742 (inline_expand_builtin_string_cmp): Likewise.
743 (inline_string_cmp): Likewise. Use c_readstr instead of
744 builtin_memcpy_read_str. Add unit_mode temporary.
746 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
749 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
750 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
752 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
754 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
755 Alphabetize prototypes of built-in functions, separating out
756 built-in functions that are listed in this section but should be
759 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
762 * expmed.c (emit_store_flag): Do not emit setcc followed by a
763 conditional move when trapping comparison was split to a
764 non-trapping one (and vice versa).
766 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
768 * config/s390/s390.c (s390_function_profiler): Generate nops
769 instead of profiler call sequences.
770 * config/s390/s390.opt: Add the new option.
772 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
774 * config/s390/s390.c (s390_function_profiler): Generate
775 __mcount_loc section.
776 * config/s390/s390.opt: Add the new option.
778 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
780 * common.opt: Add the new warning.
781 * config/s390/s390.c (s390_function_profiler): Emit "brasl
782 %r0,__fentry__" when -mfentry is specified.
783 (s390_option_override_internal): Disallow -mfentry for 31-bit
785 * config/s390/s390.opt: Add the new option.
787 2018-07-16 Richard Biener <rguenther@suse.de>
790 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
791 for function-local FUNCTION_DECL and RESULT_DECL immediately.
793 2018-07-16 Martin Liska <mliska@suse.cz>
796 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
799 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
801 * config/arc/arcHS.md: Update ARCHS scheduling rules.
803 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
805 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
807 * config/arc/arc-cpus.def (hs4x): New cpu.
809 * config/arc/arc-tables.opt: Regenerate.
810 * config/arc/arc.c (arc_sched_issue_rate): New function.
811 (TARGET_SCHED_ISSUE_RATE): Define.
812 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
813 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
815 (attr tune): Add ARCHS4x tune values.
816 (attr tune_dspmpy): Define.
817 (*tst): Correct instruction type.
818 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
819 * config/arc/arcHS4x.md: New file.
820 * config/arc/fpu.md: Update instruction type attributes.
821 * config/arc/t-multilib: Regenerate.
823 2018-07-16 Tom de Vries <tdevries@suse.de>
826 * var-tracking.c (vt_initialize): Fix pre_dec handling.
828 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
830 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
833 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
835 PR tree-optimization/86514
836 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
837 conversion to a boolean type from a type with greater precision.
839 2018-07-16 Tom de Vries <tdevries@suse.de>
841 * var-tracking.c (vt_initialize): Print adjusted insn slim if
842 dump_flags request TDF_SLIM.
844 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
846 * fold-const.c (int_const_binop_1): Abstract...
847 (wide_int_binop): ...wide int code here.
848 (poly_int_binop): ...poly int code here.
849 Abstract the rest of int_const_binop_1 into int_const_binop.
850 * fold-const.h (wide_int_binop): New.
851 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
852 Remove useless PLUS/MINUS_EXPR case.
853 (zero_nonzero_bits_from_vr): Move wide int code...
854 (zero_nonzero_bits_from_bounds): ...here.
855 (extract_range_from_binary_expr_1): Move mask optimization code...
856 (range_easy_mask_min_max): ...here.
857 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
858 (range_easy_mask_min_max): New.
860 2018-07-15 Jeff Law <law@redhat.com>
863 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
866 2018-07-14 Jim Wilson <jimw@sifive.com>
868 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
870 2018-07-14 Paul Koning <ni1d@arrl.net>
872 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
874 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
876 * lto-streamer-out.c (copy_function_or_variable): Dump info about
879 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
880 Steve Munroe <munroesj52@gmail.com>
882 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
883 (_mm_andnot_si128): Likewise.
884 (_mm_or_si128): Likewise.
885 (_mm_xor_si128): Likewise.
887 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
890 * builtins.c (expand_builtin_memcmp): Inline the calls first
891 when result_eq is false.
892 (expand_builtin_strcmp): Inline the calls first.
893 (expand_builtin_strncmp): Likewise.
894 (inline_string_cmp): New routine. Expand a string compare
895 call by using a sequence of char comparison.
896 (inline_expand_builtin_string_cmp): New routine. Inline expansion
897 a call to str(n)cmp/memcmp.
898 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
900 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
902 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
904 * config/arm/driver-arm.c: Include arm-native.h.
905 (host_detect_local_cpu): Use auto-generated data tables.
906 (vendors, arm_cpu_table): Delete. Move part information to ...
907 * config/arm/arm-cpus.in: ... here.
908 * config/arm/parsecpu.awk (gen_native): New function.
909 (vendor, part): New CPU fields.
910 (END): Add support for building the native CPU detection tables.
911 * config/arm/t-arm (arm-native.h): Add build rule.
912 (driver-arm.o): Add dependency on arm-native.h.
914 2018-07-13 Richard Biener <rguenther@suse.de>
917 * match.pd (addr1 - addr2): Allow either of the operand to
920 2018-07-13 Tom de Vries <tdevries@suse.de>
922 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
925 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
927 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
928 arrays instead of numbered variables.
930 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
932 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
933 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
935 2018-07-13 Richard Biener <rguenther@suse.de>
938 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
939 instead of get_context_die.
941 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
942 Richard Biener <rguenther@suse.de>
945 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
946 that the loop latch destination where phi is defined.
948 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
950 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
951 (riscv_expand_epilogue): Add assertion to check interrupt mode.
952 (riscv_set_current_function): Extract getting interrupt type to new
954 (riscv_get_interrupt_type): New function.
955 (riscv_merge_decl_attributes): New function, checking interrupt type is
957 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
959 2018-07-12 Paul Koning <ni1d@arrl.net>
961 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
964 2018-07-12 Paul Koning <ni1d@arrl.net>
966 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
967 zero reference, add doloop_end instead.
968 * doc/md.texi (decrement_and_branch_until_zero): Remove.
969 (Looping patterns): Remove decrement_and_branch_until_zero. Add
970 detail for doloop_end.
972 2018-07-12 Martin Sebor <msebor@redhat.com>
975 * attribs.c (decl_attributes): Reject conflicting attributes before
976 calling attribute handlers.
978 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
980 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
982 (gcc::dump_manager::get_dump_file_name): likewise.
983 (dump_begin): Likewise.
984 * dumpfile.h (dump_begin): Update prototype.
985 (gcc::dump_manager::get_dump_file_name,
986 gcc::dump_manager::get_dump_file_name): Update prototype.
988 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
990 * internal-fn.h (vectorizable_internal_fn_p): New function.
991 * tree-vect-slp.c (compatible_calls_p): Likewise.
992 (vect_build_slp_tree_1): Remove nops argument. Handle calls
993 to internal functions.
994 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
996 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
998 * fold-const.h (inverse_conditions_p): Declare.
999 * fold-const.c (inverse_conditions_p): New function.
1000 * match.pd: Use inverse_conditions_p. Add folds of view_converts
1001 that test the inverse condition of a conditional internal function.
1002 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1003 * internal-fn.c (internal_fn_mask_index): Handle conditional
1005 (vectorized_internal_fn_supported_p): New function.
1006 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1007 (any_pred_load_store): Replace with...
1008 (need_to_predicate): ...this new variable.
1009 (redundant_ssa_names): New variable.
1010 (ifcvt_can_use_mask_load_store): Move initial checks to...
1011 (ifcvt_can_predicate): ...this new function. Handle tree codes
1012 for which a conditional internal function exists.
1013 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1014 instead of ifcvt_can_use_mask_load_store. Update after variable
1016 (predicate_load_or_store): New function, split out from
1017 predicate_mem_writes.
1018 (check_redundant_cond_expr): New function.
1019 (value_available_p): Likewise.
1020 (predicate_rhs_code): Likewise.
1021 (predicate_mem_writes): Rename to...
1022 (predicate_statements): ...this. Use predicate_load_or_store
1023 and predicate_rhs_code.
1024 (combine_blocks, tree_if_conversion): Update after above name changes.
1025 (ifcvt_local_dce): Handle redundant_ssa_names.
1026 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1027 general conditional functions.
1028 * tree-vect-stmts.c (vectorizable_call): Likewise.
1030 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1031 Alan Hayward <alan.hayward@arm.com>
1032 David Sherwood <david.sherwood@arm.com>
1034 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1035 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1036 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1037 plus and minus and convert them into IFN_COND_FMA-based sequences.
1038 (convert_mult_to_fma): Handle conditional plus and minus.
1040 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1042 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1043 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1044 (cond_fnms_optab): New optabs.
1045 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1047 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1048 * internal-fn.h (get_conditional_internal_fn): Declare.
1049 (get_unconditional_internal_fn): Likewise.
1050 * internal-fn.c (cond_ternary_direct): New macro.
1051 (expand_cond_ternary_optab_fn): Likewise.
1052 (direct_cond_ternary_optab_supported_p): Likewise.
1053 (FOR_EACH_COND_FN_PAIR): Likewise.
1054 (get_conditional_internal_fn): New function.
1055 (get_unconditional_internal_fn): Likewise.
1056 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1057 (gimple_match_op::gimple_match_op): Add a new overload for 5
1059 (gimple_match_op::set_op): Likewise.
1060 (gimple_resimplify5): Declare.
1061 * genmatch.c (decision_tree::gen): Generate simplifications for
1063 * gimple-match-head.c (gimple_simplify): Define an overload for
1064 5 operands. Handle calls with 5 arguments in the top-level overload.
1065 (convert_conditional_op): Handle conversions from unconditional
1066 internal functions to conditional ones.
1067 (gimple_resimplify5): New function.
1068 (build_call_internal): Pass a fifth operand.
1069 (maybe_push_res_to_seq): Likewise.
1070 (try_conditional_simplification): Try converting conditional
1071 internal functions to unconditional internal functions.
1072 Handle 3-operand unconditional forms.
1073 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1074 Define ternary equivalents of the current rules for binary conditional
1076 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1078 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1079 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1080 (optab): Handle them.
1081 (SVE_COND_FP_TERNARY): New int iterator.
1082 (sve_fmla_op, sve_fmad_op): New int attributes.
1083 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1084 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1085 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1087 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1089 * target.def (preferred_else_value): New target hook.
1090 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1091 * doc/tm.texi: Regenerate.
1092 * targhooks.h (default_preferred_else_value): Declare.
1093 * targhooks.c (default_preferred_else_value): New function.
1094 * internal-fn.h (conditional_internal_fn_code): Declare.
1095 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1096 (get_conditional_internal_fn): Use it.
1097 (conditional_internal_fn_code): New function.
1098 * gimple-match.h (gimple_match_cond): New struct.
1099 (gimple_match_op): Add a cond member function.
1100 (gimple_match_op::gimple_match_op): Update all forms to take a
1102 * genmatch.c (expr::gen_transform): Use the same condition as res_op
1103 for the suboperation, but don't specify a particular else_value.
1104 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1105 (visit_nary_op, visit_reference_op_load): Pass
1106 gimple_match_cond::UNCOND to the gimple_match_op constructor.
1107 * gimple-match-head.c: Include tree-eh.h
1108 (convert_conditional_op): New function.
1109 (maybe_resimplify_conditional_op): Likewise.
1110 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1111 (gimple_resimplify2): Likewise.
1112 (gimple_resimplify3): Likewise.
1113 (gimple_resimplify4): Likewise.
1114 (maybe_push_res_to_seq): Return null for conditional operations.
1115 (try_conditional_simplification): New function.
1116 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
1118 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1120 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1122 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1124 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1126 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1128 (hash_tree): Do not hash DECL_FCONTEXT
1129 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1130 Do not stream DECL_FCONTEXT.
1131 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1132 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1134 2018-07-12 Richard Biener <rguenther@suse.de>
1137 * dwarf2out.c (gen_block_die): Only output blocks when they have
1138 at least one !DECL_IGNORED_P variable.
1140 2018-07-12 Richard Biener <rguenther@suse.de>
1143 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1144 Remove -mieee-fp handling.
1146 2018-07-12 Richard Biener <rguenther@suse.de>
1148 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1149 left-over from last patch.
1151 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1153 PR tree-optimization/86492
1154 * gimple-ssa-store-merging.c
1155 (imm_store_chain_info::coalesce_immediate_stores): Call
1156 check_no_overlap even for the merge_overlapping case. Formatting fix.
1158 2018-07-12 Richard Biener <rguenther@suse.de>
1161 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1162 move possibly trapping operations into the conditional.
1164 2018-07-12 Richard Biener <rguenther@suse.de>
1166 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1167 (vn_lookup_simplify_result): Remove recursion limit applied
1169 (vn_nary_build_or_lookup_1): Adjust.
1170 (try_to_simplify): Likewise.
1171 * gimple-match-head.c (gimple_resimplify1): Instead apply one
1173 (gimple_resimplify2): Likewise.
1174 (gimple_resimplify3): Likewise.
1175 (gimple_resimplify4): Likewise.
1177 2018-07-11 Jakub Jelinek <jakub@redhat.com>
1179 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1180 Use __mmask64 type instead of __mmask8 for __M argument.
1181 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1182 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1184 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1185 __mmask16 for __M argument.
1186 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1187 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1188 to __mmask16 instead of __mmask8.
1189 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1190 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1191 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1192 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1193 instead of __mmask16 for __U argument.
1194 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1195 __mmask16 instead of __mmask8 for __U argument.
1196 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1198 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1200 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1202 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1204 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1206 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1208 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1210 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1212 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1214 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1216 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1217 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1218 return type as well as __M argument type and all casts from __mmask8
1220 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1221 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1222 return type as well as __M argument type and all casts from __mmask8
1224 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1225 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1226 return type as well as __M argument type and all casts from __mmask8
1228 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1229 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1230 return type as well as __M argument type and all casts from __mmask8
1232 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1233 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1236 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
1238 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1239 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1242 2018-07-11 Paul Koning <ni1d@arrl.net>
1244 * doc/md.texi (define_subst): Document how multiple occurrences of
1245 the same argument in the replacement pattern are handled.
1247 2018-07-11 Paul Koning <ni1d@arrl.net>
1249 * doc/extend.texi (Common Variable Attributes): Move "mode" into
1251 (Common Type Attributes): Add "mode" attribute.
1253 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
1255 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1256 stream DECL_ORIGINAL_TYPE.
1257 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1258 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1259 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1260 Do not walk original type.
1261 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1263 (write_ts_decl_non_common_tree_pointers): Do not stream
1265 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1266 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1268 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1270 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1271 thread twice from the same starting edge.
1273 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1275 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1276 * gimple.c (gimple_call_nonnull_result_p): ...here...
1277 (gimple_call_nonnull_arg): ...and here.
1278 * gimple.h (gimple_call_nonnull_result_p): New.
1279 (gimple_call_nonnull_arg): New.
1281 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
1283 * config/arm/arm-cpus.in: Move information from fpu field of each
1284 cpu definition to the isa field.
1285 * config/arm/parsecpu.awk (fpu): Delete match rule.
1286 (gen_comm_data): Don't add bits from the CPU's FPU entry.
1288 2018-07-11 Richard Biener <rguenther@suse.de>
1291 * dwarf2out.c (init_sections_and_labels): Use
1292 output_asm_line_debug_info consistently.
1293 (dwarf2out_early_finish): Likewise.
1294 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1297 2018-07-11 Richard Biener <rguenther@suse.de>
1299 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1300 Rework father_bb setting in a way to avoid propagating constants
1301 multiple times on a loop body.
1303 2018-07-10 Mark Wielaard <mark@klomp.org>
1306 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1308 2018-07-10 Richard Biener <rguenther@suse.de>
1310 * hash-map.h (hash_map::iterator::operator*): Return
1311 references to key and value.
1313 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1316 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1317 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1318 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1319 (gimplify_omp_for): For composite loops, move outer
1320 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1321 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
1322 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
1323 TREE_LIST for both the original class iterator and the "last" helper
1324 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
1325 loop, remember has_decl_expr from outer composite loops for the
1326 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1328 2018-07-09 Martin Sebor <msebor@redhat.com>
1332 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1333 accessing implicitly initialized array elements.
1334 * expr.c (string_constant): Handle string initializers of
1335 character arrays within aggregates.
1336 * gimple-fold.c (fold_array_ctor_reference): Add argument.
1337 Store element offset. As a special case, handle zero size.
1338 (fold_nonarray_ctor_reference): Same.
1339 (fold_ctor_reference): Add argument. Store subobject offset.
1340 * gimple-fold.h (fold_ctor_reference): Add argument.
1342 2018-07-09 Paul Koning <ni1d@arrl.net>
1344 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1345 (pdp11_insn_cost): New function.
1346 (pdp11_md_asm_adjust): New function.
1347 (TARGET_INVALID_WITHIN_DOLOOP): Define.
1348 (pdp11_rtx_costs): Update to match machine better.
1349 (output_addr_const_pdp11): Correct format mismatch warnings.
1350 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1351 * config/pdp11/pdp11.md: General change to add base_cost and/or
1352 length attributes for use by new pdp11_insn_cost function.
1353 (MIN_BRANCH): Correct definition.
1355 (doloop_end): Use standard pattern name for looping pattern.
1356 (doloop_end_nocc): New.
1357 (movsf): Add another constraint alternative.
1358 (zero_extendqihi2): Add constraint alternatives for not in place
1360 (zero_extendhisi2): Remove.
1361 (shift patterns): Add CC handling variants.
1365 (define_peephole2): New peephole to recognize mov that sets CC for
1368 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1370 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1371 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1374 2018-07-09 Jakub Jelinek <jakub@redhat.com>
1377 * real.c (real_nextafter): Return true if result is denormal.
1379 2018-07-09 Martin Liska <mliska@suse.cz>
1381 * common.opt: Add back wrongly removed attribute.
1383 2018-07-09 Richard Biener <rguenther@suse.de>
1386 * dwarf2out.c (gen_block_die): For an early generated DIE
1387 always output high/low PC attributes.
1389 2018-07-09 Tom de Vries <tdevries@suse.de>
1391 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1392 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1393 onto VAR_DECL with abstract origin.
1395 2018-07-07 Jim Wilson <jimw@sifive.com>
1397 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1399 2018-07-07 Tom de Vries <tdevries@suse.de>
1401 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1403 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
1405 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1407 (combine_bound): Use wide-int overflow calculation instead of
1409 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1411 * fold-const.c (int_const_binop_2): Same.
1412 (extract_muldiv_1): Same.
1413 (fold_div_compare): Same.
1414 (fold_abs_const): Same.
1416 * poly-int.h (add): Same.
1420 * predict.c (predict_iv_comparison): Same.
1421 * profile-count.c (slow_safe_scale_64bit): Same.
1422 * simplify-rtx.c (simplify_const_binary_operation): Same.
1423 * tree-chrec.c (tree_fold_binomial): Same.
1424 * tree-data-ref.c (split_constant_offset_1): Same.
1425 * tree-if-conv.c (idx_within_array_bound): Same.
1426 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1427 * tree-ssa-phiopt.c (minmax_replacement): Same.
1428 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1429 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1430 * vr-values.c (vr_values::adjust_range_with_scev): Same.
1431 * wide-int.cc (wi::add_large): Same.
1432 (wi::mul_internal): Same.
1433 (wi::sub_large): Same.
1434 (wi::divmod_internal): Same.
1435 * wide-int.h: Change overflow type to overflow_type for neg, add,
1436 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1437 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1438 mul_internal, divmod_internal.
1439 (overflow_type): New enum.
1440 (accumulate_overflow): New.
1442 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1444 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1445 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1447 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1449 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1450 argument is checked for zero before entering loop, avoid checking again.
1452 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1454 * gimplify.h (generic_expr_could_trap_p): Set as global function.
1455 * gimplify.h (generic_expr_could_trap_p): Likwise.
1456 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1458 2018-07-06 Jakub Jelinek <jakub@redhat.com>
1460 PR tree-optimization/86401
1461 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1462 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1463 (fold_bit_and_mask): ... here. New helper function for match.pd.
1464 * fold-const.h (fold_bit_and_mask): Declare.
1465 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1467 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1470 * target.def (translate_mode_attribute): New hook.
1471 * targhooks.h (default_translate_mode_attribute): Declare.
1472 * targhooks.c (default_translate_mode_attribute): New function.
1473 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1474 * doc/tm.texi: Regenerate.
1475 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1476 (rs6000_translate_mode_attribute): New function.
1478 2018-07-06 Paul Koning <ni1d@arrl.net>
1480 * doc/md.texi (define_split): Document DONE and FAIL.
1481 (define_peephole2): Ditto.
1483 2018-07-05 Jeff Law <law@redhat.com>
1485 PR tree-optimization/86010
1486 * tree-ssa-dse.c (compute_trims): More aggressively trim at
1487 both the head and tail of mem* and str* calls.
1489 2018-07-05 Jim Wilson <jimw@sifive.com>
1491 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1493 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
1495 * config/aarch64/aarch64-simd.md: correct flags text for
1496 MIN_EXPR replacement.
1498 2018-07-05 James Clarke <jrtc27@jrtc27.com>
1500 * configure: Regenerated.
1502 2018-07-05 Carl Love <cel@us.ibm.com>
1504 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1505 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1506 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1507 VSX_BUILTIN_DOUBLEL_V4SF.
1509 2018-07-05 Martin Sebor <msebor@redhat.com>
1512 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1513 than its domain to compute its the upper bound of a char array.
1515 2018-07-05 Nathan Sidwell <nathan@acm.org>
1517 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1518 * doc/cpp.texi: Update comment.
1519 * doc/tm.texi: Rebuilt.
1520 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1521 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1522 * doc/extend.texi (Backwards Compatibility): Clarify it is system
1523 headers affected by extern "C".
1524 * system.h: Poison NO_IMPLICIT_EXTERN_C.
1525 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1526 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1527 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1528 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1529 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1530 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1531 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1532 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1533 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1534 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1535 config/sparc/sp64-elf.h, config/spu/spu.h,
1536 config/stormy16/stormy16.h, config/v850/v850.h,
1537 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1538 define NO_IMPLICIT_EXTERN_C.
1539 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1541 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1544 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1545 instead of GET_MODE_SIZE when comparing Units.
1547 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1550 * rtlanal.c (set_noop_p): Constrain on mode change,
1551 include hard-reg-set.h
1553 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1555 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1557 2018-07-05 Jakub Jelinek <jakub@redhat.com>
1560 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1563 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1565 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1567 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1570 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1572 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1574 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
1577 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1579 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
1581 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1582 neg_*_op* variables.
1584 2018-07-04 Martin Liska <mliska@suse.cz>
1586 * tree-switch-conversion.c: Define
1587 max_ratio_for_speed and max_ratio_for_size constants.
1589 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1590 Martin Liska <mliska@suse.cz>
1595 * common.opt: Rename align options with 'str_' prefix.
1596 * common/config/i386/i386-common.c (set_malign_value): New
1598 (ix86_handle_option): Use it to set -falign-* options/
1599 * config/aarch64/aarch64-protos.h (struct tune_params): Change
1600 type from int to string.
1601 * config/aarch64/aarch64.c: Update default values from int
1603 * config/alpha/alpha.c (alpha_override_options_after_change):
1605 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1606 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1607 max skip conditionally.
1608 * config/i386/freebsd.h (SUBALIGN_LOG): New.
1609 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1610 max skip conditionally.
1611 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1612 max skip conditionally.
1613 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1614 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1615 max skip conditionally.
1616 * config/i386/i386.c (struct ptt): Change type from int to
1618 (ix86_default_align): Set default values.
1619 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1620 max skip conditionally.
1621 * config/i386/iamcu.h (SUBALIGN_LOG): New.
1622 (ASM_OUTPUT_MAX_SKIP_ALIGN):
1623 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1624 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1625 max skip conditionally.
1626 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1627 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1628 * config/i386/x86-64.h (SUBALIGN_LOG): New.
1629 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1630 max skip conditionally.
1631 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1632 * config/ia64/ia64.c (ia64_option_override): Set default values
1633 for alignment options.
1634 * config/m68k/m68k.c: Handle new str_align_* options.
1635 * config/mips/mips.c (mips_set_compression_mode): Change
1637 (mips_option_override): Set default values for options.
1638 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1640 * config/rs6000/rs6000.c (rs6000_option_override_internal):
1642 * config/rx/rx.c (rx_option_override): Likewise.
1643 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1644 (LABEL_ALIGN): Use align_labels_log.
1645 (LOOP_ALIGN): Use align_loops_align.
1646 * config/s390/s390.c (s390_asm_output_function_label): Use new
1648 * config/sh/sh.c (sh_override_options_after_change):
1649 Change type of constants.
1650 * config/spu/spu.c (spu_sched_init): Likewise.
1651 * config/sparc/sparc.c (sparc_option_override): Set default
1653 * config/visium/visium.c (visium_option_override): Likewise.
1654 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1655 emit p2align format with last argument if it's not needed.
1656 * doc/invoke.texi: Document extended format of -falign-*.
1657 * final.c: Use align_labels alignment.
1658 * flags.h (struct target_flag_state): Change type to use
1660 (struct align_flags_tuple): New.
1661 (struct align_flags): Likewise.
1662 (align_loops_log): Redefine macro to use new types.
1663 (align_loops_max_skip): Redefine macro to use new types.
1664 (align_jumps_log): Redefine macro to use new types.
1665 (align_jumps_max_skip): Redefine macro to use new types.
1666 (align_labels_log): Redefine macro to use new types.
1667 (align_labels_max_skip): Redefine macro to use new types.
1668 (align_functions_log): Redefine macro to use new types.
1669 (align_loops): Redefine macro to use new types.
1670 (align_jumps): Redefine macro to use new types.
1671 (align_labels): Redefine macro to use new types.
1672 (align_functions): Redefine macro to use new types.
1673 (align_functions_max_skip): Redefine macro to use new types.
1674 (align_loops_value): New macro.
1675 (align_jumps_value): New macro.
1676 (align_labels_value): New macro.
1677 (align_functions_value): New macro.
1678 * function.c (invoke_set_current_function_hook): Propagate
1679 alignment values from flags to global variables default in
1681 * ipa-icf.c (sem_function::equals_wpa): Use
1682 cl_optimization_option_eq instead of memcmp.
1683 * lto-streamer.h (cl_optimization_stream_out): Support streaming
1685 (cl_optimization_stream_in): Likewise.
1686 * optc-save-gen.awk: Support strings in cl_optimization.
1687 * opth-gen.awk: Likewise.
1688 * opts.c (finish_options): Remove error checking of invalid
1690 (MAX_CODE_ALIGN): Remove.
1691 (MAX_CODE_ALIGN_VALUE): Likewise.
1692 (parse_and_check_align_values): New function.
1693 (check_alignment_argument): Likewise.
1694 (common_handle_option): Use check_alignment_argument.
1695 * opts.h (parse_and_check_align_values): Declare.
1696 * toplev.c (init_alignments): Remove.
1697 (read_log_maxskip): New.
1698 (parse_N_M): Likewise.
1699 (parse_alignment_opts): Likewise.
1700 (backend_init_target): Remove usage of init_alignments.
1701 * toplev.h (parse_alignment_opts): Declare.
1702 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1704 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1705 * tree.c (cl_option_hasher::equal): New.
1706 * varasm.c: Use new global macros.
1708 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1710 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1711 Use a simpler align directive also if MAXSKIP = ALIGN-1.
1712 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1713 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1714 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1715 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1716 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1717 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1718 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1719 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1720 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1721 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1722 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1724 2018-07-04 Martin Liska <mliska@suse.cz>
1725 Jonathan Wakely <jwakely@redhat.com>
1727 * coverage.c: Use correct type.
1728 * doc/invoke.texi: Language correction.
1730 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
1733 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1734 ENDBRANCH for non-tail call which may return via indirect branch.
1735 * doc/extend.texi: Document indirect_return attribute.
1737 2018-07-03 Martin Sebor <msebor@redhat.com>
1739 PR tree-optimization/86274
1740 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1742 (format_floating): Correct handling of infinities and NaNs.
1744 2018-07-03 Martin Sebor <msebor@redhat.com>
1746 * print-tree.c (print_real_cst): New function.
1747 (print_node_brief): Call it.
1748 (print_node): Ditto.
1750 2018-07-03 Jeff Law <law@redhat.com>
1752 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1753 into a single pattern.
1755 * config/h8300/h8300.md (ors code_iterator): New.
1756 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1757 a single pattern and single splitter.
1758 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1759 (iorqi3_1, xorqi3_1): Likewise.
1760 (iorqi3, xorqi3 expanders): Similarly.
1762 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1763 (movmd_internal) into a single pattern using the P mode iterator.
1764 (movmd splitters): Similarly.
1765 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1766 (movsd splitters): Similarly.
1768 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1769 ADDB, ADDW and ADDL into a single ADD attribute which selects the
1770 right table based on the size of the operand.
1771 * config/h8300/h8300.md (length_table): Corresponding changes. All
1772 references to "addb", "addw" and "addl" changed to "add".
1773 (btst patterns): Merge two variants into a single pattern.
1774 (tstqi, tsthi): Likewise.
1775 (addhi3_incdec, addsi3_incdec): Likewise.
1776 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1777 (mulhi3, mulsi3): Likewise.
1778 (udivhi3, udivsi3): Likewise.
1779 (divhi3, divsi3): Likewise.
1780 (andorqi3, andorhi3, andorsi3): Likewise.
1782 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
1785 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1786 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1788 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1790 PR tree-optimization/85694
1791 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1792 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1794 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1795 (<u>avg<mode>3_ceil): New patterns.
1797 2018-07-03 David Malcolm <dmalcolm@redhat.com>
1799 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1800 scan-tree-dump directive.
1801 * gcc.dg/vect/slp-perm-2.c: Likewise.
1802 * gcc.dg/vect/slp-perm-3.c: Likewise.
1803 * gcc.dg/vect/slp-perm-5.c: Likewise.
1804 * gcc.dg/vect/slp-perm-6.c: Likewise.
1805 * gcc.dg/vect/slp-perm-7.c: Likewise.
1806 * gcc.dg/vect/slp-perm-8.c: Likewise.
1808 2018-07-03 Marek Polacek <polacek@redhat.com>
1811 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1813 2018-07-03 Richard Biener <rguenther@suse.de>
1816 * tree-ssa-structalias.c (find_func_clobbers): Properly
1817 handle indirect calls.
1819 2018-07-03 Jeff Law <law@redhat.com>
1821 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1822 (shifts): New code iterator.
1823 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1824 expander. Fix HImode handling on H8/SX.
1825 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1826 (subqi3, subhi3, subsi3 expanders): Likewise.
1827 (andqi3, andhi3, andsi3 expanders): Likewise.
1828 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1829 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1830 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1831 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1832 (zero_extendqihi2, zero_extendqisi2): Likewise.
1833 (extendqihi2, extendqisi2): Likewise.
1834 (rotlqi3, rotlhi3, rotlsi3): Likewise.
1835 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1836 (rotlqi3_1, rotlhi3_1): Likewise.
1837 (logicalhi3_sn, logicalsi3_sn): Likewise.
1838 (logicalhi3, logicalsi3): Likewise.
1840 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1842 * tree-vect-patterns.c (vect_recog_rotate_pattern)
1843 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1844 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1845 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1846 type to append_pattern_def_seq instead of creating a stmt_vec_info
1848 (build_mask_conversion): Likewise. Remove vinfo argument.
1849 (vect_add_conversion_to_patterm): Likewise, renaming to...
1850 (vect_add_conversion_to_pattern): ...this.
1851 (vect_recog_mask_conversion_pattern): Update call to
1852 build_mask_conversion. Pass the vector type to
1853 append_pattern_def_seq here too.
1854 (vect_recog_gather_scatter_pattern): Update call to
1855 vect_add_conversion_to_pattern.
1857 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1859 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1860 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1861 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1862 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1863 STMT_VINFO_PATTERN_DEF_SEQ to null here.
1864 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1865 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1866 append_pattern_def_seq instead of new_pattern_def_seq.
1867 (vect_recog_divmod_pattern): Do both of the above.
1868 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1871 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1873 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1874 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1875 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1876 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1877 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1878 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1879 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1880 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1881 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1882 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1883 parameter with a single stmt_vec_info.
1884 (vect_recog_func_ptr): Likewise.
1885 (vect_recog_gather_scatter_pattern): Likewise, folding in...
1886 (vect_try_gather_scatter_pattern): ...this.
1887 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1888 the stmt_vec_info of the statement to be matched. Don't clear
1889 STMT_VINFO_RELATED_STMT.
1890 (vect_pattern_recog): Update call accordingly.
1892 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1894 PR tree-optimization/85694
1895 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1896 (uavgM3_ceil): Document new optabs.
1897 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1898 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1900 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1901 (savg_ceil_optab): New optabs.
1902 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1903 (vect_vect_recog_func_ptrs): Add it.
1904 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1905 constant directly from the associated lhs.
1907 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1909 * tree-vect-patterns.c (vect_split_statement): New function.
1910 (vect_convert_input): Use it to try to split an existing cast.
1912 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1914 * poly-int.h (print_hex): New function.
1915 * dumpfile.h (dump_dec, dump_hex): Declare.
1916 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1917 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1918 min_input_precision, operation_precision and operation_sign.
1919 * tree-vect-patterns.c (vect_get_range_info): New function.
1920 (vect_same_loop_or_bb_p, vect_single_imm_use)
1921 (vect_operation_fits_smaller_type): Delete.
1922 (vect_look_through_possible_promotion): Add an optional
1923 single_use_p parameter.
1924 (vect_recog_over_widening_pattern): Rewrite to use new
1925 stmt_vec_info infomration. Handle one operation at a time.
1926 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1927 (vect_truncatable_operation_p, vect_set_operation_type)
1928 (vect_set_min_input_precision): New functions.
1929 (vect_determine_min_output_precision_1): Likewise.
1930 (vect_determine_min_output_precision): Likewise.
1931 (vect_determine_precisions_from_range): Likewise.
1932 (vect_determine_precisions_from_users): Likewise.
1933 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1934 (vect_vect_recog_func_ptrs): Put over_widening first.
1936 (vect_pattern_recog): Call vect_determine_precisions.
1938 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1940 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1941 statements that have been replaced by further pattern statements.
1942 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1944 2018-07-03 Richard Biener <rguenther@suse.de>
1946 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1947 always set *dt. Dump vectype in vectype overload.
1948 * dumpfile.h (dump_gimple_expr): New function.
1949 (dump_gimple_expr_loc): Likewise.
1950 * dumpfile.c (dump_gimple_expr): New function.
1951 (dump_gimple_expr_loc): Likewise.
1953 2018-07-02 Jeff Law <law@redhat.com>
1955 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1956 the H8/300, H8/300H and H8/S variants into a single pattern.
1957 (movhi_h8300, movqi_h8300hs): Similarly.
1958 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1959 (QHI mode iterator): New.
1961 * config/h8300/h8300.md: Remove trailing whitespace.
1963 2018-07-02 Jim Wilson <jimw@sifive.com>
1965 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1966 instead of emit_insn for interrupt returns.
1967 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1968 (riscv_sret, riscv_uret): Likewise.
1970 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1972 * pretty-print.c (selftest::test_pp_format): Move save and restore
1973 of quotes to class auto_fix_quotes, and add an instance.
1974 * selftest.c: Include "intl.h".
1975 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1976 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1977 * selftest.h (selftest::auto_fix_quotes): New class.
1979 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
1981 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1982 (aarch64_sve_prepare_conditional_op): Remove.
1983 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1984 Allow aarch64_simd_reg_or_zero as select operand; remove
1985 the aarch64_sve_prepare_conditional_op call.
1986 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1987 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1988 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1989 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1990 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1991 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1992 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1993 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1994 and a splitters to match all of the *_any patterns.
1995 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1997 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1998 (SVE_COND_FP_BINARY_REV): Remove.
1999 (sve_int_op_rev, sve_fp_op_rev): New.
2000 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2001 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2002 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2003 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2004 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2005 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2006 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2007 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2008 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2010 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2011 Remove match_dup 1 from the inner unspec.
2012 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2014 * config/aarch64/aarch64.md (movprfx): New attr.
2015 (length): Default movprfx to 8.
2016 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2017 (*madd<SVE_I>, *msub<SVE_I): Likewise.
2018 (*<su>mul<SVE_I>3_highpart): Likewise.
2019 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2020 (*v<ASHIFT><SVE_I>3): Likewise.
2021 (*<su><MAXMIN><SVE_I>3): Likewise.
2022 (*<su><MAXMIN><SVE_F>3): Likewise.
2023 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2024 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2025 (*div<SVE_F>4): Likewise.
2027 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
2029 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2032 2018-07-02 Richard Biener <rguenther@suse.de>
2034 PR tree-optimization/86363
2035 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2036 memset argument refers to a non-variable address.
2038 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2040 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2041 {PLUS,MINUS}_EXPR code to...
2042 (adjust_symbolic_bound): ...here,
2043 (combine_bound): ...here,
2044 (set_value_range_with_overflow): ...and here.
2046 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2048 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2050 (extract_range_from_abs_expr): ...here.
2052 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
2054 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2055 -fno-omit-frame-pointer when not optimizing.
2057 2018-07-02 Martin Liska <mliska@suse.cz>
2060 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2061 (propagate_nothrow): Likewise.
2063 2018-07-02 Martin Liska <mliska@suse.cz>
2066 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2068 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2070 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2071 function in r262149, changing "loc" param from source_location to
2072 const dump_location_t &.
2073 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2074 declaration, as above.
2076 2018-07-01 Paul Koning <ni1d@arrl.net>
2078 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2079 -munit-asm, -mgnu-asm, -mdec-asm.
2080 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2081 (pdp11_output_labelref): New.
2082 (pdp11_output_def): New.
2083 (pdp11_output_addr_vec_elt): New.
2084 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
2085 %# and %@ format codes.
2086 (pdp11_option_override): New.
2087 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2088 (pdp11_output_ident): New.
2089 (pdp11_asm_named_section): New.
2090 (pdp11_asm_init_sections): New.
2091 (pdp11_file_start): New.
2092 (pdp11_file_end): New.
2093 (output_ascii): Use .ascii/.asciz for -mdec-asm.
2094 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
2095 %o, like %c but octal.
2096 (pdp11_option_override): New.
2097 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2099 (DATA_SECTION_ASM_OP): Ditto.
2100 (READONLY_DATA_SECTION_ASM_OP): New.
2101 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2102 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2103 (ASM_OUTPUT_LABELREF): Ditto.
2104 (ASM_OUTPUT_DEF): Ditto.
2105 (ASM_OUTPUT_EXTERNAL): New.
2106 (ASM_OUTPUT_SOURCE_FILENAME): New.
2107 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2108 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2109 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
2110 %# and %@ format codes.
2111 * config/pdp11/pdp11.opt (mgnu-asm): New.
2112 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2113 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2114 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2116 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
2118 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2119 dereferencing path[] beyond its length.
2121 (debug_all_paths): New.
2122 (rewire_first_differing_edge): New.
2123 (adjust_paths_after_duplication): New.
2124 (duplicate_thread_path): Call adjust_paths_after_duplication.
2126 (thread_through_all_blocks): Add new argument to
2127 duplicate_thread_path.
2129 2018-06-30 Jim Wilson <jimw@sifive.com>
2131 * config/riscv/predicates.md (p2m1_shift_operand): New.
2132 (high_mask_shift_operand): New.
2133 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2134 pattern using p2m1_shift_operand.
2135 (lshsi3_zero_extend_3+2): New combiner pattern using
2136 high_mask_shift_operand.
2138 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2140 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2142 (vect_recog_rotate_pattern): ...here.
2143 (vect_convert_input): Try to insert casts of invariants in the
2145 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2146 preheader to be empty.
2148 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2150 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2151 vector type. If given, install it in the new statement's
2153 (vect_element_precision): New function.
2154 (vect_unpromoted_value): New struct.
2155 (vect_unpromoted_value::vect_unpromoted_value): New function.
2156 (vect_unpromoted_value::set_op): Likewise.
2157 (vect_look_through_possible_promotion): Likewise.
2158 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2159 (vect_widened_op_tree, vect_convert_input): Likewise.
2160 (vect_convert_inputs, vect_convert_output): Likewise.
2161 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2162 to handle the optional cast of the multiplication result and
2163 vect_widened_op_tree to detect the widened multiplication itself.
2164 Do not require the input and output of promotion casts to have
2165 the same sign, but base the signedness of the operation on the
2166 input rather than the result. If the pattern includes two
2167 promotions, check that those promotions have the same sign.
2168 Do not restrict the MULT_EXPR handling to a double-width result;
2169 handle quadruple-width results and wider. Use vect_convert_inputs
2170 to convert the inputs to the common type.
2171 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
2172 to handle the optional cast of the ABS result. Also allow a sign
2173 change or a sign extension between the ABS and MINUS.
2174 Use vect_widened_op_tree to detect the widened subtraction and use
2175 vect_convert_inputs to convert the inputs to the common type.
2176 (vect_handle_widen_op_by_const): Delete.
2177 (vect_recog_widen_op_pattern): New function.
2178 (vect_recog_widen_mult_pattern): Use it.
2179 (vect_recog_widen_shift_pattern): Likewise.
2180 (vect_recog_widen_sum_pattern): Use
2181 vect_look_through_possible_promotion to handle the promoted
2184 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2186 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2187 the containing gimple_seq *.
2188 * gimple-iterator.h (gsi_for_stmt): Declare it.
2189 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2190 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2191 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2192 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2193 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2195 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2197 (vect_mark_pattern_stmts): ...here. Handle cases in which the
2198 statement being replaced is part of an existing pattern
2199 definition sequence, inserting the new pattern statements before
2201 (vect_pattern_recog_1): Don't return a bool. If the statement
2202 is already part of a pattern, instead apply pattern matching
2203 to the pattern definition statements. Don't clear the
2204 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2205 (vect_pattern_recog): Don't break after the first match;
2206 continue processing the pattern definition statements instead.
2207 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2209 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2211 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2212 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2213 (vect_recog_widen_sum_pattern): Use it.
2215 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2217 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2218 phi is not a pattern statement and has not been replaced by
2219 a pattern statement.
2220 * tree-vect-patterns.c (type_conversion_p): Don't check
2221 STMT_VINFO_IN_PATTERN_P.
2222 (vect_recog_vector_vector_shift_pattern): Likewise.
2223 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2224 the pattern statement rather than the original statement; check
2225 directly for a WIDEN_MULT_EXPR here.
2226 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2227 vect_is_simple_use to return the pattern statement rather
2228 than the original statement; use is_pattern_stmt_p to check
2229 for such a pattern statement.
2230 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2231 to return the pattern statement rather than the original statement;
2232 don't do the same transformation here.
2233 (vect_is_simple_use): If the defining statement has been replaced
2234 by a pattern statement, return the pattern statement instead.
2235 Remove the corresponding (local) transformation from the vectype
2238 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2240 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2241 end and default to null.
2242 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2243 (vectorizable_reduction): Update calls accordingly, dropping the
2244 gimple ** argument if the passed-back statement isn't needed.
2245 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2246 (vect_recog_rotate_pattern): Likewise.
2247 (vect_recog_mask_conversion_pattern): Likewise.
2248 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2249 (vect_mask_constant_operand_p): Likewise.
2250 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2251 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2252 (get_group_load_store_type, get_load_store_type): Likewise.
2253 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2254 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2255 (vectorizable_conversion, vectorizable_assignment): Likewise.
2256 (vectorizable_shift, vectorizable_operation): Likewise.
2257 (vectorizable_store, vect_is_simple_cond): Likewise.
2258 (vectorizable_condition, vectorizable_comparison): Likewise.
2259 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2260 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2261 and move it to the end. Cope with null def_stmt_outs.
2263 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2265 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2267 2018-06-29 Jeff Law <law@redhat.com>
2269 * config/v850/v850.c (v850_legitimate_address_p): Handle large
2270 displacements for TARGET_V850E2V3 and newer.
2271 (TARGET_LRA_P): Remove. Defaults to LRA now.
2272 * config/v850/v850.md (sign23byte_load): Remove.
2273 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2274 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2276 2018-06-29 Martin Liska <mliska@suse.cz>
2279 * coverage.c (coverage_init): Mangle full path name.
2280 * doc/invoke.texi: Document the change.
2281 * gcov-io.c (mangle_path): New.
2282 * gcov-io.h (mangle_path): Likewise.
2283 * gcov.c (mangle_name): Use mangle_path for path mangling.
2285 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2287 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2288 if starting source register is not even.
2290 2018-06-29 Martin Liska <mliska@suse.cz>
2292 PR tree-optimization/86263
2293 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2294 Make edge redirection.
2296 2018-06-29 David Malcolm <dmalcolm@redhat.com>
2298 * dumpfile.c (dump_loc): Add indentation based on scope depth.
2299 (dump_scope_depth): New variable.
2300 (get_dump_scope_depth): New function.
2301 (dump_begin_scope): New function.
2302 (dump_end_scope): New function.
2303 * dumpfile.h (get_dump_scope_depth): New declaration.
2304 (dump_begin_scope): New declaration.
2305 (dump_end_scope): New declaration.
2306 (class auto_dump_scope): New class.
2307 (AUTO_DUMP_SCOPE): New macro.
2308 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2311 2018-06-29 Richard Biener <rguenther@suse.de>
2313 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2314 compute_all_dependences succeeds.
2315 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2316 exceed --param loop-max-datarefs-for-datadeps.
2318 2018-06-29 Jakub Jelinek <jakub@redhat.com>
2320 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2322 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
2325 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2326 alternative 0 in preferred_for_speed attribute.
2328 2018-06-28 Paul Koning <ni1d@arrl.net>
2330 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2331 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2332 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2333 * config/pdp11/pdp11.md: Correct "length" attribute calculation
2334 for shift insn patterns.
2336 2018-06-28 David Malcolm <dmalcolm@redhat.com>
2338 * cgraph.c (cgraph_node::get_body): Replace assignments to
2339 "dump_file" with calls to set_dump_file.
2340 * dumpfile.c (alt_dump_file): Make static, and group with...
2341 (alt_flags): ...this definition.
2342 (dumps_are_enabled): New variable.
2343 (refresh_dumps_are_enabled): New function.
2344 (set_dump_file): New function.
2345 (set_alt_dump_file): New function.
2346 (gcc::dump_manager::dump_start): Replace assignments to
2347 "dump_file" and "alt_dump_file" with calls to set_dump_file and
2349 (gcc::dump_manager::dump_finish): Likewise.
2350 * dumpfile.h (alt_dump_file): Delete decl.
2351 (dumps_are_enabled): New variable decl.
2352 (set_dump_file): New function decl.
2353 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2355 * tree-nested.c (lower_nested_functions): Replace assignments to
2356 "dump_file" with calls to set_dump_file.
2358 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2360 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2361 goto_locus of each outgoing edge of each basic block.
2363 2018-06-28 Richard Biener <rguenther@suse.de>
2365 * dwarf2out.c (decl_scope_table): Remove.
2366 (push_decl_scope): Likewise.
2367 (pop_decl_scope): Likewise.
2368 (gen_type_die_for_member): Do not call push/pop_decl_scope.
2369 (gen_struct_or_union_type_die): Likewise.
2370 (gen_tagged_type_die): Likewise.
2371 (dwarf2out_init): Do not initialize decl_scope_table.
2372 (dwarf2out_c_finalize): Do not free it.
2374 2018-06-28 Richard Biener <rguenther@suse.de>
2376 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2377 deciding whether to not re-use a DIE.
2379 2018-06-28 Richard Biener <rguenther@suse.de>
2381 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2382 DW_AT_abstract_origin attribute.
2384 2018-06-28 Martin Liska <mliska@suse.cz>
2386 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2387 Use newly introduced constants.
2388 * tree-switch-conversion.h (struct jump_table_cluster):
2389 Define max_ratio_for_size and max_ratio_for_speed.
2391 2018-06-28 Martin Liska <mliska@suse.cz>
2393 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2394 Add new checking assert to catch invalid state.
2395 (jump_table_cluster::can_be_handled): Handle single case
2397 (jump_table_cluster::is_beneficial): Bail out for such case.
2398 (bit_test_cluster::find_bit_tests):
2399 Add new checking assert to catch invalid state.
2400 (bit_test_cluster::can_be_handled): Handle single case
2402 (bit_test_cluster::is_beneficial): Bail out for such case.
2403 (switch_decision_tree::analyze_switch_statement):
2406 2018-06-28 Martin Liska <mliska@suse.cz>
2408 * common.opt: Introduce -completion option.
2409 * gcc.c (driver_handle_option): Handle it.
2410 (driver::main): Print completions if completion
2412 * opt-suggestions.c (option_proposer::get_completions):
2414 (option_proposer::suggest_completion): Likewise.
2415 (option_proposer::find_param_completions): Likewise.
2416 (verify_autocompletions): Likewise.
2417 (test_completion_valid_options): Likewise.
2418 (test_completion_valid_params): Likewise.
2419 (in_completion_p): Likewise.
2420 (empty_completion_p): Likewise.
2421 (test_completion_partial_match): Likewise.
2422 (test_completion_garbage): Likewise.
2423 (opt_proposer_c_tests): Likewise.
2424 * opt-suggestions.h: Declare new functions.
2425 * opts.c (common_handle_option): Handle OPT__completion_.
2426 * selftest-run-tests.c (selftest::run_tests): Add
2427 opt_proposer_c_tests.
2428 * selftest.c (assert_str_startswith): New.
2429 * selftest.h (assert_str_startswith): Likewise.
2430 (opt_proposer_c_tests): New.
2431 (ASSERT_STR_STARTSWITH): Likewise.
2433 2018-06-28 Martin Liska <mliska@suse.cz>
2435 * Makefile.in: Add opt-suggestions.o.
2436 * gcc-main.c: Include opt-suggestions.h.
2437 * gcc.c (driver::driver): Likewise.
2438 (driver::~driver): Remove m_option_suggestions.
2439 (driver::build_option_suggestions): Moved to option_proposer.
2440 (driver::suggest_option): Likewise.
2441 (driver::handle_unrecognized_options): Use option_proposer.
2442 * gcc.h (class driver): Add new memver m_option_proposer.
2443 * opt-suggestions.c: New file.
2444 * opt-suggestions.h: New file.
2446 2018-06-28 Martin Liska <mliska@suse.cz>
2448 * vec.h (class auto_string_vec): New (moved from auto_argvec).
2449 (auto_string_vec::~auto_string_vec): Likewise.
2451 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2453 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2454 prevent_decl_creation_for_types fields up and add reset_location field.
2455 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2456 statement if id->reset_location is true.
2457 (copy_edges_for_bb): Do not set goto_locus on the new edges if
2458 id->reset_location is true.
2459 (copy_phis_for_bb): Force input_location on the arguments if
2460 id->reset_location is true.
2461 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2462 is set on the function to be inlined.
2464 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
2466 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2468 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
2470 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2471 registers for Pmode.
2472 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2473 hard registers for the clobbered pseudo.
2475 2018-06-27 Paul Koning <ni1d@arrl.net>
2477 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2478 mutually exclusive options.
2479 * config/pdp11/constraints.md (h): New constraint.
2480 (O): Update definition to match shift code generation.
2481 (D): New constraint.
2482 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2484 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2486 (output_jump): Change arguments.
2487 (pdp11_fixed_cc_regs): New function.
2488 (pdp11_cc_mode): Ditto.
2489 (pdp11_expand_shift): Ditto.
2490 (pdp11_assemble_shift): Ditto.
2491 (pdp11_small_shift): Ditto.
2492 (pdp11_branch_cost): Remove.
2493 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2495 (pdp11_register_move_cost): Update for CC registers.
2496 (pdp11_rtx_costs): Add case for LSHIFTRT.
2497 (pdp11_output_jump): Add CCNZ mode conditional branches.
2498 (notice_update_cc_on_set): Remove.
2499 (pdp11_cc_mode): New function.
2500 (simple_memory_operand): Correct pre/post decrement case.
2501 (no_side_effect_operand): New function.
2502 (pdp11_regno_reg_class): Add CC_REGS class.
2503 (pdp11_fixed_cc_regs): New function.
2504 (pdp11_small_shift): New function.
2505 (pdp11_expand_shift): New function to expand shift insns.
2506 (pdp11_assemble_shift): New function to output shifts.
2507 (pdp11_branch_cost): Remove.
2508 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2509 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2510 (WCHAR_TYPE): Ditto.
2511 (PTRDIFF_TYPE): Ditto.
2512 (ADJUST_INSN_LENGTH): New macro.
2513 (FIXED_REGISTERS): Add CC registers.
2514 (CALL_USED_REGISTERS): Ditto.
2516 (REG_CLASS_NAMES): Ditto.
2517 (REG_CLASS_CONTENTS): Ditto.
2518 (SELECT_CC_MODE): Use new function.
2519 (TARGET_FLAGS_REGNUM): New macro.
2520 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2521 (cc0_reg_rtx): Remove.
2522 (CC_STATUS_MDEP): Remove.
2523 (CC_STATUS_MDEFP_INIT): Remove.
2524 (CC_IN_FPU): Remove.
2525 (NOTICE_UPDATE_CC): Remove.
2526 (REGISTER_NAMES): Add CC registers.
2527 (BRANCH_COST): Change to constant 1.
2528 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2530 * config/pdp11/pdp11.opt (mbcopy): Remove.
2531 (mbcopy-builtin): Remove.
2532 (mbranch-cheap): Remove.
2533 (mbranch-expensive): Remove.
2534 * config/pdp11/predicates.md (expand_shift_operand): Update to
2535 match shift code generation.
2536 (ccnz_operator): New predicate.
2537 * doc/invoke.texi (PDP-11 Options): Remove deleted options
2538 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2539 Remove non-existent option -mabshi, -mno-abshi. Document mutually
2541 * doc/md.texi (PDP-11): Document new D and h constraints. Update
2542 description of O constraint.
2544 2018-06-27 Jeff Law <law@redhat.com>
2545 Austin Law <austinklaw@gmail.com>
2547 * config/v850/v850.md (addsi3_set_flags): New pattern.
2548 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2549 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2550 (zero_extendhisi2_v850_set_flags): Likewise.
2551 (zero_extendqisi2_v850_set_flags): Likewise.
2552 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2553 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2554 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2556 * config/v850/v850-protos.h (notice_update_cc): Remove.
2557 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2558 (v850_print_operand): Handle 'D' and "d".
2559 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2560 Add handling of arithmetic/logical operations compared against zero.
2561 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2562 Do not look at v850_compare_op, instead get mode from last argument.
2563 (v850_gen_compare): Remove
2564 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2565 after reload for prologue insns.
2566 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2568 (construct_save_jarl): Likewise.
2569 (TARGET_FLAGS_REGNUM): Define.
2570 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2571 (NOTICE_UPDATE_CC): Remove.
2572 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2573 than cc0. Conditionalize on reload_completed.
2574 (cmpsi_insn, setfcc_insn): Likewise.
2575 (tst1 splitter): Turn into define_and_split which sets the flags
2577 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2578 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2579 (cstoresf4, cstoredf4): Clobber the flags.
2580 (cmpsi, cmpsf, cmpdf): Remove expanders.
2581 (setf_insn): Remove pattern.
2582 (addsi3): Turn into define_and_split which clobbers the flags after
2583 reload and a suitable pattern (addsi3_clobber_flags) for use after
2585 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2586 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2587 (ashrsi3, ashrsi3_v850e2): Likewise.
2588 (bins): Clobber the flags.
2589 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2590 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2591 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2592 (call_value_internal_short, call_value_internal_long): Likewise.
2593 (callt_save_interrupt, callt_return_interrupt): Likewise.
2594 (save_interrupt, return_interrupt): Likewise.
2595 (callt_save_all_interrupt, save_all_interrupt): Likewise.
2596 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2597 (restore_all_interrupt, _restore_all_interrupt): Likewise.
2598 (All FP comparisons): Only allow after reload has completed.
2600 (divh, divhu): Tweak output template.
2601 (branch_z_normal, branch_z_invert): Remove
2602 (branch_nz_normal, branch_nz_invert): Likewise.
2603 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2605 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2606 * config/v850/v850.c (notice_update_cc): Remove.
2607 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
2608 (CC_NO_CARRY): Likewise.
2609 (NOTICE_UPDATE_CC): Define to nothing.
2610 * config/v850/v850.md: Remove block comment on cc0 handling
2611 Remove "cc" attribute from all patterns. Remove cc_status handling
2612 from all patterns. Minor formatting fixes.
2614 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2616 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2617 (cortex-a76.cortex-a55): Likewise.
2618 * config/aarch64/aarch64-tune.md: Regenerate.
2619 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2620 cortex-a76.cortex-a55.
2622 2018-06-27 Jeff Law <law@redhat.com>
2624 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2625 (MULTILIB_DIRNAMES): Similarly.
2627 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
2629 * gimple.h (gimple_return_retbnd): Delete.
2630 (gimple_return_set_retbnd): Likewise.
2631 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2632 gimple_return_set_retbnd.
2633 * gimple-pretty-print.c (dump_gimple_return): Remove call to
2634 gimple_return_retbnd and adjust.
2635 * tree-inline.h (struct copy_body_data): Remove retbnd field.
2636 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2637 Explicitly return NULL in a couple more cases. Move assertion
2638 on debug statements and remove unreachable code.
2639 (reset_debug_binding): Do not test id->retbnd.
2640 (expand_call_inline): Do not set it.
2642 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2644 * configure.ac: Add --disable-gcov option.
2645 * configure: Regenerate.
2646 * Makefile.in: Honour @enable_gcov@.
2647 * doc/install.texi: Document --disable-gcov.
2649 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2651 * config/arm/arm-cpus.in (cortex-a76): New entry.
2652 (cortex-a76.cortex-a55): Likewise.
2653 * config/arm/arm-tables.opt: Regenerate.
2654 * config/arm/arm-tune.md: Likewise.
2655 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2656 * doc/invoke.texi (ARM Options): Document cortex-a76 and
2657 cortex-a76.cortex-a55.
2659 2018-06-27 Tamar Christina <tamar.christina@arm.com>
2662 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2664 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
2666 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2668 (EPILOGUE_USES): Likewise.
2670 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
2672 * tree-inline.c (remap_location): New function extracted from...
2673 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
2674 (copy_phis_for_bb): ...here. Call remap_location.
2675 (copy_cfg_body): Adjust call to copy_edges_for_bb.
2677 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2679 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2680 unaligned vsx for 16B memset.
2682 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
2685 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2686 ieee128_float_type_node to long_double_type_node unless
2687 TARGET_LONG_DOUBLE_128 is set.
2689 2018-06-26 David Malcolm <dmalcolm@redhat.com>
2691 * cfgloop.c (get_loop_location): Convert return type from
2692 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2693 by implicit construction from rtx_insn *, and using
2694 dump_user_location_t::from_function_decl for the fallback case.
2695 * cfgloop.h (get_loop_location): Convert return type from
2696 location_t to dump_user_location_t.
2697 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2698 dump_printf_loc to pass in a dump_location_t rather than a
2699 location_t, via the gimple stmt.
2700 * coverage.c (get_coverage_counts): Update calls to
2701 dump_printf_loc to pass in dump_location_t rather than a
2703 * doc/optinfo.texi (Dump types): Convert example of
2704 dump_printf_loc from taking "locus" to taking "insn". Update
2705 description of the "_loc" calls to cover dump_location_t.
2706 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2708 (dump_user_location_t::dump_user_location_t): New constructors,
2709 from gimple *stmt and rtx_insn *.
2710 (dump_user_location_t::from_function_decl): New function.
2711 (dump_loc): Make static.
2712 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2713 const dump_location_t &.
2714 (dump_generic_expr_loc): Delete.
2715 (dump_printf_loc): Convert param "loc" from location_t to
2716 const dump_location_t &.
2717 (selftest::test_impl_location): New function.
2718 (selftest::dumpfile_c_tests): New function.
2719 * dumpfile.h: Include "profile-count.h".
2720 (class dump_user_location_t): New class.
2721 (struct dump_impl_location_t): New struct.
2722 (class dump_location_t): New class.
2723 (dump_printf_loc): Convert 2nd param from source_location to
2724 const dump_location_t &.
2725 (dump_generic_expr_loc): Delete.
2726 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2727 const dump_location_t &.
2728 * gimple-fold.c (fold_gimple_assign): Update call to
2729 dump_printf_loc to pass in a dump_location_t rather than a
2730 location_t, via the gimple stmt.
2731 (gimple_fold_call): Likewise.
2732 * gimple-loop-interchange.cc
2733 (loop_cand::analyze_iloop_reduction_var): Update for change to
2734 check_reduction_path.
2735 (tree_loop_interchange::interchange): Update for change to
2737 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2738 change in return-type of find_loop_location.
2739 (graphite_regenerate_ast_isl): Likewise.
2740 * graphite-optimize-isl.c (optimize_isl): Likewise.
2741 * graphite.c (graphite_transform_loops): Likewise.
2742 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2743 pass in a dump_location_t rather than a location_t, via the
2745 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2746 * ipa.c (walk_polymorphic_call_targets): Likewise.
2747 * loop-unroll.c (report_unroll): Convert "locus" param from
2748 location_t to dump_location_t.
2749 (decide_unrolling): Update for change to get_loop_location's
2751 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2752 location_t to dump_user_location_t.
2753 (grid_find_single_omp_among_assignments_1): Updates calls to
2754 dump_printf_loc to pass in a dump_location_t rather than a
2755 location_t, via the gimple stmt.
2756 (grid_parallel_clauses_gridifiable): Convert "tloc" from
2757 location_t to dump_location_t. Updates calls to dump_printf_loc
2758 to pass in a dump_location_t rather than a location_t, via the
2760 (grid_inner_loop_gridifiable_p): Likewise.
2761 (grid_dist_follows_simple_pattern): Likewise.
2762 (grid_gfor_follows_tiling_pattern): Likewise.
2763 (grid_target_follows_gridifiable_pattern): Likewise.
2764 (grid_attempt_target_gridification): Convert initialization
2765 of local "grid" from memset to zero-initialization; FIXME: does
2766 this require C++11? Update call to dump_printf_loc to pass in a
2767 optinfo_location rather than a location_t, via the gimple stmt.
2768 * profile.c (read_profile_edge_counts): Updates call to
2769 dump_printf_loc to pass in a dump_location_t rather than a
2771 (compute_branch_probabilities): Likewise.
2772 * selftest-run-tests.c (selftest::run_tests): Call
2774 * selftest.h (dumpfile_c_tests): New decl.
2775 * tree-loop-distribution.c (pass_loop_distribution::execute):
2776 Update for change in return type of find_loop_location.
2777 * tree-parloops.c (parallelize_loops): Likewise.
2778 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2779 "locus" from location_t to dump_user_location_t.
2780 (canonicalize_loop_induction_variables): Likewise.
2781 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2782 for change in return type of find_loop_location.
2783 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2784 to dump_printf_loc to pass in a dump_location_t rather than a
2785 location_t, via the stmt.
2786 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2788 * tree-vect-loop-manip.c (find_loop_location): Convert return
2789 type from source_location to dump_user_location_t.
2790 (vect_do_peeling): Update for above change.
2791 (vect_loop_versioning): Update for change in type of
2793 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2794 from location_t to dump_user_location_t.
2795 (vect_estimate_min_profitable_iters): Update for change in type
2797 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2798 location_t to dump_location_t.
2799 (vect_slp_bb): Update for change in type of vect_location.
2800 * tree-vectorizer.c (vect_location): Convert from source_location
2801 to dump_user_location_t.
2802 (try_vectorize_loop_1): Update for change in vect_location's type.
2803 (vectorize_loops): Likewise.
2804 (increase_alignment): Likewise.
2805 * tree-vectorizer.h (vect_location): Convert from source_location
2806 to dump_user_location_t.
2807 (find_loop_location): Convert return type from source_location to
2808 dump_user_location_t.
2809 (check_reduction_path): Convert 1st param from location_t to
2810 dump_user_location_t.
2811 * value-prof.c (check_counter): Update call to dump_printf_loc to
2812 pass in a dump_user_location_t rather than a location_t; update
2813 call to error_at for change in type of "locus".
2814 (check_ic_target): Update call to dump_printf_loc to
2815 pass in a dump_user_location_t rather than a location_t, via the
2818 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
2820 * config/s390/s390.h (enum processor_flags): Do not use
2821 default tune parameter when -march was specified.
2823 2018-06-26 Jakub Jelinek <jakub@redhat.com>
2826 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2827 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2830 2018-06-26 Richard Biener <rguenther@suse.de>
2832 PR tree-optimization/86287
2834 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2835 (vect_analyze_loop): Initialize n_stmts.
2837 2018-06-26 Richard Biener <rguenther@suse.de>
2840 * fold-const.c (fold_convertible_p): Pointer extension
2843 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
2846 * dwarf2out.c (loc_list_has_views): Adjust comments.
2847 (dw_loc_list): Split single cross-partition range with
2850 2018-06-25 Jeff Law <law@redhat.com>
2852 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2853 on -mbig-switch by default.
2855 * config/v850/predicates.md (const_float_1_operand): Fix match_code
2857 (const_float_0_operand): Remove unused predicate.
2858 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2859 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2860 (recipsf2): New expander. Original pattern now called
2862 (recipdf2, recipdf2_insn): Similarly.
2863 (rsqrtsf2, rsqrtsf2_insn): Similarly
2864 (rsqrtdf2, rsqrtdf2_insn): Similarly
2866 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
2868 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2869 Simplify logic for FreeBSD (twice).
2871 2018-06-25 Martin Sebor <msebor@redhat.com>
2873 PR tree-optimization/86204
2874 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2875 a strnlen result if it's less than the length of the string.
2877 2018-06-25 Martin Sebor <msebor@redhat.com>
2879 PR tree-optimization/85700
2880 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2881 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2882 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2884 2018-06-25 Martin Sebor <msebor@redhat.com>
2886 * doc/extend.texi (Zero-length arrays): Update and clarify.
2888 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
2890 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2891 added IEEE/IBM long double multilib support on PowerPC little
2892 endian Linux systems.
2893 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2894 (MULTILIB_DEFAULTS): Likewise.
2895 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2897 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2898 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2899 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2901 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
2904 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2905 (REORDER_45): Likewise.
2907 2018-06-25 Jeff Law <law@redhat.com>
2909 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2910 dividend to 32 bits. Adjust length.
2911 (udivmodhi4): Cleanup output template. Fix length.
2913 2018-06-25 Carl Love <cel@us.ibm.com>
2915 * config/rs6000/vsx.md: Change word selector to prefered location.
2917 2018-06-25 Richard Biener <rguenther@suse.de>
2919 PR tree-optimization/86304
2920 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2921 epilogue-if-converted loops as well.
2923 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
2925 * lto-section-out.c (lto_begin_section): Do not print section
2926 name for noaddr and unnumbered dumps.
2928 2018-06-25 Richard Biener <rguenther@suse.de>
2930 * tree-vectorizer.h (struct vec_info_shared): New structure
2931 with parts split out from struct vec_info and loop_nest from
2932 struct _loop_vec_info.
2933 (struct vec_info): Adjust accordingly.
2934 (struct _loop_vec_info): Likewise.
2935 (LOOP_VINFO_LOOP_NEST): Adjust.
2936 (LOOP_VINFO_DATAREFS): Likewise.
2937 (LOOP_VINFO_DDRS): Likewise.
2938 (struct _bb_vec_info): Likewise.
2939 (BB_VINFO_DATAREFS): Likewise.
2940 (BB_VINFO_DDRS): Likewise.
2941 (struct _stmt_vec_info): Add dr_aux member.
2942 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2943 (DR_MISALIGNMENT_UNINITIALIZED): New.
2944 (set_dr_misalignment): Adjust.
2945 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2946 (vect_analyze_loop): Adjust prototype.
2947 (vect_analyze_loop_form): Likewise.
2948 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2949 Compute dependences lazily.
2950 (vect_record_base_alignments): Use shared datarefs/ddrs.
2951 (vect_verify_datarefs_alignment): Likewise.
2952 (vect_analyze_data_refs_alignment): Likewise.
2953 (vect_analyze_data_ref_accesses): Likewise.
2954 (vect_analyze_data_refs): Likewise.
2955 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2956 constructor parameter for shared part.
2957 (vect_analyze_loop_form): Pass in shared part and adjust.
2958 (vect_analyze_loop_2): Pass in storage for the number of
2959 stmts. Move loop nest finding to the caller. Compute
2961 (vect_analyze_loop): Pass in shared part.
2962 (vect_transform_loop): Verify shared datarefs are unchanged.
2963 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2964 constructor parameter for shared part.
2965 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2966 (vect_slp_bb): Verify shared datarefs are unchanged before
2968 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2970 (new_stmt_vec_info): Initialize DR_AUX misalignment to
2971 DR_MISALIGNMENT_UNINITIALIZED.
2972 * tree-vectorizer.c (vec_info::vec_info): Add constructor
2973 parameter for shared part.
2974 (vec_info::~vec_info): Adjust.
2975 (vec_info_shared::vec_info_shared): New.
2976 (vec_info_shared::~vec_info_shared): Likewise.
2977 (vec_info_shared::save_datarefs): Likewise.
2978 (vec_info_shared::check_datarefs): Likewise.
2979 (try_vectorize_loop_1): Construct shared part live for analyses
2980 of a single loop for multiple vector sizes.
2981 * tree-parloops.c (gather_scalar_reductions): Adjust.
2983 2018-06-25 Richard Biener <rguenther@suse.de>
2985 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2986 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2987 (vect_analyze_data_refs): Remove similar code from here and
2988 simplify accordingly.
2990 2018-06-25 Richard Biener <rguenther@suse.de>
2992 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2993 for reverse storage order accesses rather than asserting
2994 they cannot happen here.
2996 2018-06-25 Tom de Vries <tdevries@suse.de>
2999 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3000 Use data16 instead of .byte for insn prefix.
3002 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
3005 * parser.c (make_char_string_pack): Pass this literal chars
3006 through cpp_interpret_string.
3007 (cp_parser_userdef_numeric_literal): Check the result of
3008 make_char_string_pack.
3010 2018-06-24 Maya Rashish <coypu@sdf.org>
3012 * ginclude/stddef.h: Simplify conditions around avoiding
3013 re-definition of __size_t.
3015 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3017 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3018 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3020 2018-06-22 Maya Rashish <coypu@sdf.org>
3022 * doc/invoke.texi (mno-fancy-math-387): Update for changes
3023 made to OpenBSD and NetBSD through the years.
3025 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3027 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3028 behavior of vec_pack (vector double, vector double) to match
3029 behavior of vec_float2 (vector double, vector double).
3031 2018-06-22 Olivier Hainque <hainque@adacore.com>
3033 * gimplify.c (gimplify_function_tree): Prevent creation
3034 of a trampoline for the address of the current function
3035 passed to entry/exit instrumentation hooks.
3037 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
3040 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3043 2018-06-22 Martin Liska <mliska@suse.cz>
3045 PR tree-optimization/86263
3046 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3047 Bail out if is_enabled is false.
3048 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3050 (jump_table_cluster::is_enabled): New function.
3052 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3054 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3055 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3056 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3057 (lto_input_ts_binfo_tree_pointers): Likewise.
3058 * tree-streamer-out.c (streamer_write_tree_bitfields,
3059 write_ts_binfo_tree_pointers): Likewise.
3060 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3062 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3064 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3066 2018-06-22 Martin Liska <mliska@suse.cz>
3068 * symbol-summary.h (get): Make it pure and inline move
3069 functionality from ::get function.
3070 (get): Remove and inline into ::get and ::get_create.
3071 (get_create): Move code from ::get function.
3073 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3076 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3077 -x assembler-with-cpp.
3079 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3081 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3082 _FILE_OFFSET_BITS=64 for C++.
3084 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3086 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3087 conversion insn that shows up when pr85657-3.c is compiled using
3088 IEEE 128-bit long double.
3089 (neg<mode>2_internal): Use the correct mode to check whether the
3090 mode is IBM extended.
3091 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3092 multiply and divide external functions from being created more
3095 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3097 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3099 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
3100 the edge can be forwarded.
3101 (cfg_layout_merge_blocks): Likewise.
3103 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3105 * except.c (finish_eh_generation): Commit edge insertions only after
3106 the EH edges have been redirected from post-landing to landing pads.
3108 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3110 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3111 create_tmp_var_for to create the FRAME decl.
3112 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3114 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3116 * tree-inline.c (copy_edges_for_bb): Minor tweak.
3117 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3118 debug statement when resetting its value.
3119 (expand_call_inline): Copy the locus of the call onto the assignment
3120 of the return value, if any. Use local variable in more cases.
3122 2018-06-21 Martin Liska <mliska@suse.cz>
3124 * ipa-pure-const.c (propagate_nothrow): Use
3125 funct_state_summaries->get.
3126 (dump_malloc_lattice): Likewise.
3127 (propagate_malloc): Likewise.
3129 2018-06-21 Richard Biener <rguenther@suse.de>
3131 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3132 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3133 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3135 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3136 BLOCK_ABSTRACT_ORIGIN unconditionally.
3138 2018-06-21 David Malcolm <dmalcolm@redhat.com>
3140 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3142 * ipa-reference.c (ipa_reference_c_finalize): Delete
3143 ipa_ref_opt_sum_summaries and set it to NULL.
3145 2018-06-21 Tom de Vries <tdevries@suse.de>
3147 PR tree-optimization/85859
3148 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3149 test with comment from bb_no_side_effects_p.
3151 2018-06-21 Richard Biener <rguenther@suse.de>
3153 PR tree-optimization/86232
3154 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3155 max for constant niter.
3157 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3159 * config/aarch64/aarch64-simd.md
3160 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3162 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3164 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3165 Make opernads of the unspec commutative.
3167 2018-06-21 Richard Biener <rguenther@suse.de>
3169 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3170 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3171 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3172 (vect_analyze_data_ref_dependence): Re-order checks to deal with
3174 (vect_record_base_alignments): Do not record base alignment
3175 for gathers or scatters.
3176 (vect_compute_data_ref_alignment): Drop return value that is always
3177 true. Bail out early for gathers or scatters.
3178 (vect_enhance_data_refs_alignment): Bail out early for gathers
3180 (vect_find_same_alignment_drs): Likewise.
3181 (vect_analyze_data_refs_alignment): Remove dead code.
3182 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3183 (vect_analyze_data_refs): For possible gathers or scatters do
3184 not create an alternate DR, just check their possible validity
3185 and mark them. Adjust DECL_NONALIASED handling to not rely
3187 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3188 update inits of gathers or scatters.
3189 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3190 Also copy gather/scatter flag to pattern vinfo.
3192 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
3194 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3195 behavior of vec_packsu (vector unsigned long long, vector unsigned
3196 long long) to match behavior of vec_packs with same signature.
3198 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3199 Thomas Schwinge <thomas@codesourcery.com>
3200 Cesar Philippidis <cesar@codesourcery.com>
3202 * gimplify.c (gimplify_scan_omp_clauses): Add support for
3203 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3204 (gimplify_adjust_omp_clauses): Likewise.
3205 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3206 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3207 (gimplify_omp_target_update): Update handling of acc update and
3209 * omp-low.c (install_var_field): Remove unused parameter
3210 base_pointers_restrict.
3211 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3212 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3214 (omp_target_base_pointers_restrict_p): Delete.
3215 (scan_omp_target): Update call to scan_sharing_clauses.
3216 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3218 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3219 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3220 (convert_local_omp_clauses): Likewise.
3221 * tree-pretty-print.c (dump_omp_clause): Likewise.
3222 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
3224 (omp_clause_code_name): Likewise.
3226 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3229 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3232 PR tree-optimization/86231
3233 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
3234 anti-range don't overwrite *vr0min before using it to compute *vr0max.
3236 2018-06-20 Tom de Vries <tdevries@suse.de>
3238 PR tree-optimization/86097
3239 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3240 iv type if signedness of iv type is not the same as that of *nit.
3242 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3244 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
3245 EDGE_EH edges, verify they are all EDGE_EH.
3247 2018-06-20 Maya Rashish <coypu@sdf.org>
3249 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3251 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3253 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3254 * config/aarch64/aarch64.c (xgene1_tunings): Add
3255 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3256 (aarch64_mode_valid_for_sched_fusion_p):
3257 Allow 16-byte modes.
3258 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3259 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3261 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3263 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3264 * config/aarch64/iterators.md (VQ2): New mode iterator.
3266 2018-06-20 Martin Liska <mliska@suse.cz>
3268 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3269 Change default ratio from 10 to 8.
3271 2018-06-20 Martin Liska <mliska@suse.cz>
3273 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3275 (bit_test_cluster::find_bit_tests): Likewise.
3276 (switch_decision_tree::analyze_switch_statement): Find clusters.
3277 * tree-switch-conversion.h (struct jump_table_cluster): Document
3280 2018-06-20 Martin Liska <mliska@suse.cz>
3282 * tree-switch-conversion.c (switch_conversion::collect):
3283 Record m_uniq property.
3284 (switch_conversion::expand): Bail out for special conditions.
3285 (group_cluster::~group_cluster): New.
3286 (group_cluster::group_cluster): Likewise.
3287 (group_cluster::dump): Likewise.
3288 (jump_table_cluster::emit): New.
3289 (switch_decision_tree::fix_phi_operands_for_edges): New.
3290 (struct case_node): Remove struct.
3291 (jump_table_cluster::can_be_handled): New.
3292 (case_values_threshold): Moved to header.
3293 (reset_out_edges_aux): Likewise.
3294 (jump_table_cluster::is_beneficial): New.
3295 (bit_test_cluster::can_be_handled): Likewise.
3296 (add_case_node): Remove.
3297 (bit_test_cluster::is_beneficial): New.
3298 (case_bit_test::cmp): New.
3299 (bit_test_cluster::emit): New.
3300 (expand_switch_as_decision_tree_p): Remove.
3301 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3302 (fix_phi_operands_for_edge): Likewise.
3303 (switch_decision_tree::analyze_switch_statement): New.
3304 (compute_cases_per_edge): Move ...
3305 (switch_decision_tree::compute_cases_per_edge): ... here.
3306 (try_switch_expansion): Likewise.
3307 (switch_decision_tree::try_switch_expansion): Likewise.
3308 (record_phi_operand_mapping): Likewise.
3309 (switch_decision_tree::record_phi_operand_mapping): Likewise.
3310 (emit_case_decision_tree): Likewise.
3311 (switch_decision_tree::emit): Likewise.
3312 (balance_case_nodes): Likewise.
3313 (switch_decision_tree::balance_case_nodes): Likewise.
3314 (dump_case_nodes): Likewise.
3315 (switch_decision_tree::dump_case_nodes): Likewise.
3316 (emit_jump): Likewise.
3317 (switch_decision_tree::emit_jump): Likewise.
3318 (emit_cmp_and_jump_insns): Likewise.
3319 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3320 (emit_case_nodes): Likewise.
3321 (switch_decision_tree::emit_case_nodes): Likewise.
3322 (conditional_probability): Remove.
3323 * tree-switch-conversion.h (enum cluster_type): New.
3325 (struct cluster): Likewise.
3326 (cluster::cluster): Likewise.
3327 (struct simple_cluster): Likewise.
3328 (simple_cluster::simple_cluster): Likewise.
3329 (struct group_cluster): Likewise.
3330 (struct jump_table_cluster): Likewise.
3331 (struct bit_test_cluster): Likewise.
3332 (struct min_cluster_item): Likewise.
3333 (struct case_tree_node): Likewise.
3334 (case_tree_node::case_tree_node): Likewise.
3335 (jump_table_cluster::case_values_threshold): Likewise.
3336 (struct case_bit_test): Likewise.
3337 (struct switch_decision_tree): Likewise.
3338 (struct switch_conversion): Likewise.
3339 (switch_decision_tree::reset_out_edges_aux): Likewise.
3341 2018-06-20 Martin Liska <mliska@suse.cz>
3343 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3344 (hoist_edge_and_branch_if_true): Likewise.
3345 (expand_switch_using_bit_tests_p): Likewise.
3346 (struct case_bit_test): Likewise.
3347 (case_bit_test_cmp): Likewise.
3348 (emit_case_bit_tests): Likewise.
3349 (switch_conversion::switch_conversion): New class.
3350 (struct switch_conv_info): Remove old struct.
3351 (collect_switch_conv_info): More to ...
3352 (switch_conversion::collect): ... this.
3353 (check_range): Likewise.
3354 (switch_conversion::check_range): Likewise.
3355 (check_all_empty_except_final): Likewise.
3356 (switch_conversion::check_all_empty_except_final): Likewise.
3357 (check_final_bb): Likewise.
3358 (switch_conversion::check_final_bb): Likewise.
3359 (create_temp_arrays): Likewise.
3360 (switch_conversion::create_temp_arrays): Likewise.
3361 (free_temp_arrays): Likewise.
3362 (gather_default_values): Likewise.
3363 (switch_conversion::gather_default_values): Likewise.
3364 (build_constructors): Likewise.
3365 (switch_conversion::build_constructors): Likewise.
3366 (constructor_contains_same_values_p): Likewise.
3367 (switch_conversion::contains_same_values_p): Likewise.
3368 (array_value_type): Likewise.
3369 (switch_conversion::array_value_type): Likewise.
3370 (build_one_array): Likewise.
3371 (switch_conversion::build_one_array): Likewise.
3372 (build_arrays): Likewise.
3373 (switch_conversion::build_arrays): Likewise.
3374 (gen_def_assigns): Likewise.
3375 (switch_conversion::gen_def_assigns): Likewise.
3376 (prune_bbs): Likewise.
3377 (switch_conversion::prune_bbs): Likewise.
3378 (fix_phi_nodes): Likewise.
3379 (switch_conversion::fix_phi_nodes): Likewise.
3380 (gen_inbound_check): Likewise.
3381 (switch_conversion::gen_inbound_check): Likewise.
3382 (process_switch): Use the newly created class.
3383 (switch_conversion::expand): New.
3384 (switch_conversion::~switch_conversion): New.
3385 * tree-switch-conversion.h: New file.
3387 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3389 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3390 tree-vect-patterns.c.
3391 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3392 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
3393 (vect_recog_sad_pattern): Likewise.
3394 (vect_recog_widen_sum_pattern): Likewise.
3395 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
3396 (vect_recog_widen_shift_pattern): Remove the type_in argument.
3397 (vect_recog_rotate_pattern): Likewise.
3398 (vect_recog_mult_pattern): Likewise.
3399 (vect_recog_vector_vector_shift_pattern): Likewise.
3400 (vect_recog_divmod_pattern): Likewise.
3401 (vect_recog_mixed_size_cond_pattern): Likewise.
3402 (vect_recog_bool_pattern): Likewise.
3403 (vect_recog_mask_conversion_pattern): Likewise.
3404 (vect_try_gather_scatter_pattern): Likewise.
3405 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
3406 (vect_recog_over_widening_pattern): Likewise.
3407 (vect_recog_gather_scatter_pattern): Likewise.
3408 (vect_recog_func_ptr): Move from tree-vectorizer.h
3409 (vect_vect_recog_func_ptrs): Move further down the file.
3410 (vect_recog_func): Likewise. Remove the third argument.
3411 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3412 (vect_pattern_recog_1): Expect the pattern function to do any
3413 necessary target tests. Also expect it to provide a vector type.
3414 Remove the type_in handling.
3416 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3418 * tree-vect-patterns.c (vect_pattern_detected): New function.
3419 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3420 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3421 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3422 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3423 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3424 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3425 (vect_recog_mask_conversion_pattern)
3426 (vect_try_gather_scatter_pattern): Likewise.
3428 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3430 * tree-vect-patterns.c (vect_get_internal_def): New function.
3431 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3432 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3433 (search_type_for_mask_1): Use it.
3435 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3437 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3438 redundant WIDEN_SUM_EXPR handling.
3439 (vect_recog_sad_pattern): Likewise.
3441 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3443 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3444 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3445 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3446 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3447 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3449 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3451 * tree-vect-stmts.c (vectorizable_call): Make sure that we
3452 use the stmt_vec_info of the original bb statement for the
3453 new zero assignment, even if the call is part of a pattern.
3455 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3457 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3458 that the sequence is attached to the original statement rather
3459 than the pattern statement.
3460 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3461 PATTERN_DEF_SEQ from the original statement rather than
3462 the main pattern statement.
3463 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3464 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3465 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3467 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3469 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3470 definition statements before the early exit for statements that aren't
3472 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3474 (vect_transform_loop): ...here. Process pattern definition
3475 statements without first checking whether the main pattern
3476 statement is live or relevant.
3478 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3480 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3481 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3483 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
3485 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3486 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3487 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3488 (expand_block_compare): Change select_block_compare_mode call.
3489 (expand_strncmp_align_check): Use new functions, fix comment.
3490 (emit_final_str_compare_gpr): New function.
3491 (expand_strn_compare): Refactor and clean up code.
3492 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3494 2018-06-19 Tony Reix <tony.reix@atos.com>
3495 Damien Bergamini <damien.bergamini@atos.com>
3496 David Edelsohn <dje.gcc@gmail.com>
3498 * collect2.c (static_obj): New variable.
3499 (static_libs): New variable.
3500 (is_in_list): Uncomment declaration.
3501 (main): Track AIX libraries linked statically.
3502 (is_in_list): Uncomment definition.
3503 (scan_prog_file): Don't add AIX shared libraries initializer
3504 to constructor list if linking statically.
3506 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3508 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3510 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3512 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
3514 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3517 2018-06-19 Martin Liska <mliska@suse.cz>
3519 * config/i386/i386.c (ix86_can_inline_p): Do not use
3520 ipa_fn_summaries::get_create.
3521 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3523 (devirtualization_time_bonus): Likewise.
3524 (ipcp_propagate_stage): Likewise.
3525 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3526 (edge_set_predicate): Likewise.
3527 (evaluate_conditions_for_known_args): Likewise.
3528 (evaluate_properties_for_edge): Likewise.
3529 (ipa_call_summary::reset): Tranform to ...
3530 (ipa_call_summary::~ipa_call_summary): ... this.
3531 (ipa_fn_summary::reset): Transform to ...
3532 (ipa_fn_summary::~ipa_fn_summary): ... this.
3533 (ipa_fn_summary_t::remove): Rename to ...
3534 (ipa_fn_summary_t::remove_callees): ... this.
3535 (ipa_fn_summary_t::duplicate): Use placement new
3536 instead of memory copy.
3537 (ipa_call_summary_t::duplicate): Likewise.
3538 (ipa_call_summary_t::remove): Remove.
3539 (dump_ipa_call_summary): Change get_create to get.
3540 (ipa_dump_fn_summary): Dump only when summary exists.
3541 (analyze_function_body): Use symbol_summary::get instead
3543 (compute_fn_summary): Likewise.
3544 (estimate_edge_devirt_benefit): Likewise.
3545 (estimate_edge_size_and_time): Likewise.
3546 (inline_update_callee_summaries): Likewise.
3547 (remap_edge_change_prob): Likewise.
3548 (remap_edge_summaries): Likewise.
3549 (ipa_merge_fn_summary_after_inlining): Likewise.
3550 (write_ipa_call_summary): Likewise.
3551 (ipa_fn_summary_write): Likewise.
3552 (ipa_free_fn_summary): Likewise.
3553 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3554 (struct ipa_call_summary): Likewise.
3555 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3557 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3558 (estimate_size_after_inlining): Likewise.
3559 (estimate_growth): Likewise.
3560 (growth_likely_positive): Likewise.
3561 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3562 (inline_call): Likewise.
3563 * ipa-inline.c (caller_growth_limits): Likewise.
3564 (can_inline_edge_p): Likewise.
3565 (can_inline_edge_by_limits_p): Likewise.
3566 (compute_uninlined_call_time): Likewise.
3567 (compute_inlined_call_time): Likewise.
3568 (want_inline_small_function_p): Likewise.
3569 (edge_badness): Likewise.
3570 (update_caller_keys): Likewise.
3571 (update_callee_keys): Likewise.
3572 (inline_small_functions): Likewise.
3573 (inline_to_all_callers_1): Likewise.
3574 (dump_overall_stats): Likewise.
3575 (early_inline_small_functions): Likewise.
3576 (early_inliner): Likewise.
3577 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3578 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3579 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3580 * ipa-split.c (execute_split_functions): Likewise.
3581 * symbol-summary.h: Likewise.
3582 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3584 2018-06-19 Richard Biener <rguenther@suse.de>
3586 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3587 (vectorize_loops): ... here. Fix dbgcnt handling.
3588 (try_vectorize_loop): Wrap try_vectorize_loop_1.
3590 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
3593 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3594 ieee128 argument takes up only one (vector) register, not two (floating
3597 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3599 * gimplify.c (gimplify_init_constructor): Really never clear for an
3600 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3602 2018-06-19 Richard Biener <rguenther@suse.de>
3604 PR tree-optimization/86179
3605 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3606 after failed recognition.
3608 2018-06-18 Martin Sebor <msebor@redhat.com>
3611 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3612 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3613 Handle integer subtraction.
3614 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3615 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3617 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3619 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3620 param from rtx to rtx_insn *.
3621 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3623 (frv_ifcvt_modify_insn): Likwise.
3624 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3625 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
3626 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3627 as_a <rtx_insn *> cast to local "unprotected_region" once
3628 it's been established that it's not NULL or pc_rtx.
3629 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3630 param "sethi" from rtx to rtx_insn *.
3631 (nds32_group_float_insns): Likewise for param "insn".
3632 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3634 (vax_output_int_subtract): Likewise.
3635 * config/vax/vax.c (vax_output_int_add): Likewise for param
3637 (vax_output_int_subtract): Likewise.
3638 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3639 (emit_pattern_after): Likewise for param "after".
3640 (emit_insn_after): Likewise.
3641 (emit_jump_insn_after): Likewise.
3642 (emit_call_insn_after): Likewise.
3643 (emit_debug_insn_after): Likewise.
3644 (emit_pattern_before): Likewise for param "before".
3645 (emit_insn_before): Likewise.
3646 (emit_jump_insn_before): Likewise.
3647 * final.c (get_insn_template): Likewise for param "insn", removing
3649 * output.h (get_insn_template): Likewise for 2nd param.
3650 * rtl.h (emit_insn_before): Likewise.
3651 (emit_jump_insn_before): Likewise.
3652 (emit_debug_insn_before_noloc): Likewise.
3653 (emit_insn_after): Likewise.
3654 (emit_jump_insn_after): Likewise.
3655 (emit_call_insn_after): Likewise.
3656 (emit_debug_insn_after): Likewise.
3657 (set_insn_deleted): Likewise for param.
3659 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
3662 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3663 floating point modes, so that IFmode is numerically greater than
3664 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3665 to declare the ordering. This prevents IFmode from being
3666 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3667 machine. Include rs6000-modes.h to share the fractional values
3668 between genmodes* and the rest of the compiler.
3672 * config/rs6000/rs6000-modes.h: New file.
3673 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3674 meaning of rs6000_long_double_size so that 126..128 selects an
3675 appropriate 128-bit floating point type.
3676 (rs6000_option_override_internal): Likewise.
3677 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3678 (TARGET_LONG_DOUBLE_128): Change the meaning of
3679 rs6000_long_double_size so that 126..128 selects an appropriate
3680 128-bit floating point type.
3681 (LONG_DOUBLE_TYPE_SIZE): Update comment.
3682 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3683 source and destination to match the standard usage.
3684 (truncifkf2): Likewise.
3685 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3686 ISA 2.07 to use an explicit clobber, instead of passing in a
3688 (copysign<mode>3_soft): Likewise.
3690 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3692 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3693 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3694 (vect_slp_analyze_instance_dependence): Likewise.
3695 (vect_enhance_data_refs_alignment): Likewise.
3696 (vect_analyze_data_refs_alignment): Likewise.
3697 (vect_slp_analyze_and_verify_instance_alignment
3698 (vect_analyze_data_ref_accesses): Likewise.
3699 (vect_prune_runtime_alias_test_list): Likewise.
3700 (vect_analyze_data_refs): Likewise.
3701 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3702 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3703 (vect_analyze_scalar_cycles_1): Likewise.
3704 (vect_get_loop_niters): Likewise.
3705 (vect_analyze_loop_form_1): Likewise.
3706 (vect_update_vf_for_slp): Likewise.
3707 (vect_analyze_loop_operations): Likewise.
3708 (vect_analyze_loop): Likewise.
3709 (vectorizable_induction): Likewise.
3710 (vect_transform_loop): Likewise.
3711 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3712 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3713 (vect_make_slp_decision): Likewise.
3714 (vect_detect_hybrid_slp): Likewise.
3715 (vect_slp_analyze_operations): Likewise.
3716 (vect_slp_bb): Likewise.
3717 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3718 (vectorizable_bswap): Likewise.
3719 (vectorizable_call): Likewise.
3720 (vectorizable_simd_clone_call): Likewise.
3721 (vectorizable_conversion): Likewise.
3722 (vectorizable_assignment): Likewise.
3723 (vectorizable_shift): Likewise.
3724 (vectorizable_operation): Likewise.
3725 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3727 2018-06-18 Martin Sebor <msebor@redhat.com>
3729 PR tree-optimization/81384
3730 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3731 * builtins.c (expand_builtin_strnlen): New function.
3732 (expand_builtin): Call it.
3733 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3734 * builtins.def (BUILT_IN_STRNLEN): New.
3735 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3736 Warn for bounds in excess of maximum object size.
3737 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3738 single-value ranges. Handle strnlen.
3739 (handle_builtin_strlen): Handle strnlen.
3740 (strlen_check_and_optimize_stmt): Same.
3741 * doc/extend.texi (Other Builtins): Document strnlen.
3743 2018-06-18 Maya Rashish <coypu@sdf.org>
3745 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3746 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3747 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3749 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3751 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3753 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3755 * tree.c (escaped_string::escape): Replace cast to char * by
3756 const_cast<char *> (unescaped).
3758 2018-06-18 Nick Clifton <nickc@redhat.com>
3761 * tree.c (escaped_string): New class. Converts an unescaped
3762 string into its escaped equivalent.
3763 (warn_deprecated_use): Use the new class to convert the
3764 deprecation message, if present.
3765 (test_escaped_strings): New self test.
3766 (test_c_tests): Add test_escaped_strings.
3767 * doc/extend.texi (deprecated): Add a note that the
3768 deprecation message is affected by the -fmessage-length
3769 option, and that control characters will be escaped.
3770 (#pragma GCC error): Document this pragma.
3771 (#pragma GCC warning): Likewise.
3772 * doc/invoke.texi (-fmessage-length): Document this option's
3773 effect on the #warning and #error preprocessor directives and
3774 the deprecated attribute.
3776 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
3778 * tree.c (decl_value_expr_lookup): Revert latest change.
3779 (decl_value_expr_insert): Likewise.
3781 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
3783 * gimplify.c (nonlocal_vlas): Delete.
3784 (nonlocal_vla_vars): Likewise.
3785 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3787 (gimplify_body): Do not create and destroy nonlocal_vlas.
3788 * tree-nested.c: Include diagnostic.h.
3789 (use_pointer_in_frame): Tweak.
3790 (lookup_field_for_decl): Add assertion and declare the transformation.
3791 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3792 internal error when the reference is in a wrong context. Do not
3793 create a debug decl by default.
3794 (note_nonlocal_block_vlas): Delete.
3795 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3796 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
3797 create a debug decl by default.
3798 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3799 call is in a wrong context.
3800 (fixup_vla_decls): New function.
3801 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
3802 debug variables were created.
3803 * tree.c (decl_value_expr_lookup): Add checking assertion.
3804 (decl_value_expr_insert): Likewise.
3806 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3809 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3810 * tree-scalar-evolution.c (interpret_expr): Likewise.
3811 (expression_expensive_p): Likewise.
3812 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3813 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3814 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3815 (ssa_defined_by_minus_one_stmt_p): New.
3817 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3820 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3821 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3822 * dojump.c (do_jump): Likewise.
3823 * expr.c (expand_expr_real_2): Check operand type's sign.
3824 * fold-const.c (const_unop): Handle ABSU_EXPR.
3825 (fold_abs_const): Likewise.
3826 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3827 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3828 (strip_sign_op_1): Likesise.
3829 * match.pd: Add new pattern to generate ABSU_EXPR.
3830 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3831 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3832 * tree-eh.c (operation_could_trap_helper_p): Likewise.
3833 * tree-inline.c (estimate_operator_cost): Likewise.
3834 * tree-pretty-print.c (dump_generic_node): Likewise.
3835 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3836 * tree.def (ABSU_EXPR): New.
3838 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3841 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3842 documented as preserved for backward compatibility only.
3843 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3845 PR rtl-optimization/86108
3846 * bb-reorder.c (create_forwarder_block): Renamed to ...
3847 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
3848 jump from new landing pad to the second part.
3849 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3852 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3855 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3856 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3857 Only call store_expr for halves if the mode is the same.
3860 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3861 Fix up comment formatting.
3863 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3865 * typed-splay-tree.h (typed_splay_tree::remove): New function.
3866 (typed_splay_tree::closure,
3867 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3868 (typed_splay_tree::typed_splay_tree,
3869 typed_splay_tree::operator =): Declared private.
3870 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3871 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3872 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3873 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3874 typed_splay_tree::splay_tree_splay,
3875 typed_splay_tree::splay_tree_foreach_helper,
3876 typed_splay_tree::splay_tree_insert,
3877 typed_splay_tree::splay_tree_remove,
3878 typed_splay_tree::splay_tree_lookup,
3879 typed_splay_tree::splay_tree_predecessor,
3880 typed_splay_tree::splay_tree_successor,
3881 typed_splay_tree::splay_tree_min,
3882 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3883 (typed_splay_tree::root, typed_splay_tree::comp,
3884 typed_splay_tree::delete_key,
3885 typed_splay_tree::delete_value): New data members.
3886 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3887 typed_splay_tree::remove.
3889 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
3891 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3892 -mginv and -mno-ginv to the assembler.
3893 * config/mips/mips.opt (-mcrc): New option.
3895 * doc/invoke.text (-mcrc): Document.
3898 2018-06-15 Nick Clifton <nickc@redhat.com>
3901 * tree.c (escaped_string): New class. Converts an unescaped
3902 string into its escaped equivalent.
3903 (warn_deprecated_use): Use the new class to convert the
3904 deprecation message, if present.
3905 (test_escaped_strings): New self test.
3906 (test_c_tests): Add test_escaped_strings.
3907 * doc/extend.texi (deprecated): Add a note that the
3908 deprecation message is affected by the -fmessage-length
3909 option, and that control characters will be escaped.
3910 (#pragma GCC error): Document this pragma.
3911 (#pragma GCC warning): Likewise.
3912 * doc/invoke.texi (-fmessage-length): Document this option's
3913 effect on the #warning and #error preprocessor directives and
3914 the deprecated attribute.
3916 2018-06-15 Richard Biener <rguenther@suse.de>
3918 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3919 here, also noting vector size used.
3920 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
3921 size used in MSG_OPTIMIZED_LOCATIONS dump.
3922 (pass_slp_vectorize::execute): Adjust.
3924 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
3927 * config/arc/arc.c (arc_return_address_register): Fix
3930 2018-06-15 Richard Biener <rguenther@suse.de>
3933 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3934 leave useless conversion stripping to force_gimple_operand_gsi.
3935 (gimplify_build2): Likewise.
3936 (gimplify_build1): Likewise.
3938 2018-06-15 Richard Biener <rguenther@suse.de>
3941 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3942 before adjusting their block.
3944 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3946 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3947 multilibs for *-*-rtems*.
3948 * config/riscv/t-rtems: New file.
3950 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3953 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3954 unsigned_type_for returns NULL.
3957 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3958 subregs of multi-word pseudos unless the float mode has word size.
3960 2018-06-14 Richard Biener <rguenther@suse.de>
3963 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3964 duplicate and harmful type_hash_canon.
3965 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3967 2018-06-14 Richard Biener <rguenther@suse.de>
3970 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3973 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3975 * config/rtems.h (STDINT_LONG32): Define.
3977 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
3978 Prachi Godbole <prachi.godbole@imgtec.com>
3980 * config/mips/mips-cpus.def: Define P6600.
3981 * config/mips/mips-tables.opt: Regenerate.
3982 * config/mips/mips.c (mips_ucbranch_type): New enum.
3983 (mips_rtx_cost_data): Add support for P6600.
3984 (mips_issue_rate): Likewise.
3985 (mips_multipass_dfa_lookahead): Likewise.
3986 (mips_avoid_hazard): Likewise.
3987 (mips_reorg_process_insns): Likewise.
3988 (mips_classify_branch_p6600): New function.
3989 * config/mips/mips.h (TUNE_P6600): New define.
3990 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3991 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3992 * config/mips/mips.md: Include p6600.md.
3993 (processor): Add p6600.
3994 * config/mips/p6600.md: New file.
3995 * doc/invoke.texi: Add p6600 to supported architectures.
3997 2018-06-13 Martin Sebor <msebor@redhat.com>
3999 PR tree-optimization/86114
4000 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4002 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4004 2018-06-13 Richard Biener <rguenther@suse.de>
4006 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4007 Properly set vector type of the intermediate stmt.
4008 * tree-vect-stmts.c (vectorizable_operation): The destination
4009 var always has vectype_out type.
4011 2018-06-13 Jeff Law <law@redhat.com>
4013 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4014 integer 0 for argument to print_rtl_with_bb.
4015 (rl78_reorg): Likewise.
4017 2018-06-13 David Malcolm <dmalcolm@redhat.com>
4019 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4020 from rtx to rtx_insn *.
4021 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4023 (add_sched_insns_for_speculation): Likewise for local "target",
4024 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4025 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4026 from rtx_insn ** to rtx_code_label **.
4027 (reorg_emit_nops): Likewise.
4028 (c6x_reorg): Likewise for local "call_labels".
4029 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4031 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4032 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4033 the loops over LABEL_REFS.
4034 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4036 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4037 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4038 (split_branches): Strengthen local "olabel" from rtx to
4039 rtx_insn *, adding a safe_as_a cast.
4040 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4042 (add_insn_after): Likewise for first two params.
4043 (add_insn_before): Likewise.
4044 (remove_insn): Likewise for param.
4045 (emit_pattern_before_noloc): Likewise for second and third params.
4046 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4047 (emit_call_insn_before_noloc): Likewise.
4048 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4050 (emit_barrier_before): Likewise.
4051 (emit_label_before): Strengthen "label" param from "rtx" to
4052 "rtx_code_label *". Strengthen "before" param from "rtx" to
4054 (emit_insn_after_1): Strengthen "after" param from "rtx" to
4056 (emit_pattern_after_noloc): Likewise.
4057 (emit_insn_after_noloc): Likewise.
4058 (emit_jump_insn_after_noloc): Likewise.
4059 (emit_call_insn_after_noloc): Likewise.
4060 (emit_debug_insn_after_noloc): Likewise.
4061 (emit_barrier_after): Likewise.
4062 (emit_label_after): Likewise for both params.
4063 (emit_pattern_after_setloc): Likewise for "after" param. Convert
4064 "loc" param from "int" to "location_t".
4065 (emit_insn_after_setloc): Likewise.
4066 (emit_jump_insn_after_setloc): Likewise.
4067 (emit_call_insn_after_setloc): Likewise.
4068 (emit_debug_insn_after_setloc): Likewise.
4069 (emit_pattern_before_setloc): Likewise for "before" param. Convert
4070 "loc" param from "int" to "location_t".
4071 (emit_pattern_before): Convert NULL_RTX to NULL.
4072 (emit_insn_before_setloc): Convert "loc" param from "int" to
4074 (emit_jump_insn_before_setloc): Likewise.
4075 (emit_call_insn_before_setloc): Likewise.
4076 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4077 rtx_insn *. Convert "loc" param from "int" to "location_t".
4078 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4079 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4080 Convert 3rd param from "int" to "location_t".
4081 (emit_barrier_before, emit_barrier_after, next_real_insn):
4082 Strengthen param from rtx to rtx_insn *.
4083 (emit_label_before): Strengthen 1st param from "rtx" to
4084 "rtx_code_label *". Strengthen 2nd param from "rtx" to
4086 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4087 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4088 Strengthen 2nd param from "rtx" to "rtx_insn *".
4089 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4090 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4091 Likewise. Convert 3rd param from "int" to "location_t".
4092 (emit_label_after): Strengthen 1st param from "rtx" to
4094 (next_real_insn, remove_insn): Strengthen param from "rtx" to
4096 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4097 from "rtx" to "rtx_insn *".
4099 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
4101 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4102 bodies streamed in with -Q.
4103 * dumpfile.c (dump_files): Add lto-stream-out dump file.
4104 * dumpfile.h (tree_dump_index): Add lto_stream_out.
4105 * gimple-streamer-out.c: Include gimple-pretty-print.h
4106 (output_bb): Dump stmts streamed.
4107 * lto-section-out.c: Include print-tree.h
4108 (lto_begin_section): Dump sections created.
4109 (lto_output_decl_index): Dump decl encoded.
4110 * lto-streamer-out.c: Include print-tree.h
4111 (create_output_block): Dump output block created.
4112 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4113 (output_function): Dump function output.
4114 (output_constructor): Dump constructor streamed.
4115 (write_global_stream): Output indexes encoded.
4116 (produce_asm_for_decls): Dump streams encoded.
4117 * lto-streamer.c (streamer_dump_file): New global var.
4118 * lto-streamer.h (streamer_dump_file): Declare.
4119 * passes.c (ipa_write_summaries): Initialize streamer dump.
4120 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4123 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
4126 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4127 offsets for register save directives. Emit a second batch of save
4128 directives, if need be, when the function accesses prior frames.
4130 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4132 * config/arc/fpu.md (fmasf4): Force operand to register.
4133 (fnmasf4): Likewise.
4135 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4137 * config/arc/arc-protos.h (arc_pad_return): Remove.
4138 * config/arc/arc.c (machine_function): Remove force_short_suffix
4140 (arc_print_operand): Adjust printing of '&'.
4141 (arc_verify_short): Remove conditional printing of short suffix.
4142 (arc_final_prescan_insn): Remove reference to size_reason.
4143 (pad_return): New function.
4144 (arc_reorg): Call pad_return.
4145 (arc_pad_return): Remove.
4146 (arc_init_machine_status): Remove reference to force_short_suffix.
4147 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4148 (attr length): When attribute iscompact is true force to 2
4149 regardless; in the case of maybe check if we want to force the
4150 instruction to have 4 bytes length.
4151 (nopv): Change it to generate 4 byte long nop as well.
4152 (blockage): New pattern.
4153 (simple_return): Remove call to arc_pad_return.
4154 (p_return_i): Likewise.
4156 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4158 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4160 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4162 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4165 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4167 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4168 for ARC700 and ARCv2.
4170 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
4173 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4174 operands[2] instead of operands[1].
4177 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4179 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4180 case, check whether the outer register overlaps an unallocatable
4181 register, not just whether it fits the required class.
4183 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4185 * poly-int.h (can_div_trunc_p): Add new overload in which all values
4187 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4188 (memrefs_conflict_p): Likewise.
4189 (init_alias_analysis): Likewise.
4190 * cfgexpand.c (expand_debug_expr): Likewise.
4191 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4192 * cse.c (fold_rtx): Likewise.
4193 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4194 * expr.c (emit_block_move_hints): Likewise.
4195 (clear_storage_hints, push_block, emit_push_insn): Likewise.
4196 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4197 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4198 (emit_group_store): Likewise.
4199 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
4200 to read the PRE/POST_MODIFY increment.
4201 * calls.c (store_one_arg): Use strip_offset.
4202 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4204 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4206 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4207 (simplify_binary_operation_1): Extend CONST_INT handling to
4209 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4210 than a HOST_WIDE_INT.
4211 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4213 (adjust_mems, add_stores): Update accodingly.
4214 (vt_canonicalize_addr): Track polynomial offsets.
4215 (emit_note_insn_var_location): Likewise.
4216 (vt_add_function_parameter): Likewise.
4217 (vt_initialize): Likewise.
4219 2018-06-12 Jeff Law <law@redhat.com>
4221 * config.gcc (alpha*-*-freebsd*): Remove.
4222 * config/alpha/freebsd.h: Remove.
4224 2018-06-12 David Malcolm <dmalcolm@redhat.com>
4227 * spellcheck-tree.c (levenshtein_distance): Rename to...
4228 (get_edit_distance): ...this, and update for underlying renaming.
4229 * spellcheck-tree.h (levenshtein_distance): Rename to...
4230 (get_edit_distance): ...this.
4231 * spellcheck.c (levenshtein_distance): Rename to...
4232 (get_edit_distance): ...this. Convert from Levenshtein distance
4233 to Damerau-Levenshtein distance by supporting transpositions of
4234 adjacent characters. Rename "v1" to "v_next" and "v0" to
4236 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4237 (selftest::test_edit_distance_unit_test_oneway): ...this, and
4238 update for underlying renaming.
4239 (selftest::levenshtein_distance_unit_test): Rename to...
4240 (selftest::test_get_edit_distance_unit): ...this, and update for
4241 underlying renaming.
4242 (selftest::test_find_closest_string): Add example from PR 69968
4243 where transposition helps
4244 (selftest::test_metric_conditions): Update for renaming.
4245 (selftest::test_metric_conditions): Likewise.
4246 (selftest::spellcheck_c_tests): Likewise.
4247 * spellcheck.h (levenshtein_distance): Rename both overloads to...
4248 (get_edit_distance): ...this.
4249 (best_match::consider): Update for renaming.
4251 2018-06-12 Martin Sebor <msebor@redhat.com>
4253 PR tree-optimization/85259
4254 * builtins.c (compute_objsize): Handle constant offsets.
4255 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4256 true iff a warning has been issued.
4257 * gimple.h (gimple_nonartificial_location): New function.
4258 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4259 gimple_nonartificial_location and handle -Wno-system-headers.
4260 (handle_builtin_stxncpy): Same.
4262 2018-06-12 Martin Sebor <msebor@redhat.com>
4265 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4267 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
4269 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4270 BUILTIN_VEC_XST entries for pointer to double and long long.
4272 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
4275 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4277 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4280 2018-06-12 Martin Liska <mliska@suse.cz>
4282 * doc/options.texi: Document IntegerRange.
4284 2018-06-12 Martin Liska <mliska@suse.cz>
4286 * config/i386/i386.opt: Make MPX-related options as Deprecated.
4287 * opt-functions.awk: Handle Deprecated flag.
4288 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4290 (read_cmdline_option): Report warning for a deprecated option.
4291 * opts.h (struct cl_option): Add new field cl_deprecated.
4292 (CL_ERR_DEPRECATED): New.
4294 2018-06-12 Martin Liska <mliska@suse.cz>
4296 * doc/options.texi: Document Deprecated option flag.
4298 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4300 * config/arc/arc-arch.h (arc_extras): New enum.
4301 (arc_cpu_t):Add field extra.
4302 (arc_cpu_types): Consider the extras.
4303 * config/arc/arc-cpus.def: Add extras info.
4304 * config/arc/arc-opts.h (processor_type): Consider extra field.
4305 * config/arc/arc.c (arc_override_options): Handle extra field.
4307 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4309 * config/arc/arc-arch.h: Update ARC_OPTX macro.
4310 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4312 * config/arc/arc.c (arc_init): Update pic warning.
4313 (irq_range): Update irq range parsing warnings.
4314 (arc_override_options): Update various warning messages.
4315 (arc_handle_aux_attribute): Likewise.
4317 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
4319 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4321 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4323 * doc/sourcebuild.texi: Document usage of line number 0 in verify
4324 compiler messages directives.
4326 2018-06-12 Matthew Fortune <mfortune@gmail.com>
4328 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4329 * config/mips/mips-tables.opt: Regenerate.
4330 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4332 * doc/invoke.texi: Document -march=i6500.
4334 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
4336 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4337 (i6400_gpmul): Add cpu_unit.
4338 (i6400_gpdiv): Likewise.
4339 (i6400_msa_add_d): Update reservations.
4340 (i6400_msa_int_add) Likewise.
4341 (i6400_msa_short_logic3) Likewise.
4342 (i6400_msa_short_logic2) Likewise.
4343 (i6400_msa_short_logic) Likewise.
4344 (i6400_msa_move) Likewise.
4345 (i6400_msa_cmp) Likewise.
4346 (i6400_msa_short_float2) Likewise.
4347 (i6400_msa_div_d) Likewise.
4348 (i6400_msa_long_logic1) Likewise.
4349 (i6400_msa_long_logic2) Likewise.
4350 (i6400_msa_mult) Likewise.
4351 (i6400_msa_long_float2) Likewise.
4352 (i6400_msa_long_float4) Likewise.
4353 (i6400_msa_long_float5) Likewise.
4354 (i6400_msa_long_float8) Likewise.
4355 (i6400_fpu_fadd): Include frint type.
4356 (i6400_fpu_store): New define_insn_reservation.
4357 (i6400_fpu_load): Likewise.
4358 (i6400_fpu_move): Likewise.
4359 (i6400_fpu_fcmp): Likewise.
4360 (i6400_fpu_fmadd): Likewise.
4361 (i6400_int_mult): Include imul3nc type and update reservation.
4362 (i6400_int_div): Include idiv3 type and update reservation.
4363 (i6400_int_load): Update to check type not move_type.
4364 (i6400_int_store): Likewise.
4365 (i6400_int_prefetch): Set zero latency.
4367 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
4369 * gcc.c: Document new %@{...} sequence.
4370 (LINK_COMMAND_SPEC): Use it for the -L switches.
4371 (cpp_unique_options): Use it for the -I switches.
4372 (at_file_argbuf): New global variable.
4373 (in_at_file): Likewise.
4374 (alloc_args): Create at_file_argbuf.
4375 (clear_args): Truncate at_file_argbuf.
4376 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4377 (open_at_file): New function.
4378 (close_at_file): Likewise.
4379 (create_at_file): Delete.
4380 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4383 (validate_switches_from_spec): Deal with %@{...} sequence.
4384 (validate_switches): Likewise.
4385 (driver::finalize): Call clear_args.
4387 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4389 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4391 2018-06-11 Martin Sebor <msebor@redhat.com>
4393 * doc/invoke.texi (-Wall): List -Wc++17-compat.
4394 (Wno-class-memaccess): Add @opindex.
4395 (Wno-templates, Wno-multiple-inheritance): Same.
4396 (Wno-virtual-inheritance, Wno-namespaces): Same.
4397 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4398 (Wno-format-overflow, Wno-format-truncation): Same.
4399 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4400 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4401 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4402 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4403 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4404 (Wno-misspelled-isr): Same.
4406 2018-06-11 Martin Sebor <msebor@redhat.com>
4408 * PR tree-optimization/86083
4409 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4411 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4413 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4415 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4418 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4419 on the correct operand.
4420 (*movdi_internal64): Ditto.
4422 2018-06-11 Martin Liska <mliska@suse.cz>
4424 PR tree-optimization/86089
4425 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4427 2018-06-11 Julia Koval <julia.koval@intel.com>
4429 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4430 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4431 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4433 2018-06-11 Olivier Hainque <hainque@adacore.com>
4435 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4436 for Ada with strict dwarf2.
4438 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
4441 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4444 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
4446 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4448 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
4450 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4453 2018-06-08 Martin Liska <mliska@suse.cz>
4455 * tree-cfg.h (debug_function): Fix argument type to match
4458 2018-06-08 Martin Liska <mliska@suse.cz>
4460 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4461 Remove usage of MPX-related (and removed) fields.
4462 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4464 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4466 * cfg.c (debug): Use TDF_NONE rather than 0.
4467 * cfghooks.c (debug): Likewise.
4468 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4469 (struct dump_option_value_info): Convert to...
4470 (struct kv_pair): ...this template type.
4471 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4473 (optinfo_verbosity_options): Likewise.
4474 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4476 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4477 than int for "optgroup_flags" param.
4478 (dump_generic_expr_loc): Use dump_flags_t rather than int for
4480 (dump_dec): Likewise.
4481 (dump_finish): Use TDF_NONE rather than 0.
4482 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4483 rather than int for "optgroup_flags" param. Use TDF_NONE rather
4484 than 0. Update for change to option_ptr.
4485 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4486 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
4487 0. Update for changes to optinfo_verbosity_options and
4489 (opt_info_switch_p): Convert optgroup_flags from int to
4491 (dump_basic_block): Use dump_flags_t rather than int
4492 for "dump_kind" param.
4493 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4494 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4495 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4496 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4497 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4498 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4499 TDF_NONE): Convert from macros to...
4500 (enum dump_flag): ...this new enum.
4501 (dump_flags_t): Update to use enum.
4502 (operator|, operator&, operator~, operator|=, operator&=):
4503 Implement for dump_flags_t.
4504 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4505 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4506 Convert from macros to...
4507 (enum optgroup_flag): ...this new enum.
4508 (optgroup_flags_t): New typedef.
4509 (operator|, operator|=): Implement for optgroup_flags_t.
4510 (struct dump_file_info): Convert field "alt_flags" to
4511 dump_flags_t. Convert field "optgroup_flags" to
4513 (dump_basic_block): Use dump_flags_t rather than int for param.
4514 (dump_generic_expr_loc): Likewise.
4515 (dump_dec): Likewise.
4516 (dump_register): Convert param "optgroup_flags" to
4518 (opt_info_enable_passes): Likewise.
4519 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4521 * gimple-pretty-print.c (debug): Likewise.
4522 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4523 (merged_store_group::apply_stores): Likewise.
4524 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4525 * gimple.c (verify_gimple_pp): Likewise.
4526 * graphite-poly.c (print_pbb_body): Likewise.
4527 * passes.c (pass_manager::register_one_dump_file): Convert
4528 local "optgroup_flags" to optgroup_flags_t.
4529 * print-tree.c (print_node): Use TDF_NONE rather than 0.
4531 (debug_body): Likewise.
4532 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4533 to optgroup_flags_t.
4534 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4536 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4537 (convert_mult_to_fma): Likewise.
4538 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4539 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4540 * tree-vect-data-refs.c (dump_lower_bound): Convert param
4541 "dump_kind" to dump_flags_t.
4543 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4545 * config/rs6000/rs6000.c (min, max): Delete.
4547 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4549 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4550 -mabi=spe and -mabi=no-spe.
4552 2018-06-08 Martin Liska <mliska@suse.cz>
4554 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4555 where we expect an existing summary.
4557 2018-06-08 Martin Liska <mliska@suse.cz>
4559 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4560 * ipa-inline.h (estimate_edge_growth): Likewise.
4562 2018-06-08 Martin Liska <mliska@suse.cz>
4564 * cgraph.c (function_version_hasher::hash): Use
4565 cgraph_node::get_uid ().
4566 (function_version_hasher::equal):
4567 * cgraph.h (cgraph_node::get_uid): New method.
4568 * ipa-inline.c (update_caller_keys): Use
4569 cgraph_node::get_uid ().
4570 (update_callee_keys): Likewise.
4571 * ipa-utils.c (searchc): Likewise.
4572 (ipa_reduced_postorder): Likewise.
4573 * lto-cgraph.c (input_node): Likewise.
4574 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4575 * symbol-summary.h (symtab_insertion): Likewise.
4576 (symtab_removal): Likewise.
4577 (symtab_duplication): Likewise.
4578 * tree-pretty-print.c (dump_function_header): Likewise.
4579 * tree-sra.c (convert_callers_for_node): Likewise.
4581 2018-06-08 Martin Liska <mliska@suse.cz>
4583 * cgraph.c (symbol_table::create_edge): Always assign a new
4585 (symbol_table::free_edge): Do not recycle numbers.
4586 * cgraph.h (cgraph_edge::get): New method.
4587 * symbol-summary.h (symtab_removal): Use it.
4588 (symtab_duplication): Likewise.
4589 (call_summary::hashable_uid): Remove.
4591 2018-06-08 Martin Liska <mliska@suse.cz>
4593 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4594 (initialize_growth_caches): Remove.
4595 (free_growth_caches): Likewise.
4596 (do_estimate_edge_time): Use edge_growth_cache.
4597 (do_estimate_edge_size): Likewise.
4598 (do_estimate_edge_hints): Likewise.
4599 * ipa-inline.c (reset_edge_caches): Likewise.
4600 (recursive_inlining): Likewise.
4601 (inline_small_functions): Likewise.
4602 * ipa-inline.h (initialize_growth_caches): Remove.
4603 (estimate_edge_size): Likewise.
4604 (estimate_edge_time): Likewise.
4605 (estimate_edge_hints): Likewise.
4606 (reset_edge_growth_cache): Likewise.
4607 * symbol-summary.h (call_summary::remove): New method.
4609 2018-06-08 Martin Liska <mliska@suse.cz>
4611 * ipa-cp.c (class edge_clone_summary): New summary.
4612 (grow_edge_clone_vectors): Remove.
4613 (ipcp_edge_duplication_hook): Remove.
4614 (class edge_clone_summary_t): New call_summary class.
4615 (ipcp_edge_removal_hook): Remove.
4616 (edge_clone_summary_t::duplicate): New function.
4617 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4618 (create_specialized_node): Likewise.
4619 (ipcp_driver): Initialize edge_clone_summaries and do not
4622 2018-06-08 Martin Liska <mliska@suse.cz>
4624 * symbol-summary.h (get): New function.
4625 (call_summary::m_initialize_when_cloning): New class member.
4627 2018-06-08 Martin Liska <mliska@suse.cz>
4629 * cgraph.c (cgraph_node::remove): Do not recycle uid.
4630 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4631 (symbol_table::allocate_cgraph_symbol): Do not set uid.
4632 * passes.c (uid_hash_t): Record removed_nodes by their uids.
4633 (remove_cgraph_node_from_order): Use the removed_nodes set.
4634 (do_per_function_toporder): Likwise.
4635 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4636 instead of summary_uid.
4637 (symtab_removal): Likewise.
4638 (symtab_duplication): Likewise.
4640 2018-06-08 Martin Liska <mliska@suse.cz>
4642 * ipa-cp.c (ipcp_store_bits_results): Use
4643 ipcp_transformation_sum.
4644 (ipcp_store_vr_results): Likewise.
4645 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4647 (ipcp_transformation_initialize): ... this.
4648 (ipa_set_node_agg_value_chain):
4649 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4650 (write_ipcp_transformation_info): Likewise.
4651 (read_ipcp_transformation_info): Likewise.
4652 (ipcp_update_bits): Likewise.
4653 (ipcp_update_vr): Likewise.
4654 (ipcp_transform_function): Likewise.
4655 * ipa-prop.h: Rename ipcp_transformation_summary to
4656 ipcp_transformation.
4657 (class ipcp_transformation_t): New function summary.
4658 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4659 (ipa_get_agg_replacements_for_node): Likewise.
4661 2018-06-08 Martin Liska <mliska@suse.cz>
4663 * ipa-pure-const.c (struct funct_state_d): Do it class instead
4665 (class funct_state_summary_t): New function_summary class.
4666 (has_function_state): Remove.
4667 (get_function_state): Likewise.
4668 (set_function_state): Likewise.
4669 (add_new_function): Likewise.
4670 (funct_state_summary_t::insert): New function.
4671 (duplicate_node_data): Remove.
4672 (remove_node_data): Remove.
4673 (funct_state_summary_t::duplicate): New function.
4674 (register_hooks): Create new funct_state_summaries.
4675 (pure_const_generate_summary): Use it.
4676 (pure_const_write_summary): Likewise.
4677 (pure_const_read_summary): Likewise.
4678 (propagate_pure_const): Likewise.
4679 (propagate_nothrow): Likewise.
4680 (dump_malloc_lattice): Likewise.
4681 (propagate_malloc): Likewise.
4682 (execute): Do not register hooks, just remove summary
4684 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4687 2018-06-08 Martin Liska <mliska@suse.cz>
4689 * ipa-reference.c (remove_node_data): Remove.
4690 (duplicate_node_data): Likewise.
4691 (class ipa_ref_var_info_summary_t): New class.
4692 (class ipa_ref_opt_summary_t): Likewise.
4693 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4694 (get_reference_optimization_summary): Use
4695 ipa_ref_opt_sum_summaries.
4696 (set_reference_vars_info): Remove.
4697 (set_reference_optimization_summary): Likewise.
4698 (ipa_init): Create summaries.
4699 (init_function_info): Use function summary.
4700 (ipa_ref_opt_summary_t::duplicate): New function.
4701 (ipa_ref_opt_summary_t::remove): New function.
4702 (get_read_write_all_from_node): Fix GNU coding style.
4703 (propagate): Use function summary.
4704 (write_node_summary_p): Fix GNU coding style.
4705 (stream_out_bitmap): Likewise.
4706 (ipa_reference_read_optimization_summary): Use function summary.
4707 (ipa_reference_c_finalize): Do not release hooks.
4709 2018-06-08 Martin Liska <mliska@suse.cz>
4711 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4712 (analyze_function_body): Extract multiple calls of get_create.
4713 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4714 * ipa-inline.c (recursive_inlining): Use ::get method.
4715 * ipa-inline.h (estimate_edge_growth): Likewise.
4717 2018-06-08 Martin Liska <mliska@suse.cz>
4719 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4721 (hsa_function_summary::hsa_function_summary): Use the new enum
4723 (hsa_gpu_implementation_p): Use hsa_summaries::get.
4724 * hsa-gen.c (hsa_get_host_function): Likewise.
4725 (get_brig_function_name): Likewise.
4726 * ipa-hsa.c (process_hsa_functions): Likewise.
4727 (ipa_hsa_write_summary): Likewise.
4728 * symbol-summary.h (symtab_duplication): Use ::get function/
4729 (get): New function.
4731 2018-06-08 Martin Liska <mliska@suse.cz>
4733 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4735 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4736 (hsa_register_kernel): Likewise.
4737 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4738 * hsa-gen.c (hsa_get_host_function): Likewise.
4739 (get_brig_function_name): Likewise.
4740 (generate_hsa): Likewise.
4741 (pass_gen_hsail::execute): Likewise.
4742 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4743 (devirtualization_time_bonus): Likewise.
4744 (ipcp_propagate_stage): Likewise.
4745 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4746 (edge_set_predicate): Likewise.
4747 (evaluate_conditions_for_known_args): Likewise.
4748 (evaluate_properties_for_edge): Likewise.
4749 (ipa_fn_summary::reset): Likewise.
4750 (ipa_fn_summary_t::duplicate): Likewise.
4751 (dump_ipa_call_summary): Likewise.
4752 (ipa_dump_fn_summary): Likewise.
4753 (analyze_function_body): Likewise.
4754 (compute_fn_summary): Likewise.
4755 (estimate_edge_devirt_benefit): Likewise.
4756 (estimate_edge_size_and_time): Likewise.
4757 (estimate_calls_size_and_time): Likewise.
4758 (estimate_node_size_and_time): Likewise.
4759 (inline_update_callee_summaries): Likewise.
4760 (remap_edge_change_prob): Likewise.
4761 (remap_edge_summaries): Likewise.
4762 (ipa_merge_fn_summary_after_inlining): Likewise.
4763 (ipa_update_overall_fn_summary): Likewise.
4764 (read_ipa_call_summary): Likewise.
4765 (inline_read_section): Likewise.
4766 (write_ipa_call_summary): Likewise.
4767 (ipa_fn_summary_write): Likewise.
4768 (ipa_free_fn_summary): Likewise.
4769 * ipa-hsa.c (process_hsa_functions): Likewise.
4770 (ipa_hsa_write_summary): Likewise.
4771 (ipa_hsa_read_section): Likewise.
4772 * ipa-icf.c (sem_function::merge): Likewise.
4773 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4774 (do_estimate_edge_time): Likewise.
4775 (estimate_size_after_inlining): Likewise.
4776 (estimate_growth): Likewise.
4777 (growth_likely_positive): Likewise.
4778 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4779 (inline_call): Likewise.
4780 * ipa-inline.c (caller_growth_limits): Likewise.
4781 (can_inline_edge_p): Likewise.
4782 (can_inline_edge_by_limits_p): Likewise.
4783 (compute_uninlined_call_time): Likewise.
4784 (compute_inlined_call_time): Likewise.
4785 (want_inline_small_function_p): Likewise.
4786 (edge_badness): Likewise.
4787 (update_caller_keys): Likewise.
4788 (update_callee_keys): Likewise.
4789 (recursive_inlining): Likewise.
4790 (inline_small_functions): Likewise.
4791 (inline_to_all_callers_1): Likewise.
4792 (dump_overall_stats): Likewise.
4793 (early_inline_small_functions): Likewise.
4794 (early_inliner): Likewise.
4795 * ipa-inline.h (estimate_edge_growth): Likewise.
4796 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4797 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4798 * ipa-prop.h (IPA_NODE_REF): Likewise.
4799 (IPA_EDGE_REF): Likewise.
4800 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4801 (propagate_malloc): Likewise.
4802 * ipa-split.c (execute_split_functions): Likewise.
4803 * symbol-summary.h: Rename get to get_create.
4805 (get_create): Likewise.
4806 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4808 2018-06-08 Martin Liska <mliska@suse.cz>
4810 * symbol-summary.h (release): Move definition out of class
4812 (symtab_removal): Likewise.
4813 (symtab_duplication): Likewise.
4815 2018-06-08 Martin Liska <mliska@suse.cz>
4817 * symbol-summary.h (function_summary): Move constructor
4818 implementation out of class declaration.
4819 (release): Likewise.
4820 (symtab_insertion): Likewise.
4821 (symtab_removal): Likewise.
4822 (symtab_duplication): Likewise.
4825 2018-06-08 Martin Liska <mliska@suse.cz>
4827 * Makefile.in: Remove support for MPX (macros, related functions,
4828 fields in cgraph_node, ...).
4829 * builtin-types.def (BT_BND): Likewise.
4830 (BT_FN_BND_CONST_PTR): Likewise.
4831 (BT_FN_CONST_PTR_BND): Likewise.
4832 (BT_FN_VOID_PTR_BND): Likewise.
4833 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4834 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4835 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4836 (expand_builtin_mempcpy_with_bounds): Likewise.
4837 (expand_builtin_memset_with_bounds): Likewise.
4838 (expand_builtin_memset_args): Likewise.
4839 (std_expand_builtin_va_start): Likewise.
4840 (expand_builtin): Likewise.
4841 (expand_builtin_with_bounds): Likewise.
4842 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4843 (DEF_LIB_BUILTIN_CHKP): Likewise.
4844 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4845 (DEF_CHKP_BUILTIN): Likewise.
4846 (BUILT_IN_MEMCPY): Likewise.
4847 (BUILT_IN_MEMMOVE): Likewise.
4848 (BUILT_IN_MEMPCPY): Likewise.
4849 (BUILT_IN_MEMSET): Likewise.
4850 (BUILT_IN_STPCPY): Likewise.
4851 (BUILT_IN_STRCAT): Likewise.
4852 (BUILT_IN_STRCHR): Likewise.
4853 (BUILT_IN_STRCPY): Likewise.
4854 (BUILT_IN_STRLEN): Likewise.
4855 (BUILT_IN_MEMCPY_CHK): Likewise.
4856 (BUILT_IN_MEMMOVE_CHK): Likewise.
4857 (BUILT_IN_MEMPCPY_CHK): Likewise.
4858 (BUILT_IN_MEMSET_CHK): Likewise.
4859 (BUILT_IN_STPCPY_CHK): Likewise.
4860 (BUILT_IN_STRCAT_CHK): Likewise.
4861 (BUILT_IN_STRCPY_CHK): Likewise.
4862 * calls.c (store_bounds): Likewise.
4863 (emit_call_1): Likewise.
4864 (special_function_p): Likewise.
4865 (maybe_warn_nonstring_arg): Likewise.
4866 (initialize_argument_information): Likewise.
4867 (finalize_must_preallocate): Likewise.
4868 (compute_argument_addresses): Likewise.
4869 (expand_call): Likewise.
4870 * cfgexpand.c (expand_call_stmt): Likewise.
4871 (expand_return): Likewise.
4872 (expand_gimple_stmt_1): Likewise.
4873 (pass_expand::execute): Likewise.
4874 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4875 (cgraph_node::remove): Likewise.
4876 (cgraph_node::dump): Likewise.
4877 (cgraph_node::verify_node): Likewise.
4878 * cgraph.h (chkp_function_instrumented_p): Likewise.
4879 (symtab_node::get_alias_target): Likewise.
4880 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4881 (cgraph_local_p): Likewise.
4882 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4883 (cgraph_edge::rebuild_references): Likewise.
4884 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4885 (walk_polymorphic_call_targets): Likewise.
4886 (cgraph_node::expand_thunk): Likewise.
4887 (symbol_table::output_weakrefs): Likewise.
4888 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4889 (ix86_handle_option): Likewise.
4890 * config/i386/constraints.md: Likewise.
4891 * config/i386/i386-builtin-types.def (BND): Likewise.
4895 * config/i386/i386-builtin.def (BDESC_END): Likewise.
4896 (BDESC_FIRST): Likewise.
4898 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4899 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4900 * config/i386/i386.c (enum reg_class): Likewise.
4901 (ix86_target_string): Likewise.
4902 (ix86_option_override_internal): Likewise.
4903 (ix86_conditional_register_usage): Likewise.
4904 (ix86_valid_target_attribute_inner_p): Likewise.
4905 (ix86_set_indirect_branch_type): Likewise.
4906 (ix86_set_current_function): Likewise.
4907 (ix86_function_arg_regno_p): Likewise.
4908 (init_cumulative_args): Likewise.
4909 (ix86_function_arg_advance): Likewise.
4910 (ix86_function_arg): Likewise.
4911 (ix86_pass_by_reference): Likewise.
4912 (ix86_function_value_regno_p): Likewise.
4913 (ix86_function_value_1): Likewise.
4914 (ix86_function_value_bounds): Likewise.
4915 (ix86_return_in_memory): Likewise.
4916 (ix86_setup_incoming_vararg_bounds): Likewise.
4917 (ix86_va_start): Likewise.
4918 (indirect_thunk_need_prefix): Likewise.
4919 (print_reg): Likewise.
4920 (ix86_print_operand): Likewise.
4921 (ix86_expand_call): Likewise.
4922 (ix86_output_function_return): Likewise.
4923 (reg_encoded_number): Likewise.
4924 (BDESC_VERIFYS): Likewise.
4925 (ix86_init_mpx_builtins): Likewise.
4926 (ix86_init_builtins): Likewise.
4927 (ix86_emit_cmove): Likewise.
4928 (ix86_emit_move_max): Likewise.
4929 (ix86_expand_builtin): Likewise.
4930 (ix86_builtin_mpx_function): Likewise.
4931 (ix86_get_arg_address_for_bt): Likewise.
4932 (ix86_load_bounds): Likewise.
4933 (ix86_store_bounds): Likewise.
4934 (ix86_load_returned_bounds): Likewise.
4935 (ix86_store_returned_bounds): Likewise.
4936 (ix86_class_likely_spilled_p): Likewise.
4937 (ix86_hard_regno_mode_ok): Likewise.
4938 (x86_order_regs_for_local_alloc): Likewise.
4939 (ix86_mitigate_rop): Likewise.
4940 (ix86_bnd_prefixed_insn_p): Likewise.
4941 (ix86_mpx_bound_mode): Likewise.
4942 (ix86_make_bounds_constant): Likewise.
4943 (ix86_initialize_bounds): Likewise.
4944 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4945 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4946 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4947 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4948 (TARGET_CHKP_BOUND_MODE): Likewise.
4949 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4950 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4951 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4952 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4953 * config/i386/i386.h (TARGET_MPX): Likewise.
4954 (TARGET_MPX_P): Likewise.
4955 (VALID_BND_REG_MODE): Likewise.
4956 (FIRST_BND_REG): Likewise.
4957 (LAST_BND_REG): Likewise.
4958 (enum reg_class): Likewise.
4959 (BND_REG_P): Likewise.
4960 (BND_REGNO_P): Likewise.
4961 (BNDmode): Likewise.
4962 (ADJUST_INSN_LENGTH): Likewise.
4963 * config/i386/i386.md: Likewise.
4964 * config/i386/i386.opt: Likewise.
4965 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4966 (defined): Likewise.
4967 (LINK_MPX): Likewise.
4968 (MPX_SPEC): Likewise.
4969 (LIBMPX_SPEC): Likewise.
4970 (LIBMPXWRAPPERS_SPEC): Likewise.
4971 (CHKP_SPEC): Likewise.
4972 * config/i386/predicates.md: Likewise.
4973 * dbxout.c (dbxout_type): Likewise.
4974 * doc/extend.texi: Likewise.
4975 * doc/invoke.texi: Likewise.
4976 * doc/md.texi: Likewise.
4977 * doc/tm.texi: Likewise.
4978 * doc/tm.texi.in: Likewise.
4979 * dwarf2out.c (is_base_type): Likewise.
4980 (gen_formal_types_die): Likewise.
4981 (gen_subprogram_die): Likewise.
4982 (gen_type_die_with_usage): Likewise.
4983 (gen_decl_die): Likewise.
4984 (dwarf2out_late_global_decl): Likewise.
4985 * expr.c (expand_assignment): Likewise.
4986 (emit_storent_insn): Likewise.
4987 (store_expr_with_bounds): Likewise.
4988 (store_expr): Likewise.
4989 (expand_expr_real_1): Likewise.
4990 * expr.h (store_expr_with_bounds): Likewise.
4991 * function.c (use_register_for_decl): Likewise.
4992 (struct bounds_parm_data): Likewise.
4993 (assign_parms_augmented_arg_list): Likewise.
4994 (assign_parm_find_entry_rtl): Likewise.
4995 (assign_parm_is_stack_parm): Likewise.
4996 (assign_parm_load_bounds): Likewise.
4997 (assign_bounds): Likewise.
4998 (assign_parms): Likewise.
4999 (expand_function_start): Likewise.
5000 * gcc.c (CHKP_SPEC): Likewise.
5001 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5002 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5003 (wrestrict_dom_walker::check_call): Likewise.
5004 * gimple.c (gimple_build_call_from_tree): Likewise.
5005 * gimple.h (enum gf_mask): Likewise.
5006 (gimple_call_with_bounds_p): Likewise.
5007 (gimple_call_set_with_bounds): Likewise.
5008 * gimplify.c (gimplify_init_constructor): Likewise.
5009 * ipa-cp.c (initialize_node_lattices): Likewise.
5010 (propagate_constants_across_call): Likewise.
5011 (find_more_scalar_values_for_callers_subset): Likewise.
5012 * ipa-hsa.c (process_hsa_functions): Likewise.
5013 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5014 * ipa-icf.c (sem_function::merge): Likewise.
5015 * ipa-inline.c (early_inliner): Likewise.
5016 * ipa-pure-const.c (warn_function_noreturn): Likewise.
5017 (warn_function_cold): Likewise.
5018 (propagate_pure_const): Likewise.
5019 * ipa-ref.h (enum GTY): Likewise.
5020 * ipa-split.c (find_retbnd): Likewise.
5021 (consider_split): Likewise.
5022 (split_function): Likewise.
5023 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5024 * ipa.c (walk_polymorphic_call_targets): Likewise.
5025 (symbol_table::remove_unreachable_nodes): Likewise.
5026 (process_references): Likewise.
5027 (cgraph_build_static_cdtor_1): Likewise.
5028 * lto-cgraph.c (lto_output_node): Likewise.
5029 (output_refs): Likewise.
5030 (compute_ltrans_boundary): Likewise.
5031 (input_overwrite_node): Likewise.
5032 (input_node): Likewise.
5033 (input_cgraph_1): Likewise.
5034 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5035 * passes.c (pass_manager::execute_early_local_passes): Likewise.
5036 (class pass_chkp_instrumentation_passes): Likewise.
5037 (make_pass_chkp_instrumentation_passes): Likewise.
5038 * passes.def: Likewise.
5039 * rtl.h (struct GTY): Likewise.
5040 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5041 * stor-layout.c (layout_type): Likewise.
5042 * symtab.c: Likewise.
5043 * target.def: Likewise.
5044 * targhooks.c (default_chkp_bound_type): Likewise.
5045 (default_chkp_bound_mode): Likewise.
5046 (default_builtin_chkp_function): Likewise.
5047 (default_chkp_function_value_bounds): Likewise.
5048 (default_chkp_make_bounds_constant): Likewise.
5049 (default_chkp_initialize_bounds): Likewise.
5050 * targhooks.h (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 * toplev.c (compile_file): Likewise.
5057 (process_options): Likewise.
5058 * tree-core.h (DEF_BUILTIN): Likewise.
5059 (DEF_BUILTIN_CHKP): Likewise.
5060 * tree-inline.c (declare_return_variable): Likewise.
5061 (remap_gimple_stmt): Likewise.
5062 (copy_bb): Likewise.
5063 (initialize_inlined_parameters): Likewise.
5064 (expand_call_inline): Likewise.
5065 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5066 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5067 (make_pass_ipa_chkp_produce_thunks): Likewise.
5068 (make_pass_chkp): Likewise.
5069 (make_pass_chkp_opt): Likewise.
5070 (make_pass_chkp_instrumentation_passes): Likewise.
5071 * tree-pretty-print.c (dump_generic_node): Likewise.
5072 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5073 * tree-ssa-dce.c (propagate_necessity): Likewise.
5074 (eliminate_unnecessary_stmts): Likewise.
5075 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5076 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5077 * tree-ssa-sccvn.h: Likewise.
5078 * tree-ssa-strlen.c (get_string_length): Likewise.
5079 (valid_builtin_call): Likewise.
5080 (adjust_last_stmt): Likewise.
5081 (handle_builtin_strchr): Likewise.
5082 (handle_builtin_strcpy): Likewise.
5083 (handle_builtin_stxncpy): Likewise.
5084 (handle_builtin_memcpy): Likewise.
5085 (handle_builtin_strcat): Likewise.
5086 (strlen_check_and_optimize_stmt): Likewise.
5087 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5088 * tree-streamer-in.c: Likewise.
5089 * tree-streamer.c (record_common_node): Likewise.
5090 * tree.c (tree_code_size): Likewise.
5091 (wide_int_to_tree_1): Likewise.
5092 (type_contains_placeholder_1): Likewise.
5093 (build_common_tree_nodes): Likewise.
5094 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5095 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5096 (POINTER_BOUNDS_P): Likewise.
5097 (BOUNDED_TYPE_P): Likewise.
5098 (BOUNDED_P): Likewise.
5099 (CALL_WITH_BOUNDS_P): Likewise.
5100 (pointer_bounds_type_node): Likewise.
5101 * value-prof.c (gimple_ic): Likewise.
5102 * var-tracking.c (vt_add_function_parameters): Likewise.
5103 * varasm.c (make_decl_rtl): Likewise.
5104 (assemble_start_function): Likewise.
5105 (output_constant): Likewise.
5106 (maybe_assemble_visibility): Likewise.
5107 * varpool.c (ctor_for_folding): Likewise.
5108 * chkp-builtins.def: Remove.
5109 * ipa-chkp.c: Remove.
5110 * ipa-chkp.h: Remove.
5111 * rtl-chkp.c: Remove.
5112 * rtl-chkp.h: Remove.
5113 * tree-chkp-opt.c: Remove.
5114 * tree-chkp.c: Remove.
5115 * tree-chkp.h: Remove.
5117 2018-06-07 Carl Love <cel@us.ibm.com>
5119 * config/rs6000/vsx.md (vextract_fp_from_shorth,
5120 vextract_fp_from_shortl): Add BE support.
5122 2018-06-07 Paul Koning <ni1d@arrl.net>
5124 * compare-elim.c (try_merge_compare): Don't merge compare if
5125 address contains a side effect.
5126 (try_eliminate_compare): Likewise.
5128 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
5130 * config.gcc: Support "tremont".
5131 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5132 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5134 * config/i386/i386.c (m_TREMONT): Define.
5135 (processor_target_table): Add "tremont".
5136 (PTA_TREMONT): Define.
5137 (ix86_lea_outperforms): Add TARGET_TREMONT.
5138 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5139 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5140 and M_INTEL_GOLDMONT_PLUS.
5141 (fold_builtin_cpu): Add "tremont".
5142 (ix86_add_stmt_cost): Add TARGET_TREMONT.
5143 (ix86_option_override_internal): Add "tremont".
5144 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5145 (processor_type): Add PROCESSOR_TREMONT.
5146 * config/i386/x86-tune.def: Add m_TREMONT.
5147 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5149 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5151 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5152 symbol defined for msp430i* devices to be lower case.
5154 2018-06-07 Richard Biener <rguenther@suse.de>
5156 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5157 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
5158 Properly wrap signed arithmetic if overflow wraps.
5160 2018-06-07 Jakub Jelinek <jakub@redhat.com>
5162 PR tree-optimization/69615
5163 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5164 of a cast from a same precision integral SSA_NAME in a bb dominated
5165 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
5166 cast to utype if rhs2 has already a compatible type.
5168 2018-06-07 Richard Biener <rguenther@suse.de>
5170 PR tree-optimization/85935
5171 * graphite-scop-detection.c (find_params_in_bb): Analyze
5172 condition operands with respect to the correct loop. Assert
5173 the analysis doesn't fail.
5175 2018-06-04 Carl Love <cel@us.ibm.com>
5177 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5178 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
5179 as it is slightly cheaper.
5180 (first_match_or_eos_index_<mode>):
5181 Calculate index using natural element order.
5182 (first_match_index_<mode>):
5183 Calculate index using natural element order.
5184 (first_match_or_eos_index_<mode>):
5185 Calculate index using natural order.
5186 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5187 for BE and LE modes.
5188 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5189 P9V_BUILTIN_VCLZLSBB_V16QI.
5190 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5193 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5195 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5196 indentation and line wrap for many prototypes. Add missing
5197 @smallexample directives around block of prototypes for vec_xl and
5200 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
5202 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5203 track if we pass or return IEEE 128-bit floating point.
5204 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5205 C++ mangling that is compatible with GCC 8.1.
5206 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5207 (init_cumulative_args): Note if we pass or return IEEE 128-bit
5208 floating point types.
5209 (rs6000_function_arg_advance_1): Likewise.
5210 (rs6000_mangle_type): Optionally generate mangled names that match
5211 what GCC 8.1 generated for IEEE 128-bit floating point types.
5212 (rs6000_globalize_decl_name): If we have an external function that
5213 passes or returns IEEE 128-bit types, generate a weak reference
5214 from the mangled name used in GCC 8.1 to the current mangled
5216 (rs6000_init_builtins): Make __ibm128 use the long double type if
5217 long double is IBM extended double. Make __float128 use the long
5218 double type if long double is IEEE 128-bit.
5221 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5222 macro for __ibm128 built-in functions.
5223 (PACK_IF): Add __ibm128 pack/unpack functions.
5224 (UNPACK_IF): Likewise.
5225 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5226 enable long double built-in functions if long double is IEEE
5227 128-bit floating point.
5228 (rs6000_invalid_builtin): Update long double built-in function
5230 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5231 functions, adjust the built-in function to use the long double
5232 built-in function if __ibm128 and long double are the same type.
5233 * doc/extend.texi (PowerPC builtins): Update documention for
5234 __builtin_{,un}pack_longdouble. Add documentation for
5235 __builtin_{,un}pack_ibm128.
5237 2018-06-06 Jim Wilson <jimw@sifive.com>
5239 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5240 (struct machine_function): New field interrupt_mode.
5241 (riscv_handle_type_attribute): New function. Add forward declaration.
5242 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5243 (riscv_expand_epilogue): Check interrupt_mode field.
5244 (riscv_set_current_function): Check interrupt attribute args and
5245 set interrupt_mode field.
5246 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5247 (riscv_sret, riscv_uret): New.
5248 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5249 new arguments to interrupt attribute.
5251 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
5254 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5255 Don't handle -mcpu=power8 if -mpower9-vector is also used.
5257 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5259 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5260 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5261 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5262 several redundant entries.
5264 2018-06-06 David Malcolm <dmalcolm@redhat.com>
5266 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5267 type from "rtx" to "rtx_insn *".
5268 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5269 for local "call_insn", removing cast.
5270 (ix86_expand_call): Likewise, introducing a "call_insn" local.
5272 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
5274 PR tree-optimization/86066
5275 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5276 for BIT_INSERT_EXPR stores.
5278 2018-06-06 Richard Biener <rguenther@suse.de>
5280 PR tree-optimization/86062
5281 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5282 component refs ontop
5283 of to be offsetted base.
5285 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5287 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5288 to be static and remove check on interrupt attribute name.
5290 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
5292 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5293 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5295 2018-06-05 Steve Ellcey <sellcey@cavium.com>
5298 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5300 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5301 Remove second argument, change how error is called.
5302 (aarch64_layout_arg): Remove second argument from
5303 aarch64_err_no_fpadvsimd call.
5304 (aarch64_init_cumulative_args): Ditto.
5305 (aarch64_gimplify_va_arg_expr): Ditto.
5306 * config/aarch64/aarch64.md (mov<mode>): Ditto.
5308 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
5310 * config/i386/i386.md (simple_return_indirect_internal): New expander.
5311 (*simple_return_indirect_internal<mode>): Rename from
5312 simple_return_indirect_internal. Use W mode iterator.
5313 (rstorssp): New expander.
5314 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
5315 (clrssbsy): New expander.
5316 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
5318 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
5320 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5322 (cmse_check_pointed_object): Likewise.
5324 2018-06-05 Martin Liska <mliska@suse.cz>
5326 PR gcov-profile/47618
5327 * doc/invoke.texi: Document how -fprofile-dir format
5330 2018-06-05 Richard Biener <rguenther@suse.de>
5332 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5333 removal pretend DOM info isn't available so we do not update
5334 it and only remove edges, not dominated blocks. Actually free
5335 DOM info in case we removed something. Remove unreachable blocks.
5336 (mfb_keep_latches): Work with either DOM info or marked backedges.
5337 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5338 first. Mark backedges if DOM info isn't available.
5339 (Re-)compute DOM info after cleanup_control_flow_pre.
5341 2018-06-05 Richard Biener <rguenther@suse.de>
5343 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5344 (locus_discrim_hasher::hash): Adjust.
5345 (locus_discrim_hasher::equal): Likewise.
5346 (next_discriminator_for_locus): Work on line directly.
5347 (same_line_p): Pass in expanded locus1 as well.
5348 (assign_discriminators): Avoid redundant location expansions.
5350 2018-06-05 Richard Biener <rguenther@suse.de>
5352 PR tree-optimization/86046
5353 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5354 if required after clearing TREE_ADDRESSABLE.
5356 2018-06-05 Richard Biener <rguenther@suse.de>
5358 PR tree-optimization/86047
5359 * tree-ssa-loop.c (for_each_index): Glob handling of all
5360 decls and constants and really handle all of them.
5362 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5365 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5366 qualifier_void_pointer and qualifier_const_void_pointer.
5367 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5368 (arm_init_builtins): Handle the above.
5369 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5370 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5371 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5374 2018-06-05 Martin Liska <mliska@suse.cz>
5376 * auto-profile.c (read_autofdo_file): Do not use
5377 gcov_ctr_summary struct.
5378 (afdo_callsite_hot_enough_for_early_inline): Likewise.
5379 * coverage.c (struct counts_entry): Likewise.
5380 (read_counts_file): Read just single summary entry.
5381 (get_coverage_counts): Use gcov_summary struct.
5382 * coverage.h (get_coverage_counts): Likewise.
5383 * gcov-dump.c (dump_working_sets): Likewise.
5384 (tag_summary): Dump just single summary.
5385 * gcov-io.c (gcov_write_summary): Write just histogram
5387 (gcov_read_summary): Read just single summary.
5388 (compute_working_sets): Use gcov_summary struct.
5389 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5390 of GCOV_COUNTERS_SUMMABLE.
5391 (GCOV_COUNTERS_SUMMABLE): Remove.
5392 (GCOV_FIRST_VALUE_COUNTER): Replace with
5393 GCOV_COUNTER_V_INTERVAL.
5394 (struct gcov_ctr_summary): Remove.
5395 (struct gcov_summary): Directly use fields of former
5397 (compute_working_sets): Use gcov_summary struct.
5398 * gcov.c (read_count_file): Do not use ctrs fields.
5399 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5401 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5403 * profile.c: Likewise.
5404 * profile.h: Likewise.
5406 2018-06-05 Martin Liska <mliska@suse.cz>
5408 PR gcov-profile/84846
5409 * gcov.c (output_lines): Print working directory only
5410 in intermediate format.
5412 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
5414 * config/s390/s390-builtin-types.def: Add void function type.
5415 * config/s390/s390-builtins.def: Use the function type for the
5418 2018-06-04 Jim Wilson <jimw@sifive.com>
5420 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5422 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5423 and maybe_eh_return. Change regno to unsigned int. Use new args to
5424 handle EH_RETURN_DATA_REGNO registers properly.
5425 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5426 (riscv_expand_epilogue): Update comment. Change argument name and
5427 type. Update code to use new name and type. Pass new args to
5428 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
5430 * config/riscv/riscv.md (NORMAL_RETURN): New.
5431 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5432 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5433 (eh_return): Call gen_eh_return_internal and emit barrier.
5434 (eh_return_internal): Call riscv_expand_epilogue.
5436 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
5438 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5439 bit_insertion field and declare can_be_merged_into method.
5440 (merged_store_group::can_be_merged_into): New method.
5441 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5442 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
5443 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5445 2018-06-04 Richard Biener <rguenther@suse.de>
5447 PR tree-optimization/85955
5448 * builtins.c (fold_builtin_sincos): Convert pointers to
5449 destination to appropriate type before dereferencing.
5451 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
5453 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5455 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
5457 * expr.c (expand_expr_real_1): Force the operand into memory if
5458 its TYPE_MODE is BLKmode and if there is no integer mode for
5459 the number of bits being extracted.
5461 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5465 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5466 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5468 2018-06-04 Richard Biener <rguenther@suse.de>
5470 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5471 (cleanup_tree_cfg_noloop): ... single caller. Do
5472 start_recording_case_labels later.
5474 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
5476 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5477 to _IMMINTRIN_H_INCLUDED.
5478 * config/i386/pconfigintrin.h: Ditto.
5479 * config/i386/waitpkgintrin.h: Ditto.
5480 * config/i386/immintrin.h: Add includes for sgxintrin.h,
5481 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5482 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5483 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5484 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5485 waitpkgintrin.h and cldemoteintrin.h.
5487 2018-06-04 Richard Biener <rguenther@suse.de>
5489 PR tree-optimization/86038
5490 * tracer.c (find_best_successor): Check probability for
5491 being initialized, bail out if not.
5493 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
5496 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5497 of bits to ignore when comparing architectures.
5499 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5501 PR tree-optimization/69615
5502 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5503 maximum or minimum of the type, try to merge it also as if
5504 range1 is + [-, x - 1] or + [x + 1, -].
5507 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5509 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
5511 PR tree-optimization/86034
5512 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5513 the unsigned bitfield type in a bit insertion sequence if it does not
5514 have a larger precision than the bitfield size.
5515 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5517 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
5519 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5521 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5523 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5524 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5525 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5526 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5528 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5530 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5531 Disable -fdelete-null-pointer-checks for ELF toolchain.
5533 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5534 Kito Cheng <kito.cheng@gmail.com>
5536 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5537 (nds32le-*-*, nds32be-*-*): Integrate checking process.
5538 (nds32*-*-*): Add glibc and uclibc conditions.
5539 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5540 (TARGET_EXCEPT_UNWIND_INFO): Define.
5541 * config/nds32/elf.h: New file.
5542 * config/nds32/linux.h: New file.
5543 * config/nds32/nds32-elf.opt: New file.
5544 * config/nds32/nds32-linux.opt: New file.
5545 * config/nds32/nds32-fp-as-gp.c
5546 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5547 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5549 (nds32_asm_file_end): Ditto.
5550 (nds32_print_operand): Ditto.
5551 (nds32_insert_attributes): Ditto.
5552 (nds32_init_libfuncs): New function.
5553 (TARGET_HAVE_TLS): Define.
5554 (TARGET_INIT_LIBFUNCS): Define.
5555 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5557 (TARGET_ELF): Apply different mcmodel setting.
5558 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5559 been migrated into elf.h and linux.h files.
5560 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5561 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5562 (mcmodel): The content has been migrated into nds32-elf.opt and
5563 nds32-linux.opt files.
5564 * config/nds32/t-elf: New file.
5565 * config/nds32/t-linux: New file.
5567 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5568 Shiva Chen <shiva0217@gmail.com>
5570 * config/nds32/constants.md (unspec_volatile_element): Add
5571 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5572 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5574 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5575 (make_pass_nds32_fp_as_gp): Declare.
5576 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5578 (nds32_asm_function_end_prologue): Remove unused asm output.
5579 (nds32_asm_function_begin_epilogue): Remove unused asm output.
5580 (nds32_asm_file_start): Output necessary fp_as_gp information.
5581 (nds32_option_override): Adjust register usage.
5582 (nds32_expand_prologue): Consider fp_as_gp situation.
5583 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5584 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5587 (simple_return): Ditto.
5588 (omit_fp_begin): Output special directive for fp_as_gp.
5589 (omit_fp_end): Output special directive for fp_as_gp.
5590 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5591 mforbid-fp-as-gp): New options.
5593 2018-06-01 Mark Wielaard <mark@klomp.org>
5595 * dwarf2out.c (dwarf2out_finish): Remove generation of
5596 DW_AT_loclists_base.
5598 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5600 * gimple-ssa-store-merging.c: Include gimple-fold.h.
5601 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5602 (struct merged_store_group): Add bit_insertion field.
5603 (dump_char_array): Use standard hexadecimal format.
5604 (merged_store_group::merged_store_group): Set bit_insertion to false.
5605 (merged_store_group::apply_stores): Use optimal buffer size. Deal
5606 with BIT_INSERT_EXPR stores. Move up code updating the mask and
5607 also print the mask in the dump file.
5608 (pass_store_merging::gate): Minor tweak.
5609 (imm_store_chain_info::coalesce_immediate): Fix wrong association
5610 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
5611 stores with INTEGER_CST stores.
5612 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5613 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5614 and use it throughout. Generate bit insertion sequences if need be.
5615 (pass_store_merging::process_store): Remove redundant condition.
5616 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5618 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
5620 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5621 the 128-bit floating point types. Fix function comment.
5623 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5625 * config/aarch64/aarch64-simd.md
5626 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5628 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5631 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5633 PR tree-optimization/85989
5634 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5636 (backprop::intersect_uses): Check it when deciding whether this
5637 is a backedge reference.
5638 (backprop::process_block): Add each phi to m_visited_phis
5639 after visiting it, then clear it at the end.
5641 2018-06-01 Richard Biener <rguenther@suse.de>
5643 * tree-vectorizer.h (vect_dr_stmt): New function.
5644 (vect_get_load_cost): Adjust.
5645 (vect_get_store_cost): Likewise.
5646 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5647 Use vect_dr_stmt instead of DR_SMTT.
5648 (vect_record_base_alignments): Likewise.
5649 (vect_calculate_target_alignment): Likewise.
5650 (vect_compute_data_ref_alignment): Likewise and make static.
5651 (vect_update_misalignment_for_peel): Likewise.
5652 (vect_verify_datarefs_alignment): Likewise.
5653 (vector_alignment_reachable_p): Likewise.
5654 (vect_get_data_access_cost): Likewise. Pass down
5655 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5656 (vect_get_peeling_costs_all_drs): Likewise.
5657 (vect_peeling_hash_get_lowest_cost): Likewise.
5658 (vect_enhance_data_refs_alignment): Likewise.
5659 (vect_find_same_alignment_drs): Likewise.
5660 (vect_analyze_data_refs_alignment): Likewise.
5661 (vect_analyze_group_access_1): Likewise.
5662 (vect_analyze_group_access): Likewise.
5663 (vect_analyze_data_ref_access): Likewise.
5664 (vect_analyze_data_ref_accesses): Likewise.
5665 (vect_vfa_segment_size): Likewise.
5666 (vect_small_gap_p): Likewise.
5667 (vectorizable_with_step_bound_p): Likewise.
5668 (vect_prune_runtime_alias_test_list): Likewise.
5669 (vect_analyze_data_refs): Likewise.
5670 (vect_supportable_dr_alignment): Likewise.
5671 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5672 (vect_gen_prolog_loop_niters): Likewise.
5673 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5674 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5676 (vect_recog_mask_conversion_pattern): Likewise.
5677 (vect_try_gather_scatter_pattern): Likewise.
5678 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5679 to vect_get_store_cost.
5680 (vect_get_store_cost): Get stmt_info instead of DR.
5681 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5682 (vect_get_load_cost): Get stmt_info instead of DR.
5684 2018-06-01 Richard Biener <rguenther@suse.de>
5687 * gimple-fold.c (var_decl_component_p): Also allow offsetted
5688 vars wrapped in MEM_REFs.
5690 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5692 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5693 Fix subreg tests so that we only return a choice between
5694 GENERAL_REGS and FP_REGS if the original classes included both.
5696 2018-06-01 Richard Biener <rguenther@suse.de>
5699 * tree-ssa-structalias.c (get_function_part_constraint):
5700 Handle NULL fi->decl.
5701 (find_func_aliases_for_call): Properly handle indirect
5702 fi from direct call.
5703 (find_func_clobbers): Likewise.
5704 (ipa_pta_execute): Likewise.
5705 (create_variable_info_for): For functions that are ifunc_resolver
5706 resolve to a varinfo that contains the result of the resolver call.
5707 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5710 2018-05-31 Michael Collison <michael.collison@arm.com>
5712 * config/aarch64/aarch64.md:
5713 (*fix_to_zero_extenddfdi2): New pattern.
5714 * gcc.target/aarch64/fix_extend1.c: New testcase.
5716 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
5720 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5721 and BUILT_IN_STRNCMP_EQ.
5722 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5723 BUILT_IN_STRNCMP_EQ.
5724 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5725 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5726 (gimple_fold_builtin): Likewise.
5727 * tree-ssa-strlen.c (compute_string_length): New function.
5728 (determine_min_obsize): New function.
5729 (handle_builtin_string_cmp): New function to handle calls to
5730 string compare functions.
5731 (strlen_optimize_stmt): Add handling to builtin string compare
5733 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5734 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5735 * tree.c (build_common_builtin_nodes): Add new defines of
5736 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5738 2018-05-31 Jakub Jelinek <jakub@redhat.com>
5741 * bb-reorder.c (pass_partition_blocks::gate): Return false for
5742 functions with naked attribute.
5744 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5746 * config/i386/sse.md (avx_vec_concat<mode>):
5747 Substitute concat_tg_mode mode attribute with xtg_mode.
5748 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5749 (concat_tg_mode): Remove mode attribute.
5751 2018-05-31 Martin Sebor <msebor@redhat.com>
5754 * calls.c (alloc_max_size): Correct a logic error/typo.
5755 Treat excessive arguments as infinite. Warn for invalid arguments.
5756 * doc/invoke.texi (-Walloc-size-larger-than): Update.
5758 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
5761 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5762 and movx for Haswell.
5764 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
5765 Cesar Philippidis <cesar@codesourcery.com>
5768 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5769 when emitting error on private/firstprivate reductions.
5770 * omp-low.c (lower_omp_target): Avoid reference-type processing
5771 on pointers for firstprivate clause.
5773 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5775 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5778 * config/aarch64/aarch64-simd.md
5779 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5780 (aarch64_ld1_x3_<mode>): Likewise
5781 (aarch64_st1x2<VALLDIF:mode>): Likewise
5782 (aarch64_st1_x2_<mode>): Likewise
5783 (aarch64_st1x3<VALLDIF:mode>): Likewise
5784 (aarch64_st1_x3_<mode>): Likewise
5785 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5786 (vld1_s8_x3): Likewise.
5787 (vld1_u16_x3): Likewise.
5788 (vld1_s16_x3): Likewise.
5789 (vld1_u32_x3): Likewise.
5790 (vld1_s32_x3): Likewise.
5791 (vld1_u64_x3): Likewise.
5792 (vld1_s64_x3): Likewise.
5793 (vld1_f16_x3): Likewise.
5794 (vld1_f32_x3): Likewise.
5795 (vld1_f64_x3): Likewise.
5796 (vld1_p8_x3): Likewise.
5797 (vld1_p16_x3): Likewise.
5798 (vld1_p64_x3): Likewise.
5799 (vld1q_u8_x3): Likewise.
5800 (vld1q_s8_x3): Likewise.
5801 (vld1q_u16_x3): Likewise.
5802 (vld1q_s16_x3): Likewise.
5803 (vld1q_u32_x3): Likewise.
5804 (vld1q_s32_x3): Likewise.
5805 (vld1q_u64_x3): Likewise.
5806 (vld1q_s64_x3): Likewise.
5807 (vld1q_f16_x3): Likewise.
5808 (vld1q_f32_x3): Likewise.
5809 (vld1q_f64_x3): Likewise.
5810 (vld1q_p8_x3): Likewise.
5811 (vld1q_p16_x3): Likewise.
5812 (vld1q_p64_x3): Likewise.
5813 (vst1_s64_x2): Likewise.
5814 (vst1_u64_x2): Likewise.
5815 (vst1_f64_x2): Likewise.
5816 (vst1_s8_x2): Likewise.
5817 (vst1_p8_x2): Likewise.
5818 (vst1_s16_x2): Likewise.
5819 (vst1_p16_x2): Likewise.
5820 (vst1_s32_x2): Likewise.
5821 (vst1_u8_x2): Likewise.
5822 (vst1_u16_x2): Likewise.
5823 (vst1_u32_x2): Likewise.
5824 (vst1_f16_x2): Likewise.
5825 (vst1_f32_x2): Likewise.
5826 (vst1_p64_x2): Likewise.
5827 (vst1q_s8_x2): Likewise.
5828 (vst1q_p8_x2): Likewise.
5829 (vst1q_s16_x2): Likewise.
5830 (vst1q_p16_x2): Likewise.
5831 (vst1q_s32_x2): Likewise.
5832 (vst1q_s64_x2): Likewise.
5833 (vst1q_u8_x2): Likewise.
5834 (vst1q_u16_x2): Likewise.
5835 (vst1q_u32_x2): Likewise.
5836 (vst1q_u64_x2): Likewise.
5837 (vst1q_f16_x2): Likewise.
5838 (vst1q_f32_x2): Likewise.
5839 (vst1q_f64_x2): Likewise.
5840 (vst1q_p64_x2): Likewise.
5841 (vst1_s64_x3): Likewise.
5842 (vst1_u64_x3): Likewise.
5843 (vst1_f64_x3): Likewise.
5844 (vst1_s8_x3): Likewise.
5845 (vst1_p8_x3): Likewise.
5846 (vst1_s16_x3): Likewise.
5847 (vst1_p16_x3): Likewise.
5848 (vst1_s32_x3): Likewise.
5849 (vst1_u8_x3): Likewise.
5850 (vst1_u16_x3): Likewise.
5851 (vst1_u32_x3): Likewise.
5852 (vst1_f16_x3): Likewise.
5853 (vst1_f32_x3): Likewise.
5854 (vst1_p64_x3): Likewise.
5855 (vst1q_s8_x3): Likewise.
5856 (vst1q_p8_x3): Likewise.
5857 (vst1q_s16_x3): Likewise.
5858 (vst1q_p16_x3): Likewise.
5859 (vst1q_s32_x3): Likewise.
5860 (vst1q_s64_x3): Likewise.
5861 (vst1q_u8_x3): Likewise.
5862 (vst1q_u16_x3): Likewise.
5863 (vst1q_u32_x3): Likewise.
5864 (vst1q_u64_x3): Likewise.
5865 (vst1q_f16_x3): Likewise.
5866 (vst1q_f32_x3): Likewise.
5867 (vst1q_f64_x3): Likewise.
5868 (vst1q_p64_x3): Likewise.
5870 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5872 * config/msp430/msp430.c (msp430_output_labelref): Prepend
5873 user_label_prefix to name.
5875 * tree-core.h: Update comment about the format of NAME string
5876 passed to handler in attribute_spec.
5878 * config/msp430/msp430.md: Remove erroneous subreg expression from
5879 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5880 zero_extend{q,h}isi2.
5882 2018-05-30 Borislav Petkov <bp@suse.de>
5884 * doc/extend.texi: Document some architecture specific
5885 constraints and sort entries.
5887 2018-05-30 Martin Sebor <msebor@redhat.com>
5890 * builtins.c (expand_builtin_stpcpy_1): New function.
5891 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5892 only if the former succeeds.
5894 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5896 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5899 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5901 * doc/invoke.texi (-flinker-output): Document
5903 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5905 * passes.c (ipa_write_summaries): Only modify statements if body
5907 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5908 incrementally linking.
5909 (ipa_passes): Likewise.
5910 * lto-cgraph.c (lto_output_node): When incrementally linking do not
5911 pass down resolution info.
5912 * common.opt (flag_incremental_link): Update info.
5913 * gcc.c (plugin specs): Turn flinker-output=* to
5914 -plugin-opt=-linker-output-known
5915 * toplev.c (compile_file): Also cut compilation when doing incremental
5917 * flag-types. (enum lto_partition_model): Add
5918 LTO_LINKER_OUTPUT_NOLTOREL.
5919 (invoke.texi): Add -flinker-output docs.
5920 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5921 link same way as WPA; do not stream in dead initializers.
5923 * dwarf2out.c (dwarf2out_die_ref_for_decl,
5924 darf2out_register_external_decl): Support incremental link.
5926 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5928 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5930 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5932 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5933 it down to simple_object_copy_lto_debug_sections.
5934 (run_gcc): Determine incremental LTO link time and configure
5935 lto1 into non-wpa mode, disable renaming of debug sections.
5937 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
5939 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5940 descriptions of various incorrectly documented functions.
5942 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
5945 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5946 address check not strict.
5948 2018-05-30 Richard Biener <rguenther@suse.de>
5950 PR tree-optimization/85964
5951 * tracer.c (better_p): Drop initialized count check, we only
5952 call the function with initialized counts now.
5953 (find_best_successor): Do find a best edge if one
5954 has uninitialized count.
5955 (find_best_predecessor): Likewise. Do BB frequency check only
5956 if count is initialized.
5958 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
5960 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5961 (aarch64_ldrstr_offset_compare): New.
5962 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5963 load/store orderings.
5964 (aarch64_gen_adjusted_ldpstp): Likewise.
5966 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
5968 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5969 Check for subset of GENERAL_REGS and FP_REGS.
5970 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5973 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
5975 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5976 and wi::to_poly_offset. Add the current offset and then check
5977 whether the sum fits, rather than using an unchecked addition of
5978 a checked term. Check for a shwi rather than a uhwi.
5979 * expr.c (get_bit_range): Use tree_to_poly_uint64.
5980 (store_constructor): Use poly_int_tree_p.
5981 (expand_expr_real_1): Likewise.
5982 * function.c (assign_temp): Likewise.
5983 * fold-const.c (const_binop): Use poly_int_tree_p and
5985 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
5987 * ipa-icf-gimple.c (func_checker::compare_operand): Use
5988 to_poly_offset for MEM offsets.
5989 * ipa-icf.c (sem_variable::equals): Likewise.
5990 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5991 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5992 wi::to_poly_offset for BIT_FIELD_REF offsets.
5993 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5995 * var-tracking.c (emit_note_insn_var_location): Use
5996 tree_to_poly_uint64.
5998 2018-05-29 Jim Wilson <jimw@sifive.com>
6000 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6002 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
6005 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6006 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6008 (sse4_1_round<mode>2): Use nonimmediate_operand
6009 for operand 1 predicate.
6011 2018-05-29 Martin Sebor <msebor@redhat.com>
6012 Richard Biener <rguenther@suse.de>
6015 * calls.c (get_size_range): Call determine_value_range instead
6016 of get_value_range..
6017 * tree-vrp.h (determine_value_range): Declared new function.
6018 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6020 2018-05-29 Richard Biener <rguenther@suse.de>
6022 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6023 sure to use non-pattern stmts for get_earlier_stmt arguments.
6024 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6025 called on pattern stmts.
6026 (get_later_stmt): Likewise.
6028 2018-05-29 Martin Liska <mliska@suse.cz>
6030 PR gcov-profile/85759
6031 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6034 2018-05-29 Jakub Jelinek <jakub@redhat.com>
6036 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6038 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6042 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6043 VEC_PACK_FLOAT_EXPR): New tree codes.
6044 * tree-pretty-print.c (op_code_prio): Handle
6045 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6046 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6047 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6048 * tree-inline.c (estimate_operator_cost): Likewise.
6049 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6050 * fold-const.c (const_binop): Likewise.
6051 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6052 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6053 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6054 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6055 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6056 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6057 * expr.c (expand_expr_real_2): Likewise.
6058 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6059 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6060 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6062 * optabs.c (expand_widen_pattern_expr): For
6063 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6064 sign from result type rather than operand's type.
6065 (expand_binop_directly): For vec_packu_float_optab and
6066 vec_packs_float_optab allow result type to be different from operand's
6068 * optabs-tree.c (optab_for_tree_code): Handle
6069 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6070 VEC_PACK_FLOAT_EXPR. Formatting fixes.
6071 * tree-vect-generic.c (expand_vector_operations_1): Handle
6072 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6073 VEC_PACK_FLOAT_EXPR.
6074 * tree-vect-stmts.c (supportable_widening_operation): Handle
6076 (supportable_narrowing_operation): Handle FLOAT_EXPR.
6077 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6078 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6079 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
6080 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6082 (vec_pack<floatprefix>_float_<mode>): New expander.
6083 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6085 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6086 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6087 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6088 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6089 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6091 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6092 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6093 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6094 VEC_PACK_FLOAT_EXPR): Document.
6096 2018-05-29 Richard Biener <rguenther@suse.de>
6098 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6100 (stmt_vec_info_vec): Make pointer.
6101 (init_stmt_vec_info_vec): Remove.
6102 (free_stmt_vec_info_vec): Likewise.
6103 (set_stmt_vec_info_vec): New function.
6104 (free_stmt_vec_infos): Likewise.
6105 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6106 (set_vinfo_for_stmt): Likewise.
6107 (get_earlier_stmt): Likewise.
6108 (get_later_stmt): Likewise.
6109 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6110 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6111 (vec_info::~vec_info): Free stmt_vec_infos.
6112 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6113 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6114 (pass_slp_vectorize::execute): Likewise.
6115 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6116 (free_stmt_vec_info_vec): Likewise.
6117 (set_stmt_vec_info_vec): New function.
6118 (free_stmt_vec_infos): Likewise.
6119 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6120 the global stmt_vec_info_vec.
6121 * tree-parloops.c (gather_scalar_reductions): Use
6122 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6125 2018-05-29 Richard Biener <rguenther@suse.de>
6127 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6129 2018-05-29 Martin Liska <mliska@suse.cz>
6130 David Malcolm <dmalcolm@redhat.com>
6132 * vec.c (test_reverse): New.
6133 (vec_c_tests): Add new test.
6134 * vec.h (vl_ptr>::reverse): New function.
6136 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
6138 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6140 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6143 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
6145 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6147 2018-05-28 Richard Biener <rguenther@suse.de>
6149 PR tree-optimization/85933
6150 * tree-vect-data-refs.c (vect_record_base_alignments): Only
6151 look at stmts marked as vectorizable.
6153 2018-05-28 Richard Biener <rguenther@suse.de>
6155 PR tree-optimization/85934
6156 * tree-vect-generic.c (expand_vector_operations_1): Hoist
6157 vector boolean check before scalar optimization.
6159 2018-05-28 Jakub Jelinek <jakub@redhat.com>
6161 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6164 2018-05-28 Mark Wielaard <mark@klomp.org>
6166 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6167 if it is an expression containing a minus sign.
6169 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
6171 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6173 2018-05-27 Paul Koning <ni1d@arrl.net>
6175 * config/pdp11/pdp11.md (truncsihi2): Remove.
6177 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
6178 Chung-Ju Wu <jasonwucj@gmail.com>
6180 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6182 (unaligned_store_dw): Ditto.
6183 * config/nds32/nds32-memory-manipulation.c
6184 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6185 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6186 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6187 (emit_setmem_word_loop): Rename to ...
6188 (emit_setmem_doubleword_loop): ... this.
6189 (nds32_gen_dup_4_byte_to_word_value): New function.
6190 (nds32_gen_dup_8_byte_to_double_word_value): New function.
6191 (nds32_expand_setmem_loop): Refine implementation.
6192 (nds32_expand_setmem_loop_v3m): Ditto.
6193 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6196 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6198 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6200 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6202 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6203 (nds32_init_machine_status): Initialize machine->attr_naked_p and
6204 machine->attr_no_prologue_p.
6205 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6206 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6207 (nds32_expand_epilogue): Consider attr_naked_p.
6208 (nds32_expand_epilogue_v3pop): Likewise.
6209 (nds32_can_use_return_insn): Likewise.
6210 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6211 attr_no_prologue_p fields.
6212 * config/nds32/nds32.opt (mret-in-naked-func): New option.
6214 2018-05-27 Jakub Jelinek <jakub@redhat.com>
6217 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6219 * config/i386/sse.md
6220 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6222 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6224 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6226 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6228 (*<floatsuffix>floatv2div2sf2): Rename to ...
6229 (*float<floatunssuffix>v2div2sf2): ... this.
6230 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6231 (float<floatunssuffix>v2div2sf2_mask): ... this.
6232 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6233 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6234 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6236 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6238 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6240 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6242 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6244 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6246 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6247 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6248 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6249 gen_ufix_truncv8dfv8si2.
6250 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6251 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6252 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6253 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6254 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6255 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6256 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6257 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6259 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6263 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6265 2018-05-25 Jim Wilson <jimw@sifive.com>
6267 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6268 * config/riscv/riscv.c (struct machine_function): Add
6269 interrupt_handler_p and attribute_checked_p fields.
6270 (riscv_attribute_table): Add interrupt.
6271 (riscv_interrupt_type_p): New.
6272 (riscv_save_reg_p): Save extra regs for interrupt handler.
6273 (riscv_use_save_libcall): Return false for interrupt handler.
6274 (riscv_first_stack_step): Add forward declaration.
6275 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
6276 for interrupt handler with large frame. Use it for saved reg list.
6277 (riscv_expand_prologue): Move flag_stack_usage_info support to
6278 eliminate duplication.
6279 (riscv_expand_epilogue): Generate mret for interrupt handler.
6280 (riscv_epilogue_uses): New.
6281 (riscv_can_use_return_insn): Return false for interrupt handler.
6282 (riscv_function_ok_for_sibcall): Likewise.
6283 (riscv_set_current_function): Add interrupt handler support.
6284 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6285 * config/riscv/riscv.md (UNSPECV_MRET): New.
6287 (riscv_frflags, riscv_fsflags): Use tab after opcode.
6289 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6291 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
6293 PR tree-optimization/85712
6294 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6295 this candidate has already been replaced in-situ by a copy.
6297 2018-05-25 Jason Merrill <jason@redhat.com>
6299 PR c++/80485 - inline function non-zero address.
6300 * symtab.c (nonzero_address): Check DECL_COMDAT.
6302 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
6305 * config/alpha/alpha.md (ashlsi3): New insn pattern.
6306 (*ashlsi_se): Rename from *ashldi_se. Define as sign
6307 extension of SImode operation. Use const123_operand predicate.
6308 (*saddsi_1): Remove.
6309 (*saddl_se_1): Ditto.
6311 (*ssubl_se_1): Ditto.
6312 * config/alpha/predicates.md (const123_operand): New predicate.
6313 * config/alpha/constraints.md (P): Use IN_RANGE.
6315 2018-05-25 Richard Biener <rguenther@suse.de>
6317 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6319 (ref_maybe_used_by_stmt_p): Likewise.
6320 (stmt_may_clobber_ref_p): Likewise.
6321 (stmt_may_clobber_ref_p_1): Likewise.
6322 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6324 (ref_maybe_used_by_stmt_p): Likewise.
6325 (stmt_may_clobber_ref_p): Likewise.
6326 (stmt_may_clobber_ref_p_1): Likewise.
6327 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6328 the alias oracle to disambiguate DRs with stmts DR analysis
6330 (vect_analyze_data_refs): Do not give up on not analyzable
6331 DRs for BB vectorization. Remove code truncating the dataref
6334 2018-05-25 Jakub Jelinek <jakub@redhat.com>
6337 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6338 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
6339 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6341 2018-05-25 Richard Biener <rguenther@suse.de>
6343 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6344 function, combining stmt data ref gathering and fatal analysis
6346 (vect_analyze_data_refs): Remove now redudnant code and simplify.
6347 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6348 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6349 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6350 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6352 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6354 PR tree-optimization/85720
6355 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6356 SCC if all partitions are builtins.
6357 (version_loop_by_alias_check): New parameter. Generate cancelable
6358 runtime alias check if all partitions are builtins.
6359 (distribute_loop): Update call to above function.
6361 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6363 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6364 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6365 (parm_default_def_partition_arg): Ditto.
6366 (set_parm_default_def_partition): Ditto.
6367 (get_parm_default_def_partitions): Ditto and make it static.
6368 (get_undefined_value_partitions): Ditto and make it static.
6369 (remove_ssa_form): Refactor call to init_var_map here.
6370 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6371 computation for loop region.
6372 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6373 (register_default_def): Delete.
6374 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6375 (parm_default_def_partition_arg): Ditto.
6376 (set_parm_default_def_partition): Ditto.
6377 (get_parm_default_def_partitions): Ditto and make it static.
6378 (get_undefined_value_partitions): Ditto and make it static.
6379 (coalesce_with_default, coalesce_with_default): Update comment.
6380 (create_coalesce_list_for_region): New func factored out from
6381 create_outofssa_var_map.
6382 (populate_coalesce_list_for_outofssa): New func factored out from
6383 create_outofssa_var_map and coalesce_ssa_name.
6384 (create_outofssa_var_map): Delete.
6385 (coalesce_ssa_name): Refactor to support live range computation.
6386 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6387 (get_parm_default_def_partitions): Delete.
6388 (get_undefined_value_partitions): Ditto.
6389 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6390 computation for loop region.
6391 (new_tree_live_info, loe_visit_block): Ditto.
6392 (live_worklist, set_var_live_on_entry): Ditto.
6393 (calculate_live_on_exit, verify_live_on_entry): Ditto.
6394 * tree-ssa-live.h (struct _var_map): New fields.
6395 (init_var_map): Change decl.
6396 (region_contains_p): New.
6398 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6400 * tree-ssa-live.h (live_merge_and_clear): Delete.
6402 2018-05-25 Richard Biener <rguenther@suse.de>
6405 * tree-dump.c (dequeue_and_dump): Remove access to removed
6406 operand 2 of a SWITCH_EXPR.
6408 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6410 * doc/sourcebuild.texi (vect_double_cond_arith): Include
6411 multiplication and division.
6412 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6413 (cond_udiv@var{m}, cond_umod@var{m}): Document.
6414 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6415 (cond_udiv_optab, cond_umod_optab): New optabs.
6416 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6417 (IFN_COND_RDIV): New internal functions.
6418 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6419 TRUNC_MOD_EXPR and RDIV_EXPR.
6420 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6421 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6423 (SVE_INT_BINARY): Include mult.
6424 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6425 (optab, sve_int_op): Handle mult.
6426 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6428 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6429 for SVE_INT_BINARY_SD.
6431 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6433 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6434 (optab, sve_int_op): Handle div and udiv.
6435 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6436 for SVE_INT_BINARY_SD.
6437 (*<optab><mode>3): New insn for the same.
6439 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6441 * tree-vect-patterns.c: Include predict.h.
6442 (vect_recog_divmod_pattern): Restrict check for division support
6443 to when optimizing for size.
6445 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6447 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6448 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6449 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6450 (gimple_match_op::set_op): Likewise.
6451 (gimple_resimplify4): Declare.
6452 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6453 (expr::gen_transform): Likewise.
6454 (decision_tree::gen): Generate a simplification routine for 4 operands.
6455 * gimple-match-head.c (gimple_simplify): Add an overload for
6456 4 operands. In the top-level function, handle up to 4 call
6457 arguments and call gimple_resimplify4.
6458 (gimple_resimplify4): New function.
6459 (build_call_internal): Pass a fourth operand.
6460 (maybe_push_to_seq): Likewise.
6461 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6462 Fold VEC_COND_EXPRs of an operation and a default value into
6463 an IFN_COND_* function if possible.
6464 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6466 (SVE_COND_FP_BINARY): Include them.
6467 (optab, sve_fp_op): Handle them.
6468 (SVE_INT_BINARY_REV): New code iterator.
6469 (SVE_COND_FP_BINARY_REV): New int iterator.
6470 (commutative): New int attribute.
6471 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6473 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6475 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6476 (*cond_<optab><mode>): New patterns for reversed operands.
6478 2018-05-25 Richard Biener <rguenther@suse.de>
6480 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6481 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6482 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6483 (STMT_VINFO_GROUPED_ACCESS): Adjust.
6484 * tree-vect-data-refs.c (everywhere): Adjust users.
6485 * tree-vect-loop.c (everywhere): Likewise.
6486 * tree-vect-slp.c (everywhere): Likewise.
6487 * tree-vect-stmts.c (everywhere): Likewise.
6488 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6490 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6492 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6494 (gcc_cv_as_section_exclude): ... this.
6495 Try Solaris as #exclude syntax.
6496 * configure: Regenerate.
6497 * config.in: Regenerate.
6498 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6500 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6501 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6503 * varasm.c (default_elf_asm_named_section): Don't check if
6504 HAVE_GAS_SECTION_EXCLUDE is defined.
6506 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6508 * doc/md.texi: Update the documentation of the cond_* optabs
6509 to mention the new final operand. Fix GET_MODE_NUNITS call.
6510 Describe the scalar case too.
6511 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6512 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6514 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6515 (get_conditional_internal_fn): Update comment.
6516 * tree-vect-loop.c (vectorizable_reduction): Pass the original
6517 accumulator value as a final argument to conditional functions.
6518 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6519 a define_expand and add an "else" operand. Assert for now that
6520 the else operand is equal to operand 2. Use SVE_INT_BINARY and
6521 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6522 (*cond_<optab><mode>): New patterns.
6523 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6524 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6525 (UNSPEC_COND_EOR): Delete.
6526 (optab): Remove associated mappings.
6527 (SVE_INT_BINARY): New code iterator.
6528 (sve_int_op): Remove int attribute and add "minus" to the code
6530 (SVE_COND_INT_OP): Delete.
6531 (SVE_COND_FP_OP): Rename to...
6532 (SVE_COND_FP_BINARY): ...this.
6534 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6536 * optabs.c (can_reuse_operands_p): New function.
6537 (maybe_legitimize_operands): Try to reuse the results for
6540 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6542 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6543 Add {q} suffix to insn mnemonic.
6545 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6547 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6548 (msp430_warn_func_return): New.
6550 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
6552 * fold-const.c (tree_nonzero_bits): New function.
6553 * fold-const.h (tree_nonzero_bits): Likewise.
6554 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6555 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6557 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6561 * varasm.c (assemble_alias): Check ifunc_resolver only on
6564 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6567 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6568 when memory input operand is handled.
6570 2018-05-24 Luis Machado <luis.machado@linaro.org>
6572 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6574 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6576 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6578 * match.pd: Delay FMA folds until after vectorization.
6580 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
6583 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6584 address check not strict.
6586 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6588 * gimple-match.h (gimple_match_op): New class.
6589 (mprts_hook): Replace parameters with a gimple_match_op *.
6590 (maybe_build_generic_op): Likewise.
6591 (gimple_simplified_result_is_gimple_val): Replace parameters with
6592 a const gimple_match_op *.
6593 (gimple_simplify): Replace code_helper * and tree * parameters with
6594 a gimple_match_op * parameter.
6595 (gimple_resimplify1): Replace code_helper *, tree and tree *
6596 parameters with a gimple_match_op * parameter.
6597 (gimple_resimplify2): Likewise.
6598 (gimple_resimplify3): Likewise.
6599 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6600 parameters with a gimple_match_op * parameter.
6601 * gimple-match-head.c (gimple_simplify): Change prototypes of
6602 auto-generated functions to take a gimple_match_op * instead of
6603 separate code_helper * and tree * parameters. Make the same
6604 change in the top-level overload and update calls to the
6605 gimple_resimplify routines. Update calls to the auto-generated
6606 functions and to maybe_push_res_to_seq in the publicly-facing
6607 operation-specific gimple_simplify overloads.
6608 (gimple_match_op::MAX_NUM_OPS): Define.
6609 (gimple_resimplify1): Replace rcode and ops with a single res_op
6610 parameter. Update call to gimple_simplify.
6611 (gimple_resimplify2): Likewise.
6612 (gimple_resimplify3): Likewise.
6613 (mprts_hook): Replace parameters with a gimple_match_op *.
6614 (maybe_build_generic_op): Likewise.
6615 (build_call_internal): Replace type, nargs and ops with
6616 a gimple_match_op *.
6617 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6618 with a single gimple_match_op *. Update calls to mprts_hook,
6619 build_call_internal and gimple_simplified_result_is_gimple_val.
6620 Factor out code that is common to the tree_code and combined_fn cases.
6621 * genmatch.c (expr::gen_transform): Replace tem_code and
6622 tem_ops with a gimple_match_op called tem_op. Update calls
6623 to the gimple_resimplify functions and maybe_push_res_to_seq.
6624 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6625 res_ops. Update call to the gimple_resimplify functions.
6626 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6627 (decision_tree::gen): Make the functions take a gimple_match_op *
6628 called res_op instead of separate res_code and res_ops parameters.
6629 Update call accordingly.
6630 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6631 and ops with a single res_op parameter. Update calls to
6632 maybe_build_generic_op and maybe_push_res_to_seq.
6633 (fold_stmt_1): Update calls to gimple_simplify and
6634 replace_stmt_with_simplification.
6635 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6636 and gimple_simplified_result_is_gimple_val.
6637 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6639 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6640 with a gimple_match_op *.
6641 (vn_nary_build_or_lookup): Likewise. Update call to
6642 vn_nary_build_or_lookup_1.
6643 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6644 gimple_match_op *. Update calls to the gimple_resimplify routines
6645 and to gimple_simplified_result_is_gimple_val.
6646 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6647 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6648 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6649 (visit_nary_op): Likewise.
6650 (visit_reference_op_load): Likewise.
6652 2018-05-23 Luis Machado <luis.machado@linaro.org>
6654 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6655 modifier for printing the step amount.
6657 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
6660 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6663 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
6665 * doc/sourcebuild.texi (Endianness): New subsubsection.
6667 2018-05-23 Luis Machado <luis.machado@linaro.org>
6669 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6670 <prefetch_dynamic_strides>: New const bool field.
6671 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6672 prefetch_dynamic_strides.
6673 (exynosm1_prefetch_tune): Likewise.
6674 (thunderxt88_prefetch_tune): Likewise.
6675 (thunderx_prefetch_tune): Likewise.
6676 (thunderx2t99_prefetch_tune): Likewise.
6677 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6679 (aarch64_override_options_internal): Update to set
6680 PARAM_PREFETCH_DYNAMIC_STRIDES.
6681 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6682 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6683 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6684 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6685 prefetch-dynamic-strides setting.
6687 2018-05-23 Luis Machado <luis.machado@linaro.org>
6689 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6690 <minimum_stride>: New const int field.
6691 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6692 minimum_stride field defaulting to -1.
6693 (exynosm1_prefetch_tune): Likewise.
6694 (thunderxt88_prefetch_tune): Likewise.
6695 (thunderx_prefetch_tune): Likewise.
6696 (thunderx2t99_prefetch_tune): Likewise.
6697 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6698 <default_opt_level>: Set to 3.
6699 (aarch64_override_options_internal): Update to set
6700 PARAM_PREFETCH_MINIMUM_STRIDE.
6701 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6702 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6703 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6704 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6705 stride is constant and is below the minimum stride threshold.
6707 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6709 * config/arm/arm-cpus.in (mode26): Delete.
6710 (armv4): Delete mode26 reference.
6711 * config/arm/arm.c (arm_configure_build_target): Delete use of
6714 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6716 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6718 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6719 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
6721 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
6722 (floatunsdidf2): Ditto.
6724 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6726 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6727 (fixuns_trunc<mode>si2_avx512f): Ditto.
6728 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6729 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6730 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6732 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6734 PR rtl-optimization/79985
6735 * df-scan.c (df_insn_refs_collect): Remove special case for
6736 global registers and asm statements.
6738 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6740 * extend.texi (Global Register Variables): Rewrite the bullet list.
6741 Note that the register is available for allocation. Note that access
6742 via inline asm must use constraints. Add note about async-signal
6743 handlers. Remove paragraph about automagic register selection.
6745 2018-05-23 Richard Biener <rguenther@suse.de>
6747 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6748 of fixed offset from memset VN.
6750 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
6752 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6754 (alloc_cand_and_find_basis): Initialize first_interp field.
6755 (slsr_process_mul): Modify first_interp field.
6756 (slsr_process_add): Likewise.
6757 (slsr_process_cast): Modify first_interp field for each new
6759 (slsr_process_copy): Likewise.
6760 (dump_candidate): Dump first_interp field.
6761 (replace_mult_candidate): Process all interpretations, not just
6763 (replace_rhs_if_not_dup): Likewise.
6764 (replace_one_candidate): Likewise.
6766 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
6768 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6770 (aarch64_needs_frame_chain): New function.
6771 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6773 2018-05-23 Sudakshina Das <sudi.das@arm.com>
6776 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6777 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6778 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6779 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6780 as true for strict-align.
6781 (aarch64_can_inline_p): Perform checks even when callee has no
6782 attributes to check for strict alignment.
6783 * doc/extend.texi (AArch64 Function Attributes): Document
6785 * doc/invoke.texi: (AArch64 Options): Likewise.
6787 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
6789 PR tree-optimization/85853
6790 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6791 the handling of the root of the node to...
6792 (vect_slp_analyze_node_operations_1): ...this new function,
6793 and run the whole thing with the child nodes' def types
6794 set according to their SLP node's def type.
6796 2018-05-23 Richard Biener <rguenther@suse.de>
6799 * tree-data-ref.c (create_runtime_alias_checks): Defer
6800 and ignore overflow warnings.
6802 2018-05-23 Yury Gribov <tetra2005@gmail.com>
6804 PR tree-optimization/85822
6805 * tree-vrp.c (is_masked_range_test): Fix handling of negative
6808 2018-05-23 Richard Biener <rguenther@suse.de>
6810 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6811 memset constants via native_interpret_expr.
6813 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
6816 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6818 (cgraph_node::create_alias): Likewise.
6819 (cgraph_node::get_availability): Check ifunc_resolver instead
6820 of looking up ifunc attribute.
6821 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6822 * varasm.c (do_assemble_alias): Likewise.
6823 (assemble_alias): Likewise.
6824 (default_binds_local_p_3): Likewise.
6825 * cgraph.h (cgraph_node): Add ifunc_resolver.
6826 (cgraph_node::only_called_directly_or_aliased_p): Return false
6828 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6830 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6831 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6832 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6833 instead of looking up ifunc attribute.
6835 2018-05-22 Luis Machado <luis.machado@linaro.org>
6837 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6839 2018-05-22 Martin Sebor <msebor@redhat.com>
6842 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6843 only when expasion succeeds.
6844 (expand_builtin_strcmp): Same.
6845 (expand_builtin_strncmp): Same.
6847 2018-05-22 Martin Sebor <msebor@redhat.com>
6849 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6851 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6852 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6854 * config/aarch64/aarch64-ldpstp.md: Replace uses of
6855 aarch64_mem_pair_operand with memory_operand and delete operand swapping
6857 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6858 Add check for legitimate_address.
6859 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6860 (aarch64_swap_ldrstr_operands): New.
6861 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6864 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6865 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6867 * config/aarch64/aarch64.md: New patterns to generate stp
6869 (store_pair_sw, store_pair_dw): New patterns to generate stp for
6870 single words and double words.
6871 (load_pair_sw, load_pair_dw): Likewise.
6872 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6874 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6876 * config/aarch64/aarch64-ldpstp.md: Modify peephole
6877 for different mode ldpstp and add peephole for merged zero stores.
6879 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6881 (aarch64_gen_store_pair): Rename calls to match new patterns.
6882 (aarch64_gen_load_pair): Rename calls to match new patterns.
6883 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6884 (load_pair<DREG:mode><DREG2:mode>): ... This.
6885 (store_pair<mode>): Rename to...
6886 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6887 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6889 (V_INT_EQUIV): Handle SImode.
6890 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6893 2018-05-22 Martin Sebor <msebor@redhat.com>
6896 * calls.c (maybe_warn_nonstring_arg): Use string length to set
6897 or ajust the presumed bound on an operation to avoid unnecessary
6900 2018-05-22 Martin Sebor <msebor@redhat.com>
6902 PR tree-optimization/85826
6903 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6904 assuming that a DECL necesarily has a constant size.
6906 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
6909 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6911 2018-05-22 Richard Biener <rguenther@suse.de>
6913 PR tree-optimization/85834
6914 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6915 non-constant and non-zero memset arguments.
6917 2018-05-22 Martin Liska <mliska@suse.cz>
6920 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6922 2018-05-22 Richard Biener <rguenther@suse.de>
6924 PR tree-optimization/85863
6925 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6926 comparisons when vectype is specified.
6927 (vectorizable_condition): Do not specify vectype for
6928 vect_is_simple_cond when SLP vectorizing.
6930 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
6933 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6934 define __ibm128 as long double.
6935 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6936 as a distinct type when IEEE 128-bit support is enabled.
6937 (init_float128_ieee): Fix up conversions between IFmode and IEEE
6938 128-bit types to use the correct functions.
6939 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6940 convert between 128-bit floating point types that have different
6941 modes but the same representation, instead of using gen_lowpart to
6943 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6945 (IFKF_reg): New attributes to give the register constraints for
6947 (extend<mode>tf2_internal): New insns to mark an explicit
6948 conversion between 128-bit floating point types that have a
6949 different mode but share the same representation.
6951 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
6953 PR tree-optimization/85814
6954 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6955 a null return from get_strinfo when unsharing the next
6956 strinfo in the chain.
6958 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6961 * varasm.c (weak_finish): Clean up weak_decls.
6963 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6965 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6966 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6967 UNSPEC_UADALP values.
6968 * config/aarch64/iterators.md (ABAL): New int iterator.
6971 (sur): Add mappings for the above.
6972 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6974 (aarch64_<sur>abal<mode>_4): Likewise.
6975 (aarch64_<sur>adalp<mode>_3): Likewise.
6976 (<sur>sadv16qi): New define_expand.
6978 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
6980 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6981 (*movdf_internal): Ditto.
6982 (*rcpsf2_sse): Ditto.
6983 (*rsqrtsf2_sse): Ditto.
6984 (*sqrt<mode>2_sse): Ditto.
6986 2018-05-21 Tamar Christina <tamar.christina@arm.com>
6988 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6990 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6991 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6992 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6993 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6995 * config/aarch64/arm_neon.h: Likewise.
6996 * config/aarch64/iterators.md (VQ_I): New.
6998 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
7000 * config.gcc: Add arc/t-multilib-linux to tmake_file for
7002 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7005 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7007 * config/nds32/constraints.md (S): New constraint.
7008 * config/nds32/nds32.md (call_internal): Use constraint S.
7009 (call_value_internal): Likewise.
7010 (sibcall_internal): Likewise.
7011 (sibcall_value_internal): Likewise.
7013 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7014 Chung-Ju Wu <jasonwucj@gmail.com>
7016 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7019 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7020 Chung-Ju Wu <jasonwucj@gmail.com>
7022 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7023 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7024 (nds32_rtx_costs_impl): Simplify.
7025 (nds32_address_cost_impl): Simplify.
7026 (nds32_init_rtx_costs): New function.
7027 (nds32_rtx_costs_speed_prefer): Likewise.
7028 (nds32_rtx_costs_size_prefer): Likewise.
7029 (nds32_address_cost_speed_prefer): Likewise.
7030 (nds32_address_cost_speed_fwprop): Likewise.
7031 (nds32_address_cost_size_prefer): Likewise.
7032 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7033 * config/nds32/nds32.c (nds32_option_override): Use
7034 nds32_init_rtx_costs function.
7036 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7038 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7039 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7040 (TARGET_PIPELINE_N8): Likewise.
7041 (TARGET_PIPELINE_N10): Likewise.
7042 (TARGET_PIPELINE_N13): Likewise.
7043 (TARGET_PIPELINE_GRAYWOLF): Likewise.
7045 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
7047 * config/nds32/nds32-fpu.md: Update copyright year.
7049 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7051 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7053 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7055 * config/nds32/nds32.c
7056 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7057 * config/nds32/nds32.opt (minline-asm-r15): New option.
7059 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7061 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7063 * config/nds32/nds32.md (abssi2): New pattern.
7065 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
7067 * config/i386/i386.md (rex64namesuffix): New mode attribute.
7068 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7069 Merge insn pattern from sse_cvtsi2ss<round_name> and
7070 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7071 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7072 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7073 using SWI48 mode iterator.
7074 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7075 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7076 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7077 pattern from sse_cvttss2si<round_saeonly_name>
7078 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7079 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7080 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7081 using SWI48 mode iterator.
7082 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7083 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7084 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7085 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7086 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7087 using SWI48 mode iterator.
7088 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7089 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7090 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7091 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7092 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7093 SWI48 mode iterator.
7094 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7095 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7096 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7097 pattern from sse_cvttsd2si<round_saeonly_name>
7098 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7100 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7102 * config/nds32/nds32-md-auxiliary.c
7103 (nds32_valid_smw_lwm_base_p): Refine.
7104 (nds32_output_smw_single_word): Refine.
7105 (nds32_output_smw_double_word): New.
7106 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7108 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7110 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7111 (nds32_output_stack_pop): Refine.
7112 (nds32_expand_unaligned_load): Refine.
7113 (nds32_expand_unaligned_store): Refine.
7115 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7116 Chung-Ju Wu <jasonwucj@gmail.com>
7118 * config/nds32/constants.md: Add TP_REGNUM constant.
7119 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7120 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7122 * config/nds32/nds32-doubleword.md: Consider flag_pic.
7123 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7124 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7125 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7126 and PIC code generation.
7127 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7129 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7131 * config/nds32/nds32.md: Support TLS and PIC.
7132 * config/nds32/nds32.c: Support TLS and PIC.
7133 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7134 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7137 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7139 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7140 mode with E_ prefix.
7142 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7143 Chung-Ju Wu <jasonwucj@gmail.com>
7145 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7146 * config/nds32/nds32-md-auxiliary.c
7147 (symbolic_reference_mentioned_p): New.
7148 (nds32_legitimize_ict_address): New.
7149 (nds32_expand_ict_move): New.
7150 (nds32_indirect_call_referenced_p): New.
7151 (nds32_symbol_binds_local_p): Delete.
7152 (nds32_long_call_p): Modify.
7153 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7154 * config/nds32/nds32-protos.h
7155 (symbolic_reference_mentioned_p): Declare.
7156 (nds32_legitimize_ict_address): Declare.
7157 (nds32_expand_ict_move): Declare.
7158 (nds32_indirect_call_referenced_p): Declare.
7159 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7160 (nds32_relax_group): Use nds32_ict_const_p as condition.
7161 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7162 (nds32_asm_file_start): Output ict_model directive in asm code.
7163 (nds32_legitimate_address_p): Consider indirect call.
7164 (nds32_print_operand): Consider indirect call.
7165 (nds32_print_operand_address): Consider indirect call.
7166 (nds32_insert_attributes): Handle "indirect_call" attribute.
7167 (TARGET_LEGITIMATE_ADDRESS_P): Define.
7168 (TARGET_LEGITIMATE_CONSTANT_P): Define.
7169 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7170 (TARGET_DELEGITIMIZE_ADDRESS): Define.
7171 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7172 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7173 (TARGET_ICT_MODEL_SMALL): Define.
7174 (TARGET_ICT_MODEL_LARGE): Define.
7175 * config/nds32/nds32.md (movsi): Consider ict model.
7176 (call, call_value): Consider ict model.
7177 (sibcall, sibcall_value): Consider ict model.
7178 * config/nds32/nds32.opt (mict-model): New option.
7179 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7182 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
7183 Monk Chiang <sh.chiang04@gmail.com>
7184 Jim Wilson <jimw@sifive.com>
7186 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7187 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
7188 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7189 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7190 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
7191 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7192 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7193 compute save_libcall_adjustment properly.
7194 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7195 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7196 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7197 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7198 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7199 (ABI_SPEC): Handle mabi=ilp32e.
7200 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7201 (RVE): Add RVE mask.
7202 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7203 <-march>: Add rv32e as an example.
7205 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
7208 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7209 (intra_create_variable_infos): Handle C++ constructors.
7211 2018-05-18 Martin Liska <mliska@suse.cz>
7213 * passes.def: Remove a redundant pass.
7215 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
7218 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7220 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7222 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7224 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7226 (armv2, armv2a, armv3, armv3m): Delete architectures.
7227 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7228 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7229 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7231 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7232 (*mulsidi3adddi): Likewise.
7233 (mulsidi3): Likewise.
7234 (*mulsidi3_nov6): Likewise.
7235 (umulsidi3): Likewise.
7236 (umulsidi3_nov6): Likewise.
7237 (umaddsidi4): Likewise.
7238 (*umulsidi3adddi): Likewise.
7239 (smulsi3_highpart): Likewise.
7240 (*smulsi3_highpart_nov6): Likewise.
7241 (umulsi3_highpart): Likewise.
7242 (*umulsi3_highpart_nov6): Likewise.
7243 * config/arm/arm.h (arm_arch3m): Delete.
7244 * config/arm/arm.c (arm_arch3m): Delete.
7245 (arm_option_override_internal): Update armv3-related comment.
7246 (arm_configure_build_target): Delete use of isa_bit_mode32.
7247 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7248 (arm_rtx_costs_internal): Delete check of arm_arch3m.
7249 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7251 (mulusa3): Likewise.
7252 * config/arm/arm-protos.h (arm_arch3m): Delete.
7253 * config/arm/arm-tables.opt: Regenerate.
7254 * config/arm/arm-tune.md: Likewise.
7255 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7256 deleted architectures.
7258 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7260 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7261 (armv5t, armv5te): New features.
7262 (ARMv5, ARMv5e): Delete fgroups.
7263 (ARMv5t, ARMv5te): Adjust for above changes.
7265 (armv5, armv5e): Delete arches.
7266 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7268 (*call_reg_arm): Likewise.
7269 (*call_value_reg_armv5): Likewise.
7270 (*call_value_reg_arm): Likewise.
7271 (*call_symbol): Likewise.
7272 (*call_value_symbol): Likewise.
7273 (*sibcall_insn): Likewise.
7274 (*sibcall_value_insn): Likewise.
7276 (prefetch): Likewise.
7277 (define_split and define_peephole2 dependent on arm_arch5):
7279 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7281 (TARGET_ARM_QBIT): Likewise.
7282 (TARGET_DSP_MULTIPLY): Likewise.
7283 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7284 (arm_arch5, arm_arch5e): Delete.
7285 (arm_arch5t, arm_arch5te): Declare.
7286 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7287 (arm_arch5t): Declare.
7288 (arm_option_reconfigure_globals): Update for the above.
7289 (arm_options_perform_arch_sanity_checks): Update comment, replace
7290 use of arm_arch5 with arm_arch5t.
7291 (use_return_insn): Likewise.
7292 (arm_emit_call_insn): Likewise.
7293 (output_return_instruction): Likewise.
7294 (arm_final_prescan_insn): Likewise.
7295 (arm_coproc_builtin_available): Likewise.
7296 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7297 arm_arch5e with arm_arch5t and arm_arch5te.
7298 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7299 (arm_arch5t, arm_arch5te): Declare.
7300 * config/arm/arm-tables.opt: Regenerate.
7301 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7302 * config/arm/t-multilib: Likewise.
7303 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7304 instead of arm_arch5.
7305 (*call_reg_thumb1): Likewise.
7306 (*call_value_reg_thumb1_v5): Likewise.
7307 (*call_value_reg_thumb1): Likewise.
7308 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7310 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7312 2018-05-18 Martin Liska <mliska@suse.cz>
7314 PR gcov-profile/84846
7315 * doc/gcov.texi: Document -t option of gcov tool.
7317 2018-05-18 Martin Liska <mliska@suse.cz>
7319 PR gcov-profile/84846
7320 * gcov.c (print_usage): Add new -t option.
7321 (process_args): Handle the option.
7322 (generate_results): Use stdout as output when requested by
7325 2018-05-18 Martin Liska <mliska@suse.cz>
7327 PR gcov-profile/84846
7328 * coverage.c (coverage_init): Write PWD to .gcno file.
7329 * doc/gcov.texi: Document how working directory is printed.
7330 * gcov-dump.c (dump_gcov_file): Print PWD.
7331 * gcov.c (output_intermediate_file): Likewise.
7332 (read_graph_file): Read PWD string.
7333 (output_lines): Print PWD.
7335 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7338 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7339 for retval and return false if all args to phi are zero.
7341 2018-05-18 Richard Biener <rguenther@suse.de>
7343 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7345 (evrp_dom_walker::before_dom_children): Call it.
7347 2018-05-18 Richard Biener <rguenther@suse.de>
7349 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7350 results when processing array refs with variable index.
7352 2018-05-18 Toon Moene <toon@moene.org>
7354 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7355 directly after that of -floop-interchange. Indicate that both
7356 options are enabled by default when specifying -O3.
7358 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7360 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7361 iterator. Delete separate integer-mode vec_set<mode> expander.
7362 (aarch64_simd_vec_setv2di): Delete.
7363 (vec_setv2di): Delete.
7364 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7365 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
7366 the "w, r" alternative.
7368 2018-05-18 Martin Liska <mliska@suse.cz>
7370 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7371 * tree-pass.h (make_pass_lower_switch_O0): New function.
7372 * tree-switch-conversion.c (node_has_low_bound): Remove.
7373 (node_has_high_bound): Likewise.
7374 (node_is_bounded): Likewise.
7375 (class pass_lower_switch): Make it a template type and create
7377 (pass_lower_switch::execute): Add template argument.
7378 (make_pass_lower_switch): New function.
7379 (make_pass_lower_switch_O0): New function.
7380 (do_jump_if_equal): Remove.
7381 (emit_case_nodes): Simplify to just handle all 3 cases and leave
7382 all the hard work to tree optimization passes.
7384 2018-05-18 Martin Liska <mliska@suse.cz>
7386 * dbgcnt.c (limit_low): Renamed from limit.
7387 (limit_high): New variable.
7388 (dbg_cnt_is_enabled): Check for upper limit.
7389 (dbg_cnt): Adjust dumping.
7390 (dbg_cnt_set_limit_by_index): Add new argument for high
7392 (dbg_cnt_set_limit_by_name): Likewise.
7393 (dbg_cnt_process_single_pair): Parse new format.
7394 (dbg_cnt_process_opt): Use strtok.
7395 (dbg_cnt_list_all_counters): Remove 'value' and add
7397 * doc/invoke.texi: Document changes.
7399 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
7401 * doc/sourcebuild.texi (scalar_all_fma): Document.
7402 * tree.def (FMA_EXPR): Delete.
7403 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7404 * internal-fn.c (ternary_direct): New macro.
7405 (expand_ternary_optab_fn): Likewise.
7406 (direct_ternary_optab_supported_p): Likewise.
7407 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7408 * builtins.c (fold_builtin_fma): Delete.
7409 (fold_builtin_3): Don't call it.
7410 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7411 * expr.c (expand_expr_real_2): Likewise.
7412 * fold-const.c (operand_equal_p): Likewise.
7413 (fold_ternary_loc): Likewise.
7414 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7415 * gimple.c (DEFTREECODE): Likewise.
7416 * gimplify.c (gimplify_expr): Likewise.
7417 * optabs-tree.c (optab_for_tree_code): Likewise.
7418 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7419 * tree-eh.c (operation_could_trap_p): Likewise.
7420 (stmt_could_throw_1_p): Likewise.
7421 * tree-inline.c (estimate_operator_cost): Likewise.
7422 * tree-pretty-print.c (dump_generic_node): Likewise.
7423 (op_code_prio): Likewise.
7424 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7425 * tree-ssa-operands.c (get_expr_operands): Likewise.
7426 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7427 * fold-const-call.h (fold_fma): Delete.
7428 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7429 CFN_FNMA and CFN_FNMS.
7431 * genmatch.c (combined_fn): New enum.
7432 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7433 (commutative_op): New function.
7434 (commutate): Use it. Handle more than 2 operands.
7435 (dt_operand::gen_gimple_expr): Use commutative_op.
7436 (parser::parse_expr): Allow :c to be used with non-binary
7437 operators if the commutative operand is known.
7438 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7439 CFN_FMS, CFN_FNMA and CFN_FNMS.
7440 (backprop::process_assign_use): Remove FMA_EXPR handling.
7441 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7442 (gen_hsa_fma): New function.
7443 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7444 IFN_FNMA and IFN_FNMS.
7445 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7446 * gimple-fold.h (follow_all_ssa_edges): Declare.
7447 * gimple-fold.c (follow_all_ssa_edges): New function.
7448 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7449 gimple_build interface and use follow_all_ssa_edges to fold the result.
7450 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7451 instead of checking for optabs directly.
7452 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7453 rather than FMA_EXPRs.
7454 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7455 call to IFN_FMA instead of an FMA_EXPR.
7457 2018-05-17 Jim Wilson <jimw@sifive.com>
7459 * expr.c (do_tablejump): When converting index to Pmode, if we have a
7460 sign extended promoted subreg, and the range does not have the sign bit
7461 set, then do a sign extend.
7463 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7464 test, check for sign extended subreg and/or constant operands, and
7465 do a sign extend in that case.
7467 2018-05-17 Steve Ellcey <sellcey@cavium.com>
7469 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7470 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7472 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7473 Change logics_shift_reg to logics_shift_imm.
7474 (thunderx2t99_fp_loadpair_basic): Delete.
7475 (thunderx2t99_fp_storepair_basic): Delete.
7476 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7477 (thunderx2t99_asimd_polynomial): Delete.
7478 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7479 and neon_fp_mul_d_scalar_q.
7480 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7481 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7482 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7483 (thunderx2t99_asimd_lut): Add missing tbl types.
7484 (thunderx2t99_asimd_ext): Delete.
7485 (thunderx2t99_asimd_load1_1_mult): Delete.
7486 (thunderx2t99_asimd_load1_2_mult): Delete.
7487 (thunderx2t99_asimd_load1_ldp): New.
7488 (thunderx2t99_asimd_load1): New.
7489 (thunderx2t99_asimd_load2): Add missing *load2* types.
7490 (thunderx2t99_asimd_load3): New.
7491 (thunderx2t99_asimd_load4): New.
7492 (thunderx2t99_asimd_store1_1_mult): Delete.
7493 (thunderx2t99_asimd_store1_2_mult): Delete.
7494 (thunderx2t99_asimd_store2_mult): Delete.
7495 (thunderx2t99_asimd_store2_onelane): Delete.
7496 (thunderx2t99_asimd_store_stp): New.
7497 (thunderx2t99_asimd_store1): New.
7498 (thunderx2t99_asimd_store2): New.
7499 (thunderx2t99_asimd_store3): New.
7500 (thunderx2t99_asimd_store4): New.
7502 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
7504 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7505 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
7507 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
7508 Segher Boessenkool <segher@kernel.crashing.org>
7511 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7514 2018-05-17 Richard Biener <rguenther@suse.de>
7516 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7517 for pruning loop and prune defs feeding only already visited PHIs.
7519 2018-05-17 Richard Biener <rguenther@suse.de>
7521 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7523 2018-05-17 Bin Cheng <bin.cheng@arm.com>
7524 Richard Biener <rguenther@suse.de>
7526 PR tree-optimization/85793
7527 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7528 for VMAT_ELEMENTWISE.
7530 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7532 * internal-fn.h (lookup_internal_fn): Declare
7533 * internal-fn.c (lookup_internal_fn): New function.
7534 * gimple.c (gimple_build_call_from_tree): Handle calls to
7536 * gimple-pretty-print.c (dump_gimple_call): Print "." before
7537 internal function names.
7538 * tree-pretty-print.c (dump_generic_node): Likewise.
7539 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7541 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7543 * gimple-fold.h (gimple_build): Make the function forms take
7544 combined_fn rather than built_in_function.
7545 (gimple_simplify): Likewise.
7546 * gimple-match-head.c (gimple_simplify): Likewise.
7547 * gimple-fold.c (gimple_build): Likewise.
7548 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7549 rather than gimple_build_call_internal.
7550 (get_initial_defs_for_reduction): Likewise.
7551 (vect_create_epilog_for_reduction): Likewise.
7552 (vectorizable_live_operation): Likewise.
7554 2018-05-17 Martin Liska <mliska@suse.cz>
7556 * gimple-ssa-sprintf.c (format_directive): Do not use
7557 space in between 'G_' and '('.
7559 2018-05-17 Jakub Jelinek <jakub@redhat.com>
7562 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7563 even if the mask is not all ones.
7566 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7568 (ix86_gimple_fold_builtin): Likewise.
7571 * config/i386/i386.c: Include tree-vector-builder.h.
7572 (ix86_vector_shift_count): New function.
7573 (ix86_fold_builtin): Fold shift builtins by scalar count.
7574 (ix86_gimple_fold_builtin): Likewise.
7576 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7577 _mm512_setzero): New intrinsics.
7579 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
7580 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7582 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7583 code generation for cases where splatting a value is not useful.
7584 * simplify-rtx.c (simplify_ternary_operation): Simplify
7585 vec_merge across a vec_duplicate and a paradoxical subreg forming
7586 a vector mode to a vec_concat.
7588 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
7590 * config.gcc: Support "goldmont-plus".
7591 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7593 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7594 PROCESSOR_GOLDMONT_PLUS.
7595 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7596 (processor_target_table): Add "goldmont-plus".
7597 (PTA_GOLDMONT_PLUS): Define.
7598 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7599 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7600 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7601 (fold_builtin_cpu): Add "goldmont-plus".
7602 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7603 (ix86_option_override_internal): Add "goldmont-plus".
7604 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7605 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7606 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7607 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7609 2018-05-17 Richard Biener <rguenther@suse.de>
7611 PR tree-optimization/85757
7612 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7613 remove defs that only feed that PHI from further processing.
7615 2018-05-16 Jim Wilson <jimw@sifive.com>
7617 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7619 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7621 2018-05-16 Mark Wielaard <mark@klomp.org>
7623 * dwarf2out.c (count_index_strings): New function.
7624 (output_indirect_strings): Call count_index_strings and generate
7625 header for dwarf_version >= 5.
7627 2018-05-16 Mark Wielaard <mark@klomp.org>
7629 * dwarf2out.c (dwarf_FORM): New function.
7630 (set_indirect_string): Use dwarf_FORM.
7631 (reset_indirect_string): Likewise.
7632 (size_of_die): Likewise.
7633 (value_format): Likewise.
7634 (output_die): Likewise.
7635 (add_skeleton_AT_string): Likewise.
7636 (output_macinfo_op): Likewise.
7637 (index_string): Likewise.
7638 (output_index_string_offset): Likewise.
7639 (output_index_string): Likewise.
7640 (count_index_strings): Likewise.
7642 2018-05-16 Carl Love <cel@us.ibm.com>
7644 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7645 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7647 2018-05-16 Martin Jambor <mjambor@suse.cz>
7649 * ipa-prop.c (ipa_free_all_edge_args): Remove.
7650 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7652 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
7654 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7655 (fnma<mode>4): Likewise.
7656 (fms<mode>4): Likewise.
7657 (fnms<mode>4): Likewise.
7658 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7659 (aarch64_fnma<mode>4): Likewise.
7660 (aarch64_fms<mode>4): Likewise.
7661 (aarch64_fnms<mode>4): Likewise.
7662 (aarch64_fnmadd<mode>4): Likewise.
7664 2018-05-16 Jason Merrill <jason@redhat.com>
7666 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
7668 2018-05-16 Richard Biener <rguenther@suse.de>
7670 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7671 (dump_stmt_cost): Declare.
7672 (add_stmt_cost): Dump cost we add.
7673 (add_stmt_costs): New function.
7674 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7676 (vect_analyze_stmt): Adjust prototype.
7677 (vectorizable_condition): Likewise.
7678 (vectorizable_live_operation): Likewise.
7679 (vectorizable_reduction): Likewise.
7680 (vectorizable_induction): Likewise.
7681 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7682 cost vector to pass to vectorizable_ and record afterwards.
7683 (vect_model_reduction_cost): Take cost vector argument and adjust.
7684 (vect_model_induction_cost): Likewise.
7685 (vectorizable_reduction): Likewise.
7686 (vectorizable_induction): Likewise.
7687 (vectorizable_live_operation): Likewise.
7688 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7689 SLP_TREE_NUMBER_OF_VEC_STMTS.
7690 (vect_analyze_slp_cost_1): Remove.
7691 (vect_analyze_slp_cost): Likewise.
7692 (vect_slp_analyze_node_operations): Take visited args and
7693 a target cost vector. Avoid processing already visited stmt sets.
7694 (vect_slp_analyze_operations): Use a local cost vector to gather
7695 costs and register those of non-discarded instances.
7696 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7697 (vect_schedule_slp_instance): Remove copying of
7698 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
7700 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7701 adding cost. Record cost entry location.
7702 (vect_prologue_cost_for_slp_op): Function to compute cost of
7703 a constant or invariant generated for SLP vect in the prologue,
7704 split out from vect_analyze_slp_cost_1.
7705 (vect_model_simple_cost): Make static. Adjust for SLP costing.
7706 (vect_model_promotion_demotion_cost): Likewise.
7707 (vect_model_store_cost): Likewise, make static.
7708 (vect_model_load_cost): Likewise.
7709 (vectorizable_bswap): Add cost vector arg and adjust.
7710 (vectorizable_call): Likewise.
7711 (vectorizable_simd_clone_call): Likewise.
7712 (vectorizable_conversion): Likewise.
7713 (vectorizable_assignment): Likewise.
7714 (vectorizable_shift): Likewise.
7715 (vectorizable_operation): Likewise.
7716 (vectorizable_store): Likewise.
7717 (vectorizable_load): Likewise.
7718 (vectorizable_condition): Likewise.
7719 (vectorizable_comparison): Likewise.
7720 (can_vectorize_live_stmts): Likewise.
7721 (vect_analyze_stmt): Likewise.
7722 (vect_transform_stmt): Adjust calls to vectorizable_*.
7723 * tree-vectorizer.c: Include gimple-pretty-print.h.
7724 (dump_stmt_cost): New function.
7726 2018-05-16 Richard Biener <rguenther@suse.de>
7728 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7729 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7730 * tree-ssa-dse.c: Include tree-ssa-loop.h.
7731 (check_name): New callback.
7732 (dse_classify_store): Track cycles via a visited bitmap of PHI
7733 defs and simplify handling of in-loop and across loop dead stores
7734 and properly fail for loop-variant refs. Handle byte-tracking with
7735 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7738 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
7740 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7741 (vect_get_mask_type_for_stmt): Likewise.
7742 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7744 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
7745 to determine the statement's vector type and the vector type that
7746 should be used for calculating nunits. Deal with cases in which
7747 the type has to be deferred.
7748 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7749 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7750 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7751 (vect_determine_vf_for_stmt): New functions, split out from...
7752 (vect_determine_vectorization_factor): ...here.
7753 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7754 (vect_get_mask_type_for_stmt): New functions, split out from
7755 vect_determine_vectorization_factor.
7757 2018-05-16 Richard Biener <rguenther@suse.de>
7759 * tree-cfg.c (verify_gimple_assign_ternary): Properly
7760 verify the [VEC_]COND_EXPR embedded comparison.
7762 2018-05-15 Martin Sebor <msebor@redhat.com>
7764 PR tree-optimization/85753
7765 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7766 RECORD_TYPE in addition to ARRAY_TYPE.
7768 2018-05-15 Martin Sebor <msebor@redhat.com>
7771 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7773 2018-05-15 Richard Biener <rguenther@suse.de>
7775 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7776 add by_clobber_p one. Change algorithm to collect all defs
7777 representing uses we need to walk and try reducing them to
7778 a single one before failing.
7779 (dse_dom_walker::dse_optimize_stmt): Adjust.
7781 2018-05-13 Mark Wielaard <mark@klomp.org>
7783 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7784 (size_of_loc_descr): Likewise.
7785 (output_loc_operands): Likewise.
7786 (output_loc_operands_raw): Likewise.
7787 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7788 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7789 (hash_loc_operands): Likewise.
7790 (compare_loc_operands): Likewise.
7792 2018-05-14 Mark Wielaard <mark@klomp.org>
7794 * dwarf2out.c (count_index_addrs): New function.
7795 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7797 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7799 PR tree-optimization/83648
7800 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7801 return value as malloc candidate.
7803 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7806 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7807 param as true in call to suggest_attribute.
7809 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
7811 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7812 -mreadonly-in-sdata.
7814 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7816 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7818 (aarch64_crypto_aesd_fused): Likewise.
7820 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
7822 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7823 (movsi_aarch64): Likewise.
7824 (load_pairsi): Likewise.
7825 (load_pairdi): Likewise.
7826 (store_pairsi): Likewise.
7827 (store_pairdi): Likewise.
7828 (load_pairsf): Likewise.
7829 (load_pairdf): Likewise.
7830 (store_pairsf): Likewise.
7831 (store_pairdf): Likewise.
7832 (zero_extend): Likewise.
7833 (trunc): Swap alternatives.
7834 (fcvt_target): Add '?' to prefer w over r.
7836 2018-05-14 Jakub Jelinek <jakub@redhat.com>
7839 * config/i386/i386.md: Disallow non-commutative arithmetics in
7840 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7841 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
7842 in the peephole2 before it.
7844 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
7846 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7847 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7848 (ix86_handle_option): Handle -mcldemote.
7849 * config.gcc: New header.
7850 * config/i386/cldemoteintrin.h: New file.
7851 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7852 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7854 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7855 OPTION_MASK_ISA_CLDEMOTE.
7856 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7857 (ix86_valid_target_attribute_inner_p): Ditto.
7858 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7859 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7860 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7861 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7862 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7864 * config/i386/i386.opt: Add -mcldemote.
7865 * config/i386/x86intrin.h: New header.
7866 * doc/invoke.texi: Add -mcldemote.
7868 2018-05-14 Richard Biener <rguenther@suse.de>
7870 * doc/match-and-simplify.texi: Adjust :s documentation.
7872 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
7874 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7875 intended memcpy size.
7876 (REORDER_45): Likewise.
7878 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
7880 * sort.cc: New file.
7881 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7882 * vec.c (qsort_chk): Use gcc_qsort.
7883 * Makefile.in (OBJS-libcommon): Add sort.o.
7884 (build/sort.o): New target. Use it...
7885 (BUILD_RTL): ... here, and...
7886 (build/gencfn-macros): ... here, and...
7887 (build/genmatch): ... here.
7889 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7890 Chung-Ju Wu <jasonwucj@gmail.com>
7892 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7893 * config/nds32/nds32-graywolf.md: New file.
7894 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7895 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7897 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7898 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7899 * config/nds32/nds32.md (pipeline_model): Add graywolf.
7900 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7901 * config/nds32/pipelines.md: Include n15 settings.
7903 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7904 Chung-Ju Wu <jasonwucj@gmail.com>
7906 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7907 * config/nds32/nds32-n13.md: New file.
7908 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7909 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7911 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7912 * config/nds32/nds32.md (pipeline_model): Add n13.
7913 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7914 * config/nds32/pipelines.md: Include n13 settings.
7916 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7917 Chung-Ju Wu <jasonwucj@gmail.com>
7919 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7920 * config/nds32/nds32-n10.md: New file.
7921 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7922 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7924 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7925 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7926 * config/nds32/nds32.md (pipeline_model): Add n10.
7927 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7928 * config/nds32/pipelines.md: Include n10 settings.
7930 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
7931 Kito Cheng <kito.cheng@gmail.com>
7932 Chung-Ju Wu <jasonwucj@gmail.com>
7934 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7935 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7936 Add enum values for DSP extension instructions.
7937 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7939 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7940 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7942 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7943 * config/nds32/nds32-dspext.md: New file for DSP implementation.
7944 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7945 * config/nds32/nds32-intrinsic.md: Likewise.
7946 * config/nds32/nds32_intrinsic.h: Likewise.
7947 * config/nds32/nds32-md-auxiliary.c: Likewise.
7948 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7949 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7950 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7951 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7952 * config/nds32/nds32-protos.h: New declarations for DSP extension.
7953 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7954 TYPE_DMAC in switch statement.
7955 * config/nds32/nds32.c: New checking and implementation for DSP
7956 extension instructions.
7957 * config/nds32/nds32.h: Likewise.
7958 * config/nds32/nds32.md: Likewise.
7959 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7960 * config/nds32/predicates.md: Implement new predicates for DSP
7963 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7965 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7966 Reformat alternatives and attributes so it is easier to identify
7967 which constraints/attributes go with which instruction.
7968 (mov<mode>_hardfloat32, FMOVE64): Likewise.
7969 (mov<mode>_softfloat32, FMOVE64): Likewise.
7970 (mov<mode>_hardfloat64, FMOVE64): Likewise.
7971 (mov<mode>_softfloat64, FMOVE64): Likewise.
7973 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
7975 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7977 (Basic PowerPC Built-in Functions): The new name of the
7978 subsection previously known as "PowerPC Built-in Functions".
7979 (Basic PowerPC Built-in Functions Available on all Configurations):
7981 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7982 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7983 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7984 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7986 2018-05-11 Martin Jambor <mjambor@suse.cz>
7989 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7992 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7995 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7997 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
7999 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8000 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8001 (ix86_handle_option): Handle -mwaitpkg.
8002 * config.gcc: New header.
8003 * config/i386/cpuid.h (bit_WAITPKG): New bit.
8004 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8005 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8007 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8008 OPTION_MASK_ISA_WAITPKG.
8009 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8010 (ix86_option_override_internal): Add PTA_WAITPKG.
8011 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8012 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8013 IX86_BUILTIN_TPAUSE.
8014 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8015 __builtin_ia32_umwait and __builtin_ia32_tpause.
8016 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8017 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8018 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8019 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8020 UNSPECV_TPAUSE): New.
8021 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8022 * config/i386/i386.opt: Add -mwaitpkg.
8023 * config/i386/waitpkgintrin.h: New file.
8024 * config/i386/x86intrin.h: New header.
8025 * doc/invoke.texi: Add -mwaitpkg.
8027 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8030 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8032 (cortex-m0): Use armv6s-m isa.
8033 (cortex-m0plus): Likewise.
8034 (cortex-m1): Likewise.
8035 (cortex-m0.small-multiply): Likewise.
8036 (cortex-m0plus.small-multiply): Likewise.
8037 (cortex-m1.small-multiply): Likewise.
8039 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
8040 Jakub Jelinek <jakub@redhat.com>
8042 PR tree-optimization/85692
8043 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8044 source permute as well.
8046 2018-05-11 Martin Liska <mliska@suse.cz>
8049 * doc/extend.texi: Document LLVM style format for no_sanitize
8052 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
8054 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8055 mode_supports_vsx_dform_quad to mode_supports_dq_form.
8056 (mode_supports_vsx_dform_quad): Likewise.
8057 (mode_supports_vmx_dform): Move these functions to be next to the
8058 other mode_supports functions.
8059 (mode_supports_dq_form): Likewise.
8060 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8061 mode_supports_dq_form.
8062 (reg_offset_addressing_ok_p): Likewise.
8063 (offsettable_ok_by_alignment): Likewise.
8064 (rs6000_legitimate_offset_address_p): Likewise.
8065 (legitimate_lo_sum_address_p): Likewise.
8066 (rs6000_legitimize_address): Likewise.
8067 (rs6000_legitimize_reload_address): Likewise.
8068 (rs6000_secondary_reload_inner): Likewise.
8069 (rs6000_preferred_reload_class): Likewise.
8070 (rs6000_output_move_128bit): Likewise.
8072 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8074 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8075 Generate SImode target register for null target.
8076 <case IX86_BUILTIN_XGETBV>: Ditto.
8077 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8078 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8080 2018-05-10 Carl Love <cel@us.ibm.com>
8082 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8083 dcbtt and dcbtstt if operands[2] is 0.
8085 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8088 * config/i386/sse.md (usadv64qi): New expander.
8090 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
8092 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8093 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8094 -maltivec=be support.
8095 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8096 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8097 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8098 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8099 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8100 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8101 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8102 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8103 altivec_vsumsws): Adjust.
8104 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8105 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8106 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8108 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8109 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8110 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8111 (altivec_lve<VI_char>x): Delete expand.
8112 (*altivec_lve<VI_char>x_internal): Rename to...
8113 (altivec_lve<VI_char>x): ... this.
8114 (altivec_lvxl_<mode>): Delete expand.
8115 (*altivec_lvxl_<mode>_internal): Rename to ...
8116 (altivec_lvxl_<mode>): ... this.
8117 (altivec_stvxl_<mode>): Delete expand.
8118 (*altivec_stvxl_<mode>_internal): Rename to ...
8119 (altivec_stvxl_<mode>): ... this.
8120 (altivec_stve<VI_char>x): Delete expand.
8121 (*altivec_stve<VI_char>x_internal): Rename to ...
8122 (altivec_stve<VI_char>x): ... this.
8123 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8124 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8125 reduc_plus_scal_<mode>): Adjust.
8126 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8128 (rs6000_cpu_cpp_builtins): Adjust.
8129 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8130 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8131 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8132 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8133 -maltivec=be support.
8134 (rs6000_split_vec_extract_var): Adjust.
8135 (rs6000_split_v4si_init): Adjust.
8136 (swap_selector_for_mode): Delete.
8137 (altivec_expand_lvx_be, altivec_expand_stvx_be,
8138 altivec_expand_stvex_be): Delete.
8139 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8140 -maltivec=be support.
8141 (rs6000_gimple_fold_builtin): Ditto.
8142 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8144 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8145 (TARGET_DIRECT_MOVE_64BIT): Adjust.
8146 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8147 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8148 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8149 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8150 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8151 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8152 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8153 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8154 anonymous split): Adjust.
8155 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8156 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8158 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
8160 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8161 when --with-gxx-include-dir is also specified.
8162 * configure: Regenerate.
8164 2018-05-09 Jim Wilson <jimw@sifive.com>
8167 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8168 * config/riscv/t-withmultilib: New.
8169 * config/riscv/withmultilib.h: New.
8170 * doc/install.texi: Document RISC-V --with-multilib-list support.
8172 2018-05-09 Richard Biener <rguenther@suse.de>
8174 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8176 (vect_bb_vectorization_profitable_p): Adjust. Compute
8177 actual scalar cost using the cost vector and the add_stmt_cost
8180 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8182 PR rtl-optimization/85645
8183 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8184 in the REG_CFA_REGISTER note for LR, don't leave it empty.
8186 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8188 PR rtl-optimization/85645
8189 * shrink-wrap.c (spread_components): Return a boolean saying if
8190 anything was changed.
8191 (try_shrink_wrapping_separate): Iterate spread_components until
8192 nothing changes anymore.
8194 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8196 PR rtl-optimization/85645
8197 * regrename.c (build_def_use): Also kill the chains that include the
8198 destination of a REG_CFA_REGISTER note.
8200 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8202 PR rtl-optimization/85645
8203 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8204 insn that has a REG_CFA_REGISTER note.
8206 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
8208 * cfgexpand.c (expand_clobber): New function.
8209 (expand_gimple_stmt_1): Use it.
8210 * tree-vect-stmts.c (vect_clobber_variable): New function,
8212 (vectorizable_simd_clone_call): ...here.
8213 (vectorizable_store): Emit a clobber either side of an
8214 IFN_STORE_LANES sequence.
8215 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8217 2018-05-09 Tom de Vries <tom@codesourcery.com>
8220 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8221 (define_insn "trap_if_false"): Add exit after trap.
8223 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
8225 PR rtl-optimization/85638
8226 * bb-reorder.c: Include common/common-target.h.
8227 (create_forwarder_block): New function extracted from...
8228 (fix_up_crossing_landing_pad): ...here. Rename into...
8229 (dw2_fix_up_crossing_landing_pad): ...this.
8230 (sjlj_fix_up_crossing_landing_pad): New function.
8231 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8232 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8233 from both partitions and exit the loop after one iteration.
8235 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8238 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8240 (Basic PowerPC Built-in Functions): The new name of the
8241 subsection previously known as "PowerPC Built-in Functions".
8242 (Basic PowerPC Built-in Functions Available on all Configurations):
8244 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8246 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8248 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8250 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8253 2018-05-08 Jim Wilson <jimw@sifive.com>
8255 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8256 (LD_EMUL_SUFFIX): New.
8257 (LINK_SPEC): Use it.
8259 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8261 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8263 (Basic PowerPC Built-in Functions): The new name of the
8264 subsection previously known as "PowerPC Built-in Functions".
8265 (Basic PowerPC Built-in Functions Available on all Configurations):
8267 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8269 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8271 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8273 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8276 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8279 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8280 after cmpelim optimization.
8282 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
8284 * config.gcc: Support "goldmont".
8285 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8286 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8288 * config/i386/i386.c (m_GOLDMONT): Define.
8289 (processor_target_table): Add "goldmont".
8290 (PTA_GOLDMONT): Define.
8291 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8292 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8293 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8294 (fold_builtin_cpu): Add "goldmont".
8295 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8296 (ix86_option_override_internal): Add "goldmont".
8297 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8298 (processor_type): Add PROCESSOR_GOLDMONT.
8299 * config/i386/i386.md: Add CPU "glm".
8300 * config/i386/glm.md: New file.
8301 * config/i386/x86-tune.def: Add m_GOLDMONT.
8302 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8304 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8307 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8309 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8310 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
8311 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
8314 * config/i386/i386.c (ix86_fold_builtin): Handle
8315 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8318 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8319 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8321 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
8324 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8325 (check_arch): Likewise.
8326 (check_fpu): Return the result rather than printing it.
8327 (end arch): Fix operator precedence.
8328 (end cpu): Likewise.
8329 (END): Print the result from check_fpu.
8331 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8332 Alan Hayward <alan.hayward@arm.com>
8333 David Sherwood <david.sherwood@arm.com>
8335 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8336 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8337 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8338 (*fcmuo<mode>_and): New patterns.
8340 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8342 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8343 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8344 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8345 (cmp_op, sve_imm_con): New code attributes.
8346 (SVE_COND_INT_CMP, imm_con): Delete.
8347 (cmp_op): Remove above unspecs from int attribute.
8348 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8350 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
8351 comparison-specific unspecs.
8352 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8353 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8354 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8355 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8356 (*vec_fcm<cmp_op><mode>): Rename to...
8357 (*fcm<cmp_op><mode>): ...this and adjust likewise.
8358 (*vec_fcmuo<mode>): Rename to...
8359 (*fcmuo<mode>): ...this and adjust likewise.
8360 (*pred_fcm<cmp_op><mode>): New pattern.
8361 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8362 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8364 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8366 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8367 (aarch64_emit_sve_predicated_cond): New function.
8368 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8369 (aarch64_emit_unspec_cond_or): Replace with...
8370 (aarch64_emit_sve_or_conds): ...this new function. Use
8371 aarch64_emit_sve_ptrue_op for the individual comparisons and
8372 aarch64_emit_binop to OR them together.
8373 (aarch64_emit_inverted_unspec_cond): Replace with...
8374 (aarch64_emit_sve_inverted_cond): ...this new function. Use
8375 aarch64_emit_sve_ptrue_op for the comparison and
8376 aarch64_emit_unop to invert the result.
8377 (aarch64_expand_sve_vec_cmp_float): Update after the above
8378 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
8380 2018-05-07 Nathan Sidwell <nathan@acm.org>
8382 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8383 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8384 (Backwards Compatibility): Likewise.
8386 2018-05-07 Luis Machado <luis.machado@linaro.org>
8390 2018-05-07 Luis Machado <luis.machado@linaro.org>
8392 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8393 <prefetch_dynamic_strides>: New const bool field.
8394 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8395 prefetch_dynamic_strides.
8396 (exynosm1_prefetch_tune): Likewise.
8397 (thunderxt88_prefetch_tune): Likewise.
8398 (thunderx_prefetch_tune): Likewise.
8399 (thunderx2t99_prefetch_tune): Likewise.
8400 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8402 (aarch64_override_options_internal): Update to set
8403 PARAM_PREFETCH_DYNAMIC_STRIDES.
8404 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8405 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8406 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8407 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8408 prefetch-dynamic-strides setting.
8410 2018-05-07 Luis Machado <luis.machado@linaro.org>
8412 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8413 <minimum_stride>: New const int field.
8414 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8415 minimum_stride field.
8416 (exynosm1_prefetch_tune): Likewise.
8417 (thunderxt88_prefetch_tune): Likewise.
8418 (thunderx_prefetch_tune): Likewise.
8419 (thunderx2t99_prefetch_tune): Likewise.
8420 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8421 (aarch64_override_options_internal): Update to set
8422 PARAM_PREFETCH_MINIMUM_STRIDE.
8423 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8424 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8425 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8426 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8427 stride is constant and is below the minimum stride threshold.
8429 2018-05-07 Luis Machado <luis.machado@linaro.org>
8431 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8434 2018-05-07 Luis Machado <luis.machado@linaro.org>
8436 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8437 <prefetch_dynamic_strides>: New const bool field.
8438 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8439 prefetch_dynamic_strides.
8440 (exynosm1_prefetch_tune): Likewise.
8441 (thunderxt88_prefetch_tune): Likewise.
8442 (thunderx_prefetch_tune): Likewise.
8443 (thunderx2t99_prefetch_tune): Likewise.
8444 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8446 (aarch64_override_options_internal): Update to set
8447 PARAM_PREFETCH_DYNAMIC_STRIDES.
8448 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8449 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8450 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8451 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8452 prefetch-dynamic-strides setting.
8454 2018-05-07 Luis Machado <luis.machado@linaro.org>
8456 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8457 <minimum_stride>: New const int field.
8458 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8459 minimum_stride field.
8460 (exynosm1_prefetch_tune): Likewise.
8461 (thunderxt88_prefetch_tune): Likewise.
8462 (thunderx_prefetch_tune): Likewise.
8463 (thunderx2t99_prefetch_tune): Likewise.
8464 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8465 (aarch64_override_options_internal): Update to set
8466 PARAM_PREFETCH_MINIMUM_STRIDE.
8467 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8468 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8469 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8470 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8471 stride is constant and is below the minimum stride threshold.
8473 2018-05-06 Jakub Jelinek <jakub@redhat.com>
8476 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8477 the type is addressable. Don't force op into register if it has
8480 2018-05-05 Roland McGrath <mcgrathr@google.com>
8483 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8484 any section for which we don't know a specific type it should have,
8485 regardless of name. Previously this was done only for the exact
8486 names ".init_array", ".fini_array", and ".preinit_array".
8487 (default_elf_asm_named_section): Add comment about
8488 relationship with default_section_type_flags and SECTION_NOTYPE.
8489 (get_section): Don't consider it a type conflict if one side has
8490 SECTION_NOTYPE and the other doesn't, as long as neither has the
8491 SECTION_BSS et al used in the default_section_type_flags logic.
8493 2018-05-05 Tom de Vries <tom@codesourcery.com>
8496 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8497 (workaround_barsyncs): New function.
8498 (nvptx_reorg): Use workaround_barsyncs.
8499 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8500 (define_expand "nvptx_membar_cta"): New define_expand.
8501 (define_insn "*nvptx_membar_cta"): New insn.
8503 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
8505 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8506 To improve optimization opportunities.
8507 * builtin-types.def: The new needed builtin types for the above.
8509 2018-05-04 Richard Biener <rguenther@suse.de>
8511 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8512 * gimple-ssa-store-merging.c
8513 (imm_store_chain_info::output_merged_store): Remove redundant create,
8514 release split_store vector contents on failure.
8515 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8516 scalar stmt vector on cache hit.
8518 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
8520 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8522 * config.gcc (powerpc-xilinx-eabi*): Remove.
8523 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8525 (fusion_addis_mem_combo_load): Ditto.
8526 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8528 (rs6000_cpu_cpp_builtins): Ditto.
8529 * config/rs6000/rs6000-linux.c
8530 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8531 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8532 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8534 (rs6000_setup_reg_addr_masks): Ditto.
8535 (rs6000_init_hard_regno_mode_ok): Ditto.
8536 (rs6000_option_override_internal): Ditto.
8537 (legitimate_lo_sum_address_p): Ditto.
8538 (rs6000_legitimize_address): Ditto.
8539 (rs6000_legitimize_reload_address): Ditto.
8540 (rs6000_legitimate_address_p): Ditto.
8541 (abi_v4_pass_in_fpr): Ditto.
8542 (setup_incoming_varargs): Ditto.
8543 (rs6000_gimplify_va_arg): Ditto.
8544 (rs6000_split_multireg_move): Ditto.
8545 (rs6000_savres_strategy): Ditto.
8546 (rs6000_emit_prologue_components): Ditto.
8547 (rs6000_emit_epilogue_components): Ditto.
8548 (rs6000_emit_prologue): Ditto.
8549 (rs6000_emit_epilogue): Ditto.
8550 (rs6000_elf_file_end): Ditto.
8551 (rs6000_function_value): Ditto.
8552 (rs6000_libcall_value): Ditto.
8553 * config/rs6000/rs6000.h: Ditto.
8554 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8555 (TARGET_MINMAX): ... this. New.
8556 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8557 * config/rs6000/rs6000.md: Remove Xilinx FP support.
8558 (*movsi_internal1_single): Delete.
8559 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8560 mfpu=, mxilinx-fpu): Delete.
8561 * config/rs6000/singlefp.h: Delete.
8562 * config/rs6000/sysv4.h: Remove Xilinx FP support.
8563 * config/rs6000/t-rs6000: Ditto.
8564 * config/rs6000/t-xilinx: Delete.
8565 * config/rs6000/titan.md: Adjust for fp_type removal.
8566 * config/rs6000/vsx.md: Remove Xilinx FP support.
8567 (VStype_simple): Delete.
8568 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8569 * config/rs6000/xfpu.h: Delete.
8570 * config/rs6000/xfpu.md: Delete.
8571 * config/rs6000/xilinx.h: Delete.
8572 * config/rs6000/xilinx.opt: Delete.
8573 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8574 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8576 2018-05-04 Tom de Vries <tom@codesourcery.com>
8579 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8582 2018-05-04 Richard Biener <rguenther@suse.de>
8585 * tree-complex.c (update_complex_assignment): We are always in SSA form.
8586 (expand_complex_div_wide): Likewise.
8587 (expand_complex_operations_1): Likewise.
8588 (expand_complex_libcall): Preserve EH info of the original stmt.
8589 (tree_lower_complex): Handle removed blocks.
8590 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8591 on complex multiplication and division libcall builtins.
8593 2018-05-04 Richard Biener <rguenther@suse.de>
8596 * fold-const.c (negate_expr_p): Restrict negation of operand
8597 zero of a division to when we know that can happen without
8599 (fold_negate_expr_1): Likewise.
8601 2018-05-04 Jakub Jelinek <jakub@redhat.com>
8604 * real.h (real_nextafter): Declare.
8605 * real.c (real_nextafter): New function.
8606 * fold-const-call.c (fold_const_nextafter): New function.
8607 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8608 CASE_CFN_NEXTTOWARD.
8609 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8610 even when arg1_mode is different from arg0_mode.
8612 2018-05-03 Nathan Sidwell <nathan@acm.org>
8614 * doc/extend.texi (Deprecated Features): Remove
8616 (Backwards Compatibility): Likewise.
8617 * doc/invoke.texi (C++ Language Options): Likewise.
8618 (C++ Dialect Options): Likewise.
8620 2018-05-03 Jakub Jelinek <jakub@redhat.com>
8623 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8624 _mm512_mask_mullox_epi64): New intrinsics.
8626 2018-05-03 Tom de Vries <tom@codesourcery.com>
8629 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8630 dump files): Add offload-tree.
8632 2018-05-03 Richard Biener <rguenther@suse.de>
8634 PR tree-optimization/85615
8635 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8636 to loops not nested in BBs loop father to avoid creating multi-entry
8639 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8641 PR tree-optimization/70291
8642 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8643 arguments. Change return type to tree. Emit libcall as a new
8644 statement rather than replacing existing one when inplace_p is true.
8645 (expand_complex_multiplication_components): New function.
8646 (expand_complex_multiplication): Expand floating-point complex
8647 multiplication using the above.
8648 (expand_complex_division): Rename inner_type parameter to type.
8649 Update expand_complex_libcall call-site.
8650 (expand_complex_operations_1): Update expand_complex_multiplication
8651 and expand_complex_division call-sites.
8653 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8656 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8657 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8658 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8659 the highest significant bit of the shift count mask is clear. In
8660 check whether and[sq]i3 is needed verify that all significant bits
8661 of the shift count other than the highest are set.
8663 2018-05-02 Tom de Vries <tom@codesourcery.com>
8666 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8667 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8668 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8669 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8670 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8671 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8672 __builtin_goacc_parlevel_size.
8674 2018-05-02 Richard Biener <rguenther@suse.de>
8676 PR tree-optimization/85597
8677 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8678 do not use split vect_get_vec_defs call but call vect_get_slp_defs
8681 2018-05-02 Tom de Vries <tom@codesourcery.com>
8684 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8685 dump files): Add ltrans-tree.
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 wpa-ipa.
8693 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
8695 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
8696 powerpc*-*-linux*paired* target.
8697 * config/rs6000/750cl.h: Delete.
8698 * config/rs6000/paired.h: Delete.
8699 * config/rs6000/paired.md: Delete.
8700 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8702 * config/rs6000/rs6000-builtin.def: Remove paired float support.
8703 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8704 comment. Remove paired float support.
8705 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8706 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8708 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8709 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8711 * config/rs6000/rs6000.c: Remove paired float support.
8712 (paired_expand_vector_init, paired_expand_vector_move,
8713 paired_emit_vector_compare, paired_emit_vector_cond_expr,
8714 (paired_expand_lv_builtin, paired_expand_stv_builtin,
8715 paired_expand_builtin, paired_expand_predicate_builtin,
8716 paired_init_builtins): Delete.
8717 * config/rs6000/rs6000.h: Remove paired float support.
8718 * config/rs6000/rs6000.md: Remove paired float support.
8719 (move_from_CR_ov_bit): Delete.
8720 * config/rs6000/rs6000.opt (mpaired): Delete.
8721 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8722 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8724 2018-05-02 Richard Biener <rguenther@suse.de>
8727 * gimplify.c (gimplify_save_expr): When in SSA form allow
8728 SAVE_EXPRs to compute to SSA vars.
8730 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8733 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8734 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8735 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8736 clobber operands[2], instead use a new pseudo. Formatting fixes.
8738 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
8740 PR tree-optimization/85586
8741 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8742 exit early for statements in the same group if the accesses are
8745 2018-05-02 Tom de Vries <tom@codesourcery.com>
8748 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8751 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
8753 PR tree-optimization/85143
8754 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8756 2018-05-01 Tom de Vries <tom@codesourcery.com>
8759 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8760 not found" error message.
8762 2018-05-01 Tom de Vries <tom@codesourcery.com>
8765 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8766 * vec.c (test_ordered_remove_if): New function.
8767 (vec_c_tests): Call test_ordered_remove_if.
8768 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8769 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8770 * tree-vect-patterns.c (vect_pattern_recog_1): Use
8771 VEC_ORDERED_REMOVE_IF.
8773 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8775 PR tree-optimization/82665
8776 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8777 pointer subtraction where arguments come from a memchr call.
8779 2018-05-01 Jakub Jelinek <jakub@redhat.com>
8781 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8782 --push-state --as-needed and --pop-state instead of --as-needed and
8783 --no-as-needed if ld supports it.
8784 * configure: Regenerated.
8787 * doc/install.texi2html: Replace _002d with - and _002a with * in
8788 generated html files using sed.
8790 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8793 * gcc-rich-location.c (blank_line_before_p): New function.
8794 (use_new_line): New function.
8795 (gcc_rich_location::add_fixit_insert_formatted): New function.
8796 * gcc-rich-location.h
8797 (gcc_rich_location::add_fixit_insert_formatted): New function.
8799 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8801 * selftest.c (assert_streq): Rename "expected" and "actual" to
8802 "val1" and "val2". Extend NULL-handling to cover both inputs
8803 symmetrically, while still requiring both to be non-NULL for a pass.
8804 * selftest.h (assert_streq): Rename "expected" and "actual" to
8806 (ASSERT_EQ): Likewise.
8807 (ASSERT_EQ_AT): Likewise.
8808 (ASSERT_KNOWN_EQ): Likewise.
8809 (ASSERT_KNOWN_EQ_AT): Likewise.
8810 (ASSERT_NE): Likewise.
8811 (ASSERT_MAYBE_NE): Likewise.
8812 (ASSERT_MAYBE_NE_AT): Likewise.
8813 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
8814 the assertion to pass.
8815 (ASSERT_STREQ_AT): Likewise.
8817 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8819 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8820 interaction with -pie.
8822 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8824 * selftest.h: Fix alphabetization of per-source-file selftest
8827 2018-04-30 Jason Merrill <jason@redhat.com>
8829 PR c++/61982 - dead stores to destroyed objects.
8830 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8833 2018-04-30 Jason Merrill <jason@redhat.com>
8835 * tree.c (build_clobber): New.
8836 * tree.h: Declare it.
8837 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8839 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8841 * diagnostic-show-locus.c (layout::layout): Update for
8842 location_get_source_line returning a char_span.
8843 (struct char_span): Move to input.h.
8844 (struct correction): Update for fields in char_span becoming
8846 (struct source_line): Update for location_get_source_line
8847 returning a char_span.
8848 (layout::print_line): Likewise.
8849 * edit-context.c (edited_file::print_content): Likewise.
8850 (edited_file::print_diff_hunk): Likewise.
8851 (edited_file::print_run_of_changed_lines): Likewise.
8852 (edited_file::get_num_lines): Likewise.
8853 (edited_line::edited_line): Likewise.
8854 * final.c (asm_show_source): Likewise.
8855 * input.c (location_get_source_line): Convert return type
8856 from const char * to char_span, losing the final "line_len"
8858 (dump_location_info): Update for the above.
8859 (get_substring_ranges_for_loc): Likewise. Use a char_span
8860 when handling the literal within the line.
8861 (test_reading_source_line): Update for location_get_source_line
8862 returning a char_span.
8863 * input.h (class char_span): Move here from
8864 diagnostic-show-locus.c, converting from a struct to a class.
8865 Make data members private.
8866 (char_span::operator bool): New.
8867 (char_span::length): New.
8868 (char_span::get_buffer): New.
8869 (char_span::operator[]): New.
8870 (char_span::subspan): Make const.
8871 (char_span::xstrdup): New.
8872 (location_get_source_line): Convert return type from const char *
8873 to char_span, losing the final "line_size" param.
8875 2018-04-30 Jan Hubicka <jh@suse.cz>
8877 * lto-wrapper.c (ltrans_priorities): New static var.
8878 (cmp_priority): New.
8879 (run_gcc): Read priorities and if doing parallel build order
8880 the Makefile by them.
8882 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8884 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8886 2018-04-30 Richard Biener <rguenther@suse.de>
8888 * tree-cfg.c (verify_address): Remove base argument, add
8889 flag whether to check TREE_ADDRESSABLE and do that.
8890 (verify_expr): Remove.
8891 (verify_types_in_gimple_reference): Add pieces from verify_expr.
8892 (verify_gimple_assign_single): Likewise.
8893 (verify_gimple_switch): Likewise.
8894 (verify_expr_location_1): Dereference tp once. Add (disabled)
8895 piece from verify_expr.
8896 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8898 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8900 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8902 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8904 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8905 (small_data_pattern): Likewise.
8906 (arc_rewrite_small_data): Likewise.
8907 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8908 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8909 (get_symbol_alignment): New function.
8910 (legitimate_small_data_address_p): Likewise.
8911 (legitimate_scaled_address): Update, call
8912 legitimate_small_data_address_p.
8913 (output_sdata): New static variable.
8914 (arc_print_operand): Update how we handle small data operands.
8915 (arc_print_operand_address): Likewise.
8916 (arc_legitimate_address_p): Update, use
8917 legitimate_small_data_address_p.
8918 (arc_rewrite_small_data_p): Remove.
8919 (arc_rewrite_small_data_1): Likewise.
8920 (arc_rewrite_small_data): Likewise.
8921 (small_data_pattern): Likewise.
8922 (compact_sda_memory_operand): Update to use
8923 legitimate_small_data_address_p and get_symbol_alignment.
8924 (prepare_move_operands): Don't rewite sdata pattern.
8925 (prepare_extend_operands): Remove.
8926 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8928 (zero_extendqisi2): Likewise.
8929 (zero_extendhisi2): Likewise.
8930 (extendqihi2): Likewise.
8931 (extendqisi2): Likewise.
8932 (extendhisi2): Likewise.
8936 * config/arc/constraints.md (Usd): Change it to memory constraint.
8938 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8940 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8941 as source of std instructions.
8942 * config/arc/arc.md (movsi_insn): Update pattern predicate to
8943 allow 6-bit constants as source for store instructions.
8944 (movdi_insn): Update instruction pattern to allow 6-bit constants
8945 as source for store instructions.
8947 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8949 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8951 2018-04-30 Nathan Sidwell <nathan@acm.org>
8952 Sandra Loosemore <sandra@codesourcery.com>
8954 * dumpfile.c (dump_open): Allow '-' for stdout.
8955 * doc/invoke.texi (Developer Options): Document dump filename
8956 determination early. Document stdin/stdout selection.
8958 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
8960 Microblaze Target: PIC data text relative
8962 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8963 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8965 * config/microblaze/microblaze.h (microblaze_constant_address_p):
8966 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8967 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8968 New addressing mode for data-text relative position indepenedent code.
8969 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8970 'ADDRESS_SYMBOLIC_TXT_REL'.
8971 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8972 (microblaze_legitimate_pic_operand): Exclude function calls from
8973 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8974 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8976 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8977 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8978 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8979 for 'address + offset'.
8980 (microblaze_expand_prologue): Add new function prologue call for
8982 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8983 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8984 table in case of TARGET_PIC_DATA_TEXT_REL.
8985 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8986 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8987 Add new macros 'UNSPEC_TEXT',
8988 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8989 + exclude function calls from 'UNSPEC_PLT' in case of data text
8991 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8992 new target hook for generating address diff vector tables in case of
8994 * doc/tm.texi : Regenerate.
8995 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8996 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8997 of addr diff vector generation.
8998 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8999 target hook definition.
9000 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9001 Add default function for generate_pic_addr_diff_vec -> flag_pic.
9002 * doc/invoke.texi (Add new pic option): Add new microblaze pic
9003 option for data text relative.
9005 2018-04-30 Richard Biener <rguenther@suse.de>
9007 * tree-chrec.h (evolution_function_is_constant_p): Remove
9009 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9011 2018-04-30 Richard Biener <rguenther@suse.de>
9014 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9016 2018-04-30 Richard Biener <rguenther@suse.de>
9018 PR tree-optimization/28364
9019 PR tree-optimization/85275
9020 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9021 copying first exit test.
9023 2018-04-28 Mark Wielaard <mark@klomp.org>
9025 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9027 (dwarf_AT): Handle DW_AT_addr_base.
9028 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9030 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
9033 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9034 (*ashl<dwi>3_doubleword_mask_1): Ditto.
9035 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9036 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9038 2018-04-28 Richard Biener <rguenther@suse.de>
9040 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9041 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9042 to reflect use. Only add interesting stmts.
9044 2018-04-27 Martin Jambor <mjambor@suse.cz>
9047 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9048 the jump function allows for passing through aggregate values.
9050 2018-04-27 David Malcolm <dmalcolm@redhat.com>
9052 * input.h (in_system_header_at): Convert from macro to inline
9054 (from_macro_expansion_at): Likewise.
9055 (from_macro_definition_at): Likewise.
9057 2018-04-27 Jeff Law <law@redhat.com>
9059 * config.gcc: Mark tile* targets as deprecated/obsolete.
9061 2018-04-27 Richard Biener <rguenther@suse.de>
9063 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9066 2018-04-27 Richard Biener <rguenther@suse.de>
9068 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9070 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
9072 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9073 with Yd constraint. Set "preferred_for_speed" attribute from
9074 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9076 (*movdi_internal): Ditto.
9077 (movti_interunit splitters): Remove
9078 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9079 (movdi_interunit splitters): Ditto.
9080 * config/i386/constraints.md (Ye): Remove.
9081 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9083 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9086 * config/aarch64/constraints.md (Usg): Limit to 31.
9089 2018-04-27 Jakub Jelinek <jakub@redhat.com>
9091 PR tree-optimization/85529
9092 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9093 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9094 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9095 zero extension or masking of the MSB bit.
9096 (optimize_range_tests): Add FIRST_BB argument, pass it through
9097 to optimize_range_tests_var_bound.
9098 (maybe_optimize_range_tests, reassociate_bb): Adjust
9099 optimize_range_tests callers.
9101 2018-04-26 Richard Biener <rguenther@suse.de>
9102 Jakub Jelinek <jakub@redhat.com>
9104 * cgraph.h (symbol_table): Just declare debug method here.
9105 * symtab.c (symbol_table::debug): Define.
9107 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
9109 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9111 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
9113 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9114 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9115 (*movdi_internal): Substitute Yi and Yj constraint with x
9116 and Ym and Yn constraint with y constraint. Update "isa"
9117 attribute and set "preferred_for_speed" attribute from
9118 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9119 (*movsi_internal): Ditto.
9120 (*movdf_internal): Ditto.
9121 (*movsf_internal): Ditto.
9122 (*zero_extendsidi2): Ditto.
9123 * config/i386/sse.md (vec_set<mode>_0): Ditto.
9124 (sse2_loadld): Ditto.
9125 (*vec_extract<ssevecmodelower>_0): Ditto.
9126 (*vec_extractv4si_0_zext_sse4): Ditto.
9127 (vec_concatv2di): Ditto.
9128 (*vec_dup<mode>): Ditto.
9129 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9130 * config/i386/constraints.md (Yi): Remove.
9135 2018-04-26 Nathan Sidwell <nathan@acm.org>
9137 * dumpfile.c (dump_open): New.
9138 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9139 (dump_finish): Detect stdio/stderr by value not name.
9141 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
9143 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9145 2018-04-26 Tom de Vries <tom@codesourcery.com>
9148 * config/nvptx/nvptx.c (verify_neutering_jumps)
9149 (verify_neutering_labels): New function
9150 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9152 2018-04-26 Tom de Vries <tom@codesourcery.com>
9155 * config/nvptx/nvptx.c (needs_neutering_p): New function.
9156 (nvptx_single): Use needs_neutering_p to skip over insns that do not
9159 2018-04-26 Richard Biener <rguenther@suse.de>
9160 Tom de Vries <tom@codesourcery.com>
9163 * lto-streamer-out.c (output_function): Fixup loops if required to match
9164 discovery done in the reader.
9166 2018-04-26 Richard Biener <rguenther@suse.de>
9168 PR tree-optimization/85116
9169 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9170 have a loop exit from the single latch predecessor. Remove
9171 case of header with just condition.
9172 (ch_base::copy_headers): Exclude infinite loops from any
9174 (pass_ch::execute): Record exits.
9176 2018-04-26 Richard Biener <rguenther@suse.de>
9178 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9179 prologue cost vector and pass it to vect_get_load_cost.
9180 (vect_get_peeling_costs_all_drs): Likewise.
9181 (vect_peeling_hash_get_lowest_cost): Likewise.
9182 (vect_enhance_data_refs_alignment): Likewise.
9184 2018-04-26 Richard Biener <rguenther@suse.de>
9187 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9188 checking of integer<->pointer conversions.
9189 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9190 sign-/zero-extending pointer types.
9191 (expand_omp_for_static_chunk): Likewise.
9193 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
9194 Jean Lee <xiaoyur347@gmail.com>
9196 * config/mips/mips.c (mips_asan_shadow_offset): New function.
9197 (TARGET_ASAN_SHADOW_OFFSET): Define.
9198 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9199 true for -fsanitize=address.
9201 2018-04-25 Mark Wielaard <mark@klomp.org>
9203 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9206 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9208 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9209 than "alu", remove explicit "memory" and "imm_disp" attributes.
9210 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9213 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9214 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9215 gen_lowpart_no_emit.
9217 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
9220 * config/i386/i386.c (ix86_expand_builtin): Change memory
9221 operand to XI, extend p0 to Pmode.
9222 * config/i386/i386.md: Change unspec volatile and operand
9223 1 mode to XI, change operand 0 mode to P.
9225 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9227 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9228 GET_MODE_MASK before any checking.
9229 (nds32_can_use_bset_p): Likewise.
9230 (nds32_can_use_btgl_p): Likewise.
9232 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9234 * config/nds32/nds32-doubleword.md: New define_split pattern for
9235 illegal register number.
9237 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9239 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9241 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9243 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9245 2018-04-25 Richard Biener <rguenther@suse.de>
9247 * lto-streamer.h (LTO_major_version): Bump to 8.
9249 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9251 * BASE-VER: Set to 9.0.0.
9253 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
9255 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9256 in __abskf2 and __powikf2.
9258 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9261 * config/aarch64/constraints.md (Usg, Usj): New constraints.
9262 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9263 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9264 Use the above on operand 2. Reindent.
9265 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9267 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9270 * common/config/i386/i386-common.c (ix86_handle_option): Don't
9272 * config/i386/i386.opt (mcet): Removed.
9273 * doc/install.texi: Remove -mcet documentation.
9274 * doc/invoke.texi: Likewise.
9276 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9279 * doc/install.texi: Remove -mcet from bootstrap-cet.
9281 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9284 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9285 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9289 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9290 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9291 containing a CONST_VECTOR.
9293 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
9295 * doc/install.texi: Update newlib dependency for nvptx.
9297 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9300 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9301 instead of INTVAL when shifting x left.
9303 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
9305 PR tree-optimization/85478
9306 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9307 vect_grouped_store_supported for single element vectors.
9309 2018-04-24 Richard Biener <rguenther@suse.de>
9312 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9313 load cost increase to the case of non-constant step.
9315 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9318 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9319 destination if any_malformed_asm.
9321 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
9324 * expr.c (store_field): In the bitfield case, if the value comes from
9325 a function call and is returned in registers by means of a PARALLEL,
9326 do not change the mode of the temporary unless BLKmode and VOIDmode.
9328 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
9330 PR rtl-optimization/85423
9331 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9332 dependencies to debug insns when the previous insn is non-debug.
9334 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9336 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9337 enums into a single definition.
9338 (fls): Fix predicates and printing.
9341 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9343 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9344 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9345 and short u6 immediate.
9346 (check_if_valid_sleep_operand): Remove.
9347 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9349 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9351 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9352 flag_always_save_lp condition.
9353 * config/nds32/nds32.opt (malways-save-lp): New option.
9355 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9357 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9358 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9359 * config/nds32/nds32.h
9360 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9361 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9363 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9365 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9366 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9368 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9369 Chung-Ju Wu <jasonwucj@gmail.com>
9371 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9373 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9374 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9376 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9378 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9380 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9382 * config/nds32/nds32-protos.h (nds32_data_alignment,
9383 nds32_local_alignment): Declare.
9384 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9385 nds32_local_alignment): New functions.
9386 (TARGET_CONSTANT_ALIGNMENT): Define.
9387 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9389 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9391 * config/nds32/nds32.c
9392 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9393 (TARGET_MODES_TIEABLE_P): Likewise.
9395 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9397 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9400 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
9401 Chung-Ju Wu <jasonwucj@gmail.com>
9403 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9404 for unaligned access.
9405 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9407 * config/nds32/nds32-intrinsic.md: Likewise.
9408 * config/nds32/nds32_intrinsic.h: Likewise.
9409 * config/nds32/nds32.h (nds32_builtins): Likewise.
9410 * config/nds32/nds32.opt (munaligned-access): New option.
9411 * config/nds32/nds32.c (nds32_asm_file_start): Display
9412 flag_unaligned_access status.
9414 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9416 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9417 -mno-relax is present.
9418 * config/riscv/linux.h (LINK_SPEC): Ditto.
9420 2018-04-20 Martin Sebor <msebor@redhat.com>
9423 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9425 (gimple_fold_builtin_stxcpy_chk): Same.
9426 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9428 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
9431 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9432 __powikf2 when long double is IEEE 128-bit.
9434 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9436 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9437 step to make sure stack always aligned.
9439 2018-04-20 Carl Love <cel@us.ibm.com>
9442 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9443 size check for arg0.
9445 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
9446 Tom de Vries <tom@codesourcery.com>
9449 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9450 Emit insns for calls too.
9451 (nvptx_find_par): Always look for worker-level predecessor insn.
9452 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
9454 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9455 (nvptx_process_pars): Propagate frames for calls.
9457 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
9460 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9462 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9463 (ix86_handle_option): Don't handle OPT_mibt.
9464 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9466 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9468 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9469 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9470 (ix86_target_macros): Define __CET__ with flag_cf_protection
9471 for -fcf-protection.
9472 * config/i386/i386.c (isa2_opts): Remove -mibt.
9473 * config/i386/i386.h (TARGET_IBT): Removed.
9474 (TARGET_IBT_P): Likewise.
9475 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9476 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9477 * config/i386/i386.opt (mcet): Update help message.
9480 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
9481 -mcet as an alias for -mshstk.
9483 2018-04-20 Richard Biener <rguenther@suse.de>
9486 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9487 complexity by forcing a single use of the multiply operand.
9489 2018-04-20 Martin Jambor <mjambor@suse.cz>
9492 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9493 recursion dependency to only apply to non-clones.
9495 2018-04-20 Martin Jambor <mjambor@suse.cz>
9498 * ipa-cp.c (create_specialized_node): Check that clones of
9499 self-recursive edges exist during IPA-CP.
9501 2018-04-19 Toon Moene <toon@moene.org>
9503 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9506 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9508 PR tree-optimization/85467
9509 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9510 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
9511 VECTOR_CST element to type.
9513 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9516 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9517 * config/i386/i386.md (builtin_setjmp_setup): Removed.
9518 (builtin_longjmp): Likewise.
9519 (save_stack_nonlocal): New pattern.
9520 (restore_stack_nonlocal): Likewise.
9522 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9525 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9526 Replace ASM_OUTPUT_LABEL with fprintf.
9528 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9531 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9532 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9533 * config/i386/i386-c.c (ix86_target_macros_internal): Also
9534 define __IBT__ and __SHSTK__ for -fcf-protection.
9535 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9537 (ix86_trampoline_init): Likewise.
9538 (x86_output_mi_thunk): Likewise.
9539 (ix86_notrack_prefixed_insn_p): Likewise.
9540 (ix86_option_override_internal): Don't disallow -fcf-protection.
9541 * config/i386/i386.md (rdssp<mode>): Also enable for
9543 (incssp<mode>): Likewise.
9544 (nop_endbr): Likewise.
9545 * config/i386/i386.opt (mcet): Change help message to built-in
9549 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9550 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
9551 enable CET built-in functions.
9553 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
9555 * common/config/i386/i386-common.c
9556 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9557 OPTION_MASK_ISA_MOVDIRI_UNSET,
9558 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9559 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9560 * config.gcc (movdirintrin.h): New header.
9561 * config/i386/cpuid.h (bit_MOVDIRI,
9562 bit_MOVDIR64B): New bits.
9563 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9565 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9566 (VOID, PVOID, PCVOID)): New function types.
9567 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9568 __builtin_ia32_directstoreu_u64,
9569 __builtin_ia32_movdir64b): New builtins.
9570 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9571 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9573 (ix86_valid_target_attribute_inner_p): Ditto.
9574 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9575 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9576 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9577 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9578 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9579 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9580 (movdiri<mode>, movdir64b_<mode>): New.
9581 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9582 * config/i386/immintrin.h: Include movdirintrin.h.
9583 * config/i386/movdirintrin.h: New file.
9584 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9586 2018-04-19 Richard Biener <rguenther@suse.de>
9589 * cfg.c (clear_bb_flags): When loop state says we have
9590 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9592 2018-04-19 Richard Biener <rguenther@suse.de>
9594 PR tree-optimization/84737
9595 * tree-vect-data-refs.c (vect_copy_ref_info): New function
9596 copying restrict info.
9597 (vect_setup_realignment): Use it.
9598 * tree-vectorizer.h (vect_copy_ref_info): Declare.
9599 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9600 the first DR to all generated stores.
9601 (vectorizable_load): Likewise for loads.
9603 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9605 PR tree-optimization/85446
9606 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9607 the integral and pointer types to have the same precision.
9609 * doc/install.texi: Document --disable-cet being the default and
9612 2018-04-18 Martin Liska <mliska@suse.cz>
9614 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9617 2018-04-18 Martin Liska <mliska@suse.cz>
9620 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
9623 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9624 arguments if they are comparable.
9626 2018-04-18 Martin Liska <mliska@suse.cz>
9629 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
9632 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9635 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
9638 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9639 ENDBR after calling __morestack.
9641 2018-04-18 David Malcolm <dmalcolm@redhat.com>
9644 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9645 by using gcc_base_ver to generate a gcc_driver_version, and use
9646 it when generating GCC_DRIVER_NAME.
9647 * configure: Regenerate.
9649 2018-04-18 Jakub Jelinek <jakub@redhat.com>
9652 * config.gcc: Obsolete powerpc*-*-*spe*.
9654 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9657 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9658 (stabstr_D): Change type of unum from unsigned int to
9659 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
9662 2018-04-17 Jim Wilson <jimw@sifive.com>
9665 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9666 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9667 Set arg_pointer_offset after using pretend_args_size.
9669 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9671 PR rtl-optimization/85431
9672 * dse.c (record_store): Ignore zero width stores.
9675 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
9676 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9677 __builtin_stack_restore rather than after it.
9678 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9679 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9680 argument instead of virtual_dynamic_stack_rtx.
9682 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
9684 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9686 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9687 Add note to error message to explain internal mapping of overloaded
9688 built-in function name to non-overloaded built-in function name.
9689 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9692 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
9695 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9696 where the inputs overlap with the output.
9698 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9700 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9701 (=v, v) alternative and explicit "memory" attribute.
9702 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
9703 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9705 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9706 "sselog1" type instead of "sselog".
9707 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9708 "sselog". Remove explicit "memory" attribute.
9709 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9710 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9712 (vec_extract_hi_v32hi): Merge all alternatives into one, use
9713 "sselog1" type instead of "sselog". Remove explicit "memory"
9715 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9716 use "sselog1" type instead of "sselog". Remove explicit "memory"
9718 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9719 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9721 (vec_extract_hi_v64qi): Merge all alternatives into one, use
9722 "sselog1" type instead of "sselog". Remove explicit "memory"
9724 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9725 use "sselog1" type instead of "sselog". Remove explicit "memory"
9729 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9732 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9735 2018-04-17 Martin Jambor <mjambor@suse.cz>
9738 * ipa-cp.c (create_specialized_node): Call
9739 expand_all_artificial_thunks if necessary.
9741 2018-04-17 Martin Liska <mliska@suse.cz>
9744 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9745 in message, remote space in between '_G' and '('.
9747 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9750 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9751 avx512f_vmcmp<mode>3<round_saeonly_name>,
9752 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9753 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9754 avx512f_rndscale<mode><round_saeonly_name>,
9755 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9756 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9757 Use %<iptr>2 instead of %2 for -masm=intel.
9758 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9759 avx512f_vcvttss2usi<round_saeonly_name>,
9760 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9762 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9763 avx512f_vcvttsd2usi<round_saeonly_name>,
9764 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9765 Use %q1 instead of %1 for -masm=intel.
9766 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9767 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9768 of %3 for -masm=intel.
9769 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9771 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9773 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9775 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9776 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9778 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9780 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9781 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9782 %g1 and one with %0 and %1.
9783 (avx512er_vmrcp28<mode><round_saeonly_name>,
9784 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9786 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9787 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9788 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9789 of %0 and %{%4%} for -masm=intel.
9790 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9791 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9792 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9793 order of %0 and %{%5%}%{z%} for -masm=intel.
9795 2018-04-17 Jan Hubicka <jh@suse.cz>
9798 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9800 2018-04-17 Martin Liska <mliska@suse.cz>
9803 * multiple_target.c (create_dispatcher_calls): Set apostrophes
9804 for target_clone error message. Make default implementation
9805 clone to be a local declaration.
9806 (separate_attrs): Add new argument and check for an empty
9808 (expand_target_clones): Handle it.
9809 (ipa_target_clone): Make redirection just for target_clones
9812 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
9813 Tom de Vries <tom@codesourcery.com>
9816 * omp-expand.c (expand_oacc_for): Add dummy false branch for
9817 tiled basic blocks without omp continue statements.
9819 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
9822 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9823 vec_extract expression as having side effects to make sure it gets
9826 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
9829 * config/i386/i386.c (get_builtin_code_for_version): Check
9832 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
9835 * config.gcc: Support "skylake".
9836 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9838 * config/i386/i386.c (m_SKYLAKE): Define.
9839 (processor_target_table): Add "skylake".
9840 (ix86_option_override_internal): Add "skylake".
9841 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9842 PROCESSOR_CANNONLAKE.
9843 (get_builtin_code_for_version): Fix priority for
9844 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9845 PROCESSOR_SKYLAKE-AVX512.
9846 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9847 (processor_type): Add PROCESSOR_SKYLAKE.
9849 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
9850 Jason Merrill <jason@redhat.com>
9853 * convert.c (convert_to_integer_1): Use direct recursion for
9854 enumeral types and types with a precision less than the number
9855 of bits in their mode.
9857 2018-04-16 Julia Koval <julia.koval@intel.com>
9860 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9861 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9863 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
9866 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9867 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9868 and -mno-direct-move.
9870 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
9873 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9874 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9875 Ensure negative shifts result in {0}.
9877 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
9879 PR rtl-optimization/79916
9880 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9881 regs (if any) to define how to gnerate SD moves when LRA is in
9884 2018-04-13 Jakub Jelinek <jakub@redhat.com>
9886 PR rtl-optimization/85393
9887 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9888 * except.c (expand_dw2_landing_pad_for_region): Make static.
9889 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9890 a label and unconditional jump to old_bb, rather than
9891 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9894 PR rtl-optimization/85376
9895 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9896 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9897 instead of a specific value.
9899 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9900 Bin Cheng <bin.cheng@arm.com>
9902 PR tree-optimization/82965
9903 PR tree-optimization/83991
9904 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9905 by_profile_only parameter.
9906 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9907 information if the loop was predicted to iterate too many times.
9908 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9910 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9913 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9916 2018-04-13 Martin Liska <mliska@suse.cz>
9917 Jakub Jelinek <jakub@redhat.com>
9920 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9921 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9922 * builtins.c (expand_builtin_memory_copy_args): Use
9923 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9924 handle dest_addr == pc_rtx.
9926 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
9929 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9930 asked to not generate direct moves.
9931 (fix_trunc<mode>si2_stfiwx): Similar.
9932 (fix_trunc<mode>si2_internal): Similar.
9934 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9937 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9938 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9939 lookup if dest in some wider mode is known to be const0_rtx and
9940 if so, record permanent equivalence for it to be ZERO_EXTEND of
9941 the narrower mode destination.
9943 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9945 * lto-streamer-out.c (output_function): Revert 259346.
9946 * omp-expand.c (expand_oacc_for): Likewise.
9948 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
9950 PR rtl-optimization/85354
9951 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9952 * sel-sched.c (sel_global_init): ... here.
9954 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
9957 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9958 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9959 mode for PE-COFF targets.
9960 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9961 (i386_pe_asm_lto_end): Likewise.
9962 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9963 (TARGET_ASM_LTO_END): Likewise.
9964 * config/i386/winnt.c (saved_debug_info_level): New static variable.
9965 (i386_pe_asm_lto_start): New function.
9966 (i386_pe_asm_lto_end): Likewise.
9968 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9969 Richard Biener <rguenther@suse.de>
9972 * lto-streamer-out.c (output_function): Fix CFG loop state before
9974 * omp-expand.c (expand_oacc_for): Handle calls to internal
9975 functions like regular functions.
9977 2018-04-12 Richard Biener <rguenther@suse.de>
9980 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9981 for the early LTO debug to properly generate references to it
9982 during DIE emission. Do not re-use that for the skeleton for
9984 (dwarf2out_early_finish): Likewise.
9986 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9989 * config/i386/sse.md
9990 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9991 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9992 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9993 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9994 and output is a reg, avoid creating invalid lowpart subreg, but
9995 instead split into a 512-bit move. Don't split if not AVX512VL,
9996 input is xmm16+ reg and output is a mem.
9997 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9998 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9999 xmm16+ reg and output is a mem.
10001 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10003 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10004 also for flag_dwarf2_cfi_asm.
10006 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10008 PR rtl-optimization/85342
10009 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10010 a bool scalar var inside of the loop instead. Don't try to update
10011 recog_data.operand after failed apply_change_group.
10013 2018-04-12 Tom de Vries <tom@codesourcery.com>
10016 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10017 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
10018 array with flexible array member as array without given dimension.
10019 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10020 argument for undefined param to true.
10022 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
10025 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10026 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10027 from PowerPC section.
10028 * config/rs6000/sysv4.opt (mcall-): Improve help text.
10029 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10030 help text that is too long.
10031 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10032 help text that is too long.
10033 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10034 help text that is too long.
10036 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
10038 * config/alpha/alpha.md (stack_probe_internal): Rename
10039 from "probe_stack". Update all callers.
10041 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10043 PR rtl-optimization/84566
10044 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10045 sched_macro_fuse_insns.
10047 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10050 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10051 (compute_block_dependences): ... from here.
10053 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10055 PR tree-optimization/85331
10056 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10057 from int to HOST_WIDE_INT.
10059 2018-04-11 Martin Jambor <mjambor@suse.cz>
10062 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10063 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10064 not the same as the source val.
10065 (cgraph_edge_brings_value_p): New parameter.
10066 (gather_edges_for_value): Pass destination value to
10067 cgraph_edge_brings_value_p.
10068 (perhaps_add_new_callers): Likewise.
10069 (get_info_about_necessary_edges): Likewise and exclude values brought
10070 only by self-recursive edges.
10071 (create_specialized_node): Redirect only clones of self-calling edges.
10072 (+self_recursive_pass_through_p): New function.
10073 (find_more_scalar_values_for_callers_subset): Use it.
10074 (find_aggregate_values_for_callers_subset): Likewise.
10075 (known_aggs_to_agg_replacement_list): Removed.
10076 (decide_whether_version_node): Re-calculate known constants for all
10077 remaining context clones.
10079 2018-04-11 Richard Biener <rguenther@suse.de>
10082 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10083 from early DWARF output.
10084 (dwarf2out_early_finish): Output line info unconditionally into
10085 early DWARF and add reference to it.
10087 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10090 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10091 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10092 other than V2DFmode using iptr mode attribute.
10093 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10095 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10097 PR rtl-optimization/84659
10098 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10100 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10103 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10105 (output_loc_list): Pass address of a dummy size variable even in the
10106 locview handling loop.
10107 (index_location_lists): Add comment on why skip_loc_list_entry can't
10110 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
10113 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10116 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
10119 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10120 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10121 and -mstring-compare-inline-limit.
10123 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10126 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10127 for stack clash protection in a register whenever we need it to be in
10130 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10132 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10133 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10135 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10138 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10140 (mlong-double-): Ditto.
10141 * config/rs6000/sysv4.opt (msdata=): Ditto.
10142 (mtls-size=): Ditto.
10144 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
10146 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10147 erroneous entries for
10148 "vector int vec_ldl (int, long int *)", and
10149 "vector unsigned int vec_ldl (int, unsigned long int *)".
10150 Add comments and entries for
10151 "vector bool char vec_ldl (int, bool char *)",
10152 "vector bool short vec_ldl (int, bool short *)",
10153 "vector bool int vec_ldl (int, bool int *)",
10154 "vector bool long long vec_ldl (int, bool long long *)",
10155 "vector pixel vec_ldl (int, pixel *)",
10156 "vector long long vec_ldl (int, long long *)",
10157 "vector unsigned long long vec_ldl (int, unsigned long long *)".
10158 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10159 type tree bool_long_long_type_node and correct definition of
10160 bool_V2DI_type_node to make reference to this new type tree.
10161 (rs6000_mangle_type): Replace erroneous reference to
10162 bool_long_type_node with bool_long_long_type_node.
10163 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10164 comments to emphasize sign distinctions for char and int types and
10165 replace RS6000_BTI_bool_long constant with
10166 RS6000_BTI_bool_long_long constant. Also add comment to restrict
10167 use of RS6000_BTI_pixel.
10168 (bool_long_type_node): Remove this macro definition.
10169 (bool_long_long_type_node): New macro definition
10171 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10173 PR rtl-optimization/85300
10174 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10175 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10176 simplify_unary_operation fails.
10178 2018-04-10 Martin Liska <mliska@suse.cz>
10180 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10181 cgraph_edge and ipa_ref.
10183 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10187 * config/i386/sse.md
10188 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10189 computation of the VEC_MERGE selector from mask.
10190 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10191 Fix decoding of the VEC_MERGE selector into mask.
10193 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10195 PR tree-optimization/85286
10196 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10198 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10200 * final.c (final_1): Set insn_last_address as well as
10201 insn_current_address.
10203 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10206 * explow.c (emit_stack_probe): Call validize_mem on memory location
10207 before passing it to gen_probe_stack. Create address operand and
10208 legitimize it for the probe_stack_address case.
10210 2018-04-09 Jan Hubicka <jh@suse.cz>
10213 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10214 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10215 * tree.c (free_lang_data_in_type): Fix handling of binfos;
10217 (free_lang_data): Rebuild type inheritance graph.
10219 2018-04-09 Martin Sebor <msebor@redhat.com>
10221 * invoke.texi (-finline-small-functions): Mention other optimization
10223 (-findirect-inlining, -fpartial-inlining): Same.
10224 (-finline-functions-called-once): Same.
10225 (-freorder-blocks-and-partition): Same.
10227 2018-04-09 Jan Hubicka <jh@suse.cz>
10230 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10231 jumps; choose last target that matches the criteria (i.e.
10232 no partition changes for non-crossing jumps).
10233 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10234 support for redirecting crossing jumps to non-crossing.
10236 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
10238 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10239 also for naked functions.
10241 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
10243 * config/arc/arc.md (add_shift): New pattern.
10244 (add_shift2): Likewise.
10245 (sub_shift): Likewise.
10246 (sub_shift_cmp0_noout): Likewise.
10247 (compare_si_ashiftsi): Likewise.
10248 (xbfu_cmp0_noout): New combine pattern.
10249 (xbfu_cmp0"): Likewise.
10250 (movsi_set_cc_insn): Place the predicable variant first.
10251 (commutative_binary_cmp0_noout): Remove clobber.
10252 (commutative_binary_cmp0): New pattern.
10253 (noncommutative_binary_cmp0): Likewise.
10254 (noncommutative_binary_cmp0_noout): Likewise.
10255 (noncommutative_binary_comparison_result_used): Removed.
10256 (rsub_cmp0): New pattern.
10257 (rsub_cmp0_noout): Likewise.
10258 (extzvsi): Changed, keep only meaningful variants.
10259 (SQH, SEZ): New iterators.
10260 (SQH_postfix): New mode attribute.
10261 (SEZ_prefix): New code attribute.
10262 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10263 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10264 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10265 of numerical value.
10266 (noncommutative_operator): Check the availability of barrel
10269 2018-04-09 Richard Biener <rguenther@suse.de>
10271 PR tree-optimization/85284
10272 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10273 Only use the niter constraining form of simple_iv when the exit
10274 is always executed.
10276 2018-04-09 Tom de Vries <tom@codesourcery.com>
10279 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10280 (define_expand "*memory_barrier"): New define_expand.
10281 (define_insn "memory_barrier"): New insn.
10283 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10285 PR rtl-optimization/80463
10286 PR rtl-optimization/83972
10287 PR rtl-optimization/83480
10289 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10290 correct producer for the insn.
10291 (tidy_control_flow): Fixup seqnos in case of debug insns.
10293 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10295 PR rtl-optimization/83913
10297 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10298 different sched-times when merging exprs.
10300 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10302 PR rtl-optimization/83962
10304 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10305 tidy_fallthru_edge and tidy_control_flow.
10307 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10309 PR rtl-optimization/83530
10311 * sel-sched.c (force_next_insn): New global variable.
10312 (remove_insn_for_debug): When force_next_insn is true, also leave only
10313 next insn in the ready list.
10314 (sel_sched_region): When the region wasn't scheduled, make another pass
10315 over it with force_next_insn set to 1.
10317 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10319 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10321 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10322 for interrupt control.
10323 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10324 functions for interrupt control.
10325 * config/nds32/nds32-intrinsic.md: Likewise.
10326 * config/nds32/nds32_intrinsic.h: Likewise.
10327 * config/nds32/nds32.h (nds32_builtins): Likewise.
10329 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10331 * config/nds32/nds32.c (nds32_init_machine_status,
10332 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10333 strict_aligned_p field.
10334 (nds32_expand_to_rtl_hook): New function.
10335 (TARGET_EXPAND_TO_RTL_HOOK): Define.
10336 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10338 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10339 Chung-Ju Wu <jasonwucj@gmail.com>
10341 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10342 * config/nds32/nds32-n7.md: New file.
10343 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10344 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10346 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10347 * config/nds32/nds32.md (pipeline_model): Add n7.
10348 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10349 * config/nds32/pipelines.md: Include n7 settings.
10351 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10352 Chung-Ju Wu <jasonwucj@gmail.com>
10354 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10355 * config/nds32/nds32-e8.md: New file.
10356 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10357 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10359 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10360 * config/nds32/nds32.md (pipeline_model): Add e8.
10361 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10362 * config/nds32/pipelines.md: Include e8 settings.
10364 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10365 Chung-Ju Wu <jasonwucj@gmail.com>
10367 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10368 * config/nds32/nds32-n8.md: New file.
10369 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10370 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10372 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10373 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10374 * config/nds32/nds32.md (pipeline_model): Add n8.
10375 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10376 * config/nds32/pipelines.md: Include n8 settings.
10378 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10379 Chung-Ju Wu <jasonwucj@gmail.com>
10381 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10382 * config/nds32/nds32-n9-2r1w.md: New file.
10383 * config/nds32/nds32-n9-3r2w.md: New file.
10384 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10385 nds32_register_ports): New or modify for cpu n9.
10386 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10388 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10389 * config/nds32/nds32-utils.c: New file.
10390 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10391 TARGET_MUL_SLOW): Define.
10392 * config/nds32/nds32.md (pipeline_model): New attribute.
10393 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10394 New options that support cpu n9.
10395 * config/nds32/pipelines.md: Include n9 settings.
10396 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10398 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10400 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10401 information if necessary.
10402 (output_cond_branch_compare_zero): Likewise.
10403 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10404 (nds32_target_alignment): Refine for alignment.
10405 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10406 (FUNCTION_BOUNDARY): Modify.
10407 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10409 * config/nds32/nds32.opt (malways-align, malign-functions): New.
10411 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10413 * config/nds32/constants.md (unspec_volatile_element): Add values for
10414 TLB operation and data prefetch.
10415 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10416 functions for TLB operation and data prefetch.
10417 * config/nds32/nds32-intrinsic.md: Likewise.
10418 * config/nds32/nds32_intrinsic.h: Likewise.
10419 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10420 (nds32_print_operand): Likewise.
10421 * config/nds32/nds32.h (nds32_builtins): Likewise.
10423 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
10424 Andrew Pinski <pinsika@gcc.gnu.org>
10426 PR middle-end/82976
10427 * match.pd: Use constant_boolean_node of correct type instead of
10428 boolean_true_node or boolean_false_node for simplifying
10429 pointer comparisons to zero.
10431 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10433 PR tree-optimization/80021
10434 * tree.c (verify_type_variant): Make error call in verify_variant_match
10435 translatable and remove final full stop.
10437 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10439 * config/nds32/constants.md (unspec_volatile_element): Add
10440 UNSPEC_VOLATILE_EH_RETURN.
10441 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10442 nds32_output_stack_pop): Support dwarf exception handling process.
10443 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10444 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10445 exception handling process.
10446 (nds32_compute_stack_frame): Likewise.
10447 (nds32_return_addr_rtx): Likewise.
10448 (nds32_initial_elimination_offset): Likewise.
10449 (nds32_expand_prologue): Likewise.
10450 (nds32_expand_epilogue): Likewise.
10451 (nds32_dynamic_chain_address): New function.
10452 * config/nds32/nds32.h (machine_function): Add fields for dwarf
10453 exception handling.
10454 (DYNAMIC_CHAIN_ADDRESS): Define.
10455 (EH_RETURN_DATA_REGNO): Define.
10456 (EH_RETURN_STACKADJ_RTX): Define.
10457 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10458 patterns for dwarf exception handling.
10460 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10462 * config/nds32/nds32.h: Clean up obsolete macros.
10464 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10466 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10467 Add enum values for particular instructions.
10468 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10469 particular intrinsic functions.
10470 * config/nds32/nds32-intrinsic.md: Likewise.
10471 * config/nds32/nds32_intrinsic.h: Likewise.
10472 * config/nds32/nds32.h (nds32_builtins): Likewise.
10473 * config/nds32/nds32.md (type): Add pbsad and pbsada.
10474 (btst, ave): New patterns for particular instructions.
10476 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10478 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10479 Add enum values for atomic load/store and memory sync.
10480 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10482 * config/nds32/nds32-intrinsic.md: Likewise.
10483 * config/nds32/nds32_intrinsic.h: Likewise.
10484 * config/nds32/nds32.h (nds32_builtins): Likewise.
10486 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10488 PR tree-optimization/85257
10489 * fold-const.c (native_encode_vector): If not all elts could fit
10490 and off is -1, return 0 rather than offset.
10491 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10492 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10493 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
10494 adjust buffer in native_interpret_expr call.
10496 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10498 * config/nds32/constants.md (unspec_volatile_element): Add cache
10499 control enum values.
10500 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10501 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10502 * config/nds32/nds32.c (nds32_cctl_names): New.
10503 (nds32_print_operand): Handle cache control register names.
10504 * config/nds32/nds32.h (nds32_builtins): New enum values.
10505 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10507 * config/nds32/nds32.md (type): Add mmu.
10508 * config/nds32/pipelines.md (simple_insn): Add mmu.
10510 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10512 * config/nds32/nds32.md (type): Remove call.
10513 * config/nds32/pipelines.md (simple_insn): Likewise.
10515 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10517 * config/nds32/constants.md (unspec_volatile_element): Add
10518 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10519 UNSPEC_VOLATILE_FMFCFG.
10520 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10521 description for fmfcfg and fmfcsr.
10522 (bdesc_1arg): Add fmtcsr.
10523 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10524 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10525 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10526 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10527 unspec_fmfcfg): New patterns.
10528 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10529 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10530 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10531 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10532 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10533 __nds32__fmfcfg): Define.
10535 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10537 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10538 intrinsic register names.
10539 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10540 intrinsic register enum values and macros.
10542 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10544 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10545 for load/store addressing form.
10546 (nds32_print_operand_address): Likewise.
10548 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
10551 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10552 based on LABEL_REF. Remove useless assertion.
10553 (pic_address_needs_scratch): Fix formatting.
10554 (sparc_legitimize_pic_address): Minor tweaks.
10555 (sparc_delegitimize_address): Adjust assertion accordingly.
10556 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10557 into symbolic_operand.
10558 (movsi_high_pic_label_ref): Likewise.
10559 (movsi_lo_sum_pic_label_ref): Likewise.
10560 (movdi_pic_label_ref): Likewise.
10561 (movdi_high_pic_label_ref): Likewise.
10562 (movdi_lo_sum_pic_label_ref): Likewise.
10564 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
10566 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10567 custom LIB_SPEC setup.
10569 2018-04-06 Ruslan Bukin <br@bsdpad.com>
10570 Kito Cheng <kito.cheng@gmail.com>
10572 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10573 * config/riscv/freebsd.h: New.
10575 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10577 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10578 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10581 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10582 Kito Cheng <kito.cheng@gmail.com>
10584 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10585 nds32_output_call, nds32_symbol_binds_local_p): New functions.
10586 * config/nds32/nds32-protos.h (nds32_output_call,
10587 nds32_output_return): Declare.
10588 * config/nds32/nds32.md: Refine all the call and return patterns.
10590 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10593 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10594 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10596 PR rtl-optimization/84872
10597 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10598 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10599 EDGE_CROSSING edge.
10601 2018-04-06 Tamar Christina <tamar.christina@arm.com>
10603 * expr.c (copy_blkmode_to_reg): Revert 254862.
10604 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10606 2018-04-06 Richard Biener <rguenther@suse.de>
10608 PR middle-end/85244
10609 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10610 after seeing a component reference with an adjacent field. Treat
10611 refs to arrays at struct end of external decls similar to
10612 refs to unconstrained commons.
10614 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10617 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10618 look through SAVE_EXPRs with non-side-effects argument. Adjust
10620 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10623 2018-04-06 Richard Biener <rguenther@suse.de>
10625 PR middle-end/85180
10626 * alias.c (find_base_term): New wrapper around find_base_term
10627 unwinding CSELIB_VAL_PTR changes.
10628 (find_base_term): Do not restore CSELIB_VAL_PTR during the
10631 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10633 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10635 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10636 constant definitions.
10637 ("nop"): lr 0,0 -> nopr r0
10638 ("nop_lr0", "nop_lr1"): New insn definitions.
10640 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10642 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10643 NDS32_V3PUSH_AVAILABLE_P macro.
10645 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
10646 Chung-Ju Wu <jasonwucj@gmail.com>
10648 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10649 (nds32*-*-*): Add float and fpu_config into supported_defaults.
10650 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10651 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10652 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10653 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10654 * config/nds32/constraints.md: New constraints and checking for hard
10655 float configuration.
10656 * config/nds32/iterators.md: New mode iterator and attribute for hard
10657 float configuration.
10658 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10660 * config/nds32/nds32-fpu.md: New file.
10661 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10662 deal with hard float code generation.
10663 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10665 (abi_type, float_reg_number): New enum type.
10666 * config/nds32/nds32-predicates.c: New predicates for hard float.
10667 * config/nds32/nds32-protos.h: Declare functions for hard float.
10668 * config/nds32/nds32.c: Implementation for hard float configuration.
10669 * config/nds32/nds32.h: Definitions for hard float configuration.
10670 * config/nds32/nds32.md: Include hard float machine description and
10671 modify patterns for hard float configuration.
10672 * config/nds32/nds32.opt: New options for hard float configuration.
10673 * config/nds32/predicates.md: New predicates for hard float
10676 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10678 * common/config/nds32/nds32-common.c
10679 (nds32_option_optimization_table): Enable -mreleax-hint by default.
10681 2018-04-05 Jakub Jelinek <jakub@redhat.com>
10683 PR middle-end/85195
10684 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10685 CONSTRUCTOR_ELT (ctor, ...)->value.
10687 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
10690 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10692 2018-04-05 Tom de Vries <tom@codesourcery.com>
10695 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10698 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10699 Kito Cheng <kito.cheng@gmail.com>
10701 * config/nds32/constraints.md (U33): Fine-tune checking condition.
10702 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10703 * config/nds32/nds32.h (nds32_16bit_address_type): Add
10704 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10706 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10707 Kito Cheng <kito.cheng@gmail.com>
10709 * config/nds32/constraints.md (Ufe): New memory constraint.
10710 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10711 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10712 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10714 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10715 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10717 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10719 * config/nds32/nds32.md: Use optimize_size in the condition for
10720 alu-shift instructions.
10722 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10724 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10726 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10728 * config/nds32/nds32.md (negsi2): Refine pattern.
10730 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10731 Chung-Ju Wu <jasonwucj@gmail.com>
10733 * config/nds32/iterators.md (shift_rotate): New code iterator.
10734 (shift): New code attribute.
10735 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10736 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10737 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10738 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10739 bit-wise operations.
10740 (andsi3, *andsi3): Ditto.
10741 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10742 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10743 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10744 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10745 nds32_ior_operand, nds32_xor_operand): New predicates.
10747 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10749 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10750 (addsi3, subsi3): ... this.
10752 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10754 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10756 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10758 * config/nds32/nds32.md: Adjust indention.
10760 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10762 * config/nds32/nds32.md (feature): New attribute.
10764 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10766 * config/nds32/nds32.md (subtype): New attribute.
10768 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
10771 * config/arm/arm-builtins.c (arm_expand_builtin): Change
10772 expansion to perform a bitwise AND of the argument followed by a
10773 boolean negation of the result.
10775 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
10777 PR rtl-optimization/84878
10778 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10779 the basic block. Assert the use reference is not artificial and that
10780 it has an associated insn.
10782 2018-04-04 Michael Matz <matz@suse.de>
10784 * builtins.c (compute_objsize): Pass correct operand
10785 to array_at_struct_end_p.
10787 2018-04-04 Richard Biener <rguenther@suse.de>
10790 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10791 from contexts for DINFO_LEVEL_TERSE and below.
10793 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10795 * config/nds32/nds32-doubleword.md (move_<mode>): Require
10796 resiter_operand condition.
10797 * config/nds32/nds32.md (*move<mode>): Ditto.
10799 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10800 Monk Chiang <sh.chiang04@gmail.com>
10802 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10804 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10806 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10808 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10809 Kito Cheng <kito.cheng@gmail.com>
10811 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10812 nds32_cond_code_str, output_cond_branch,
10813 output_cond_branch_compare_zero, nds32_expand_cbranch,
10814 nds32_expand_cstore, nds32_expand_movcc,
10815 nds32_output_cbranchsi4_equality_zero,
10816 nds32_output_cbranchsi4_equality_reg,
10817 nds32_output_cbranchsi4_equality_reg_or_const_int,
10818 nds32_output_cbranchsi4_greater_less_zero: New functions.
10819 * config/nds32/nds32-protos.h (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): Declare.
10825 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10826 nds32_rimm11s_operand): New predicates.
10827 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10828 * config/nds32/nds32.md: Rewrite all the branch and conditional move
10831 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10833 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10834 * config/nds32/nds32.md: Ditto.
10835 * config/nds32/pipelines.md: Ditto.
10837 2018-04-04 Richard Biener <rguenther@suse.de>
10839 PR tree-optimization/85168
10840 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10841 propagating abnormals.
10843 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10845 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10847 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10848 Kito Cheng <kito.cheng@gmail.com>
10850 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10851 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10852 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10853 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10854 * config/nds32/nds32.md (sibcall_internal): New.
10855 (sibcall_register): Remove.
10856 (sibcall_immediate): Remove.
10857 (sibcall_value_internal): New.
10858 (sibcall_value_register): Remove.
10859 (sibcall_value_immediate): Remove.
10860 * config/nds32/predicates.md (nds32_general_register_operand): New.
10861 (nds32_call_address_operand): New.
10863 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10865 PR rtl-optimization/85167
10866 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10867 bb_defs if *split_p, instead preinitialize it to NULL.
10869 PR tree-optimization/85156
10870 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10871 evaluating the argument multiple times.
10873 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
10875 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10877 (_mm_cvtpd_ps): Likewise.
10878 (_mm_cvttpd_epi32): Likewise.
10879 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10880 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10881 vector, pixel, and bool following altivec.h include.
10883 2018-04-03 Martin Sebor <msebor@redhat.com>
10885 * doc/extend.texi (Common Function Attributes): Clarify.
10886 (const attribute): Likewise.
10887 (pure attribute): Likewise.
10889 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10892 * config/i386/i386.c (ix86_expand_vector_set): Use
10893 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
10895 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
10897 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10898 instructions when changing rounding bits to preserve precision bits
10899 in the x87 control word.
10901 2018-04-03 Martin Liska <mliska@suse.cz>
10903 PR tree-optimization/82491
10904 * rtl.h (strip_offset_and_add): Replace += suboffset with
10905 poly_uint64 () + suboffset.
10907 2018-03-29 Martin Liska <mliska@suse.cz>
10908 Martin Jambor <mjambor@suse.cz>
10911 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10912 param_type is not an integral or pointer type.
10914 2018-04-03 Richard Biener <rguenther@suse.de>
10916 * sese.h (recompute_all_dominators): Remove.
10918 2018-04-02 Martin Sebor <msebor@redhat.com>
10920 * doc/invoke.texi (-Wrestrict): Fix typos.
10922 2018-04-02 Jim Wilson <jimw@sifive.com>
10924 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10925 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10926 (<optab>di3, <optab>si3_extend): Likewise.
10927 (<optab>si3_mask, <optab>si3_mask_1): New.
10928 (<optab>di3_mask, <optab>di3_mask_1): New.
10929 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10930 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10931 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10933 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
10935 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10938 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
10940 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10941 (nds32_canonicalize_comparison): New function.
10943 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10944 Kito Cheng <kito.cheng@gmail.com>
10945 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10947 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10948 * config/nds32/constants.md (unspec_volatile_element): Add
10949 UNSPEC_VOLATILE_RELAX_GROUP.
10950 * config/nds32/nds32-relax-opt.c: New file.
10951 * config/nds32/nds32-predicates.c
10952 (nds32_symbol_load_store_p): New function.
10953 * config/nds32/nds32-protos.h
10954 (nds32_symbol_load_store_p): Declare function.
10955 (make_pass_nds32_relax_opt): Declare new rtl pass function.
10956 * config/nds32/nds32.c
10957 (nds32_register_pass): New function to register pass.
10958 (nds32_register_passes): New function to register passes.
10959 * config/nds32/nds32.md (relax_group): New pattern.
10960 * config/nds32/nds32.opt (mrelax-hint): New option.
10961 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10963 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
10965 * config/nds32/t-nds32: Modify files dependency.
10967 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10969 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10970 (PROFILE_HOOK): Define its implementation.
10972 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10974 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10975 type and 32-bit size.
10977 2018-04-01 Jakub Jelinek <jakub@redhat.com>
10979 PR middle-end/85090
10980 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10981 (V_128_256): New mode iterator.
10982 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10983 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10984 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10986 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10987 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10989 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
10992 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10993 NaN inputs correctly.
10995 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
10998 * config/rs6000/vsx.md (??r): New mode attribute.
10999 (*vsx_mov<mode>_64bit): Use it.
11000 (*vsx_mov<mode>_32bit): Likewise.
11002 2018-03-30 Martin Sebor <msebor@redhat.com>
11004 PR tree-optimization/84818
11005 * builtins.c (check_access): Use warning_n.
11007 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11010 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11012 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11015 2018-03-30 Julia Koval <julia.koval@intel.com>
11018 * x86-tune.def (movx, partial_reg_dependency): Enable for
11021 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
11023 PR inline-asm/84985
11024 * lra-constraints.c (process_alt_operands): Move setting
11025 this_alternative_matches below.
11027 2018-03-29 Martin Liska <mliska@suse.cz>
11030 * doc/invoke.texi: Document how LTO works with debug info.
11031 Describe auto-load support of binutils. Mention 'x86-64'
11032 as valid option value of -march option.
11034 2018-03-29 Jakub Jelinek <jakub@redhat.com>
11036 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11039 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11040 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11041 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11044 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11047 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11048 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11049 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11050 for RS6000_BTM_POWERPC64.
11051 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11052 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11053 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11056 (DIVDEU): Likewise.
11058 2018-03-28 Carl Love <cel@us.ibm.com>
11061 2017-09-27 Carl Love <cel@us.ibm.com>
11063 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11064 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11065 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11068 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11070 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11071 instead of __vector bool.
11072 (_mm_max_pu8): Likewise.
11073 (_mm_min_pi16): Likewise.
11075 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11078 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11079 (DIVWEUO): Likewise.
11080 (DIVDEO): Likewise.
11081 (DIVDEUO): Likewise.
11082 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11083 DIVWEUO and DIVDEUO.
11084 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11085 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11086 (div_extend): Likewise.
11087 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11089 (__builtin_divweuo): Likewise.
11090 (__builtin_divdeo): Likewise.
11091 (__builtin_divdeuo): Likewise.
11093 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11096 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11097 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11099 PR tree-optimization/82004
11100 * gimple-match-head.c (optimize_pow_to_exp): New function.
11101 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11102 Don't fold to exp if optimize_pow_to_exp is false.
11104 2018-03-28 Martin Liska <mliska@suse.cz>
11107 * calls.c (initialize_argument_information): Fix trailing space.
11108 * common.opt: Fix typo and provide better explanation for
11109 -fsanitize-coverage option.
11110 * config/i386/i386.opt: Fix typo.
11112 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11113 Martin Liska <mliska@suse.cz>
11116 * gimplify.c (asan_poison_variable): Don't do the check for
11117 gimplify_omp_ctxp here.
11118 (gimplify_decl_expr): Do it here.
11119 (gimplify_target_expr): Likewise.
11121 2018-03-28 Martin Liska <mliska@suse.cz>
11124 * config/i386/i386.c (ix86_function_arg_advance): Do not call
11125 chkp_type_bounds_count if MPX is not enabled.
11127 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
11129 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11131 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
11134 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11135 function to create the function decl for complex long double
11136 multiply and divide for -mabi=ieeelongdouble.
11137 (init_float128_ieee): Call it.
11139 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
11142 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11143 -fcf-protection=branch -mibt.
11144 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11146 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11149 * config/arm/arm.c (arm_valid_symbolic_address): Handle
11150 arm_word_relocations.
11152 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
11155 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11156 extern array declarations.
11158 2018-03-27 Richard Biener <rguenther@suse.de>
11160 PR middle-end/84067
11161 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11162 explicit single_use checks.
11164 2018-03-27 Richard Biener <rguenther@suse.de>
11166 PR tree-optimization/85082
11167 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11170 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11172 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11173 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11174 Turn on fasynchronous-unwind-tables and funwind-tables.
11176 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
11179 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11180 (*bmi_blsr_<mode>_ccz): Ditto.
11182 2018-03-26 Tom de Vries <tom@codesourcery.com>
11184 PR tree-optimization/85063
11185 * omp-general.c (offloading_function_p): New function. Factor out
11187 * omp-offload.c (pass_omp_target_link::gate): ... here.
11188 * omp-general.h (offloading_function_p): Declare.
11189 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11190 with attribute omp declare target for offloading functions.
11192 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
11194 PR tree-optimization/84005
11195 * tree-data-ref.h (get_base_for_alignment): Declare.
11196 * tree-data-ref.c (get_base_for_alignment_1): New function.
11197 (get_base_for_alignment): Likewise.
11198 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11199 get_base_for_alignment to find a suitable base object, instead
11200 of always using drb->base_address.
11202 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11204 PR inline-asm/85022
11205 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11206 known size by default.
11208 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
11210 PR inline-asm/85030
11211 * lra-constraints.c (process_alt_operands): Don't match BLKmode
11212 and non BLKmode operands.
11214 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11217 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11218 Clean up attributes.
11220 2018-03-23 Richard Biener <rguenther@suse.de>
11223 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11224 we are going to emit early debug for LTO.
11226 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11228 PR inline-asm/85034
11229 * function.c (match_asm_constraints_1): Don't optimize if input
11230 doesn't satisfy general_operand predicate for output's mode.
11232 PR inline-asm/85022
11233 * alias.c (write_dependence_p): Don't require for x_canonicalized
11234 non-VOIDmode if x has VOIDmode.
11237 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11238 just don't try to optimize it rather than assert it never happens.
11240 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11242 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11243 macro expansions for definition of ST_INTERNAL_<mode> and
11244 LD_INTERNAL_<mode> builtins.
11245 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11247 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11249 (altivec_expand_st_builtin): Likewise.
11250 (altivec_expand_builtin): Remove calls to deleted functions.
11251 (rs6000_address_for_altivec): Delete this function.
11252 * config/rs6000/vector.md: Remove expands for
11253 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11255 2018-03-22 Sudakshina Das <sudi.das@arm.com>
11258 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11259 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11260 re-computing once computed.
11261 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11262 (arm_init_machine_status): Initialize
11263 machine->static_chain_stack_bytes.
11265 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11268 * doc/extend.texi: Add four new prototypes for vec_ld.
11269 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11270 definitions for more logical presentation.
11271 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11272 entries for V1TI variants of __builtin_altivec_ld builtin.
11273 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11274 handling of V1TI variant of LVX icode pattern.
11275 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11276 (rs6000_gimple_fold_builtin): Likewise.
11277 (altivec_init_builtins): Add code to define
11278 __builtin_altivec_lvx_v1ti function.
11280 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11282 PR inline-asm/84941
11283 * function.c (match_asm_constraints_1): Don't do the optimization
11284 if input isn't a REG, SUBREG, MEM or constant.
11286 2018-03-22 Tom de Vries <tom@codesourcery.com>
11288 PR tree-optimization/84956
11289 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11290 bb_has_abnormal_pred.
11292 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11295 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11296 DECL_INITIAL (decl) to decl at the end.
11297 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11298 adjust the comment.
11300 2018-03-21 Joseph Myers <joseph@codesourcery.com>
11302 * doc/extend.texi (__builtin_tgmath): Document when complex
11303 integer types are treated as _Complex _Float64.
11305 2018-03-21 Tom de Vries <tom@codesourcery.com>
11307 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11309 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11311 PR tree-optimization/84960
11312 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11313 if it is ENTRY block, move them into single succ of ENTRY in that case.
11315 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
11317 PR tree-optimization/84811
11318 * poly-int.h (poly_span_traits): Remove the T3 parameter and
11319 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11320 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11321 (known_subrange_p): Update accordingly. Cast each value involved
11322 in the size comparison, rather than casting the result of the
11325 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11327 PR tree-optimization/84982
11328 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11329 by flipping the least significant bit rather than all bits from
11330 bitpos to bitpos + bitsize - 1.
11332 2018-03-21 Nathan Sidwell <nathan@acm.org>
11334 * doc/extend.texi (Deprecated Features): Remove mention of
11335 long-deleted deprecations.
11337 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11340 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11341 * configure: Regenerate.
11343 2018-03-21 Tom de Vries <tom@codesourcery.com>
11345 PR tree-optimization/83126
11346 * tree-parloops.c (num_phis): New function.
11347 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11349 2018-03-21 Nathan Sidwell <nathan@acm.org>
11351 * doc/extend.texi (Deprecated Features): Update deprecated flags,
11352 mention anon-struct/union members and trailing attributes.
11354 2018-03-21 Bin Cheng <bin.cheng@arm.com>
11356 PR tree-optimization/84969
11357 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11358 builtin memset partitions if they set different rhs values.
11360 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11362 PR rtl-optimization/84989
11363 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11364 VEC_DUPLICATE with scalar result mode.
11366 2018-03-21 Martin Liska <mliska@suse.cz>
11369 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11370 not intended return statement.
11372 2018-03-21 Martin Liska <mliska@suse.cz>
11375 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11376 (chkp_find_bound_slots_1): Limit number of iterations.
11378 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
11381 * Minor grammar fixes for x86 options.
11383 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11386 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11387 holding REG_CFA_RESTORE notes, instead turn them into a USE.
11389 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
11392 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11393 (altivec_lvx_<mode>_1op): Likewise.
11394 (altivec_stvx_<mode>_2op): Likewise.
11395 (altivec_stvx_<mode>_1op): Likewise.
11396 (altivec_lvx_<VM2:mode>): New define_expand.
11397 (altivec_stvx_<VM2:mode>): Likewise.
11398 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11399 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11400 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11401 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11402 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11403 (rs6000_gen_lvx): Likewise.
11404 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11405 (altivec_expand_stv_builtin): Likewise.
11406 (altivec_expand_builtin): Likewise.
11407 * config/rs6000/vector.md: Likewise.
11409 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11412 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11415 2018-03-20 Richard Biener <rguenther@suse.de>
11418 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11419 sign-conversions as zero, fall back to standard scalar_stmt
11422 2018-03-20 Martin Liska <mliska@suse.cz>
11425 * predict.c (rebuild_frequencies): Handle case when we have
11426 PROFILE_ABSENT, but flag_guess_branch_prob is false.
11428 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11431 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11432 flag_section_anchors.
11433 * varasm.c (use_blocks_for_decl_p): Remove hack for
11434 dw2_force_const_mem.
11437 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11439 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
11440 be created, use lowpart_subreg of operands[0] rather than operands[0]
11442 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11443 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11444 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11445 and n constraint instead of aarch64_shift_imm_di and Usd.
11446 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11447 (*aarch64_<optab>_reg_minus<mode>3): ... this.
11449 2018-03-20 Sudakshina Das <sudi.das@arm.com>
11452 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11453 to favor GPR over NEON registers.
11454 (<shift>di3_neon): Likewise.
11456 2018-03-20 Tom de Vries <tom@codesourcery.com>
11459 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11460 (nvptx_process_pars): Emit bar.sync asap and alap.
11462 2018-03-20 Tom de Vries <tom@codesourcery.com>
11465 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11466 seen_label if seen_label is already set.
11468 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11471 * config/i386/i386.c (fold_builtin_cpu): For features above 31
11472 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11473 Use 1U instead of 1. Formatting fixes.
11476 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11477 instead of TREE_TYPE (s1) for the return value.
11479 2018-03-19 Jakub Jelinek <jakub@redhat.com>
11481 PR tree-optimization/84946
11482 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11483 bitsize + bitsize in poly_uint64 rather than poly_int64.
11486 * dwarf2asm.c: Include fold-const.c.
11487 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11488 of decl rather than decl itself.
11490 PR rtl-optimization/84643
11491 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11493 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
11496 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11497 calling assemble_variable.
11499 2018-03-19 Sudakshina Das <sudi.das@arm.com>
11502 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11503 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11505 2018-03-19 Jim Wilson <jimw@sifive.com>
11508 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11509 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11510 (riscv_first_stack_step): Likewise.
11511 (riscv_option_override): Use STACK_BOUNDARY instead of
11512 MIN_STACK_BOUNDARY.
11513 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11514 MIN_STACK_BOUNDARY.
11515 (BIGGEST_ALIGNMENT): Set to 128.
11516 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11517 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11520 2018-03-19 Richard Biener <rguenther@suse.de>
11522 PR tree-optimization/84933
11523 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11524 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11526 2018-03-19 Richard Biener <rguenther@suse.de>
11528 PR tree-optimization/84859
11529 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11530 (cond_if_else_store_replacement): Perform sinking operation on
11531 single-store BBs regardless of MAX_STORES_TO_SINK setting.
11532 Generalize what a BB with a single eligible store is.
11534 2018-03-19 Richard Biener <rguenther@suse.de>
11536 PR tree-optimization/84929
11537 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11538 chrec_is_positive against non-chrec arg.
11540 2018-03-19 Tamar Christina <tamar.christina@arm.com>
11543 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11545 2018-03-18 Martin Liska <mliska@suse.cz>
11547 PR rtl-optimization/84635
11548 * regrename.c (build_def_use): Use matches_mode only when
11551 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
11553 PR tree-optimization/84913
11554 * tree-vect-loop.c (vectorizable_reduction): Don't try to
11555 vectorize chains of COND_EXPRs.
11557 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11559 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11561 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11563 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11565 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11567 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11569 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11570 Kito Cheng <kito.cheng@gmail.com>
11572 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11573 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11574 (nds32_adjust_reg_alloc_order): New function.
11575 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11577 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
11579 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11580 nds32_print_operand, nds32_print_operand_address): Use
11581 HOST_WIDE_INT_PRINT_DEC instead.
11583 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11585 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11587 2018-03-17 Jakub Jelinek <jakub@redhat.com>
11590 * config/i386/i386.c (initial_ix86_tune_features,
11591 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11592 unsigned long long.
11593 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11594 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11595 rather than 1u << ix86_tune. Formatting fix.
11596 (ix86_option_override_internal): Change ix86_arch_mask from
11597 unsigned int to unsigned HOST_WIDE_INT, initialize to
11598 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11599 (ix86_function_specific_restore): Likewise.
11601 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11604 * postreload.c (reload_combine_recognize_pattern): Perform
11605 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11606 truncate_int_for_mode the result for the destination's mode.
11609 * hsa-gen.c (mem_type_for_type): Fix comment typo.
11610 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11612 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11615 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
11618 * lra-assigns.c (lra_split_hard_reg_for): Don't use
11619 regno_allocno_class_array and sorted_pseudos.
11620 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11621 insns where regno is used.
11623 2018-03-16 Martin Liska <mliska@suse.cz>
11626 * multiple_target.c (create_dispatcher_calls): Redirect
11627 reference in the symbol table.
11629 2018-03-16 Martin Liska <mliska@suse.cz>
11632 * multiple_target.c (create_dispatcher_calls): Redirect also
11635 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11639 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11640 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11641 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11643 2018-03-16 Julia Koval <julia.koval@intel.com>
11645 * doc/invoke.texi (Skylake Server): Add CLWB.
11646 Cannonlake): Remove CLWB.
11648 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11650 PR tree-optimization/84841
11651 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11653 (FLOAT_ONE_CONST_TYPE): Define.
11654 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11655 (sort_by_operand_rank): Put entries with higher constant_type last
11656 rather than first to match comments.
11658 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
11660 * config/nios2/nios2.md (movsi_internal): Fix thinko in
11663 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11666 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11667 check and use address of target always.
11669 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
11672 * config/i386/i386.c (indirect_thunk_needed): Update comments.
11673 (indirect_thunk_bnd_needed): Likewise.
11674 (indirect_thunks_used): Likewise.
11675 (indirect_thunks_bnd_used): Likewise.
11676 (indirect_return_needed): New.
11677 (indirect_return_bnd_needed): Likewise.
11678 (output_indirect_thunk_function): Add a bool argument for
11680 (output_indirect_thunk_function): Don't generate alias for
11681 function return thunk.
11682 (ix86_code_end): Call output_indirect_thunk_function to generate
11683 function return thunks.
11684 (ix86_output_function_return): Set indirect_return_bnd_needed
11685 and indirect_return_needed instead of indirect_thunk_bnd_needed
11686 and indirect_thunk_needed.
11688 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
11690 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11691 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11692 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11694 2018-03-15 David Malcolm <dmalcolm@redhat.com>
11695 Paul Hua <paul.hua.gm@gmail.com>
11698 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11700 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
11702 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11703 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11704 resp. SFmode cases.
11706 2018-03-15 Tamar Christina <tamar.christina@arm.com>
11709 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11710 instead of GET_MODE_SIZE when comparing Units.
11712 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11715 * varasm.c (hash_section): Return an unchangeble hash value
11716 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11717 Return !aarch64_can_use_per_function_literal_pools_p ().
11719 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11722 * optabs.c (emit_conditional_move): Pass address of cmode's copy
11723 rather than address of cmode as last argument to prepare_cmp_insn.
11725 2018-03-15 Julia Koval <julia.koval@intel.com>
11727 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11728 F_AVX512VNNI, F_AVX512BITALG): New.
11730 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
11733 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
11734 insn for floating-point loads and stores.
11736 2018-03-14 Carl Love <cel@us.ibm.com>
11738 * config/rs6000/rs6000-c.c: Add macro definitions for
11739 ALTIVEC_BUILTIN_VEC_PERMXOR.
11740 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11741 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11742 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11743 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11745 * config/doc/extend.texi: Add prototypes for vec_permxor.
11747 2018-03-14 David Malcolm <dmalcolm@redhat.com>
11750 * diagnostic-show-locus.c (class layout_point): Convert m_line
11751 from int to linenum_type.
11752 (line_span::comparator): Use linenum "compare" function when
11753 comparing line numbers.
11754 (test_line_span): New function.
11755 (layout_range::contains_point): Convert param "row" from int to
11757 (layout_range::intersects_line_p): Likewise.
11758 (layout::will_show_line_p): Likewise.
11759 (layout::print_source_line): Likewise.
11760 (layout::should_print_annotation_line_p): Likewise.
11761 (layout::print_annotation_line): Likewise.
11762 (layout::print_leading_fixits): Likewise.
11763 (layout::annotation_line_showed_range_p): Likewise.
11764 (struct line_corrections): Likewise for field m_row.
11765 (line_corrections::line_corrections): Likewise for param "row".
11766 (layout::print_trailing_fixits): Likewise.
11767 (layout::get_state_at_point): Likewise.
11768 (layout::get_x_bound_for_row): Likewise.
11769 (layout::print_line): Likewise.
11770 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11771 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11772 * input.c (selftest::test_linenum_comparisons): New function.
11773 (selftest::input_c_tests): Call it.
11774 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11775 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11776 * selftest.h (ASSERT_GT): New macro.
11777 (ASSERT_GT_AT): New macro.
11778 (ASSERT_LT): New macro.
11779 (ASSERT_LT_AT): New macro.
11781 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
11783 PR rtl-optimization/84780
11784 * combine.c (distribute_links): Don't make a link based on pc_rtx.
11786 2018-03-14 Martin Liska <mliska@suse.cz>
11788 * tree.c (record_node_allocation_statistics): Use
11789 get_stats_node_kind.
11790 (get_stats_node_kind): New function extracted from
11791 record_node_allocation_statistics.
11792 (free_node): Use get_stats_node_kind.
11794 2018-03-14 Richard Biener <rguenther@suse.de>
11796 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11797 that the value-set of ANTIC_IN doesn't grow.
11800 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11802 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11803 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11805 2018-03-14 Julia Koval <julia.koval@intel.com>
11807 * config.gcc (icelake-client, icelake-server): New.
11809 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11810 (initial_ix86_arch_features): Ditto.
11811 (PTA_SKYLAKE): Add SGX.
11812 (PTA_ICELAKE): Remove.
11813 (PTA_ICELAKE_CLIENT): New.
11814 (PTA_ICELAKE_SERVER): New.
11815 (ix86_option_override_internal): Split up icelake on icelake client and
11817 (get_builtin_code_for_version): Ditto.
11818 (fold_builtin_cpu): Ditto.
11819 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11820 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11821 * config/i386/i386.h (processor_type): Ditto.
11822 * doc/invoke.texi: Ditto.
11824 2018-03-14 Jakub Jelinek <jakub@redhat.com>
11827 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11828 INTEGER_CST offset, add it together with bitpos / 8 and
11829 sign extend based on POINTER_SIZE.
11833 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
11836 * config/i386/constraints.md (Yc): New register constraint.
11837 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11838 Use Yc constraint for alternative 2 of operand 0. Remove
11839 preferred_for_speed attribute.
11841 2018-03-14 Richard Biener <rguenther@suse.de>
11843 PR tree-optimization/84830
11844 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11845 with the old one to avoid oscillations.
11847 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
11850 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11852 (assign_by_spills): Return a flag of reload assignment failure.
11853 Do not process the reload assignment failures. Do not spill other
11854 reload pseudos if they has the same reg class. Update n if
11856 (lra_assign): Add a return arg. Set up from the result of
11857 assign_by_spills call.
11858 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11859 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11860 usage_insns if it is not NULL.
11861 (spill_hard_reg_in_range): New function.
11862 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11863 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11864 function prototypes.
11865 (lra_assign): Change prototype.
11866 * lra.c (lra): Add code to deal with fails by splitting hard reg
11869 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
11871 * config/riscv/riscv.opt (mrelax): New option.
11872 * config/riscv/riscv.c (riscv_file_start): Emit ".option
11873 "norelax" when riscv_mrelax is disabled.
11874 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11876 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11879 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11880 reassociation for int modes.
11882 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11884 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11885 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11887 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11888 * config/aarch64/aarch64-sve.md
11889 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11890 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11891 (*extend<mode><Vwide>2): Rename to...
11892 (aarch64_sve_extend<mode><Vwide>2): ...this.
11893 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11894 renaming the old pattern to...
11895 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
11897 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11898 define_expand, renaming the old pattern to...
11899 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11900 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11901 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11902 account when deciding which SVE instruction the optab should use.
11903 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11905 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11907 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11908 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11909 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11910 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11911 (tlsdesc_small_<mode>): Turn a define_expand and use
11912 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
11913 (tlsdesc_small_advsimd_<mode>): ...this.
11914 (tlsdesc_small_sve_<mode>): New pattern.
11916 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11918 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11919 (UNSPEC_UMUL_HIGHPART): New constants.
11920 (MUL_HIGHPART): New int iteraor.
11921 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11922 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11924 (*<su>mul<mode>3_highpart): New define_insn.
11926 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11929 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11932 2018-03-13 Martin Liska <mliska@suse.cz>
11935 * (sem_item_optimizer::sem_item_optimizer): Initialize new
11937 (sem_item_optimizer::~sem_item_optimizer): Release it.
11938 (sem_item_optimizer::merge_classes): Register variable aliases.
11939 (sem_item_optimizer::fixup_pt_set): New function.
11940 (sem_item_optimizer::fixup_points_to_sets): Likewise.
11941 * ipa-icf.h: Declare new variables and functions.
11943 2018-03-13 Jakub Jelinek <jakub@redhat.com>
11945 PR middle-end/84834
11946 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11947 integer_pow2p@2 and test integer_pow2p in condition.
11948 (A < 0 ? C : 0): Similarly for @1.
11950 PR middle-end/84831
11951 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11952 characters starting at p contain '\0' character, don't look beyond
11956 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11957 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11960 * reg-stack.c (change_stack): Change update_end var from int to
11961 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11962 also call set_block_for_insn on the newly added insns and rescan.
11965 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11966 on the last operand.
11969 * tree.c (stabilize_reference_1): Return save_expr (e) for
11970 STATEMENT_LIST even if it doesn't have side-effects.
11972 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
11974 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11976 2018-03-12 Renlin Li <renlin.li@arm.com>
11978 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11979 aarch64_output_scalar_simd_mov_immediate.
11981 2018-03-12 Martin Sebor <msebor@redhat.com>
11983 PR tree-optimization/83456
11984 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11985 for perfectly overlapping calls to memcpy.
11986 (gimple_fold_builtin_memory_chk): Same.
11987 (gimple_fold_builtin_strcpy): Handle no-warning.
11988 (gimple_fold_builtin_stxcpy_chk): Same.
11989 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11991 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11993 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11994 parameter. Use it for SFmode.
11995 (rs6000_function_arg_advance_1): Adjust.
11996 (rs6000_function_arg): Adjust.
11997 (rs6000_gimplify_va_arg): Pass false for that new parameter.
11999 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12001 PR rtl-optimization/84169
12002 PR rtl-optimization/84780
12003 * combine.c (can_combine_p): Check for a 2-insn combination whether
12004 the destination register is used between the two insns, too.
12006 2018-03-12 Richard Biener <rguenther@suse.de>
12008 PR tree-optimization/84803
12009 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12010 for refs DR analysis didn't process.
12012 2018-03-12 Richard Biener <rguenther@suse.de>
12014 PR tree-optimization/84777
12015 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12016 force-vectorize loops ignore whether we are optimizing for size.
12018 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
12020 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12021 (TARGET_MD_ASM_ADJUST): Define.
12023 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
12024 Kito Cheng <kito.cheng@gmail.com>
12025 Chung-Ju Wu <jasonwucj@gmail.com>
12027 * config/nds32/nds32.c (nds32_compute_stack_frame,
12028 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12029 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12030 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12031 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12032 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12033 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12034 * config/nds32/nds32.md (prologue, epilogue): Use macro
12035 NDS32_V3PUSH_AVAILABLE_P to do checking.
12037 2018-03-11 Jakub Jelinek <jakub@redhat.com>
12040 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12041 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12042 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
12043 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
12044 addition of most attributes on !orig_type_die or the attribute not
12045 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12047 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12048 Chung-Ju Wu <jasonwucj@gmail.com>
12050 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12051 __NDS32_VH__ macro.
12052 * config/nds32/nds32.opt (mvh): New option.
12054 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12055 Chung-Ju Wu <jasonwucj@gmail.com>
12057 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12059 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12060 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12063 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12064 Chung-Ju Wu <jasonwucj@gmail.com>
12066 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12068 * config/nds32/nds32-multiple.md (strlensi): New pattern.
12069 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12071 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
12072 Kito Cheng <kito.cheng@gmail.com>
12073 Chung-Ju Wu <jasonwucj@gmail.com>
12075 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12076 UNSPEC_FFMISM and UNSPEC_FLMISM.
12077 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12078 for ffb, ffmism and flmism.
12079 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12080 (unspec_ffmism): Ditto.
12081 (unspec_flmism): Ditto.
12082 (nds32_expand_builtin_impl): Check if string extension is available.
12083 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12084 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12086 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
12089 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12092 * lra-assigns.c (assign_by_spills): Return a flag of reload
12093 assignment failure. Do not process the reload assignment
12094 failures. Do not spill other reload pseudos if they has the same
12096 (lra_assign): Add a return arg. Set up from the result of
12097 assign_by_spills call.
12098 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12099 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12100 usage_insns if it is not NULL.
12101 (spill_hard_reg_in_range): New function.
12102 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12103 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12104 function prototypes.
12105 (lra_assign): Change prototype.
12106 * lra.c (lra): Add code to deal with fails by splitting hard reg
12109 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
12112 * config/i386/i386.opt: Replace Enforcment with Enforcement.
12114 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
12117 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12118 (dw_val_node): Add val_symbolic_view.
12119 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12120 (symview_upper_bound): New.
12121 (new_line_info_table): Initialize symviews_since_reset.
12122 (dwarf2out_source_line): Count symviews_since_reset and set
12123 symview_upper_bound.
12124 (dw_val_equal_p): Handle symview.
12125 (add_AT_symview): New.
12126 (print_dw_val): Handle symview.
12127 (attr_checksum, attr_checksum_ordered): Likewise.
12128 (same_dw_val_p, size_of_die): Likewise.
12129 (value_format, output_die): Likewise.
12130 (add_high_low_attributes): Use add_AT_symview for entry_view.
12131 (dwarf2out_finish): Reset symview_upper_bound, clear
12134 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
12137 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12138 Add strict argument and use it.
12139 (rs6000_split_multireg_move): Update for new strict argument.
12140 (mem_operand_gpr): Disallow all non-offsettable addresses.
12141 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12143 2018-03-09 Jakub Jelinek <jakub@redhat.com>
12146 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12147 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12148 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12151 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12152 decl, use remap_type if we want to use the type.
12154 2018-03-09 Martin Sebor <msebor@redhat.com>
12156 PR tree-optimization/84526
12157 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12159 (builtin_access::generic_overlap): Be prepared to handle non-array
12162 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
12164 PR rtl-optimization/84682
12165 * lra-constraints.c (process_address_1): Check is_address flag
12166 for address constraints.
12167 (process_alt_operands): Likewise.
12168 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12169 preprocess_constraints.
12170 * recog.h (preprocess_constraints): Add oploc parameter.
12172 * recog.c (preprocess_constraints): Test address_operand for
12173 CT_ADDRESS constraints.
12175 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12178 * lra-assigns.c (assign_by_spills): Return a flag of reload
12179 assignment failure. Do not process the reload assignment
12180 failures. Do not spill other reload pseudos if they has the same
12182 (lra_assign): Add a return arg. Set up from the result of
12183 assign_by_spills call.
12184 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12185 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12186 usage_insns if it is not NULL.
12187 (spill_hard_reg_in_range): New function.
12188 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12189 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12190 function prototypes.
12191 (lra_assign): Change prototype.
12192 * lra.c (lra): Add code to deal with fails by splitting hard reg
12195 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12198 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12199 Accept complain bool parameter. Only emit errors if it is true.
12200 (arm_parse_cpu_option_name): Likewise.
12201 (arm_target_thumb_only): Adjust callers of the above.
12202 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12203 prototype to take a default true bool parameter.
12204 (arm_parse_arch_option_name): Likewise.
12206 2018-03-09 David Malcolm <dmalcolm@redhat.com>
12207 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12211 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12212 * configure: Regenerate.
12213 * configure.ac ("linker --version-script option"): New.
12214 ("linker soname option"): New.
12216 2018-03-09 Richard Biener <rguenther@suse.de>
12218 PR tree-optimization/84775
12219 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12220 immediate uses of predicate stmts and mark them modified.
12223 PR tree-optimization/84178
12224 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12226 (version_loop_for_if_conversion): Delay update_ssa call.
12227 (tree_if_conversion): Delay update_ssa until after predicate
12230 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
12233 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12234 when the function accesses prior frames.
12236 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12239 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12240 gen_llsym, otherwise call maybe_gen_llsym.
12242 PR inline-asm/84742
12243 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12244 has ',' character inside of it.
12246 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12249 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12250 as clobbering CC_REGNUM.
12252 2018-03-08 Richard Biener <rguenther@suse.de>
12254 PR middle-end/84552
12255 * tree-scalar-evolution.c: Include tree-into-ssa.h.
12256 (follow_copies_to_constant): Do not follow SSA names registered
12259 2018-03-08 Richard Biener <rguenther@suse.de>
12261 PR tree-optimization/84178
12262 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12264 (version_loop_for_if_conversion): Delay update_ssa call.
12265 (tree_if_conversion): Delay update_ssa until after predicate
12268 2018-03-08 David Malcolm <dmalcolm@redhat.com>
12270 PR tree-optimization/84178
12271 * tree-if-conv.c (release_bb_predicate): Remove the
12272 the assertion that the stmts have NULL use_ops.
12273 Discard the statements, asserting that they haven't
12274 yet been added to a BB.
12276 2018-03-08 Richard Biener <rguenther@suse.de>
12278 PR tree-optimization/84746
12279 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12280 (phi_translate): Pass in destination ANTIC_OUT set.
12281 (phi_translate_1): Likewise. For a simplified result lookup
12282 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12283 (phi_translate_set): Adjust.
12284 (do_pre_regular_insertion): Likewise.
12285 (do_pre_partial_partial_insertion): Likewise.
12287 2018-03-08 Martin Liska <mliska@suse.cz>
12289 PR gcov-profile/84735
12290 * doc/gcov.texi: Document usage of profile files.
12291 * gcov-io.h: Document changes in the format.
12293 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
12297 * dwarf2out.c (struct dw_line_info_table): Update comments for
12299 (FORCE_RESET_NEXT_VIEW): New.
12300 (FORCE_RESETTING_VIEW_P): New.
12301 (RESETTING_VIEW_P): Check for -1 too.
12302 (ZERO_VIEW_P): Likewise.
12303 (new_line_info_table): Force-reset next view.
12304 (dwarf2out_begin_function): Likewise.
12305 (dwarf2out_source_line): Simplify zero_view_p initialization.
12306 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12307 view directly. Omit view when omitting .loc at line 0.
12309 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12311 PR tree-optimization/84740
12312 * tree-switch-conversion.c (process_switch): Call build_constructors
12313 only if info.phi_count is non-zero.
12315 PR tree-optimization/84739
12316 * tree-tailcall.c (find_tail_calls): Check call arguments against
12317 DECL_ARGUMENTS (current_function_decl) rather than
12318 DECL_ARGUMENTS (func) when checking for tail recursion.
12320 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12322 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12323 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12324 Volker Reichelt's entry and add entries for people that perform
12325 GCC fuzzy testing and report numerous bugs.
12327 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
12330 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12331 readonly data in sdata, if that is disabled.
12332 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12333 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12334 -mreadonly-in-sdata option.
12336 2018-03-07 Martin Sebor <msebor@redhat.com>
12338 PR tree-optimization/84468
12339 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12340 basic block when looking for nul assignment.
12342 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
12345 * except.h (output_function_exception_table): Adjust prototype.
12346 * except.c (output_function_exception_table): Remove FNNAME parameter
12347 and add SECTION parameter. Ouput one part of the table at a time.
12348 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12349 the first part of the exception table and emit unwind directives.
12350 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12351 (i386_pe_seh_cold_init): Likewise.
12352 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12353 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12354 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12355 (ix86_output_call_insn): Emit a nop in one more case for SEH.
12356 * config/i386/winnt.c: Include except.h.
12357 (struct seh_frame_state): Add reg_offset, after_prologue and
12358 in_cold_section fields.
12359 (i386_pe_seh_end_prologue): Set seh->after_prologue.
12360 (i386_pe_seh_cold_init): New function.
12361 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12362 to seh->in_cold_section.
12363 (seh_emit_push): Record the offset of the push.
12364 (seh_emit_save): Record the offet of the save.
12365 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12366 Test seh->after_prologue to disregard the epilogue.
12367 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12368 (i386_pe_end_cold_function): New function.
12370 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12373 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12374 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12377 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12379 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12380 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12382 PR middle-end/84723
12383 * multiple_target.c: Include tree-inline.h and intl.h.
12384 (expand_target_clones): Diagnose and fail if node->definition and
12385 !tree_versionable_function_p (node->decl).
12387 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
12389 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12391 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12392 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12393 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12395 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12398 * combine.c (try_combine): Use reg_or_subregno instead of handling
12399 just paradoxical SUBREGs and REGs.
12401 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
12403 * config/arc/arc.c (arc_finalize_pic): Remove function.
12404 (arc_must_save_register): We use single base PIC register, remove
12405 checks to save/restore the PIC register.
12406 (arc_expand_prologue): Likewise.
12407 * config/arc/arc-protos.h (arc_set_default_type_attributes):
12409 (arc_verify_short): Likewise.
12410 (arc_attr_type): Likewise.
12411 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12412 (walk_stores): Likewise.
12413 (arc_address_cost): Make it static.
12414 (arc_verify_short): Likewise.
12415 (branch_dest): Likewise.
12416 (arc_attr_type): Likewise.
12417 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12418 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12419 (arc_final_prescan_insn): Remove inserting the nops due to
12420 hardware hazards. It is done in reorg step.
12421 (insn_length_variant_t): Remove.
12422 (insn_length_parameters_t): Likewise.
12423 (arc_insn_length_parameters): Likewise.
12424 (arc_get_insn_variants): Likewise.
12425 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12427 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12429 PR inline-asm/84683
12430 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12433 PR tree-optimization/84687
12434 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12436 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12438 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12440 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12441 Rename to ppc_speculation_barrier.
12442 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12443 __builtin_ppc_speculation_barrier.
12445 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12448 * combine.c (combine_simplify_rtx): Don't try to simplify if
12449 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12452 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
12454 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12455 to 32 bytes when compiling for POWER9.
12457 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12460 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12461 regparm >= 3 with no arg reg available also for calls with
12462 flag_force_indirect_call. Pass decl to ix86_function_regparm.
12465 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12467 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
12469 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
12472 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12474 2018-03-05 Richard Biener <rguenther@suse.de>
12476 PR tree-optimization/84486
12477 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12478 When inserting a __builtin_assume_aligned call set the LHS
12479 SSA name alignment info accordingly.
12481 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
12483 PR tree-optimization/84114
12484 * config/aarch64/aarch64.c (aarch64_reassociation_width)
12485 Avoid reassociation of FLOAT_MODE addition.
12487 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
12489 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12490 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12491 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12492 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12493 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12494 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12495 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12497 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12498 __builtin_ia32_wbinvd): New builtins.
12499 (SPECIAL_ARGS2): New.
12500 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12501 (SPECIAL_ARGS2): New.
12502 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12503 (ix86_valid_target_attribute_inner_p): Ditto.
12504 (ix86_init_mmx_sse_builtins): Add special_args2.
12505 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12506 TARGET_WBNOINVD_P): New.
12507 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12508 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12509 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12510 * config/i386/immintrin.h (_wbinvd): New intrinsic.
12511 * config/i386/pconfigintrin.h: New file.
12512 * config/i386/wbnoinvdintrin.h: Ditto.
12513 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12515 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12517 2018-03-05 Richard Biener <rguenther@suse.de>
12519 PR tree-optimization/84670
12520 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12522 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12523 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12524 (compute_antic_aux): Only assert the number of values in ANTIC_IN
12525 doesn't grow if all successors (recursively) were visited at least
12528 2018-03-05 Richard Biener <rguenther@suse.de>
12530 PR tree-optimization/84650
12531 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12532 if executed in the loop pipeline.
12534 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
12536 * doc/configfiles.texi (Configuration Files): Move info about
12537 conditionalizing $target-protos.h to...
12538 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
12539 differs from $target-protos.h.
12541 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
12542 Chung-Ju Wu <jasonwucj@gmail.com>
12544 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12545 * config/nds32/nds32-multiple.md (setmemsi): Define.
12546 * config/nds32/nds32-memory-manipulation.c
12547 (nds32_gen_dup_4_byte_to_word_value): New.
12548 (emit_setmem_word_loop): New.
12549 (emit_setmem_byte_loop): New.
12550 (nds32_expand_setmem_loop): New.
12551 (nds32_expand_setmem_loop_v3m): New.
12552 (nds32_expand_setmem_unroll): New.
12553 (nds32_expand_setmem): New.
12555 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12556 Chung-Ju Wu <jasonwucj@gmail.com>
12558 * config/nds32/nds32-memory-manipulation.c
12559 (nds32_emit_load_store): New.
12560 (nds32_emit_post_inc_load_store): New.
12561 (nds32_emit_mem_move): New.
12562 (nds32_emit_mem_move_block): New.
12563 (nds32_expand_movmemsi_loop_unknown_size): New.
12564 (nds32_expand_movmemsi_loop_known_size): New.
12565 (nds32_expand_movmemsi_loop): New.
12566 (nds32_expand_movmemsi_unroll): New.
12567 (nds32_expand_movmemqi): Rename ...
12568 (nds32_expand_movmemsi): ... to this.
12569 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12570 (movmemsi): ... to this.
12571 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12572 (nds32_expand_movmemsi): ... to this.
12574 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12575 Monk Chiang <sh.chiang04@gmail.com>
12576 Chung-Ju Wu <jasonwucj@gmail.com>
12578 * config/nds32/nds32-protos.h
12579 (nds32_expand_load_multiple): New arguments.
12580 (nds32_expand_store_multiple): Ditto.
12581 (nds32_valid_multiple_load_store): Rename ...
12582 (nds32_valid_multiple_load_store_p): ... to this.
12583 * config/nds32/nds32-memory-manipulation.c
12584 (nds32_expand_load_multiple): Refine implementation.
12585 (nds32_expand_store_multiple): Ditto.
12586 * config/nds32/nds32-multiple.md
12587 (load_multiple): Update nds32_expand_load_multiple interface.
12588 (store_multiple): Update nds32_expand_store_multiple interface.
12589 * config/nds32/nds32-predicates.c
12590 (nds32_valid_multiple_load_store): Rename ...
12591 (nds32_valid_multiple_load_store_p): ... to this and refine
12593 * config/nds32/predicates.md
12594 (nds32_load_multiple_and_update_address_operation): New predicate.
12595 (nds32_store_multiple_and_update_address_operation): New predicate.
12597 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12598 Chung-Ju Wu <jasonwucj@gmail.com>
12600 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12601 (combo): New attribute.
12602 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12604 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
12606 * config/nds32/nds32.opt: Change -mcmodel= default value.
12608 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
12609 Monk Chiang <sh.chiang04@gmail.com>
12610 Chung-Ju Wu <jasonwucj@gmail.com>
12612 * config/nds32/constants.md (unspec_element): New enum.
12613 * config/nds32/constraints.md (Umw): New constraint.
12614 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12615 * config/nds32/nds32-intrinsic.md: Likewise.
12616 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12617 (nds32_valid_smw_lwm_base_p): New.
12618 (nds32_output_smw_single_word): New.
12619 (nds32_output_lmw_single_word): New.
12620 (nds32_expand_unaligned_load): New.
12621 (nds32_expand_unaligned_store): New.
12622 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12623 (nds32_output_smw_single_word): Declare.
12624 (nds32_output_lmw_single_word): Declare.
12625 (nds32_expand_unaligned_load): Declare.
12626 (nds32_expand_unaligned_store): Declare.
12627 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12628 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12629 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12630 NDS32_BUILTIN_UASTORE_DW.
12631 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12634 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
12635 Kito Cheng <kito.cheng@gmail.com>
12636 Chung-Ju Wu <jasonwucj@gmail.com>
12638 * config/nds32/nds32-intrinsic.c
12639 (nds32_expand_builtin_null_ftype_reg): Delete.
12640 (nds32_expand_builtin_reg_ftype_imm): Ditto.
12641 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12642 (nds32_read_argument): New.
12643 (nds32_legitimize_target): Ditto.
12644 (nds32_legitimize_argument): Ditto.
12645 (nds32_check_constant_argument): Ditto.
12646 (nds32_expand_unop_builtin): Ditto.
12647 (nds32_expand_unopimm_builtin): Ditto.
12648 (nds32_expand_binop_builtin): Ditto.
12649 (nds32_builtin_decl_impl): Ditto.
12650 (builtin_description): Ditto.
12651 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12652 (nds32_init_builtins_impl): Ditto.
12653 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12654 (nds32_builtin_decl): New.
12655 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12656 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12658 2018-03-02 Jeff Law <law@redhat.com>
12660 * reorg.c (stop_search_p): Handle DEBUG_INSN.
12661 (redundant_insn, fill_simple_delay_slots): Likewise.
12662 (fill_slots_from_thread): Likewise.
12663 * resource.c (mark_referenced_resources): Likewise.
12664 (mark_set_resources, find_dead_or_set_registers): Likewise.
12666 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12668 * substring-locations.h (format_warning_va): Formatting fix for
12669 ATTRIBUTE_GCC_DIAG.
12670 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12672 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12673 * substring-locations.c: Include intl.h.
12674 (format_warning_va): Turned into small wrapper around
12675 format_warning_n_va, renamed to ...
12676 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12677 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12679 (format_warning_at_substring_n): New function.
12680 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12681 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
12682 format_warning_at_substring with just a shorter name instead of
12683 const function pointer.
12684 (fmtwarn_n): New function.
12685 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12686 appropriate, get rid of all the fmtstr temporaries, move conditionals
12687 with G_() wrapped string literals directly into fmtwarn arguments,
12688 cast dir.len to (int), formatting fixes.
12690 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
12692 * doc/invoke.texi: Remove "Cilk Plus" references.
12694 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12695 Richard Biener <rguenther@suse.de>
12698 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12699 for error or warning attributes if CALL_FROM_THUNK_P is set.
12702 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12705 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12706 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12709 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12710 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12712 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12713 instead of -1U in last predictors element's probability member.
12715 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12718 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12719 arguments if they are comparable.
12721 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12723 PR tree-optimization/84634
12724 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12725 masks and masked_loop_p with a single loop_masks, making sure it's
12726 null for bb vectorization.
12728 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12730 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12731 (vect_analyze_data_ref_access): Use loop->safe_len rather than
12732 loop->force_vectorize to check whether there is no alias.
12734 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12737 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12739 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12741 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12742 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12743 instead of a loop around prev_real_insn.
12744 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12747 PR inline-asm/84625
12748 * config/i386/i386.c (ix86_print_operand): Use conditional
12749 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12752 2018-03-02 Richard Biener <rguenther@suse.de>
12754 PR tree-optimization/84427
12755 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12756 (bitmap_set_subtract_values): Rewrite to handle multiple
12759 (prune_clobbered_mems): Likewise.
12760 (phi_translate): Take edge instead of pred/phiblock.
12761 (phi_translate_1): Likewise.
12762 (phi_translate_set): Likewise. Insert all translated
12763 exprs for a value into the set, keeping possibly multiple
12764 expressions per value.
12765 (compute_antic_aux): Adjust for phi_translate changes.
12766 When intersecting union the expressions and prune those
12767 not in the final value set, keeping possibly multiple
12768 expressions per value. Do not use value-insertion
12769 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12770 all expressions. Add verification that the value-sets
12771 only shrink during iteration.
12772 (compute_partial_antic_aux): Adjust for the phi_translate changes.
12773 (do_pre_regular_insertion): Likewise.
12774 (do_pre_partial_partial_insertion): Likewise.
12776 2018-03-02 Richard Biener <rguenther@suse.de>
12779 * config/darwin.c (saved_debug_info_level): New static global.
12780 (darwin_asm_lto_start): Disable debug info generation for LTO out.
12781 (darwin_asm_lto_end): Restore debug info generation settings.
12783 2018-03-01 Martin Liska <mliska@suse.cz>
12786 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12787 volatile arguments.
12789 2018-03-01 Richard Biener <rguenther@suse.de>
12792 * dwarf2out.c (gen_variable_die): Properly handle late VLA
12793 type annotation with LTO when debug was disabled at compile-time.
12795 2018-03-01 Matthew Fortune <mfortune@gmail.com>
12797 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12799 (mips_final_postscan_insn): Likewise.
12801 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
12803 PR rtl-optimization/84528
12804 * alias.c (init_alias_target): Add commentary.
12805 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12806 a unique base value if the frame pointer is not eliminated
12807 to the stack pointer.
12809 2018-03-01 Tom de Vries <tom@codesourcery.com>
12811 PR rtl-optimization/83327
12812 * lra-int.h (hard_regs_spilled_into): Declare.
12813 * lra.c (hard_regs_spilled_into): Define.
12814 (init_reg_info): Init hard_regs_spilled_into.
12815 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12816 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12817 (process_bb_lives): Handle hard_regs_spilled_into.
12818 (lra_create_live_ranges_1): Before doing liveness propagation, clear
12819 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12821 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
12823 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12824 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12825 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12826 * config/rs6000/aix72.h: New file.
12828 2018-02-28 Jakub Jelinek <jakub@redhat.com>
12830 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12831 instead of warning_at with conditional singular and plural messages
12835 * stor-layout.c (update_alignment_for_field): For
12836 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12837 && !DECL_PACKED (field), do the alignment update, just use
12838 only desired_align instead of MAX (type_align, desired_align)
12840 (place_field): Don't do known_align < desired_align handling
12841 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12842 is non-NULL, instead do it after rli->prev_field handling and
12843 only if not within a bitfield word. For DECL_PACKED (field)
12844 use type_align of BITS_PER_UNIT.
12846 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
12848 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12849 superfluous parentheses and trailing spaces.
12851 2018-02-28 Richard Biener <rguenther@suse.de>
12853 PR tree-optimization/84584
12854 * graphite-scop-detection.c (scop_detection::add_scop): Discard
12855 SCoPs with fake exit edge.
12857 2018-02-28 Martin Liska <mliska@suse.cz>
12860 * timevar.c (timer::print): Fix format to properly print 100%
12863 2018-02-28 Richard Biener <rguenther@suse.de>
12865 PR middle-end/84607
12866 * genmatch.c (capture_info::walk_match): Do not mark
12867 captured expressions without operands as expr_p given
12868 they act more like predicates and should be subject to
12869 "lost tail" side-effect preserving.
12871 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
12873 PR rtl-optimization/81611
12874 * auto-inc-dec.c (attempt_change): Move dead note from
12875 mem_insn if it's the next use of regno
12876 (find_address): Take address use of reg holding
12877 non-incremented value. Add parm to limit search to the named
12879 (merge_in_block): Attempt to use a mem insn that is the next
12880 use of the original regno.
12882 2018-02-27 Martin Sebor <msebor@redhat.com>
12885 * doc/invoke.texi (-Wmissing-attributes): New option.
12886 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
12888 2018-02-27 Martin Sebor <msebor@redhat.com>
12890 PR translation/84207
12891 * diagnostic-core.h (warning_n, error_n, inform_n): Change
12892 n argument to unsigned HOST_WIDE_INT.
12893 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12894 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
12895 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12896 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12898 2018-02-27 Richard Biener <rguenther@suse.de>
12900 PR tree-optimization/84512
12901 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12902 Do not use the estimate returned from record_stmt_cost for
12903 the scalar iteration cost but sum properly using add_stmt_cost.
12905 2018-02-27 Richard Biener <rguenther@suse.de>
12907 PR tree-optimization/84466
12908 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12909 Adjust last change to less strictly validate use operands.
12911 2018-02-27 Martin Liska <mliska@suse.cz>
12913 PR gcov-profile/84548
12914 * gcov.c (process_file): Allow partial overlap and consider it
12915 also as group functions.
12916 (output_lines): Properly calculate range of lines for a group.
12918 2018-02-27 Martin Liska <mliska@suse.cz>
12920 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12921 'ggc' suffixes. Change first column width.
12922 (timer::print): Fix formatting of the column.
12924 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
12926 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12927 preserve inline entry blocks for the sake of debug inline
12928 entry point markers alone.
12929 (remove_unused_locals): Suggest in comments a better place to
12930 force the preservation of inline entry blocks that are
12931 otherwise unused, but do not preserve them.
12933 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12935 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12937 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12940 * config/i386/constraints.md (Bs): Replace
12941 ix86_indirect_branch_register with
12942 TARGET_INDIRECT_BRANCH_REGISTER.
12944 * config/i386/i386.md (indirect_jump): Likewise.
12945 (tablejump): Likewise.
12946 (*sibcall_memory): Likewise.
12947 (*sibcall_value_memory): Likewise.
12948 Peepholes of indirect call and jump via memory: Likewise.
12949 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12950 (*sibcall_value_GOT_32): Likewise.
12951 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12952 (GOT_memory_operand): Likewise.
12953 (call_insn_operand): Likewise.
12954 (sibcall_insn_operand): Likewise.
12955 (GOT32_symbol_operand): Likewise.
12956 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12958 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12960 PR rtl-optimization/83496
12961 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12962 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
12963 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12964 redundant insn, if any.
12965 (relax_delay_slots): Likewise.
12966 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12968 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
12970 PR tree-optimization/83965
12971 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12972 that grouped statements are part of a reduction chain. Return
12973 true if the statement is not marked as a reduction itself but
12974 is part of a group.
12975 (vect_recog_dot_prod_pattern): Don't check whether the statement
12976 is part of a group here.
12977 (vect_recog_sad_pattern): Likewise.
12978 (vect_recog_widen_sum_pattern): Likewise.
12980 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12983 * final.c (rest_of_clean_state): Also look for calls inside sequences.
12985 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12988 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12990 (ix86_output_indirect_function_return): New prototype.
12991 (ix86_split_simple_return_pop_internal): Likewise.
12992 * config/i386/i386.c (indirect_return_via_cx): New.
12993 (indirect_return_via_cx_bnd): Likewise.
12994 (indirect_thunk_name): Handle return va CX_REG.
12995 (output_indirect_thunk_function): Create alias for
12996 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12997 (ix86_output_indirect_jmp): Remove the bool argument.
12998 (ix86_output_indirect_function_return): New function.
12999 (ix86_split_simple_return_pop_internal): Likewise.
13000 * config/i386/i386.md (*indirect_jump): Don't pass false
13001 to ix86_output_indirect_jmp.
13002 (*tablejump_1): Likewise.
13003 (simple_return_pop_internal): Change it to define_insn_and_split.
13004 Call ix86_split_simple_return_pop_internal to split it for
13005 -mfunction-return=.
13006 (simple_return_indirect_internal): Call
13007 ix86_output_indirect_function_return instead of
13008 ix86_output_indirect_jmp.
13010 2018-02-26 Jakub Jelinek <jakub@redhat.com>
13013 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13014 memset and value initialization afterwards.
13016 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
13018 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13020 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13023 * common/config/aarch64/aarch64-common.c
13024 (aarch_option_optimization_table[]): Switch
13025 off fomit-frame-pointer
13027 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13028 Chung-Ju Wu <jasonwucj@gmail.com>
13030 * config/nds32/nds32-multiple.md (load_multiple): Disallow
13032 (store_multiple): Ditto.
13034 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13036 * config.gcc: Add --with-cpu support for nds32 target.
13037 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13038 * config/nds32/nds32.opt: Add -mcpu= option.
13040 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
13042 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13043 isel=yes): Warn for these deprecated options.
13045 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
13047 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13048 ISA_2_5_MASKS_EMBEDDED.
13050 2018-02-23 Jakub Jelinek <jakub@redhat.com>
13052 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13053 p->max as pointers rather than using iterative_hash_expr.
13055 2018-02-23 Carl Love <cel@us.ibm.com>
13057 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13058 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13060 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13061 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13062 P8V_BUILTIN_VEC_VUNSIGNED2.
13064 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
13067 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13068 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13070 * lra-constraints.c (curr_insn_transform): Set up
13071 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
13073 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13074 * lra-eliminations.c (spill_pseudos): Ditto.
13075 (process_insn_for_elimination): Ditto.
13076 * lra-lives.c (reg_early_clobber_p): Use the new macros.
13077 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13078 LRA_NON_CLOBBERED_ALT.
13080 2018-02-22 Martin Sebor <msebor@redhat.com>
13082 PR tree-optimization/84480
13083 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13084 to maybe_diag_stxncpy_trunc. Call it.
13085 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13086 from gimple_fold_builtin_strcpy. Print inlining stack.
13087 (handle_builtin_stxncpy): Print inlining stack.
13088 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13090 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
13093 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13094 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13095 and -fcheck-pointer-bounds are used together.
13096 (indirect_thunk_prefix): New enum.
13097 (indirect_thunk_need_prefix): New function.
13098 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
13099 "_nt" instead of "_bnd" for NOTRACK prefix.
13100 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13101 (output_indirect_thunk_function): Likewise.
13103 (ix86_code_end): Update output_indirect_thunk_function calls.
13104 (ix86_output_indirect_branch_via_reg): Replace
13105 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13106 (ix86_output_indirect_branch_via_push): Likewise.
13107 (ix86_output_function_return): Likewise.
13108 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13109 incompatible with -fcf-protection=branch and
13110 -fcheck-pointer-bounds.
13112 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13115 * config/aarch64/aarch64.c (aarch64_print_address_internal):
13116 Change gcc_assert call to output_operand_lossage.
13118 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13120 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13122 2018-02-22 DJ Delorie <dj@redhat.com>
13123 Sebastian Perta <sebastian.perta@renesas.com>
13124 Oleg Endo <olegendo@gcc.gnu.org>
13126 * config/rx/rx.c (rx_rtx_costs): New function.
13127 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13129 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
13131 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13133 2018-02-22 Martin Liska <mliska@suse.cz>
13136 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13137 Add "native" as a possible value.
13139 2018-02-22 Martin Liska <mliska@suse.cz>
13142 * config/i386/i386.c (ix86_option_override_internal):
13143 Add "native" as a possible value for -march and -mtune.
13145 2018-02-22 Jakub Jelinek <jakub@redhat.com>
13148 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13149 to all type variants.
13151 PR tree-optimization/84503
13152 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13153 width as info->bitpos + info->bitsize - start.
13154 (merged_store_group::merge_overlapping): Simplify width computation.
13155 (check_no_overlap): New function.
13156 (imm_store_chain_info::try_coalesce_bswap): Compute expected
13157 start + width and last_order of the group, fail if check_no_overlap
13159 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13160 to group if check_no_overlap fails.
13162 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13164 * config/rs6000/altivec.md: Delete contraint arguments to
13165 define_expand, define_split, and define_peephole2, and in
13166 define_insn_and_split if always unused.
13167 * config/rs6000/darwin.md: Ditto.
13168 * config/rs6000/dfp.md: Ditto.
13169 * config/rs6000/rs6000.md: Ditto.
13170 * config/rs6000/sync.md: Ditto.
13171 * config/rs6000/vector.md: Ditto.
13172 * config/rs6000/vsx.md: Ditto.
13174 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13176 * config/rs6000/altivec.md: Write output control strings as braced
13177 blocks instead of double-quoted strings.
13178 * config/rs6000/darwin.md: Ditto.
13179 * config/rs6000/rs6000.md: Ditto.
13180 * config/rs6000/vector.md: Ditto.
13181 * config/rs6000/vsx.md: Ditto.
13183 2018-02-21 Jason Merrill <jason@redhat.com>
13185 PR c++/84314 - ICE with templates and fastcall attribute.
13186 * attribs.c (build_type_attribute_qual_variant): Remove assert.
13188 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13190 * ipa-cp.c (determine_versionability): Fix comment typos.
13192 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13195 * ipa-cp.c (determine_versionability): Do not version functions caling
13198 2018-02-21 Martin Liska <mliska@suse.cz>
13201 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13202 Add "native" as a possible value.
13203 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
13204 the macro when native cpu detection is available.
13206 2018-02-21 Martin Liska <mliska@suse.cz>
13209 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13210 Add "native" as a possible value.
13211 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13212 when native cpu detection is available.
13214 2018-02-21 Jakub Jelinek <jakub@redhat.com>
13215 Martin Sebor <msebor@redhat.com>
13217 PR tree-optimization/84478
13218 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13220 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13221 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13222 support which is conservatively correct, for 2 only stay conservative
13223 for maxlen. Formatting and comment capitalization fixes. Add STRICT
13224 argument to the 2 argument get_range_strlen, adjust 6 arg
13225 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13227 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13228 (gimple_fold_builtin_strlen): Pass true as last argument to
13231 2018-02-20 Martin Sebor <msebor@redhat.com>
13233 PR middle-end/84095
13234 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13235 (builtin_memref::set_base_and_offset): Same. Handle inner references.
13236 (builtin_memref::builtin_memref): Factor out parts into
13237 set_base_and_offset and call it.
13239 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13241 PR middle-end/84406
13242 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13243 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13244 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
13245 search at the associated MODE_INT.
13247 2018-02-20 Jeff Law <law@redhat.com>
13249 PR middle-end/82123
13250 PR tree-optimization/81592
13251 PR middle-end/79257
13252 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13253 for range data rather than using global data.
13254 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13255 range data rather than using global data.
13256 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13257 pass it to children as needed.
13258 (struct directive::fmtresult): Similarly.
13259 (struct directive::set_width): Similarly.
13260 (struct directive::set_precision): Similarly.
13261 (format_integer, format_directive, parse_directive): Similarly.
13262 (format_none): Accept unnamed vr_values parameter.
13263 (format_percent, format_floating, format_character): Similarly.
13264 (format_string, format_plain): Similarly.
13265 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13266 the EVRP range analyzer for range data rather than using global data.
13267 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13268 gimple-ssa-evrp-analyze.h
13269 (class sprintf_dom_walker): Add after_dom_children member function.
13270 Add evrp_range_analyzer member.
13271 (sprintf_dom_walker::before_dom_children): Call into the EVRP
13272 range analyzer as needed.
13273 (sprintf_dom_walker::after_dom_children): New member function.
13274 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13276 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13277 (evrp_range_analyzer::pop_to_marker): Likewise.
13279 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13281 PR tree-optimization/84419
13282 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13283 with the required type if its current type is compatible but
13286 2018-02-20 Jakub Jelinek <jakub@redhat.com>
13288 PR middle-end/82004
13289 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13290 after vectorization.
13292 2018-02-20 Martin Liska <mliska@suse.cz>
13295 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13296 possible values if we don't have a hint.
13298 2018-02-20 Martin Liska <mliska@suse.cz>
13302 * final.c (shorten_branches): Build align_tab array with one
13304 * opts.c (finish_options): Add alignment option limit check.
13305 (MAX_CODE_ALIGN): Likewise.
13306 (MAX_CODE_ALIGN_VALUE): Likewise.
13307 * doc/invoke.texi: Document maximum allowed option value for
13308 all -falign-* options.
13310 2018-02-19 Jakub Jelinek <jakub@redhat.com>
13313 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13314 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13315 * var-tracking.c (emit_note_insn_var_location): Remove all references
13316 to NOTE_INSN_CALL_ARG_LOCATION.
13317 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13318 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13319 Use copy_rtx_if_shared.
13320 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13321 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13322 (dwarf2out_var_location): Remove handling of
13323 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13325 * final.c (final_scan_insn): Remove all references to
13326 NOTE_INSN_CALL_ARG_LOCATION.
13327 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
13328 before dumping final insns.
13329 * except.c (emit_note_eh_region_end): Remove all references to
13330 NOTE_INSN_CALL_ARG_LOCATION.
13331 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13332 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13333 * config/arc/arc.c (hwloop_optimize): Likewise.
13334 * config/arm/arm.c (create_fix_barrier): Likewise.
13335 * config/s390/s390.c (s390_chunkify_start): Likewise.
13336 * config/sh/sh.c (find_barrier): Likewise.
13337 * config/i386/i386.c (rest_of_insert_endbranch,
13338 ix86_seh_fixup_eh_fallthru): Likewise.
13339 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13340 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13341 * config/frv/frv.c (frv_function_prologue): Likewise.
13342 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
13344 (note_outside_basic_block_p): Remove all references to
13345 NOTE_INSN_CALL_ARG_LOCATION.
13346 * gengtype.c (adjust_field_rtx_def): Likewise.
13347 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13349 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13350 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13353 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13356 PR tree-optimization/84452
13357 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13358 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13361 2018-02-19 Martin Liska <mliska@suse.cz>
13364 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13366 2018-02-19 Martin Liska <mliska@suse.cz>
13367 Richard Sandiford <richard.sandiford@linaro.org>
13369 PR tree-optimization/82491
13370 * gimple-fold.c (get_base_constructor): Make earlier bail out
13373 2018-02-19 Carl Love <cel@us.ibm.com>
13375 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13376 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13378 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13379 P8V_BUILTIN_VEC_NEG.
13381 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
13383 * config/rl78/rl78.md (movdf): New define expand.
13385 2018-02-19 Martin Liska <mliska@suse.cz>
13388 * doc/invoke.texi: Fix typo.
13389 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13391 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
13393 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13394 handle rs6000_single_float and rs6000_double_float specially for
13397 2018-02-16 Jeff Law <law@redhat.com>
13399 * config/rx/rx.c (add_pop_cfi_notes): New function.;
13400 (pop_regs): Use it.
13402 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13405 * ipa-inline.c (inline_small_functions): Fix a typo.
13407 2018-02-16 Nathan Sidwell <nathan@acm.org>
13409 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13411 2018-02-16 Carl Love <cel@us.ibm.com>
13413 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13414 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13415 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13416 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13417 expansion to P8V_BUILTIN_VEC_FLOAT2.
13419 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
13421 PR rtl-optimization/70023
13422 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13423 src_regno into account.
13425 2018-02-16 Carl Love <cel@us.ibm.com>
13427 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13428 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13429 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13430 * config/rs6000/rs6000.c: Remove case statements for
13431 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13432 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13433 and P9V_BUILTIN_VEC_VINSERT4B.
13434 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13435 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13436 * config/rs6000/vsx.md:
13437 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13440 2018-02-16 Carl Love <cel@us.ibm.com>
13442 * config/rs6000/altivec.h: Add builtin names vec_extract4b
13444 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13446 * config/rs6000/rs6000-c.c: Add the definitions for
13447 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13448 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13449 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13450 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
13451 definition for insert4b and define insn *insert3b_internal.
13452 * doc/extend.texi: Add documentation for vec_extract4b.
13454 2018-02-16 Nathan Sidwell <nathan@acm.org>
13456 * doc/extend.texi (Backwards Compatibility): Mention friend
13457 injection. Note for-scope is deprecated.
13458 * doc/invoke.texi (-ffriend-injection): Deprecate.
13460 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
13462 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13463 that moved to I2, also allow destinations that are a paradoxical
13464 subreg (instead of a normal reg).
13466 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
13469 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13472 2018-02-16 Richard Biener <rguenther@suse.de>
13474 PR tree-optimization/84037
13475 PR tree-optimization/84016
13477 * config/i386/i386.c (ix86_builtin_vectorization_cost):
13478 Adjust vec_construct for the fact we need additional higher latency
13479 128bit inserts for AVX256 and AVX512 vector builds.
13480 (ix86_add_stmt_cost): Scale vector construction cost for
13483 2018-02-16 Richard Biener <rguenther@suse.de>
13485 PR tree-optimization/84417
13486 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13487 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13488 (non_rewritable_lvalue_p): Likewise, use poly-ints.
13490 2018-02-16 Martin Liska <mliska@suse.cz>
13493 * internal-fn.def (ASAN_CHECK): Set proper flags.
13494 (ASAN_MARK): Likewise.
13496 2018-02-16 Julia Koval <julia.koval@intel.com>
13498 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13499 from PTA_CANNONLAKE.
13501 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13504 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13505 Use ++iter rather than iter++ for std::list iterators.
13506 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
13507 defer deleting them until all nodes in the forest are processed. Do
13508 free even leaf nodes. Change to_process into auto_vec.
13511 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13512 * vec.h (vec_default_construct): Use memset instead of placement new
13513 if BROKEN_VALUE_INITIALIZATION is defined.
13514 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13515 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13518 PR rtl-optimization/83723
13519 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13520 * lra.c (lra_substitute_pseudo): Likewise. If true, use
13521 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
13523 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13525 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13527 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
13529 PR rtl-optimization/81443
13530 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13531 from inner REGs to paradoxical SUBREGs.
13533 2018-02-16 Richard Biener <rguenther@suse.de>
13535 PR tree-optimization/84399
13536 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13537 For operands we can analyze at their definition make sure we can
13538 analyze them at each use as well.
13540 2018-02-16 Richard Biener <rguenther@suse.de>
13542 PR tree-optimization/84190
13543 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13544 volatile accesses if the decl isn't volatile.
13546 2018-02-15 Jason Merrill <jason@redhat.com>
13548 PR c++/84314 - ICE with templates and fastcall attribute.
13549 * attribs.c (build_type_attribute_qual_variant): Don't clobber
13550 TYPE_CANONICAL on an existing type.
13552 2018-02-15 Jakub Jelinek <jakub@redhat.com>
13554 PR tree-optimization/84383
13555 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13556 dstoff nor call operand_equal_p if dstbase is NULL.
13558 PR tree-optimization/84334
13559 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13560 also a CONSTANT_CLASS_P, punt.
13562 2018-02-14 Jim Wilson <jimw@sifive.com>
13564 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13565 first SMALL_OPERAND check. New local min_second_step. Move assert
13566 to where locals are set. Add TARGET_RVC support.
13567 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13569 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
13571 * doc/invoke.texi: Correct -Wformat-overflow code sample.
13573 2018-02-14 Martin Sebor <msebor@redhat.com>
13575 PR tree-optimization/83698
13576 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13577 arrays constrain the offset range to their bounds.
13578 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13579 (builtin_access::overlap): Avoid setting the size of overlap if it's
13581 (maybe_diag_overlap): Also consider arrays when deciding what values
13582 of offsets to include in diagnostics.
13584 2018-02-14 Martin Sebor <msebor@redhat.com>
13587 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13588 that correspond to the kind of a declaration.
13590 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
13593 * config/pa/pa.md: Load address of PIC label using the linkage table
13594 if the label is nonlocal.
13596 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
13598 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13599 warning message if user requests -maltivec=be.
13600 * doc/invoke.texi: Document deprecation of -maltivec=be.
13602 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
13605 * config/rs6000/rs6000-c.c: Update definitions for
13606 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13607 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13609 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13612 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13613 add _get_ssp intrinsics. Remove argument from
13614 __builtin_ia32_rdssp[d|q].
13615 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13616 * config/i386/i386-builtin.def: Remove argument from
13617 __builtin_ia32_rdssp[d|q].
13618 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13619 ix86_expand_special_args_builtin for _rdssp[d|q].
13620 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13621 Clear register before usage.
13622 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13623 Add documentation for new _get_ssp and _inc_ssp intrinsics.
13625 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
13627 PR tree-optimization/84357
13628 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13629 operand 1 of an ARRAY_REF too.
13631 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
13634 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13635 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13637 (set_of_reg): New struct.
13638 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13639 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13640 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13642 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13643 Split into bitclr, bitset, bitinvert patterns if appropriate.
13644 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13645 use rx_fuse_in_memory_bitop.
13646 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13647 to named insn, correct maximum insn length.
13649 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
13652 * machmode.def: Define a complex mode for PARTIAL_INT.
13653 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13655 * doc/rtl.texi: Document CSPImode.
13656 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13658 (msp430_hard_regno_nregs_with_padding): Likewise.
13660 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
13663 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13665 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
13667 PR rtl-optimization/84169
13668 * combine.c (try_combine): New variable split_i2i3. Set it to true if
13669 we generated a parallel as new i3 and we split that to new i2 and i3
13670 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
13671 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
13672 those to i2, not i1. Partially rewrite this scan code.
13674 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13677 * stor-layout.c (place_field): For variable length fields, adjust
13678 offset_align afterwards not just based on the field's alignment,
13679 but also on the size.
13681 PR middle-end/84309
13682 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13683 of exps and logs in the use_exp2 case.
13685 2018-02-13 Jeff Law <law@redhat.com>
13687 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13688 entry for "vector".
13690 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13693 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
13697 * common.opt (gas-loc-support, gas-locview-support): New.
13698 (ginline-points, ginternal-reset-location-views): New.
13699 * doc/invoke.texi: Document them. Use @itemx where intended.
13700 (gvariable-location-views): Adjust.
13701 * target.def (reset_location_view): New.
13702 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13703 (TARGET_RESET_LOCATION_VIEW): New.
13704 * doc/tm.texi: Rebuilt.
13705 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13706 (dwarf2out_default_as_locview_support): New.
13707 (output_asm_line_debug_info): Use option variables.
13708 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13709 (output_loc_list): Likewise.
13710 (add_high_low_attributes): Check option variables.
13711 Don't output entry view attribute in strict mode.
13712 (gen_inlined_subroutine_die): Check option variables.
13713 (dwarf2out_inline_entry): Likewise.
13714 (init_sections_and_labels): Likewise.
13715 (dwarf2out_early_finish): Likewise.
13716 (maybe_reset_location_view): New, from...
13717 (dwarf2out_var_location): ... here. Call it.
13718 * debug.h (dwarf2out_default_as_loc_support): Declare.
13719 (dwarf2out_default_as_locview_support): Declare.
13720 * hooks.c (hook_int_rtx_insn_0): New.
13721 * hooks.h (hook_int_rtx_insn_0): Declare.
13722 * toplev.c (process_options): Take -gas-loc-support and
13723 -gas-locview-support from dwarf2out. Enable
13724 -gvariable-location-views by default only with locview
13725 assembler support. Enable -ginternal-reset-location-views by
13726 default only if the target defines the corresponding hook.
13727 Enable -ginline-points by default if location views are
13728 enabled; force it disabled if statement frontiers are
13730 * tree-inline.c (expand_call_inline): Check option variables.
13731 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13733 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
13735 PR tree-optimization/84321
13736 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13737 handling. Also check whether the anti-range contains any values
13738 that satisfy the mask; switch to a VR_RANGE if not.
13740 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
13743 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13745 2018-02-13 Martin Jambor <mjambor@suse.cz>
13748 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13749 of call statements, also set location of a load to a temporary.
13751 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
13753 * config/rl78/rl78.c (add_vector_labels): New function.
13754 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13755 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13756 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13757 which checks that no arguments are passed.
13758 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13759 * doc/extend.texi: Documentation for the new attribute.
13761 2018-02-13 Andreas Schwab <schwab@suse.de>
13763 * config/riscv/linux.h (CPP_SPEC): Define.
13765 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13768 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13769 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13770 OPTION_MASK_ISA_AES as first argument to def_builtin_const
13771 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13772 instead of OPTION_MASK_ISA_PCLMUL as first argument to
13773 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13774 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13775 temporarily for AES and PCLMUL builtins.
13777 PR tree-optimization/84339
13778 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13779 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13782 PR middle-end/84309
13783 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13784 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13785 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13787 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13789 * omp-simd-clone.h: New file.
13790 * omp-simd-clone.c: Include omp-simd-clone.h.
13791 (expand_simd_clones): No longer static.
13792 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13793 cgraph.h and omp-simd-clone.h.
13794 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13795 (vect_recog_widen_shift_pattern): Formatting fix.
13796 (vect_pattern_recog_1): Don't check optab for calls.
13799 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13800 operands[2] into a REG before using gen_lowpart on it.
13802 2018-02-12 Jeff Law <law@redhat.com>
13805 * config/sh/sh.c (find_barrier): Consider a sibling call
13808 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13809 successfully back substituting a reg.
13811 2018-02-12 Richard Biener <rguenther@suse.de>
13813 PR tree-optimization/84037
13814 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13815 parameter, move visited init to caller.
13816 (vect_slp_analyze_operations): Separate cost from validity
13817 check, initialize visited once for all instances.
13818 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13820 * tree-vect-stmts.c (vect_model_simple_cost): Make early
13822 (vect_model_promotion_demotion_cost): Likewise.
13823 (vectorizable_bswap): Guard cost modeling with !slp_node
13824 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13826 (vectorizable_call): Likewise.
13827 (vectorizable_conversion): Likewise.
13828 (vectorizable_assignment): Likewise.
13829 (vectorizable_shift): Likewise.
13830 (vectorizable_operation): Likewise.
13831 (vectorizable_store): Likewise.
13832 (vectorizable_load): Likewise.
13833 (vectorizable_condition): Likewise.
13834 (vectorizable_comparison): Likewise.
13836 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
13839 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13840 (ASAN_MARK): Fix fnspec to account for return value, change pointer
13841 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13843 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13845 PR middle-end/83665
13846 * params.def (inline-min-speedup): Increase from 8 to 15.
13847 (max-inline-insns-auto): Decrease from 40 to 30.
13848 * ipa-split.c (consider_split): Add some buffer for function to
13849 be considered inlining candidate.
13850 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13853 2018-02-12 Richard Biener <rguenther@suse.de>
13855 PR tree-optimization/84037
13856 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13857 matched stmts if we cannot swap the non-matched ones.
13859 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13861 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13862 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13863 _mm_maskz_scalef_round_ss): New intrinsics.
13864 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13865 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13866 __builtin_ia32_scalefss_round): Remove.
13867 (__builtin_ia32_scalefsd_mask_round,
13868 __builtin_ia32_scalefss_mask_round): New intrinsics.
13869 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13870 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13871 ((match_operand:VF_128 2 "<round_nimm_predicate>"
13872 "<round_constraint>")): Changed to ...
13873 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13874 "<round_scalar_constraint>")): ... this.
13875 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13876 %0, %1, %2<round_op3>}"): Changed to ...
13877 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13878 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13879 %2<round_scalar_mask_op3>}"): ... this.
13880 * config/i386/subst.md (round_scalar_nimm_predicate): New.
13882 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13884 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13885 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13886 (_mm_maskz_sqrt_round_ss): New intrinsics.
13887 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13888 (__builtin_ia32_sqrtsd_mask_round)
13889 (__builtin_ia32_sqrtss_mask_round): New builtins.
13890 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13891 (__builtin_ia32_sqrtss_round): Remove.
13892 (__builtin_ia32_sqrtsd_mask_round)
13893 (__builtin_ia32_sqrtss_mask_round): New builtins.
13894 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13895 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13896 ((match_operand:VF_128 1 "vector_operand"
13897 "xBm,<round_constraint>")): Changed to ...
13898 ((match_operand:VF_128 1 "vector_operand"
13899 "xBm,<round_scalar_constraint>")): ... this.
13900 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13901 %0, %2, %<iptr>1<round_op3>}): Changed to ...
13902 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13903 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13904 %<iptr>1<round_scalar_mask_op3>}): ... this.
13905 ((set_attr "prefix" "<round_prefix>")): Changed to ...
13906 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13908 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
13911 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13912 Cast vec_cmpeq result to correct type.
13913 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13914 Cast vec_cmpgt result to correct type.
13916 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
13918 * final.c (final_scan_insn_1): Renamed from...
13919 (final_scan_insn): ... this. New wrapper, to recover
13920 seen from the outermost call in recursive ones.
13921 * config/sparc/sparc.c (output_return): Drop seen from call.
13922 (output_sibcall): Likewise.
13923 * config/visium/visium.c (output_branch): Likewise.
13925 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
13927 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13930 2018-02-10 Alan Modra <amodra@gmail.com>
13933 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13934 Specify LR as an input.
13936 2018-02-10 Jakub Jelinek <jakub@redhat.com>
13939 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13940 remove_member_access_dummy_vars): New functions.
13941 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13942 lower_omp_1, execute_lower_omp): Use them.
13944 PR rtl-optimization/84308
13945 * shrink-wrap.c (spread_components): Release todo vector.
13947 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
13949 PR rtl-optimization/57193
13950 * ira-color.c (struct allocno_color_data): Add member
13951 conflict_allocno_hard_prefs.
13952 (update_conflict_allocno_hard_prefs): New.
13953 (bucket_allocno_compare_func): Add a preference based on
13954 conflict_allocno_hard_prefs.
13955 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13956 (color_allocnos): Remove a dead code. Initiate
13957 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
13959 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13962 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13963 constraint from =wa to wa. Avoid a subreg on the output operand,
13964 instead use a pseudo and subreg it in a move.
13965 (p9_xxbrd_<mode>): Changed to ...
13966 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13967 (p9_xxbrd_v2df): New expander.
13968 (p9_xxbrw_<mode>): Changed to ...
13969 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13970 (p9_xxbrw_v4sf): New expander.
13972 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13974 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13976 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
13979 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13980 multiply in 32-bit mode.
13981 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13982 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13985 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13987 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13988 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13989 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13990 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13992 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
13995 * dwarf2out.c (is_trivial_indirect_ref): New function.
13996 (dwarf2out_late_global_decl): Do not generate a location
13997 attribute for variables that have a non-trivial DECL_VALUE_EXPR
13998 and that are not defined in the current unit.
14000 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14002 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14003 instead of a libcall for UNORDERED.
14005 2018-02-09 Tamar Christina <tamar.christina@arm.com>
14008 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14009 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14011 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14014 * config/s390/s390.c (s390_set_current_function): Invoke
14015 s390_indirect_branch_settings also if fndecl didn't change.
14017 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14019 * config/rs6000/rs6000.md (blockage): Set length to zero.
14021 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14023 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14025 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14028 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14029 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14033 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14034 PARALLEL incoming that failed vt_get_decl_and_offset check.
14036 PR middle-end/84237
14037 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14038 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14040 (get_variable_section): For decls in named .bss* sections pass true as
14041 second argument to bss_initializer_p.
14043 2018-02-09 Marek Polacek <polacek@redhat.com>
14044 Jakub Jelinek <jakub@redhat.com>
14047 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14048 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
14049 Sync some changes from cxx_fold_indirect_ref.
14051 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14053 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14055 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14056 (BLOCK_INLINE_ENTRY_LABEL): New.
14057 (dwarf2out_var_location): Disregard inline entry markers.
14058 (inline_entry_data): New struct.
14059 (inline_entry_data_hasher): New hashtable type.
14060 (inline_entry_data_hasher::hash): New.
14061 (inline_entry_data_hasher::equal): New.
14062 (inline_entry_data_table): New variable.
14063 (add_high_low_attributes): Add DW_AT_entry_pc and
14064 DW_AT_GNU_entry_view attributes if a pending entry is found
14065 in inline_entry_data_table. Add old entry_pc attribute only
14066 if debug nonbinding markers are disabled.
14067 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14068 markers are enabled.
14069 (block_within_block_p, dwarf2out_inline_entry): New.
14070 (dwarf2out_finish): Check that no entries remained in
14071 inline_entry_data_table.
14072 * final.c (reemit_insn_block_notes): Handle inline entry notes.
14073 (final_scan_insn, notice_source_line): Likewise.
14074 (rest_of_clean_state): Skip inline entry markers.
14075 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14077 * gimple.c (gimple_build_debug_inline_entry): New.
14078 * gimple.h (enum gimple_debug_subcode): Add
14079 GIMPLE_DEBUG_INLINE_ENTRY.
14080 (gimple_build_debug_inline_entry): Declare.
14081 (gimple_debug_inline_entry_p): New.
14082 (gimple_debug_nonbind_marker_p): Adjust.
14083 * insn-notes.def (INLINE_ENTRY): New.
14084 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14085 inline entry marker notes.
14086 (print_insn): Likewise.
14087 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14088 (INSN_DEBUG_MARKER_KIND): Likewise.
14089 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14090 * tree-inline.c (expand_call_inline): Build and insert
14091 debug_inline_entry stmt.
14092 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14093 inline entry blocks early, if nonbind markers are enabled.
14094 (dump_scope_block): Dump fragment info.
14095 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14096 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14097 (gimple_build_debug_inline_entry): New.
14098 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14099 Enable/disable inline entry points too.
14100 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14101 (DEBUG_INSN): Describe inline entry markers.
14103 * common.opt (gvariable-location-views): New.
14104 (gvariable-location-views=incompat5): New.
14105 * config.in: Rebuilt.
14106 * configure: Rebuilt.
14107 * configure.ac: Test assembler for view support.
14108 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14109 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14110 * dwarf2out.c (var_loc_view): New typedef.
14111 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14112 (dwarf2out_locviews_in_attribute): New.
14113 (dwarf2out_locviews_in_loclist): New.
14114 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14115 (enum dw_line_info_opcode): Add LI_adv_address.
14116 (struct dw_line_info_table): Add view.
14117 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14118 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14119 (zero_view_p): New variable.
14120 (ZERO_VIEW_P): New macro.
14121 (output_asm_line_debug_info): New.
14122 (struct var_loc_node): Add view.
14123 (add_AT_view_list, AT_loc_list): New.
14124 (add_var_loc_to_decl): Add view param. Test it against last.
14125 (new_loc_list): Add view params. Record them.
14126 (AT_loc_list_ptr): Handle loc and view lists.
14127 (view_list_to_loc_list_val_node): New.
14128 (print_dw_val): Handle dw_val_class_view_list.
14129 (size_of_die): Likewise.
14130 (value_format): Likewise.
14131 (loc_list_has_views): New.
14132 (gen_llsym): Set vl_symbol too.
14133 (maybe_gen_llsym, skip_loc_list_entry): New.
14134 (dwarf2out_maybe_output_loclist_view_pair): New.
14135 (output_loc_list): Output view list or entries too.
14136 (output_view_list_offset): New.
14137 (output_die): Handle dw_val_class_view_list.
14138 (output_dwarf_version): New.
14139 (output_compilation_unit_header): Use it.
14140 (output_skeleton_debug_sections): Likewise.
14141 (output_rnglists, output_line_info): Likewise.
14142 (output_pubnames, output_aranges): Update version comments.
14143 (output_one_line_info_table): Output view numbers in asm comments.
14144 (dw_loc_list): Determine current endview, pass it to new_loc_list.
14145 Call maybe_gen_llsym.
14146 (loc_list_from_tree_1): Adjust.
14147 (add_AT_location_description): Create view list attribute if
14148 needed, check it's absent otherwise.
14149 (convert_cfa_to_fb_loc_list): Adjust.
14150 (maybe_emit_file): Call output_asm_line_debug_info for test.
14151 (dwarf2out_var_location): Reset views as needed. Precompute
14152 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
14153 attribute. Set view.
14154 (new_line_info_table): Reset next view.
14155 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14156 (dwarf2out_source_line): Likewise. Output view resets and labels to
14157 the assembler, or select appropriate line info opcodes.
14158 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14159 (optimize_string_length): Catch it. Adjust.
14160 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
14161 dw_val_class_view_list, and remove it if no longer needed.
14162 (hash_loc_list): Hash view numbers.
14163 (loc_list_hasher::equal): Compare them.
14164 (optimize_location_lists): Check whether a view list symbol is
14165 needed, and whether the locview attribute is present, and
14166 whether they match. Remove the locview attribute if no longer
14168 (index_location_lists): Call skip_loc_list_entry for test.
14169 (dwarf2out_finish): Call output_asm_line_debug_info for test.
14170 Use output_dwarf_version.
14171 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14172 (struct dw_val_node): Add val_view_list.
14173 * final.c (SEEN_NEXT_VIEW): New.
14174 (set_next_view_needed): New.
14175 (clear_next_view_needed): New.
14176 (maybe_output_next_view): New.
14177 (final_start_function): Rename to...
14178 (final_start_function_1): ... this. Take pointer to FIRST,
14179 add SEEN parameter. Emit param bindings in the initial view.
14180 (final_start_function): Reintroduce SEEN-less interface.
14181 (final): Rename to...
14182 (final_1): ... this. Take SEEN parameter. Output final pending
14183 next view at the end.
14184 (final): Reintroduce seen-less interface.
14185 (final_scan_insn): Output pending next view before switching
14186 sections or ending a block. Mark the next view as needed when
14187 outputting variable locations. Notify debug backend of section
14188 changes, and of location view changes.
14189 (rest_of_handle_final): Adjust.
14190 * toplev.c (process_options): Autodetect value for debug variable
14191 location views option. Warn on incompat5 without -gdwarf-5.
14192 * doc/invoke.texi (gvariable-location-views): New.
14193 (gvariable-location-views=incompat5): New.
14194 (gno-variable-location-views): New.
14196 2018-02-08 David Malcolm <dmalcolm@redhat.com>
14198 PR tree-optimization/84136
14199 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14200 that the result of find_edge is non-NULL.
14202 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14205 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14206 storing integer register in SImode. Fix cost of 256 and 512
14207 byte aligned SSE register store.
14209 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14211 * config/i386/i386.c (ix86_multiplication_cost): Fix
14212 multiplication cost for TARGET_AVX512DQ.
14214 2018-02-08 Marek Polacek <polacek@redhat.com>
14216 PR tree-optimization/84238
14217 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14220 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14222 PR tree-optimization/84265
14223 * tree-vect-stmts.c (vectorizable_store): Don't treat
14224 VMAT_CONTIGUOUS accesses as grouped.
14225 (vectorizable_load): Likewise.
14227 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14229 PR tree-optimization/81635
14230 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14231 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14232 (test_round_for_mask): New functions.
14233 (wide_int_cc_tests): Call test_round_for_mask.
14234 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14235 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14236 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14237 range returned by get_range_info.
14239 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14242 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14243 * symtab.c: Include builtins.h
14244 (symtab_node::output_to_lto_symbol_table_p): Move here
14245 from lto-streamer-out.c:output_symbol_p.
14246 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14247 (output_symbol_p): Move all logic to symtab.c
14248 (produce_symtab): Update.
14250 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14252 * config/s390/s390-opts.h (enum indirect_branch): Define.
14253 * config/s390/s390-protos.h (s390_return_addr_from_memory)
14254 (s390_indirect_branch_via_thunk)
14255 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14256 (enum s390_indirect_branch_type): Define.
14257 * config/s390/s390.c (struct s390_frame_layout, struct
14258 machine_function): Remove.
14259 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14260 (indirect_branch_table_label_no, indirect_branch_table_name):
14262 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14263 (enum s390_indirect_branch_option): Define.
14264 (s390_return_addr_from_memory): New function.
14265 (s390_handle_string_attribute): New function.
14266 (s390_attribute_table): Add new attribute handler.
14267 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14268 (s390_indirect_branch_via_thunk): New function.
14269 (s390_indirect_branch_via_inline_thunk): New function.
14270 (s390_function_ok_for_sibcall): When jumping via thunk disallow
14271 sibling call optimization for non z10 compiles.
14272 (s390_emit_call): Force indirect branch target to be a single
14273 register. Add r1 clobber for non-z10 compiles.
14274 (s390_emit_epilogue): Emit return jump via return_use expander.
14275 (s390_reorg): Handle JUMP_INSNs as execute targets.
14276 (s390_option_override_internal): Perform validity checks for the
14277 new command line options.
14278 (s390_indirect_branch_attrvalue): New function.
14279 (s390_indirect_branch_settings): New function.
14280 (s390_set_current_function): Invoke s390_indirect_branch_settings.
14281 (s390_output_indirect_thunk_function): New function.
14282 (s390_code_end): Implement target hook.
14283 (s390_case_values_threshold): Implement target hook.
14284 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14286 * config/s390/s390.h (struct s390_frame_layout)
14287 (struct machine_function): Move here from s390.c.
14288 (TARGET_INDIRECT_BRANCH_NOBP_RET)
14289 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14290 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14291 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14292 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14293 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14294 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14295 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14296 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14297 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14298 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14299 (mnemonic attribute): Add values which aren't recognized
14301 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14302 pattern for branch conversion. Fix mnemonic attribute.
14303 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14304 indirect branch via thunk if requested.
14305 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14306 ("*indirect_jump"): Disable for branch conversion using out of
14308 ("indirect_jump_via_thunk<mode>_z10")
14309 ("indirect_jump_via_thunk<mode>")
14310 ("indirect_jump_via_inlinethunk<mode>_z10")
14311 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14312 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14313 ("casesi_jump_via_inlinethunk<mode>_z10")
14314 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14315 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14316 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14317 ("*indirect2_jump"): Disable for branch conversion.
14318 ("casesi_jump"): Turn into expander and expand patterns for branch
14320 ("return_use"): New expander.
14321 ("*return"): Emit return via thunk and rename it to ...
14322 ("*return<mode>"): ... this one.
14323 * config/s390/s390.opt: Add new options and and enum for the
14326 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14328 * lra-constraints.c (match_reload): Unconditionally use
14329 gen_lowpart_SUBREG, rather than selecting between that
14330 and equivalent gen_rtx_SUBREG code.
14332 2018-02-08 Richard Biener <rguenther@suse.de>
14334 PR tree-optimization/84233
14335 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14336 changed flag instead of boguously re-using phi_inserted.
14338 2018-02-08 Martin Jambor <mjambor@suse.cz>
14340 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14341 static local variables.
14343 2018-02-08 Richard Biener <rguenther@suse.de>
14345 PR tree-optimization/84278
14346 * tree-vect-stmts.c (vectorizable_store): When looking for
14347 smaller vector types to perform grouped strided loads/stores
14348 make sure the mode is supported by the target.
14349 (vectorizable_load): Likewise.
14351 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14353 * config/aarch64/aarch64.c (aarch64_components_for_bb):
14354 Increase LDP/STP opportunities by adding adjacent callee-saves.
14356 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14358 PR rtl-optimization/84068
14359 PR rtl-optimization/83459
14360 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14362 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
14364 PR tree-optimization/84224
14365 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14366 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14367 non-zero arguments.
14369 2018-02-07 Iain Sandoe <iain@codesourcery.com>
14372 * config/rs6000/altivec.md (*restore_world): Remove LR use.
14373 * config/rs6000/predicates.md (restore_world_operation): Adjust op
14374 count, remove one USE.
14376 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
14378 * doc/install.texi (Configuration): Document the
14379 --with-long-double-format={ibm,ieee} PowerPC configuration
14383 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14384 Convert from define_expand to be define_insn_and_split. Rework
14385 float/double/_Float128 conversions to QI/HI/SImode to work with
14386 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
14387 conversions to QI/HImode types did a store and then a load to
14388 truncate the value. For conversions to VSX registers, don't split
14389 the insn, instead emit the code directly. Use the code iterator
14390 any_fix to combine signed and unsigned conversions.
14391 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14392 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14393 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14394 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14395 (fix_<mode>di2_hw): Likewise.
14396 (fixuns_<mode>di2_hw): Likewise.
14397 (fix_<mode>si2_hw): Likewise.
14398 (fixuns_<mode>si2_hw): Likewise.
14399 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14400 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14401 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14402 fix<uns>_trunc<SFDF:mode>si2_p8.
14403 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14404 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14405 (fix<uns>_<mode>_mem): Likewise.
14406 (fctiw<u>z_<mode>_mem): Likewise.
14407 (fix<uns>_<mode>_mem): Likewise.
14408 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14409 the register allocator from doing a direct move to the GPRs to do
14410 a store, and instead use the ISA 3.0 store byte/half-word from
14411 vector register instruction. For IEEE 128-bit floating point,
14412 also optimize stores of 32-bit ints.
14413 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14415 2018-02-07 Alan Hayward <alan.hayward@arm.com>
14417 * genextract.c (push_pathstr_operand): New function to support
14419 (walk_rtx): Call push_pathstr_operand.
14420 (print_path): Support [a-zA-Z].
14422 2018-02-07 Richard Biener <rguenther@suse.de>
14424 PR tree-optimization/84037
14425 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14426 (cse_and_gimplify_to_preheader): Declare.
14427 (vect_get_place_in_interleaving_chain): Likewise.
14428 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14430 (_loop_vec_info::~_loop_vec_info): Delete it.
14431 (cse_and_gimplify_to_preheader): New function.
14432 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14433 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14434 (vectorizable_load): Likewise. For grouped stores always base
14435 the IV on the first element.
14436 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14437 condition before gimplifying.
14439 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14441 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14442 *DIV_EXPR and *MOD_EXPR.
14444 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
14447 * config/i386/i386.c (ix86_option_override_internal): Mask out
14448 the CF_SET bit when checking -fcf-protection.
14450 2018-02-07 Tom de Vries <tom@codesourcery.com>
14453 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14456 2018-02-07 Richard Biener <rguenther@suse.de>
14458 PR tree-optimization/84204
14459 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14462 PR tree-optimization/84205
14463 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14464 special-case isl_ast_op_zdiv_r.
14466 PR tree-optimization/84223
14467 * graphite-scop-detection.c (gather_bbs::before_dom_children):
14468 Only add conditions from within the region.
14469 (gather_bbs::after_dom_children): Adjust.
14471 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
14474 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14475 * config/avr/avr.md: Only post-reload split REG-REG moves if
14476 either register is GENERAL_REG_P.
14478 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14480 PR tree-optimization/84235
14481 * tree-ssa-scopedtables.c
14482 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14483 if the subtraction is performed in floating point type where NaNs are
14484 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14485 build 1. Formatting fix.
14487 2018-02-06 Jakub Jelinek <jakub@redhat.com>
14490 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14491 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14492 and skip it regardless of bb boundaries. Use CALL_P macro,
14493 don't test INSN_P (insn) together with CALL_P or JUMP_P check
14494 unnecessarily, formatting fix.
14496 2018-02-06 Michael Collison <michael.collison@arm.com>
14498 * config/arm/thumb2.md:
14499 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14500 (*thumb_mov_notscc): Ditto.
14502 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
14505 * config/rs6000/rs6000.md (su code attribute): Use "u" for
14506 unsigned_fix, not "s".
14508 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14510 * configure.ac (gcc_fn_eh_frame_ro): New function.
14511 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14512 correct .eh_frame permissions.
14513 * configure: Regenerate.
14515 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
14517 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14518 irrelevant options.
14520 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14522 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14523 Display warning message for -mno-speculate-indirect-jumps.
14525 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
14527 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14529 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14531 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
14533 PR tree-optimization/84225
14534 * tree-eh.c (find_trapping_overflow): Only call
14535 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14537 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14540 * config/i386/i386.c: Reimplement the check of possible options
14541 -mibt/-mshstk conbination. Change error messages.
14542 * doc/invoke.texi: Fix a typo: remove extra '='.
14544 2018-02-06 Marek Polacek <polacek@redhat.com>
14546 PR tree-optimization/84228
14547 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14549 2018-02-06 Tamar Christina <tamar.christina@arm.com>
14552 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14553 emitted arch directives.
14554 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14555 __ARM_FEATURE_COPROC before changing architectures.
14557 2018-02-06 Richard Biener <rguenther@suse.de>
14559 * config/i386/i386.c (print_reg): Fix typo.
14560 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14562 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
14564 * configure: Regenerate.
14566 2018-02-05 Martin Sebor <msebor@redhat.com>
14568 PR tree-optimization/83369
14569 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14572 2018-02-05 Martin Liska <mliska@suse.cz>
14574 * doc/invoke.texi: Cherry-pick upstream r323995.
14576 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
14578 * ira.c (ira_init_register_move_cost): Adjust comment.
14580 2018-02-05 Martin Liska <mliska@suse.cz>
14582 PR gcov-profile/84137
14583 * doc/gcov.texi: Fix typo in documentation.
14585 2018-02-05 Martin Liska <mliska@suse.cz>
14587 PR gcov-profile/83879
14588 * doc/gcov.texi: Document necessity of --dynamic-list-data when
14589 using dlopen functionality.
14591 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
14593 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14594 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14595 _mm_maskz_range_ss, _mm_mask_range_round_ss,
14596 _mm_maskz_range_round_ss): New intrinsics.
14597 (__builtin_ia32_rangesd128_round)
14598 (__builtin_ia32_rangess128_round): Remove.
14599 (__builtin_ia32_rangesd128_mask_round,
14600 __builtin_ia32_rangess128_mask_round): New builtins.
14601 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14602 __builtin_ia32_rangess128_round): Remove.
14603 (__builtin_ia32_rangesd128_mask_round,
14604 __builtin_ia32_rangess128_mask_round): New builtins.
14605 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14606 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14607 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14608 "<round_saeonly_constraint>")): Changed to ...
14609 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14610 "<round_saeonly_scalar_constraint>")): ... this.
14611 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14612 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14613 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14614 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14615 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14617 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
14619 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14621 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14622 Remove all values except native, 8540 and 8548.
14624 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
14626 * config/i386/i386.c (ix86_output_function_return): Pass
14627 INVALID_REGNUM, instead of -1, as invalid register number to
14628 indirect_thunk_name and output_indirect_thunk.
14630 2018-02-02 Julia Koval <julia.koval@intel.com>
14632 * config.gcc: Add -march=icelake.
14633 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14634 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14635 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14636 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14637 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14638 (processor_target_table): Add icelake.
14639 (ix86_option_override_internal): Handle new PTAs.
14640 (get_builtin_code_for_version): Handle icelake.
14641 (M_INTEL_COREI7_ICELAKE): New.
14642 (fold_builtin_cpu): Handle icelake.
14643 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14644 * doc/invoke.texi: Add -march=icelake.
14646 2018-02-02 Julia Koval <julia.koval@intel.com>
14648 * config/i386/i386.c (ix86_option_override_internal): Change flags type
14649 to wide_int_bitmask.
14650 * wide-int-bitmask.h: New.
14652 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14655 * config/i386/i386.md: Replace Pmode with word_mode in
14656 builtin_setjmp_setup and builtin_longjmp to support x32.
14658 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
14662 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14664 (rs6000_supported_cpu_names): New static variable.
14665 (linux_cpu_translation_table): Likewise.
14666 (elf_platform) <cpu>: Define new static variable and use it.
14667 Translate kernel AT_PLATFORM name to canonical name if needed.
14668 Error if platform name is unknown.
14670 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
14673 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14675 2018-02-01 Jeff Law <law@redhat.com>
14678 * config/i386/i386.c (release_scratch_register_on_entry): Add new
14679 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
14680 the scratch if RELEASE_VIA_POP is false.
14681 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14682 If we have to save a temporary register, decrement SIZE appropriately.
14683 Pass new arguments to release_scratch_register_on_entry.
14684 (ix86_adjust_stack_and_probe): Likewise.
14685 (ix86_emit_probe_stack_range): Pass new arguments to
14686 release_scratch_register_on_entry.
14688 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
14690 PR rtl-optimization/84157
14691 * combine.c (change_zero_ext): Use REG_P predicate in
14692 front of HARD_REGISTER_P predicate.
14694 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
14696 * config/avr/avr.c (avr_option_override): Move disabling of
14697 -fdelete-null-pointer-checks to...
14698 * common/config/avr/avr-common.c (avr_option_optimization_table):
14701 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14703 PR tree-optimization/81635
14704 * tree-data-ref.c (split_constant_offset_1): For types that
14705 wrap on overflow, try to use range info to prove that wrapping
14708 2018-02-01 Renlin Li <renlin.li@arm.com>
14711 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14712 TAILCALL_ADDR_REGS.
14713 (aarch64_register_move_cost): Likewise.
14714 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14715 TAILCALL_ADDR_REGS.
14716 (REG_CLASS_NAMES): Likewise.
14717 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14718 TAILCALL_ADDR_REGS. Remove IP registers.
14719 * config/aarch64/aarch64.md (Ucs): Update register constraint.
14721 2018-02-01 Richard Biener <rguenther@suse.de>
14723 * domwalk.h (dom_walker::dom_walker): Add additional constructor
14724 for specifying RPO order and allow NULL for that.
14725 * domwalk.c (dom_walker::dom_walker): Likewise.
14726 (dom_walker::walk): Handle NULL RPO order.
14727 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14729 (rewrite_update_dom_walker): Likewise.
14730 (mark_def_dom_walker): Likewise.
14732 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14734 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14735 (aarch64_maybe_expand_sve_subreg_move): Declare.
14736 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14737 * config/aarch64/predicates.md (aarch64_any_register_operand): New
14739 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14740 that are semantically a reverse operation.
14741 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14742 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14743 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14745 (aarch64_can_change_mode_class): For big-endian, forbid changes
14746 between two SVE modes if they have different element sizes.
14748 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14750 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14751 the TImode handling for big-endian targets.
14753 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14755 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14756 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
14758 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14759 Remove BSWAP handing for big-endian targets and use the form of
14760 LD1RQ appropariate for the mode.
14762 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14764 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14765 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14766 duplicated element.
14768 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14771 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14772 check for operands that need to go through aarch64_sve_reload_be.
14774 2018-02-01 Jakub Jelinek <jakub@redhat.com>
14776 PR tree-optimization/81661
14777 PR tree-optimization/84117
14778 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14779 * tree-eh.c: Include gimplify.h.
14780 (find_trapping_overflow, replace_trapping_overflow,
14781 rewrite_to_non_trapping_overflow): New functions.
14782 * tree-vect-loop.c: Include tree-eh.h.
14783 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14784 * tree-data-ref.c: Include tree-eh.h.
14785 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14787 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
14789 PR rtl-optimization/84123
14790 * combine.c (change_zero_ext): Check if hard register satisfies
14791 can_change_dest_mode before calling gen_lowpart_SUBREG.
14793 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
14796 * ira.c (ira_init_register_move_cost): Remove assert.
14798 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14800 PR rtl-optimization/84071
14801 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14802 * doc/tm.texi: Regenerate.
14804 2018-01-31 Richard Biener <rguenther@suse.de>
14806 PR tree-optimization/84132
14807 * tree-data-ref.c (analyze_miv_subscript): Properly
14808 check whether evolution_function_is_affine_multivariate_p
14809 before calling gcd_of_steps_may_divide_p.
14811 2018-01-31 Julia Koval <julia.koval@intel.com>
14814 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14815 * config/i386/i386.md (rdpid_rex64) New.
14816 (rdpid): Make 32bit only.
14818 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
14821 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14822 an IDENTIFIER_NODE for FUNCTION_TYPE's.
14824 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14827 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14829 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14831 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14833 PR rtl-optimization/84071
14834 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14835 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14837 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14839 * config/arc/arc.c (arc_handle_aux_attribute): New function.
14840 (arc_attribute_table): Add 'aux' attribute.
14841 (arc_in_small_data_p): Consider aux like variables.
14842 (arc_is_aux_reg_p): New function.
14843 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14844 (arc_get_aux_arg): New function.
14845 (prepare_move_operands): Handle aux-register access.
14846 (arc_handle_aux_attribute): New function.
14847 * doc/extend.texi (ARC Variable attributes): Add subsection.
14849 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14851 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14852 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14853 (arc_attribute_table): Add 'uncached' attribute.
14854 (arc_print_operand): Print '.di' flag for uncached memory
14856 (arc_in_small_data_p): Do not consider for small data the uncached
14858 (arc_is_uncached_mem_p): New function.
14859 * config/arc/predicates.md (compact_store_memory_operand): Check
14860 for uncached memory accesses.
14861 (nonvol_nonimm_operand): Likewise.
14862 * doc/extend.texi (ARC Type Attribute): New subsection.
14864 2018-01-31 Jakub Jelinek <jakub@redhat.com>
14867 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14868 falign-loops=): Add Optimization flag.
14870 2018-01-30 Jeff Law <law@redhat.com>
14873 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14874 INT_REGISTERS_SAVED. Check it prior to calling
14875 get_scratch_register_on_entry.
14876 (ix86_adjust_stack_and_probe): Similarly.
14877 (ix86_emit_probe_stack_range): Similarly.
14878 (ix86_expand_prologue): Corresponding changes.
14880 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14883 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14884 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14886 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
14889 * lra-constraints.c (curr_insn_transform): Process AND in the
14892 2018-01-30 Jakub Jelinek <jakub@redhat.com>
14894 PR rtl-optimization/83986
14895 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14896 dependence against last_pending_memory_flush in addition to
14897 pending_jump_insns.
14899 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
14901 PR tree-optimization/81611
14902 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14905 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14908 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14911 2018-01-30 Richard Biener <rguenther@suse.de>
14912 Jakub Jelinek <jakub@redhat.com>
14914 PR tree-optimization/84111
14915 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14916 inner loops added during recursion, as they don't have up-to-date
14919 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14922 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14923 (can_inline_edge_by_limits_p): ... here.
14924 (can_early_inline_edge_p, check_callers,
14925 update_caller_keys, update_callee_keys, recursive_inlining,
14926 add_new_edges_to_heap, speculation_useful_p,
14927 inline_small_functions,
14928 inline_small_functions, flatten_function,
14929 inline_to_all_callers_1): Update.
14931 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14933 * profile-count.c (profile_count::combine_with_ipa_count): Handle
14936 2018-01-30 Richard Biener <rguenther@suse.de>
14938 PR tree-optimization/83008
14939 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14940 invariant and constant vector uses in stmts when they need
14941 more than one stmt.
14943 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14946 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14947 * configure: Regenerate.
14949 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14951 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14953 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14954 Use gen_rtx_REG rather than gen_lowpart.
14956 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14958 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14959 rather than 0 when creating partial subregs.
14961 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14963 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14966 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
14969 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14970 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14971 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14972 flags. This restores the settings used before the 2017-07-24.
14973 Turning off pre increment/decrement/modify allows IVOPTS to
14974 optimize DF/SF loops where the index is an int.
14976 2018-01-29 Richard Biener <rguenther@suse.de>
14977 Kelvin Nilsen <kelvin@gcc.gnu.org>
14980 * tree-vect-stmts.c (vectorizable_call): Don't call
14981 targetm.vectorize_builtin_md_vectorized_function if callee is
14984 2018-01-22 Carl Love <cel@us.ibm.com>
14986 * doc/extend.tex: Fix typo in second arg in
14987 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14989 2018-01-29 Richard Biener <rguenther@suse.de>
14991 PR tree-optimization/84086
14992 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14993 (flush_ssaname_freelist): When SSA names were released reset
14994 the SCEV hash table.
14996 2018-01-29 Richard Biener <rguenther@suse.de>
14998 PR tree-optimization/84057
14999 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15000 removed paths when removing edges.
15002 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
15004 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15005 -mfunction-return=@var{choice}.
15007 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
15009 PR diagnostic/84034
15010 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15011 Handle CR like TAB.
15012 (layout::print_source_line): Likewise.
15013 (test_get_line_width_without_trailing_whitespace): Add test cases.
15015 2018-01-27 Jakub Jelinek <jakub@redhat.com>
15017 PR middle-end/84040
15018 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15021 2018-01-26 Jim Wilson <jimw@sifive.com>
15023 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15025 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15028 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15030 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15031 and CMP + SUB-immediate -> SUBS.
15033 2018-01-26 Martin Sebor <msebor@redhat.com>
15035 PR tree-optimization/83896
15036 * tree-ssa-strlen.c (get_string_len): Rename...
15037 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
15038 Avoid assuming length is constant.
15039 (handle_char_store): Use HOST_WIDE_INT for string length.
15041 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
15044 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15045 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15047 2018-01-26 Richard Biener <rguenther@suse.de>
15049 PR rtl-optimization/84003
15050 * dse.c (record_store): Only record redundant stores when
15051 the earlier store aliases at least all accesses the later one does.
15053 2018-01-26 Jakub Jelinek <jakub@redhat.com>
15055 PR rtl-optimization/83985
15056 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15057 REG_CFA_RESTORE insns.
15058 (delete_unmarked_insns): Don't ignore separate shrink wrapping
15059 REG_CFA_RESTORE insns here.
15062 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15063 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15065 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15067 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15068 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15069 (arc_init): Likewise.
15070 (arc_override_options): Likewise.
15071 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15073 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15075 * config/arc/arc.h (TARGET_DBNZ): Define.
15076 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15077 properly set the tune attribute.
15078 (dbnz): Use TARGET_DBNZ guard.
15079 * config/arc/arc.opt (mtune): Add core3 option.
15081 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15083 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15084 recognize new pic like addresses.
15085 (arc_delegitimize_address): Clean up.
15087 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15089 * config/arc/arc-arches.def: Option mrf16 valid for all
15091 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15092 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15093 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15094 * config/arc/arc-tables.opt: Regenerate.
15095 * config/arc/arc.c (arc_conditional_register_usage): Handle
15096 reduced register file case.
15097 (arc_file_start): Set must have build attributes.
15098 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15099 mrf16 option value.
15100 * config/arc/arc.opt (mrf16): Add new option.
15101 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15102 * config/arc/genmultilib.awk: Handle new mrf16 option.
15103 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15104 * config/arc/t-multilib: Regenerate.
15105 * doc/invoke.texi (ARC Options): Document mrf16 option.
15107 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15109 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15110 * config/arc/arc.c (arc_handle_secure_attribute): New function.
15111 (arc_attribute_table): Add 'secure_call' attribute.
15112 (arc_print_operand): Print secure call operand.
15113 (arc_function_ok_for_sibcall): Don't optimize tail calls when
15115 (arc_is_secure_call_p): New function. * config/arc/arc.md
15116 (call_i): Add support for sjli instruction.
15117 (call_value_i): Likewise.
15118 * config/arc/constraints.md (Csc): New constraint.
15120 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15121 John Eric Martin <John.Martin@emmicro-us.com>
15123 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15124 * config/arc/arc.c (_arc_jli_section): New struct.
15125 (arc_jli_section): New type.
15126 (rc_jli_sections): New static variable.
15127 (arc_handle_jli_attribute): New function.
15128 (arc_attribute_table): Add jli_always and jli_fixed attribute.
15129 (arc_file_end): New function.
15130 (TARGET_ASM_FILE_END): Define.
15131 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15132 (arc_add_jli_section): New function.
15133 (jli_call_scan): Likewise.
15134 (arc_reorg): Call jli_call_scan.
15135 (arc_output_addsi): Remove 'S' from printing asm operand.
15136 (arc_is_jli_call_p): New function.
15137 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15139 (movhi_insn): Likewise.
15140 (movsi_insn): Likewise.
15141 (movsi_set_cc_insn): Likewise.
15142 (loadqi_update): Likewise.
15143 (load_zeroextendqisi_update): Likewise.
15144 (load_signextendqisi_update): Likewise.
15145 (loadhi_update): Likewise.
15146 (load_zeroextendhisi_update): Likewise.
15147 (load_signextendhisi_update): Likewise.
15148 (loadsi_update): Likewise.
15149 (loadsf_update): Likewise.
15150 (movsicc_insn): Likewise.
15151 (bset_insn): Likewise.
15152 (bxor_insn): Likewise.
15153 (bclr_insn): Likewise.
15154 (bmsk_insn): Likewise.
15155 (bicsi3_insn): Likewise.
15156 (cmpsi_cc_c_insn): Likewise.
15157 (movsi_ne): Likewise.
15158 (movsi_cond_exec): Likewise.
15159 (clrsbsi2): Likewise.
15160 (norm_f): Likewise.
15170 (call_i): Remove 'S' asm letter, add jli instruction.
15171 (call_value_i): Likewise.
15172 * config/arc/arc.op (mjli-always): New option.
15173 * config/arc/constraints.md (Cji): New constraint.
15174 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15176 (subsf3_fpx): Likewise.
15177 (mulsf3_fpx): Likewise.
15178 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15180 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15181 function attrbutes.
15182 * doc/invoke.texi (ARC): Document mjli-always option.
15184 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
15186 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15187 avoid addition with 0 and use incw and decw where possible.
15189 2018-01-26 Richard Biener <rguenther@suse.de>
15191 PR tree-optimization/81082
15192 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15193 association if it requires casting to unsigned.
15194 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15195 from fold_plusminus_mult_expr to catch important cases late when
15196 range info is available.
15198 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15200 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15201 * configure.ac (hidden_linkonce): New test.
15202 * configure: Regenerate.
15203 * config.in: Regenerate.
15205 2018-01-26 Julia Koval <julia.koval@intel.com>
15207 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15208 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15209 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15210 _mm_mask_bitshuffle_epi64_mask): Fix type.
15211 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15212 USI_FTYPE_V4DI_V4DI_USI): Remove.
15213 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15214 __builtin_ia32_vpshufbitqmb256_mask,
15215 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15216 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15217 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15219 2018-01-26 Alan Modra <amodra@gmail.com>
15222 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15223 UNSPEC_VBPERMQ. Sort other unspecs.
15225 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
15227 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15229 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
15231 PR middle-end/83055
15232 * predict.c (drop_profile): Do not push/pop cfun; update also
15234 (handle_missing_profiles): Fix logic looking for zero profiles.
15236 2018-01-25 Jakub Jelinek <jakub@redhat.com>
15238 PR middle-end/83977
15239 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15240 on functions with #pragma omp declare simd or functions with simd
15242 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15243 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15244 Remove trailing \n from warning_at calls.
15246 2018-01-25 Tom de Vries <tom@codesourcery.com>
15249 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15250 for neutered workers.
15252 2018-01-24 Joseph Myers <joseph@codesourcery.com>
15255 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15256 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15258 2018-01-24 Jeff Law <law@redhat.com>
15261 * i386.c (get_probe_interval): Move to earlier point.
15262 (ix86_compute_frame_layout): If -fstack-clash-protection and
15263 the frame is larger than the probe interval, then use pushes
15264 to save registers rather than reg->mem moves.
15265 (ix86_expand_prologue): Remove conditional for int_registers_saved
15268 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
15271 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15272 min/max for never referenced object.
15274 2018-01-24 Jakub Jelinek <jakub@redhat.com>
15276 PR middle-end/83977
15277 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15279 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15280 attributes from DECL_ATTRIBUTES (decl) without affecting
15281 DECL_ATTRIBUTES (current_function_decl).
15282 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15283 functions with non-NULL DECL_ABSTRACT_ORIGIN.
15285 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
15287 PR tree-optimization/83979
15288 * fold-const.c (fold_comparison): Use constant_boolean_node
15289 instead of boolean_{true,false}_node.
15291 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
15293 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15296 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15298 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15299 Simplify the clause that sets the length attribute.
15300 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15301 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15302 clause that sets the length attribute.
15303 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15305 2018-01-24 Tom de Vries <tom@codesourcery.com>
15308 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15309 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15310 Add strict parameter.
15311 (prevent_branch_around_nothing): Insert dummy insn between branch to
15312 label and label with no ptx insn inbetween.
15313 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15315 2018-01-24 Tom de Vries <tom@codesourcery.com>
15318 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15319 for neutered threads in warp.
15320 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15322 2018-01-24 Richard Biener <rguenther@suse.de>
15324 PR tree-optimization/83176
15325 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15328 2018-01-24 Richard Biener <rguenther@suse.de>
15330 PR tree-optimization/82819
15331 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15332 code generating pluses that are no-ops in the target precision.
15334 2018-01-24 Richard Biener <rguenther@suse.de>
15336 PR middle-end/84000
15337 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15339 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15341 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15342 to merge probabilities.
15343 * predict.c (probably_never_executed): Also mark as cold functions
15344 with global 0 profile and guessed local profile.
15345 * profile-count.c (profile_probability::combine_with_count): New
15347 * profile-count.h (profile_probability::operator*,
15348 profile_probability::operator*=, profile_probability::operator/,
15349 profile_probability::operator/=): Reduce precision to adjusted
15350 and set value to guessed on contradictory divisions.
15351 (profile_probability::combine_with_freq): Remove.
15352 (profile_probability::combine_wiht_count): Declare.
15353 (profile_count::force_nonzero):: Set to adjusted.
15354 (profile_count::probability_in):: Set quality to adjusted.
15355 * tree-ssa-tail-merge.c (replace_block_by): Use
15356 combine_with_count.
15358 2018-01-23 Andrew Waterman <andrew@sifive.com>
15359 Jim Wilson <jimw@sifive.com>
15361 * config/riscv/riscv.c (riscv_stack_boundary): New.
15362 (riscv_option_override): Set riscv_stack_boundary. Handle
15363 riscv_preferred_stack_boundary_arg.
15364 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15365 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15366 (STACK_BOUNDARY): Set to riscv_stack_boundary.
15367 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15368 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15369 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15371 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
15374 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15375 of struct ix86_frame.
15376 (ix86_expand_epilogue): Likewise. Add a local variable for
15377 the reg_save_offset field in struct ix86_frame.
15379 2018-01-23 Bin Cheng <bin.cheng@arm.com>
15381 PR tree-optimization/82604
15382 * tree-loop-distribution.c (enum partition_kind): New enum item
15383 PKIND_PARTIAL_MEMSET.
15384 (partition_builtin_p): Support above new enum item.
15385 (generate_code_for_partition): Ditto.
15386 (compute_access_range): Differentiate cases that equality can be
15387 proven at all loops, the innermost loops or no loops.
15388 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15389 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
15390 (finalize_partitions, distribute_loop): Don't fuse partition of
15391 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15392 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15393 parloop is enabled.
15395 2018-01-23 Martin Liska <mliska@suse.cz>
15397 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15398 order to ignore the predictor.
15399 (PRED_POLYMORPHIC_CALL): Likewise.
15400 (PRED_RECURSIVE_CALL): Likewise.
15402 2018-01-23 Martin Liska <mliska@suse.cz>
15404 * tree-profile.c (tree_profiling): Print function header to
15405 aware reader which function we are working on.
15406 * value-prof.c (gimple_find_values_to_profile): Do not print
15407 not interesting value histograms.
15409 2018-01-23 Martin Liska <mliska@suse.cz>
15411 * profile-count.h (enum profile_quality): Add
15412 profile_uninitialized as the first value. Do not number values
15413 as they are zero based.
15414 (profile_count::verify): Update sanity check.
15415 (profile_probability::verify): Likewise.
15417 2018-01-23 Nathan Sidwell <nathan@acm.org>
15419 * doc/invoke.texi (ffor-scope): Deprecate.
15421 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15423 PR tree-optimization/83510
15424 * domwalk.c (set_all_edges_as_executable): New function.
15425 (dom_walker::dom_walker): Convert bool param
15426 "skip_unreachable_blocks" to enum reachability. Move setup of
15427 edge flags to set_all_edges_as_executable and only do it when
15428 reachability is REACHABLE_BLOCKS.
15429 * domwalk.h (enum dom_walker::reachability): New enum.
15430 (dom_walker::dom_walker): Convert bool param
15431 "skip_unreachable_blocks" to enum reachability.
15432 (set_all_edges_as_executable): New decl.
15433 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
15434 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15436 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15437 but converting true to REACHABLE_BLOCKS.
15438 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15440 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15441 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15442 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15444 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15445 if check_all_array_refs will be called.
15447 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15449 * tree.c (selftest::test_location_wrappers): Add more test
15452 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15454 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15455 (selftest::test_bit_in_range): Likewise.
15457 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15460 * doc/sourcebuild.texi (vect_float): Say that the selector
15461 only describes the situation when -funsafe-math-optimizations is on.
15462 (vect_float_strict): Document.
15464 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15466 PR tree-optimization/83965
15467 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15468 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15469 instead of checking only for a reduction.
15470 (vect_recog_widen_sum_pattern): Likewise.
15472 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15474 * predict.c (probably_never_executed): Only use precise profile info.
15475 (compute_function_frequency): Skip after inlining hack since we now
15476 have quality checking.
15478 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15480 * profile-count.h (profile_probability::very_unlikely,
15481 profile_probability::unlikely, profile_probability::even): Set
15482 precision to guessed.
15484 2018-01-23 Richard Biener <rguenther@suse.de>
15486 PR tree-optimization/83963
15487 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15488 Properly terminate dominator walk when crossing the exit edge not
15489 when visiting its source block.
15491 2018-01-23 Jakub Jelinek <jakub@redhat.com>
15494 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15495 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15497 2018-01-22 Jakub Jelinek <jakub@redhat.com>
15499 PR tree-optimization/83957
15500 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
15501 semicolon after for body surrounded by braces.
15503 PR tree-optimization/83081
15504 * profile-count.h (profile_probability::split): New method.
15505 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15506 Use profile_probability::split.
15507 (do_compare_rtx_and_jump): Fix adjustment of probabilities
15508 when splitting a single conditional jump into 2.
15510 2018-01-22 David Malcolm <dmalcolm@redhat.com>
15512 PR tree-optimization/69452
15513 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15516 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15518 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15519 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15520 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15522 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15524 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15526 * config/rl78/rl78.md (movdi): New define_expand.
15527 * config/rl78/rl78.c (rl78_split_movdi): New function.
15529 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
15532 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15534 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15535 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15536 128-bit to produce an UNSPEC move to get the double word with the
15537 signbit and then a shift directly to do signbit.
15538 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15539 implementation with a new version that just does either a direct
15540 move or a regular move. Move memory interface to separate insns.
15541 Move insns so they are next to the expander.
15542 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15543 with signbit move. Split big and little endian case.
15544 (signbit<mode>2_dm_mem_le): Likewise.
15545 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15546 (signbit<mode>2_dm2): Likewise.
15548 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15550 * config/rl78/rl78.md (anddi3): New define_expand.
15552 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15554 * config/rl78/rl78.md (umindi3): New define_expand.
15556 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15558 * config/rl78/rl78.md (smindi3): New define_expand.
15560 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15562 * config/rl78/rl78.md (smaxdi3): New define_expand.
15564 2018-01-22 Carl Love <cel@us.ibm.com>
15566 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15567 LVX_V1TI): Add macro expansion.
15568 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15569 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15570 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15571 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15572 Change check to determine if the instruction is a byte reversing
15573 entry. Fix typo in comment.
15574 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15575 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15576 Add def_builtin calls for new builtins.
15577 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15578 Add define_insn expansion.
15580 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15582 * config/rl78/rl78.md (umaxdi3): New define_expand.
15584 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15586 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15587 for non-QImode registers.
15589 2018-01-22 Richard Biener <rguenther@suse.de>
15591 PR tree-optimization/83963
15592 * graphite-scop-detection.c (scop_detection::get_sese): Delay
15593 including the loop exit block.
15594 (scop_detection::merge_sese): Likewise.
15595 (scop_detection::add_scop): Do it here instead.
15597 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15599 * doc/sourcebuild.texi (arm_softfloat): Document.
15601 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
15604 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15605 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15606 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15608 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15609 David Edelsohn <dje.gcc@gmail.com>
15612 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15613 Change "crset eq" to "crset 2".
15614 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15615 (*call_indirect_aix<mode>_nospec): Likewise.
15616 (*call_value_indirect_aix<mode>_nospec): Likewise.
15617 (*call_indirect_elfv2<mode>_nospec): Likewise.
15618 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15619 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15620 change assembly output from . to $.
15621 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15622 (indirect_jump<mode>_nospec): Change assembly output from . to $.
15623 (*tablejump<mode>_internal1_nospec): Likewise.
15625 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
15628 * config/sh/sh_optimize_sett_clrt.cc:
15629 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15631 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
15633 PR tree-optimization/83940
15634 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15635 offset_dt to vect_constant_def rather than vect_unknown_def_type.
15636 (vect_check_load_store_mask): Add a mask_dt_out parameter and
15637 use it to pass back the definition type.
15638 (vect_check_store_rhs): Likewise rhs_dt_out.
15639 (vect_build_gather_load_calls): Add a mask_dt argument and use
15640 it instead of a call to vect_is_simple_use.
15641 (vectorizable_store): Update calls to vect_check_load_store_mask
15642 and vect_check_store_rhs. Use the dt returned by the latter instead
15643 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
15644 instead of calls to vect_is_simple_use. Pass the scalar rather
15645 than the vector operand to vect_is_simple_use when handling
15646 second and subsequent copies of an rhs value.
15647 (vectorizable_load): Update calls to vect_check_load_store_mask
15648 and vect_build_gather_load_calls. Use the cached mask_dt and
15649 gs_info.offset_dt instead of calls to vect_is_simple_use.
15651 2018-01-20 Jakub Jelinek <jakub@redhat.com>
15653 PR middle-end/83945
15654 * tree-emutls.c: Include gimplify.h.
15655 (lower_emutls_2): New function.
15656 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15657 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15658 it before further processing.
15661 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15662 UINTVAL (trueop1) instead of INTVAL (op1).
15664 2018-01-19 Jakub Jelinek <jakub@redhat.com>
15668 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15669 INCOMING_FRAME_SP_OFFSET if not defined.
15670 (scan_trace): Add ENTRY argument. If true and
15671 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15672 emit a note to adjust the CFA offset.
15673 (create_cfi_notes): Adjust scan_trace callers.
15674 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15675 INCOMING_FRAME_SP_OFFSET in the CIE.
15676 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15677 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15679 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15680 * doc/tm.texi: Regenerated.
15682 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15684 PR rtl-optimization/83147
15685 * lra-constraints.c (remove_inheritance_pseudos): Use
15686 lra_substitute_pseudo_within_insn.
15688 2018-01-19 Tom de Vries <tom@codesourcery.com>
15689 Cesar Philippidis <cesar@codesourcery.com>
15692 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15694 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
15697 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15698 spaces for function labels.
15700 2018-01-19 Martin Liska <mliska@suse.cz>
15702 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15703 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15704 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15705 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15706 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15707 (PRED_CONST_RETURN): Change from 69 to 65.
15708 (PRED_NULL_RETURN): Change from 91 to 71.
15709 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15710 (PRED_LOOP_GUARD): Change from 66 to 73.
15712 2018-01-19 Martin Liska <mliska@suse.cz>
15714 * predict.c (predict_insn_def): Add new assert.
15715 (struct branch_predictor): Change type to signed integer.
15716 (test_prediction_value_range): Amend test to cover
15717 PROB_UNINITIALIZED.
15718 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15719 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15720 (PRED_LOOP_ITERATIONS_MAX): Likewise.
15721 (PRED_LOOP_IV_COMPARE): Likewise.
15722 * predict.h (PROB_UNINITIALIZED): Define new constant.
15724 2018-01-19 Martin Liska <mliska@suse.cz>
15726 * predict.c (dump_prediction): Add new format for
15727 analyze_brprob.py script which is enabled with -details
15729 * profile-count.h (precise_p): New function.
15731 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15733 PR tree-optimization/83922
15734 * tree-vect-loop.c (vect_verify_full_masking): Return false if
15735 there are no statements that need masking.
15736 (vect_active_double_reduction_p): New function.
15737 (vect_analyze_loop_operations): Use it when handling phis that
15738 are not in the loop header.
15740 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15742 PR tree-optimization/83914
15743 * tree-vect-loop.c (vectorizable_induction): Don't convert
15744 init_expr or apply the peeling adjustment for inductions
15745 that are nested within the vectorized loop.
15747 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15749 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15752 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15756 * function.h (gimplify_parameters): Add gimple_seq * argument.
15757 * function.c: Include gimple.h and options.h.
15758 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15759 for the added local temporaries if needed.
15760 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15761 if there are any parameter cleanups, wrap whole body into a
15762 try/finally with the cleanups.
15764 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
15767 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15768 Use GET_MODE_CLASS for scalar floating point.
15770 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15774 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15775 Fix call of call_cgraph_insertion_hooks.
15777 2018-01-18 Martin Sebor <msebor@redhat.com>
15779 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15781 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15784 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15787 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
15790 * common.opt: (-ffile-prefix-map): New option.
15791 * opts.c (common_handle_option): Defer it.
15792 * opts-global.c (handle_common_deferred_options): Handle it.
15793 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15794 * file-prefix-map.h: New file.
15795 (remap_debug_filename, add_debug_prefix_map): ...here.
15796 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15797 * final.c (debug_prefix_map, add_debug_prefix_map
15798 remap_debug_filename): Move to...
15799 * file-prefix-map.c: New file.
15800 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15801 generalize, get rid of alloca(), use strrchr() instead of strchr().
15802 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15803 Implement in terms of add_prefix_map().
15804 (remap_macro_filename, remap_debug_filename): Implement in term of
15806 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15807 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15808 * dbxout.c: Include file-prefix-map.h.
15809 * varasm.c: Likewise.
15810 * vmsdbgout.c: Likewise.
15811 * xcoffout.c: Likewise.
15812 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15813 * doc/cppopts.texi (-fmacro-prefix-map): Document.
15814 * doc/invoke.texi (-ffile-prefix-map): Document.
15815 (-fdebug-prefix-map): Update description.
15817 2018-01-18 Martin Liska <mliska@suse.cz>
15819 * config/i386/i386.c (indirect_thunk_name): Document that also
15821 (output_indirect_thunk): Document why both instructions
15822 (pause and lfence) are generated.
15824 2018-01-18 Richard Biener <rguenther@suse.de>
15826 PR tree-optimization/83887
15827 * graphite-scop-detection.c
15828 (scop_detection::get_nearest_dom_with_single_entry): Remove.
15829 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15830 (scop_detection::merge_sese): Re-implement with a flood-fill
15831 algorithm that properly finds a SESE region if it exists.
15833 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15836 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15837 pointer_diff optimizations use view_convert instead of convert.
15839 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15841 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15842 Generate different code for -mno-speculate-indirect-jumps.
15843 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15844 (*call_indirect_aix<mode>): Disable for
15845 -mno-speculate-indirect-jumps.
15846 (*call_indirect_aix<mode>_nospec): New define_insn.
15847 (*call_value_indirect_aix<mode>): Disable for
15848 -mno-speculate-indirect-jumps.
15849 (*call_value_indirect_aix<mode>_nospec): New define_insn.
15850 (*sibcall_nonlocal_sysv<mode>): Generate different code for
15851 -mno-speculate-indirect-jumps.
15852 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15854 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15856 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15857 long double type, set the flags for noting the default long double
15858 type, even if we don't pass or return a long double type.
15860 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
15863 * ipa-inline.c (flatten_function): Do not overwrite final inlining
15866 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
15868 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15869 support for merge[hl].
15870 (fold_mergehl_helper): New helper function.
15871 (tree-vector-builder.h): New #include for tree_vector_builder usage.
15872 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15873 (altivec_vmrglw_direct): Add xxmrglw insn.
15875 2018-01-17 Andrew Waterman <andrew@sifive.com>
15877 * config/riscv/riscv.c (riscv_conditional_register_usage): If
15878 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15880 2018-01-17 David Malcolm <dmalcolm@redhat.com>
15883 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15884 call the lto_location_cache before reading the
15885 DECL_SOURCE_LOCATION of the types.
15887 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
15888 Richard Sandiford <richard.sandiford@linaro.org>
15890 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15891 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15892 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15893 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15894 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15896 * config/aarch64/constraints.md (aarch64_movti_operand):
15898 * config/aarch64/predicates.md (Uti): Add new constraint.
15900 2018-01-17 Carl Love <cel@us.ibm.com>
15902 * config/rs6000/vsx.md (define_expand xl_len_r,
15903 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15904 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15906 (define_expand, define_insn): Move the shift left from the
15907 define_insn to the define_expand for lxvl and stxvl instructions.
15908 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15909 and XL_LEN_R definitions to PURE.
15911 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
15913 * config/i386/i386.c (indirect_thunk_name): Declare regno
15914 as unsigned int. Compare regno with INVALID_REGNUM.
15915 (output_indirect_thunk): Ditto.
15916 (output_indirect_thunk_function): Ditto.
15917 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
15918 in the call to output_indirect_thunk_function.
15920 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
15922 PR middle-end/83884
15923 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15924 rather than the size of inner_type to determine the stack slot size
15925 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15927 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
15930 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15933 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
15935 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15936 endian Linux systems to optionally enable multilibs for selecting
15937 the long double type if the user configured an explicit type.
15938 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15939 have no long double multilibs if not defined.
15940 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15941 warn if the user used -mabi={ieee,ibm}longdouble and we built
15942 multilibs for long double.
15943 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15944 appropriate multilib option.
15945 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15947 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15948 for building long double multilibs.
15949 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15951 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
15953 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15956 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15958 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15961 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15964 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15967 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15969 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15970 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15972 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
15974 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15975 different rtl trees depending on TARGET_64BIT.
15976 (rs6000_gen_lvx): Likewise.
15978 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15980 * config/visium/visium.md (nop): Tweak comment.
15981 (hazard_nop): Likewise.
15983 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15985 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15986 -mspeculate-indirect-jumps.
15987 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15988 for -mno-speculate-indirect-jumps.
15989 (*call_indirect_elfv2<mode>_nospec): New define_insn.
15990 (*call_value_indirect_elfv2<mode>): Disable for
15991 -mno-speculate-indirect-jumps.
15992 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15993 (indirect_jump): Emit different RTL for
15994 -mno-speculate-indirect-jumps.
15995 (*indirect_jump<mode>): Disable for
15996 -mno-speculate-indirect-jumps.
15997 (*indirect_jump<mode>_nospec): New define_insn.
15998 (tablejump): Emit different RTL for
15999 -mno-speculate-indirect-jumps.
16000 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16001 (tablejumpsi_nospec): New define_expand.
16002 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16003 (tablejumpdi_nospec): New define_expand.
16004 (*tablejump<mode>_internal1): Disable for
16005 -mno-speculate-indirect-jumps.
16006 (*tablejump<mode>_internal1_nospec): New define_insn.
16007 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16010 2018-01-16 Artyom Skrobov tyomitch@gmail.com
16012 * caller-save.c (insert_save): Drop unnecessary parameter. All
16015 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16016 Richard Biener <rguenth@suse.de>
16019 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16020 return early, inline manually is_gimple_sizepos. Make sure if we
16021 call gimplify_expr we don't end up with a gimple constant.
16022 * tree.c (variably_modified_type_p): Don't return true for
16023 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
16024 * gimplify.h (is_gimple_sizepos): Remove.
16026 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16028 PR tree-optimization/83857
16029 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16030 vectorizable_live_operation for pure SLP statements.
16031 (vectorizable_live_operation): Handle PHIs.
16033 2018-01-16 Richard Biener <rguenther@suse.de>
16035 PR tree-optimization/83867
16036 * tree-vect-stmts.c (vect_transform_stmt): Precompute
16037 nested_in_vect_loop_p since the scalar stmt may get invalidated.
16039 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16042 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16043 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16044 If off is not INTEGER_CST, issue a may not be aligned warning
16045 rather than isn't aligned. Use isn%'t rather than isn't.
16046 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16048 <case MULT_EXPR>: Improve the case when bottom and one of the
16049 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16050 operand, in that case check if the other operand is multiple of
16051 bottom divided by the INTEGER_CST operand.
16053 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16056 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16057 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16058 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16059 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16060 * config/pa/pa.c (pa_function_arg_advance): Likewise.
16061 (pa_function_arg, pa_arg_partial_bytes): Likewise.
16062 (pa_function_arg_size): New function.
16064 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16066 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16067 in a separate statement.
16069 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16071 PR tree-optimization/83847
16072 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16073 group gathers and scatters.
16075 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16077 PR rtl-optimization/86620
16078 * params.def (max-sched-ready-insns): Bump minimum value to 1.
16080 PR rtl-optimization/83213
16081 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16082 to last if both are JUMP_INSNs.
16084 PR tree-optimization/83843
16085 * gimple-ssa-store-merging.c
16086 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16087 store_immediate_info for bswap/nop orig_stores.
16089 2018-01-15 Andrew Waterman <andrew@sifive.com>
16091 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16093 <UDIV>: Increase cost if !TARGET_DIV.
16095 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
16097 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16098 (define_attr "cr_logical_3op"): New.
16099 (cceq_ior_compare): Adjust.
16100 (cceq_ior_compare_complement): Adjust.
16101 (*cceq_rev_compare): Adjust.
16102 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16103 (is_cracked_insn): Adjust.
16104 (insn_must_be_first_in_group): Adjust.
16105 * config/rs6000/40x.md: Adjust.
16106 * config/rs6000/440.md: Adjust.
16107 * config/rs6000/476.md: Adjust.
16108 * config/rs6000/601.md: Adjust.
16109 * config/rs6000/603.md: Adjust.
16110 * config/rs6000/6xx.md: Adjust.
16111 * config/rs6000/7450.md: Adjust.
16112 * config/rs6000/7xx.md: Adjust.
16113 * config/rs6000/8540.md: Adjust.
16114 * config/rs6000/cell.md: Adjust.
16115 * config/rs6000/e300c2c3.md: Adjust.
16116 * config/rs6000/e500mc.md: Adjust.
16117 * config/rs6000/e500mc64.md: Adjust.
16118 * config/rs6000/e5500.md: Adjust.
16119 * config/rs6000/e6500.md: Adjust.
16120 * config/rs6000/mpc.md: Adjust.
16121 * config/rs6000/power4.md: Adjust.
16122 * config/rs6000/power5.md: Adjust.
16123 * config/rs6000/power6.md: Adjust.
16124 * config/rs6000/power7.md: Adjust.
16125 * config/rs6000/power8.md: Adjust.
16126 * config/rs6000/power9.md: Adjust.
16127 * config/rs6000/rs64.md: Adjust.
16128 * config/rs6000/titan.md: Adjust.
16130 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16132 * config/i386/predicates.md (indirect_branch_operand): Rewrite
16133 ix86_indirect_branch_register logic.
16135 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16137 * config/i386/constraints.md (Bs): Update
16138 ix86_indirect_branch_register check. Don't check
16139 ix86_indirect_branch_register with GOT_memory_operand.
16141 * config/i386/predicates.md (GOT_memory_operand): Don't check
16142 ix86_indirect_branch_register here.
16143 (GOT32_symbol_operand): Likewise.
16145 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16147 * config/i386/predicates.md (constant_call_address_operand):
16148 Rewrite ix86_indirect_branch_register logic.
16149 (sibcall_insn_operand): Likewise.
16151 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16153 * config/i386/constraints.md (Bs): Replace
16154 ix86_indirect_branch_thunk_register with
16155 ix86_indirect_branch_register.
16157 * config/i386/i386.md (indirect_jump): Likewise.
16158 (tablejump): Likewise.
16159 (*sibcall_memory): Likewise.
16160 (*sibcall_value_memory): Likewise.
16161 Peepholes of indirect call and jump via memory: Likewise.
16162 * config/i386/i386.opt: Likewise.
16163 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16164 (GOT_memory_operand): Likewise.
16165 (call_insn_operand): Likewise.
16166 (sibcall_insn_operand): Likewise.
16167 (GOT32_symbol_operand): Likewise.
16169 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16171 PR middle-end/83837
16172 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16173 type rather than type addr's type points to.
16174 (expand_omp_atomic_mutex): Likewise.
16175 (expand_omp_atomic): Likewise.
16177 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16180 * config/i386/i386.c (output_indirect_thunk_function): Use
16181 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16182 for __x86_return_thunk.
16184 2018-01-15 Richard Biener <rguenther@suse.de>
16186 PR middle-end/83850
16187 * expmed.c (extract_bit_field_1): Fix typo.
16189 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16192 * config/arm/iterators.md (VF): New mode iterator.
16193 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16194 Remove integer-related logic from pattern.
16195 (neon_vabd<mode>_3): Likewise.
16197 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16199 PR middle-end/82694
16200 * common.opt (fstrict-overflow): No longer an alias.
16201 (fwrapv-pointer): New option.
16202 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16203 also for pointer types based on flag_wrapv_pointer.
16204 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16205 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16206 opts->x_flag_wrapv got set.
16207 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16208 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16209 POINTER_TYPE_OVERFLOW_UNDEFINED.
16210 * match.pd: Likewise in address comparison pattern.
16211 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16213 2018-01-15 Richard Biener <rguenther@suse.de>
16216 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16217 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
16218 Reset type names to their identifier if their TYPE_DECL doesn't
16219 have linkage (and thus is used for ODR and devirt).
16220 (save_debug_info_for_decl): Remove.
16221 (save_debug_info_for_type): Likewise.
16222 (add_tree_to_fld_list): Adjust.
16223 * tree-pretty-print.c (dump_generic_node): Make dumping of
16224 type names more robust.
16226 2018-01-15 Richard Biener <rguenther@suse.de>
16228 * BASE-VER: Bump to 8.0.1.
16230 2018-01-14 Martin Sebor <msebor@redhat.com>
16233 * builtins.c (check_access): Avoid warning when the no-warning bit
16236 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
16238 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16239 * ira-color (allocno_hard_regs_compare): Likewise.
16241 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
16244 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16245 Use .pushsection/.popsection.
16247 2018-01-14 Martin Sebor <msebor@redhat.com>
16250 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16252 2018-01-14 Jakub Jelinek <jakub@redhat.com>
16254 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16255 entry from extra_headers.
16256 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16257 extra_headers, make the list bitwise identical to the i?86-*-* one.
16259 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16261 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16262 -mcmodel=large with -mindirect-branch=thunk,
16263 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16264 -mfunction-return=thunk-extern.
16265 * doc/invoke.texi: Document -mcmodel=large is incompatible with
16266 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16267 -mfunction-return=thunk and -mfunction-return=thunk-extern.
16269 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16271 * config/i386/i386.c (print_reg): Print the name of the full
16272 integer register without '%'.
16273 (ix86_print_operand): Handle 'V'.
16274 * doc/extend.texi: Document 'V' modifier.
16276 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16278 * config/i386/constraints.md (Bs): Disallow memory operand for
16279 -mindirect-branch-register.
16281 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16282 (GOT_memory_operand): Likewise.
16283 (call_insn_operand): Likewise.
16284 (sibcall_insn_operand): Likewise.
16285 (GOT32_symbol_operand): Likewise.
16286 * config/i386/i386.md (indirect_jump): Call convert_memory_address
16287 for -mindirect-branch-register.
16288 (tablejump): Likewise.
16289 (*sibcall_memory): Likewise.
16290 (*sibcall_value_memory): Likewise.
16291 Disallow peepholes of indirect call and jump via memory for
16292 -mindirect-branch-register.
16293 (*call_pop): Replace m with Bw.
16294 (*call_value_pop): Likewise.
16295 (*sibcall_pop_memory): Replace m with Bs.
16296 * config/i386/i386.opt (mindirect-branch-register): New option.
16297 * doc/invoke.texi: Document -mindirect-branch-register option.
16299 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16301 * config/i386/i386-protos.h (ix86_output_function_return): New.
16302 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16303 set function_return_type.
16304 (indirect_thunk_name): Add ret_p to indicate thunk for function
16306 (output_indirect_thunk_function): Pass false to
16307 indirect_thunk_name.
16308 (ix86_output_indirect_branch_via_reg): Likewise.
16309 (ix86_output_indirect_branch_via_push): Likewise.
16310 (output_indirect_thunk_function): Create alias for function
16311 return thunk if regno < 0.
16312 (ix86_output_function_return): New function.
16313 (ix86_handle_fndecl_attribute): Handle function_return.
16314 (ix86_attribute_table): Add function_return.
16315 * config/i386/i386.h (machine_function): Add
16316 function_return_type.
16317 * config/i386/i386.md (simple_return_internal): Use
16318 ix86_output_function_return.
16319 (simple_return_internal_long): Likewise.
16320 * config/i386/i386.opt (mfunction-return=): New option.
16321 (indirect_branch): Mention -mfunction-return=.
16322 * doc/extend.texi: Document function_return function attribute.
16323 * doc/invoke.texi: Document -mfunction-return= option.
16325 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16327 * config/i386/i386-opts.h (indirect_branch): New.
16328 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16329 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16330 with local indirect jump when converting indirect call and jump.
16331 (ix86_set_indirect_branch_type): New.
16332 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16333 (indirectlabelno): New.
16334 (indirect_thunk_needed): Likewise.
16335 (indirect_thunk_bnd_needed): Likewise.
16336 (indirect_thunks_used): Likewise.
16337 (indirect_thunks_bnd_used): Likewise.
16338 (INDIRECT_LABEL): Likewise.
16339 (indirect_thunk_name): Likewise.
16340 (output_indirect_thunk): Likewise.
16341 (output_indirect_thunk_function): Likewise.
16342 (ix86_output_indirect_branch_via_reg): Likewise.
16343 (ix86_output_indirect_branch_via_push): Likewise.
16344 (ix86_output_indirect_branch): Likewise.
16345 (ix86_output_indirect_jmp): Likewise.
16346 (ix86_code_end): Call output_indirect_thunk_function if needed.
16347 (ix86_output_call_insn): Call ix86_output_indirect_branch if
16349 (ix86_handle_fndecl_attribute): Handle indirect_branch.
16350 (ix86_attribute_table): Add indirect_branch.
16351 * config/i386/i386.h (machine_function): Add indirect_branch_type
16352 and has_local_indirect_jump.
16353 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16355 (tablejump): Likewise.
16356 (*indirect_jump): Use ix86_output_indirect_jmp.
16357 (*tablejump_1): Likewise.
16358 (simple_return_indirect_internal): Likewise.
16359 * config/i386/i386.opt (mindirect-branch=): New option.
16360 (indirect_branch): New.
16363 (thunk-inline): Likewise.
16364 (thunk-extern): Likewise.
16365 * doc/extend.texi: Document indirect_branch function attribute.
16366 * doc/invoke.texi: Document -mindirect-branch= option.
16368 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
16371 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16373 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
16375 * ipa-inline.c (want_inline_small_function_p): Return false if
16376 inlining has already failed with CIF_FINAL_ERROR.
16377 (update_caller_keys): Call want_inline_small_function_p before
16379 (update_callee_keys): Likewise.
16381 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
16383 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16385 (rs6000_quadword_masked_address_p): Likewise.
16386 (quad_aligned_load_p): Likewise.
16387 (quad_aligned_store_p): Likewise.
16388 (const_load_sequence_p): Add comment to describe the outer-most loop.
16389 (mimic_memory_attributes_and_flags): New function.
16390 (rs6000_gen_stvx): Likewise.
16391 (replace_swapped_aligned_store): Likewise.
16392 (rs6000_gen_lvx): Likewise.
16393 (replace_swapped_aligned_load): Likewise.
16394 (replace_swapped_load_constant): Capitalize argument name in
16395 comment describing this function.
16396 (rs6000_analyze_swaps): Add a third pass to search for vector loads
16397 and stores that access quad-word aligned addresses and replace
16398 with stvx or lvx instructions when appropriate.
16399 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16400 New function prototype.
16401 (rs6000_quadword_masked_address_p): Likewise.
16402 (rs6000_gen_lvx): Likewise.
16403 (rs6000_gen_stvx): Likewise.
16404 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16405 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16406 when memory address is aligned.
16407 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16408 this split to select lvx instruction when memory address is aligned.
16409 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16410 instruction when memory address is aligned.
16411 (*vsx_le_perm_load_v16qi): Likewise.
16412 (four unnamed splitters): Modify to select the stvx instruction
16413 when memory is aligned.
16415 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
16417 * predict.c (determine_unlikely_bbs): Handle correctly BBs
16418 which appears in the queue multiple times.
16420 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16421 Alan Hayward <alan.hayward@arm.com>
16422 David Sherwood <david.sherwood@arm.com>
16424 * tree-vectorizer.h (vec_lower_bound): New structure.
16425 (_loop_vec_info): Add check_nonzero and lower_bounds.
16426 (LOOP_VINFO_CHECK_NONZERO): New macro.
16427 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16428 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16429 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16430 fields. Make seg_len the distance travelled, not including the
16432 (dr_direction_indicator): Declare.
16433 (dr_zero_step_indicator): Likewise.
16434 (dr_known_forward_stride_p): Likewise.
16435 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16437 (runtime_alias_check_p): Allow runtime alias checks with
16439 (operator ==): Compare access_size and align.
16440 (prune_runtime_alias_test_list): Rework for new distinction between
16441 the access_size and seg_len.
16442 (create_intersect_range_checks_index): Likewise. Cope with polynomial
16444 (get_segment_min_max): New function.
16445 (create_intersect_range_checks): Use it.
16446 (dr_step_indicator): New function.
16447 (dr_direction_indicator): Likewise.
16448 (dr_zero_step_indicator): Likewise.
16449 (dr_known_forward_stride_p): Likewise.
16450 * tree-loop-distribution.c (data_ref_segment_size): Return
16451 DR_STEP * (niters - 1).
16452 (compute_alias_check_pairs): Update call to the dr_with_seg_len
16454 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16455 (vect_preserves_scalar_order_p): New function, split out from...
16456 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
16457 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16458 (vect_vfa_access_size): New function.
16459 (vect_vfa_align): Likewise.
16460 (vect_compile_time_alias): Take access_size_a and access_b arguments.
16461 (dump_lower_bound): New function.
16462 (vect_check_lower_bound): Likewise.
16463 (vect_small_gap_p): Likewise.
16464 (vectorizable_with_step_bound_p): Likewise.
16465 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16466 depencies if the vectorization factor is 1. Convert the checks
16467 for nonzero steps into checks on the bounds of DR_STEP. Try using
16468 a bunds check for variable steps if the minimum required step is
16469 relatively small. Update calls to the dr_with_seg_len
16470 constructor and to vect_compile_time_alias.
16471 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16473 (vect_loop_versioning): Call it.
16474 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16476 (vect_estimate_min_profitable_iters): Account for any bounds checks.
16478 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16479 Alan Hayward <alan.hayward@arm.com>
16480 David Sherwood <david.sherwood@arm.com>
16482 * doc/sourcebuild.texi (vect_scatter_store): Document.
16483 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16485 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16487 * genopinit.c (main): Add supports_vec_scatter_store and
16488 supports_vec_scatter_store_cached to target_optabs.
16489 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16490 IFN_MASK_SCATTER_STORE.
16491 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16493 * internal-fn.h (internal_store_fn_p): Declare.
16494 (internal_fn_stored_value_index): Likewise.
16495 * internal-fn.c (scatter_store_direct): New macro.
16496 (expand_scatter_store_optab_fn): New function.
16497 (direct_scatter_store_optab_supported_p): New macro.
16498 (internal_store_fn_p): New function.
16499 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16500 IFN_MASK_SCATTER_STORE.
16501 (internal_fn_mask_index): Likewise.
16502 (internal_fn_stored_value_index): New function.
16503 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16504 for scatter stores.
16505 * optabs-query.h (supports_vec_scatter_store_p): Declare.
16506 * optabs-query.c (supports_vec_scatter_store_p): New function.
16507 * tree-vectorizer.h (vect_get_store_rhs): Declare.
16508 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16509 true for scatter stores.
16510 (vect_gather_scatter_fn_p): Handle scatter stores too.
16511 (vect_check_gather_scatter): Consider using scatter stores if
16512 supports_vec_scatter_store_p.
16513 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16514 scatter stores too.
16515 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16516 internal_fn_stored_value_index.
16517 (check_load_store_masking): Handle scatter stores too.
16518 (vect_get_store_rhs): Make public.
16519 (vectorizable_call): Use internal_store_fn_p.
16520 (vectorizable_store): Handle scatter store internal functions.
16521 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16522 when deciding whether the end of the group has been reached.
16523 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16524 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16525 (mask_scatter_store<mode>): New insns.
16527 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16528 Alan Hayward <alan.hayward@arm.com>
16529 David Sherwood <david.sherwood@arm.com>
16531 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16532 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16533 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16535 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16536 Use vect_truncate_gather_scatter_offset if we can't treat the
16537 operation as a normal gather load or scatter store.
16538 (get_group_load_store_type): Take the gather_scatter_info
16539 as argument. Try using a gather load or scatter store for
16540 single-element groups.
16541 (get_load_store_type): Update calls to get_group_load_store_type
16542 and vect_use_strided_gather_scatters_p.
16544 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16545 Alan Hayward <alan.hayward@arm.com>
16546 David Sherwood <david.sherwood@arm.com>
16548 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16549 optional tree argument.
16550 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16552 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16553 but continue to use the current value as a fallback.
16554 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16555 to compare the updates.
16556 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16557 (get_load_store_type): Use it when handling a strided access.
16558 (vect_get_strided_load_store_ops): New function.
16559 (vect_get_data_ptr_increment): Likewise.
16560 (vectorizable_load): Handle strided gather loads. Always pass
16561 a step to vect_create_data_ref_ptr and bump_vector_ptr.
16563 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16564 Alan Hayward <alan.hayward@arm.com>
16565 David Sherwood <david.sherwood@arm.com>
16567 * doc/md.texi (gather_load@var{m}): Document.
16568 (mask_gather_load@var{m}): Likewise.
16569 * genopinit.c (main): Add supports_vec_gather_load and
16570 supports_vec_gather_load_cached to target_optabs.
16571 * optabs-tree.c (init_tree_optimization_optabs): Use
16572 ggc_cleared_alloc to allocate target_optabs.
16573 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16574 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16576 * internal-fn.h (internal_load_fn_p): Declare.
16577 (internal_gather_scatter_fn_p): Likewise.
16578 (internal_fn_mask_index): Likewise.
16579 (internal_gather_scatter_fn_supported_p): Likewise.
16580 * internal-fn.c (gather_load_direct): New macro.
16581 (expand_gather_load_optab_fn): New function.
16582 (direct_gather_load_optab_supported_p): New macro.
16583 (direct_internal_fn_optab): New function.
16584 (internal_load_fn_p): Likewise.
16585 (internal_gather_scatter_fn_p): Likewise.
16586 (internal_fn_mask_index): Likewise.
16587 (internal_gather_scatter_fn_supported_p): Likewise.
16588 * optabs-query.c (supports_at_least_one_mode_p): New function.
16589 (supports_vec_gather_load_p): Likewise.
16590 * optabs-query.h (supports_vec_gather_load_p): Declare.
16591 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16592 and memory_type field.
16593 (NUM_PATTERNS): Bump to 15.
16594 * tree-vect-data-refs.c: Include internal-fn.h.
16595 (vect_gather_scatter_fn_p): New function.
16596 (vect_describe_gather_scatter_call): Likewise.
16597 (vect_check_gather_scatter): Try using internal functions for
16598 gather loads. Recognize existing calls to a gather load function.
16599 (vect_analyze_data_refs): Consider using gather loads if
16600 supports_vec_gather_load_p.
16601 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16602 (vect_get_gather_scatter_offset_type): Likewise.
16603 (vect_convert_mask_for_vectype): Likewise.
16604 (vect_add_conversion_to_patterm): Likewise.
16605 (vect_try_gather_scatter_pattern): Likewise.
16606 (vect_recog_gather_scatter_pattern): New pattern recognizer.
16607 (vect_vect_recog_func_ptrs): Add it.
16608 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16609 internal_fn_mask_index and internal_gather_scatter_fn_p.
16610 (check_load_store_masking): Take the gather_scatter_info as an
16611 argument and handle gather loads.
16612 (vect_get_gather_scatter_ops): New function.
16613 (vectorizable_call): Check internal_load_fn_p.
16614 (vectorizable_load): Likewise. Handle gather load internal
16616 (vectorizable_store): Update call to check_load_store_masking.
16617 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16618 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16619 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16620 (aarch64_gather_scale_operand_d): New predicates.
16621 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16622 (mask_gather_load<mode>): New insns.
16624 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16625 Alan Hayward <alan.hayward@arm.com>
16626 David Sherwood <david.sherwood@arm.com>
16628 * optabs.def (fold_left_plus_optab): New optab.
16629 * doc/md.texi (fold_left_plus_@var{m}): Document.
16630 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16631 * internal-fn.c (fold_left_direct): Define.
16632 (expand_fold_left_optab_fn): Likewise.
16633 (direct_fold_left_optab_supported_p): Likewise.
16634 * fold-const-call.c (fold_const_fold_left): New function.
16635 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16636 * tree-parloops.c (valid_reduction_p): New function.
16637 (gather_scalar_reductions): Use it.
16638 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16639 (vect_finish_replace_stmt): Declare.
16640 * tree-vect-loop.c (fold_left_reduction_fn): New function.
16641 (needs_fold_left_reduction_p): New function, split out from...
16642 (vect_is_simple_reduction): ...here. Accept reductions that
16643 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16644 (vect_force_simple_reduction): Also store the reduction type in
16645 the assignment's STMT_VINFO_REDUC_TYPE.
16646 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16647 (merge_with_identity): New function.
16648 (vect_expand_fold_left): Likewise.
16649 (vectorize_fold_left_reduction): Likewise.
16650 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
16651 scalar phi in place for it. Check for target support and reject
16652 cases that would reassociate the operation. Defer the transform
16653 phase to vectorize_fold_left_reduction.
16654 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16655 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16656 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16658 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16660 * tree-if-conv.c (predicate_mem_writes): Remove redundant
16661 call to ifc_temp_var.
16663 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16664 Alan Hayward <alan.hayward@arm.com>
16665 David Sherwood <david.sherwood@arm.com>
16667 * target.def (legitimize_address_displacement): Take the original
16668 offset as a poly_int.
16669 * targhooks.h (default_legitimize_address_displacement): Update
16671 * targhooks.c (default_legitimize_address_displacement): Likewise.
16672 * doc/tm.texi: Regenerate.
16673 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16674 as an argument, moving assert of ad->disp == ad->disp_term to...
16675 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
16676 Try calling targetm.legitimize_address_displacement before expanding
16677 the address rather than afterwards, and adjust for the new interface.
16678 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16679 Match the new hook interface. Handle SVE addresses.
16680 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16681 new hook interface.
16683 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16685 * Makefile.in (OBJS): Add early-remat.o.
16686 * target.def (select_early_remat_modes): New hook.
16687 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16688 * doc/tm.texi: Regenerate.
16689 * targhooks.h (default_select_early_remat_modes): Declare.
16690 * targhooks.c (default_select_early_remat_modes): New function.
16691 * timevar.def (TV_EARLY_REMAT): New timevar.
16692 * passes.def (pass_early_remat): New pass.
16693 * tree-pass.h (make_pass_early_remat): Declare.
16694 * early-remat.c: New file.
16695 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16697 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16699 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16700 Alan Hayward <alan.hayward@arm.com>
16701 David Sherwood <david.sherwood@arm.com>
16703 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16704 vfm1 with a bound_epilog parameter.
16705 (vect_do_peeling): Update calls accordingly, and move the prologue
16706 call earlier in the function. Treat the base bound_epilog as 0 for
16707 fully-masked loops and retain vf - 1 for other loops. Add 1 to
16708 this base when peeling for gaps.
16709 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16710 with fully-masked loops.
16711 (vect_estimate_min_profitable_iters): Handle the single peeled
16712 iteration in that case.
16714 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16715 Alan Hayward <alan.hayward@arm.com>
16716 David Sherwood <david.sherwood@arm.com>
16718 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16719 single-element interleaving even if the size is not a power of 2.
16720 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16721 accesses for single-element interleaving if the group size is
16724 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16725 Alan Hayward <alan.hayward@arm.com>
16726 David Sherwood <david.sherwood@arm.com>
16728 * doc/md.texi (fold_extract_last_@var{m}): Document.
16729 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16730 * optabs.def (fold_extract_last_optab): New optab.
16731 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16732 * internal-fn.c (fold_extract_direct): New macro.
16733 (expand_fold_extract_optab_fn): Likewise.
16734 (direct_fold_extract_optab_supported_p): Likewise.
16735 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16736 * tree-vect-loop.c (vect_model_reduction_cost): Handle
16737 EXTRACT_LAST_REDUCTION.
16738 (get_initial_def_for_reduction): Do not create an initial vector
16739 for EXTRACT_LAST_REDUCTION reductions.
16740 (vectorizable_reduction): Leave the scalar phi in place for
16741 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
16742 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
16743 epilogue code for EXTRACT_LAST_REDUCTION and defer the
16744 transform phase to vectorizable_condition.
16745 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16747 (vect_finish_stmt_generation): ...here.
16748 (vect_finish_replace_stmt): New function.
16749 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16750 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16752 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
16754 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16755 Alan Hayward <alan.hayward@arm.com>
16756 David Sherwood <david.sherwood@arm.com>
16758 * doc/md.texi (extract_last_@var{m}): Document.
16759 * optabs.def (extract_last_optab): New optab.
16760 * internal-fn.def (EXTRACT_LAST): New internal function.
16761 * internal-fn.c (cond_unary_direct): New macro.
16762 (expand_cond_unary_optab_fn): Likewise.
16763 (direct_cond_unary_optab_supported_p): Likewise.
16764 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16765 loops using EXTRACT_LAST.
16766 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16767 (extract_last_<mode>): ...this optab.
16768 (vec_extract<mode><Vel>): Update accordingly.
16770 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16771 Alan Hayward <alan.hayward@arm.com>
16772 David Sherwood <david.sherwood@arm.com>
16774 * target.def (empty_mask_is_expensive): New hook.
16775 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16776 * doc/tm.texi: Regenerate.
16777 * targhooks.h (default_empty_mask_is_expensive): Declare.
16778 * targhooks.c (default_empty_mask_is_expensive): New function.
16779 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16780 if the target says that empty masks are expensive.
16781 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16783 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16785 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16786 Alan Hayward <alan.hayward@arm.com>
16787 David Sherwood <david.sherwood@arm.com>
16789 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16790 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16791 (vect_use_loop_mask_for_alignment_p): New function.
16792 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16793 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16794 niters_skip argument. Make sure that the first niters_skip elements
16795 of the first iteration are inactive.
16796 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16797 Update call to vect_set_loop_masks_directly.
16798 (get_misalign_in_elems): New function, split out from...
16799 (vect_gen_prolog_loop_niters): ...here.
16800 (vect_update_init_of_dr): Take a code argument that specifies whether
16801 the adjustment should be added or subtracted.
16802 (vect_update_init_of_drs): Likewise.
16803 (vect_prepare_for_masked_peels): New function.
16804 (vect_do_peeling): Skip prologue peeling if we're using a mask
16805 instead. Update call to vect_update_inits_of_drs.
16806 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16808 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16809 alignment. Do not include the number of peeled iterations in
16810 the minimum threshold in that case.
16811 (vectorizable_induction): Adjust the start value down by
16812 LOOP_VINFO_MASK_SKIP_NITERS iterations.
16813 (vect_transform_loop): Call vect_prepare_for_masked_peels.
16814 Take the number of skipped iterations into account when calculating
16816 * tree-vect-stmts.c (vect_gen_while_not): New function.
16818 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16819 Alan Hayward <alan.hayward@arm.com>
16820 David Sherwood <david.sherwood@arm.com>
16822 * doc/sourcebuild.texi (vect_fully_masked): Document.
16823 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16824 default value to 0.
16825 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16827 (vect_analyze_loop_2): ...here. Don't check the vectorization
16828 factor against the number of loop iterations if the loop is
16831 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16832 Alan Hayward <alan.hayward@arm.com>
16833 David Sherwood <david.sherwood@arm.com>
16835 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16836 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16837 (dump_groups): Update accordingly.
16838 (iv_use::mem_type): New member variable.
16839 (address_p): New function.
16840 (record_use): Add a mem_type argument and initialize the new
16842 (record_group_use): Add a mem_type argument. Use address_p.
16843 Remove obsolete null checks of base_object. Update call to record_use.
16844 (find_interesting_uses_op): Update call to record_group_use.
16845 (find_interesting_uses_cond): Likewise.
16846 (find_interesting_uses_address): Likewise.
16847 (get_mem_type_for_internal_fn): New function.
16848 (find_address_like_use): Likewise.
16849 (find_interesting_uses_stmt): Try find_address_like_use before
16850 calling find_interesting_uses_op.
16851 (addr_offset_valid_p): Use the iv mem_type field as the type
16852 of the addressed memory.
16853 (add_autoinc_candidates): Likewise.
16854 (get_address_cost): Likewise.
16855 (split_small_address_groups_p): Use address_p.
16856 (split_address_groups): Likewise.
16857 (add_iv_candidate_for_use): Likewise.
16858 (autoinc_possible_for_pair): Likewise.
16859 (rewrite_groups): Likewise.
16860 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16861 (determine_group_iv_cost): Update after split of USE_ADDRESS.
16862 (get_alias_ptr_type_for_ptr_address): New function.
16863 (rewrite_use_address): Rewrite address uses in calls that were
16864 identified by find_address_like_use.
16866 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16867 Alan Hayward <alan.hayward@arm.com>
16868 David Sherwood <david.sherwood@arm.com>
16870 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16872 * gimple-expr.h (is_gimple_addressable: Likewise.
16873 * gimple-expr.c (is_gimple_address): Likewise.
16874 * internal-fn.c (expand_call_mem_ref): New function.
16875 (expand_mask_load_optab_fn): Use it.
16876 (expand_mask_store_optab_fn): Likewise.
16878 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16879 Alan Hayward <alan.hayward@arm.com>
16880 David Sherwood <david.sherwood@arm.com>
16882 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16883 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16884 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16885 (cond_umax@var{mode}): Document.
16886 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16887 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16888 (cond_umin_optab, cond_umax_optab): New optabs.
16889 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16890 (COND_IOR, COND_XOR): New internal functions.
16891 * internal-fn.h (get_conditional_internal_fn): Declare.
16892 * internal-fn.c (cond_binary_direct): New macro.
16893 (expand_cond_binary_optab_fn): Likewise.
16894 (direct_cond_binary_optab_supported_p): Likewise.
16895 (get_conditional_internal_fn): New function.
16896 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16897 Cope with reduction statements that are vectorized as calls rather
16899 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16900 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16901 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16902 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16903 (UNSPEC_COND_EOR): New unspecs.
16904 (optab): Add mappings for them.
16905 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16906 (sve_int_op, sve_fp_op): New int attributes.
16908 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16909 Alan Hayward <alan.hayward@arm.com>
16910 David Sherwood <david.sherwood@arm.com>
16912 * optabs.def (while_ult_optab): New optab.
16913 * doc/md.texi (while_ult@var{m}@var{n}): Document.
16914 * internal-fn.def (WHILE_ULT): New internal function.
16915 * internal-fn.h (direct_internal_fn_supported_p): New override
16916 that takes two types as argument.
16917 * internal-fn.c (while_direct): New macro.
16918 (expand_while_optab_fn): New function.
16919 (convert_optab_supported_p): Likewise.
16920 (direct_while_optab_supported_p): New macro.
16921 * wide-int.h (wi::udiv_ceil): New function.
16922 * tree-vectorizer.h (rgroup_masks): New structure.
16923 (vec_loop_masks): New typedef.
16924 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16925 and fully_masked_p.
16926 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16927 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16928 (vect_max_vf): New function.
16929 (slpeel_make_loop_iterate_ntimes): Delete.
16930 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16931 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16932 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16933 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16934 internal-fn.h, stor-layout.h and optabs-query.h.
16935 (vect_set_loop_mask): New function.
16936 (add_preheader_seq): Likewise.
16937 (add_header_seq): Likewise.
16938 (interleave_supported_p): Likewise.
16939 (vect_maybe_permute_loop_masks): Likewise.
16940 (vect_set_loop_masks_directly): Likewise.
16941 (vect_set_loop_condition_masked): Likewise.
16942 (vect_set_loop_condition_unmasked): New function, split out from
16943 slpeel_make_loop_iterate_ntimes.
16944 (slpeel_make_loop_iterate_ntimes): Rename to..
16945 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
16946 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16947 (vect_do_peeling): Update call accordingly.
16948 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16950 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16951 mask_compare_type, can_fully_mask_p and fully_masked_p.
16952 (release_vec_loop_masks): New function.
16953 (_loop_vec_info): Use it to free the loop masks.
16954 (can_produce_all_loop_masks_p): New function.
16955 (vect_get_max_nscalars_per_iter): Likewise.
16956 (vect_verify_full_masking): Likewise.
16957 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16958 retries, and free the mask rgroups before retrying. Check loop-wide
16959 reasons for disallowing fully-masked loops. Make the final decision
16960 about whether use a fully-masked loop or not.
16961 (vect_estimate_min_profitable_iters): Do not assume that peeling
16962 for the number of iterations will be needed for fully-masked loops.
16963 (vectorizable_reduction): Disable fully-masked loops.
16964 (vectorizable_live_operation): Likewise.
16965 (vect_halve_mask_nunits): New function.
16966 (vect_double_mask_nunits): Likewise.
16967 (vect_record_loop_mask): Likewise.
16968 (vect_get_loop_mask): Likewise.
16969 (vect_transform_loop): Handle the case in which the final loop
16970 iteration might handle a partial vector. Call vect_set_loop_condition
16971 instead of slpeel_make_loop_iterate_ntimes.
16972 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16973 (check_load_store_masking): New function.
16974 (prepare_load_store_mask): Likewise.
16975 (vectorizable_store): Handle fully-masked loops.
16976 (vectorizable_load): Likewise.
16977 (supportable_widening_operation): Use vect_halve_mask_nunits for
16979 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16980 (vect_gen_while): New function.
16981 * config/aarch64/aarch64.md (umax<mode>3): New expander.
16982 (aarch64_uqdec<mode>): New insn.
16984 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16985 Alan Hayward <alan.hayward@arm.com>
16986 David Sherwood <david.sherwood@arm.com>
16988 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16989 (reduc_xor_scal_optab): New optabs.
16990 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16991 (reduc_xor_scal_@var{m}): Document.
16992 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16993 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16994 internal functions.
16995 * fold-const-call.c (fold_const_call): Handle them.
16996 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16997 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16998 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16999 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17000 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17001 (UNSPEC_XORV): New unspecs.
17002 (optab): Add entries for them.
17003 (BITWISEV): New int iterator.
17004 (bit_reduc_op): New int attributes.
17006 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17007 Alan Hayward <alan.hayward@arm.com>
17008 David Sherwood <david.sherwood@arm.com>
17010 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17011 * internal-fn.def (VEC_SHL_INSERT): New internal function.
17012 * optabs.def (vec_shl_insert_optab): New optab.
17013 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17014 (duplicate_and_interleave): Likewise.
17015 * tree-vect-loop.c: Include internal-fn.h.
17016 (neutral_op_for_slp_reduction): New function, split out from
17017 get_initial_defs_for_reduction.
17018 (get_initial_def_for_reduction): Handle option 2 for variable-length
17019 vectors by loading the neutral value into a vector and then shifting
17020 the initial value into element 0.
17021 (get_initial_defs_for_reduction): Replace the code argument with
17022 the neutral value calculated by neutral_op_for_slp_reduction.
17023 Use gimple_build_vector for constant-length vectors.
17024 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17025 but the first group_size elements have a neutral value.
17026 Use duplicate_and_interleave otherwise.
17027 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17028 Update call to get_initial_defs_for_reduction. Handle SLP
17029 reductions for variable-length vectors by creating one vector
17030 result for each scalar result, with the elements associated
17031 with other scalar results stubbed out with the neutral value.
17032 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17033 Require IFN_VEC_SHL_INSERT for double reductions on
17034 variable-length vectors, or SLP reductions that have
17035 a neutral value. Require can_duplicate_and_interleave_p
17036 support for variable-length unchained SLP reductions if there
17037 is no neutral value, such as for MIN/MAX reductions. Also require
17038 the number of vector elements to be a multiple of the number of
17039 SLP statements when doing variable-length unchained SLP reductions.
17040 Update call to vect_create_epilog_for_reduction.
17041 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17042 and remove initial values.
17043 (duplicate_and_interleave): Make public.
17044 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17045 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17047 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17048 Alan Hayward <alan.hayward@arm.com>
17049 David Sherwood <david.sherwood@arm.com>
17051 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17052 (can_duplicate_and_interleave_p): New function.
17053 (vect_get_and_check_slp_defs): Take the vector of statements
17054 rather than just the current one. Remove excess parentheses.
17055 Restriction rejectinon of vect_constant_def and vect_external_def
17056 for variable-length vectors to boolean types, or types for which
17057 can_duplicate_and_interleave_p is false.
17058 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17059 (duplicate_and_interleave): New function.
17060 (vect_get_constant_vectors): Use gimple_build_vector for
17061 constant-length vectors and suitable variable-length constant
17062 vectors. Use duplicate_and_interleave for other variable-length
17063 vectors. Don't defer the update when inserting new statements.
17065 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17066 Alan Hayward <alan.hayward@arm.com>
17067 David Sherwood <david.sherwood@arm.com>
17069 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17070 min_profitable_iters doesn't go negative.
17072 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17073 Alan Hayward <alan.hayward@arm.com>
17074 David Sherwood <david.sherwood@arm.com>
17076 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17077 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17078 * optabs.def (vec_mask_load_lanes_optab): New optab.
17079 (vec_mask_store_lanes_optab): Likewise.
17080 * internal-fn.def (MASK_LOAD_LANES): New internal function.
17081 (MASK_STORE_LANES): Likewise.
17082 * internal-fn.c (mask_load_lanes_direct): New macro.
17083 (mask_store_lanes_direct): Likewise.
17084 (expand_mask_load_optab_fn): Handle masked operations.
17085 (expand_mask_load_lanes_optab_fn): New macro.
17086 (expand_mask_store_optab_fn): Handle masked operations.
17087 (expand_mask_store_lanes_optab_fn): New macro.
17088 (direct_mask_load_lanes_optab_supported_p): Likewise.
17089 (direct_mask_store_lanes_optab_supported_p): Likewise.
17090 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17092 (vect_load_lanes_supported): Likewise.
17093 * tree-vect-data-refs.c (strip_conversion): New function.
17094 (can_group_stmts_p): Likewise.
17095 (vect_analyze_data_ref_accesses): Use it instead of checking
17096 for a pair of assignments.
17097 (vect_store_lanes_supported): Take a masked_p parameter.
17098 (vect_load_lanes_supported): Likewise.
17099 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17100 vect_store_lanes_supported and vect_load_lanes_supported.
17101 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17102 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17103 parameter. Don't allow gaps for masked accesses.
17104 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
17105 and vect_load_lanes_supported.
17106 (get_load_store_type): Take a masked_p parameter and update
17107 call to get_group_load_store_type.
17108 (vectorizable_store): Update call to get_load_store_type.
17109 Handle IFN_MASK_STORE_LANES.
17110 (vectorizable_load): Update call to get_load_store_type.
17111 Handle IFN_MASK_LOAD_LANES.
17113 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17114 Alan Hayward <alan.hayward@arm.com>
17115 David Sherwood <david.sherwood@arm.com>
17117 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17119 * config/aarch64/aarch64-protos.h
17120 (aarch64_sve_struct_memory_operand_p): Declare.
17121 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17122 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17123 (VPRED, vpred): Handle SVE structure modes.
17124 * config/aarch64/constraints.md (Utx): New constraint.
17125 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17126 (aarch64_sve_struct_nonimmediate_operand): New predicates.
17127 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17128 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17129 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17130 structure modes. Split into pieces after RA.
17131 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17132 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17134 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17135 SVE structure modes.
17136 (aarch64_classify_address): Likewise.
17137 (sizetochar): Move earlier in file.
17138 (aarch64_print_operand): Handle SVE register lists.
17139 (aarch64_array_mode): New function.
17140 (aarch64_sve_struct_memory_operand_p): Likewise.
17141 (TARGET_ARRAY_MODE): Redefine.
17143 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17144 Alan Hayward <alan.hayward@arm.com>
17145 David Sherwood <david.sherwood@arm.com>
17147 * target.def (array_mode): New target hook.
17148 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17149 * doc/tm.texi: Regenerate.
17150 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17151 * hooks.c (hook_optmode_mode_uhwi_none): New function.
17152 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17153 targetm.array_mode.
17154 * stor-layout.c (mode_for_array): Likewise. Support polynomial
17157 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17158 Alan Hayward <alan.hayward@arm.com>
17159 David Sherwood <david.sherwood@arm.com>
17161 * fold-const.c (fold_binary_loc): Check the argument types
17162 rather than the result type when testing for a vector operation.
17164 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17166 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17167 * doc/tm.texi: Regenerate.
17169 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17170 Alan Hayward <alan.hayward@arm.com>
17171 David Sherwood <david.sherwood@arm.com>
17173 * doc/invoke.texi (-msve-vector-bits=): Document new option.
17174 (sve): Document new AArch64 extension.
17175 * doc/md.texi (w): Extend the description of the AArch64
17176 constraint to include SVE vectors.
17177 (Upl, Upa): Document new AArch64 predicate constraints.
17178 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17180 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17181 (msve-vector-bits=): New option.
17182 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17183 SVE when these are disabled.
17184 (sve): New extension.
17185 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17186 modes. Adjust their number of units based on aarch64_sve_vg.
17187 (MAX_BITSIZE_MODE_ANY_MODE): Define.
17188 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17189 aarch64_addr_query_type.
17190 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17191 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17192 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17193 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17194 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17195 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17196 (aarch64_simd_imm_zero_p): Delete.
17197 (aarch64_check_zero_based_sve_index_immediate): Declare.
17198 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17199 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17200 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17201 (aarch64_sve_float_mul_immediate_p): Likewise.
17202 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17203 rather than an rtx.
17204 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17205 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17206 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17207 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17208 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17209 (aarch64_regmode_natural_size): Likewise.
17210 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17211 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17213 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17214 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17215 for VG and the SVE predicate registers.
17216 (V_ALIASES): Add a "z"-prefixed alias.
17217 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17218 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17219 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17220 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17221 (REG_CLASS_NAMES): Add entries for them.
17222 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
17223 and the predicate registers.
17224 (aarch64_sve_vg): Declare.
17225 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17226 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17227 (REGMODE_NATURAL_SIZE): Define.
17228 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17230 * config/aarch64/aarch64.c: Include cfgrtl.h.
17231 (simd_immediate_info): Add a constructor for series vectors,
17232 and an associated step field.
17233 (aarch64_sve_vg): New variable.
17234 (aarch64_dbx_register_number): Handle VG and the predicate registers.
17235 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17236 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17237 (VEC_ANY_DATA, VEC_STRUCT): New constants.
17238 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17239 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17240 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17241 (aarch64_get_mask_mode): New functions.
17242 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17243 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17244 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
17245 predicate modes and predicate registers. Explicitly restrict
17246 GPRs to modes of 16 bytes or smaller. Only allow FP registers
17247 to store a vector mode if it is recognized by
17248 aarch64_classify_vector_mode.
17249 (aarch64_regmode_natural_size): New function.
17250 (aarch64_hard_regno_caller_save_mode): Return the original mode
17252 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17253 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17254 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17255 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17257 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
17258 does not overlap dest if the function is frame-related. Handle
17260 (aarch64_split_add_offset): New function.
17261 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17262 them aarch64_add_offset.
17263 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17264 and update call to aarch64_sub_sp.
17265 (aarch64_add_cfa_expression): New function.
17266 (aarch64_expand_prologue): Pass extra temporary registers to the
17267 functions above. Handle the case in which we need to emit new
17268 DW_CFA_expressions for registers that were originally saved
17269 relative to the stack pointer, but now have to be expressed
17270 relative to the frame pointer.
17271 (aarch64_output_mi_thunk): Pass extra temporary registers to the
17273 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
17274 IP0 and IP1 values for SVE frames.
17275 (aarch64_expand_vec_series): New function.
17276 (aarch64_expand_sve_widened_duplicate): Likewise.
17277 (aarch64_expand_sve_const_vector): Likewise.
17278 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17279 Handle SVE constants. Use emit_move_insn to move a force_const_mem
17280 into the register, rather than emitting a SET directly.
17281 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17282 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17283 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17284 (offset_9bit_signed_scaled_p): New functions.
17285 (aarch64_replicate_bitmask_imm): New function.
17286 (aarch64_bitmask_imm): Use it.
17287 (aarch64_cannot_force_const_mem): Reject expressions involving
17288 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
17289 (aarch64_classify_index): Handle SVE indices, by requiring
17290 a plain register index with a scale that matches the element size.
17291 (aarch64_classify_address): Handle SVE addresses. Assert that
17292 the mode of the address is VOIDmode or an integer mode.
17293 Update call to aarch64_classify_symbol.
17294 (aarch64_classify_symbolic_expression): Update call to
17295 aarch64_classify_symbol.
17296 (aarch64_const_vec_all_in_range_p): New function.
17297 (aarch64_print_vector_float_operand): Likewise.
17298 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
17299 "vN" for FP registers with SVE modes. Handle (const ...) vectors
17300 and the FP immediates 1.0 and 0.5.
17301 (aarch64_print_address_internal): Handle SVE addresses.
17302 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17303 (aarch64_regno_regclass): Handle predicate registers.
17304 (aarch64_secondary_reload): Handle big-endian reloads of SVE
17306 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17307 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17308 (aarch64_convert_sve_vector_bits): New function.
17309 (aarch64_override_options): Use it to handle -msve-vector-bits=.
17310 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17311 rather than an rtx.
17312 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17313 Handle SVE vector and predicate modes. Accept VL-based constants
17314 that need only one temporary register, and VL offsets that require
17315 no temporary registers.
17316 (aarch64_conditional_register_usage): Mark the predicate registers
17317 as fixed if SVE isn't available.
17318 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17319 Return true for SVE vector and predicate modes.
17320 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17321 rather than an unsigned int. Handle SVE modes.
17322 (aarch64_preferred_simd_mode): Update call accordingly. Handle
17324 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17326 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17327 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17328 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17329 (aarch64_sve_float_mul_immediate_p): New functions.
17330 (aarch64_sve_valid_immediate): New function.
17331 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17332 Explicitly reject structure modes. Check for INDEX constants.
17333 Handle PTRUE and PFALSE constants.
17334 (aarch64_check_zero_based_sve_index_immediate): New function.
17335 (aarch64_simd_imm_zero_p): Delete.
17336 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17337 vector modes. Accept constants in the range of CNT[BHWD].
17338 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17339 ask for an Advanced SIMD mode.
17340 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17341 (aarch64_simd_vector_alignment): Handle SVE predicates.
17342 (aarch64_vectorize_preferred_vector_alignment): New function.
17343 (aarch64_simd_vector_alignment_reachable): Use it instead of
17345 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17346 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17348 (MAX_VECT_LEN): Delete.
17349 (expand_vec_perm_d): Add a vec_flags field.
17350 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17351 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17352 (aarch64_evpc_ext): Don't apply a big-endian lane correction
17354 (aarch64_evpc_rev): Rename to...
17355 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
17356 (aarch64_evpc_rev_global): New function.
17357 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17358 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17360 (aarch64_evpc_sve_tbl): New function.
17361 (aarch64_expand_vec_perm_const_1): Update after rename of
17362 aarch64_evpc_rev. Handle SVE permutes too, trying
17363 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17364 than aarch64_evpc_tbl.
17365 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17366 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17367 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17368 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17369 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17370 (aarch64_expand_sve_vcond): New functions.
17371 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17372 of aarch64_vector_mode_p.
17373 (aarch64_dwarf_poly_indeterminate_value): New function.
17374 (aarch64_compute_pressure_classes): Likewise.
17375 (aarch64_can_change_mode_class): Likewise.
17376 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17377 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17378 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17379 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17380 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17381 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17382 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17383 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17385 (Dn, Dl, Dr): Accept const as well as const_vector.
17386 (Dz): Likewise. Compare against CONST0_RTX.
17387 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17388 of "vector" where appropriate.
17389 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17390 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17391 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17392 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17393 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17394 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17395 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17396 (v_int_equiv): Extend to SVE modes.
17397 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17399 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17400 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17401 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17402 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17403 (SVE_COND_FP_CMP): New int iterators.
17404 (perm_hilo): Handle the new unpack unspecs.
17405 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17407 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17408 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17409 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17410 (aarch64_equality_operator, aarch64_constant_vector_operand)
17411 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17412 (aarch64_sve_nonimmediate_operand): Likewise.
17413 (aarch64_sve_general_operand): Likewise.
17414 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17415 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17416 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17417 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17418 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17419 (aarch64_sve_float_arith_immediate): Likewise.
17420 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17421 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17422 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17423 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17424 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17425 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17426 (aarch64_sve_float_arith_operand): Likewise.
17427 (aarch64_sve_float_arith_with_sub_operand): Likewise.
17428 (aarch64_sve_float_mul_operand): Likewise.
17429 (aarch64_sve_vec_perm_operand): Likewise.
17430 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17431 (aarch64_mov_operand): Accept const_poly_int and const_vector.
17432 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17433 as well as const_vector.
17434 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17435 in file. Use CONST0_RTX and CONSTM1_RTX.
17436 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
17437 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17438 Use aarch64_simd_imm_zero.
17439 * config/aarch64/aarch64-sve.md: New file.
17440 * config/aarch64/aarch64.md: Include it.
17441 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17442 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17443 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17444 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17445 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17446 (sve): New attribute.
17447 (enabled): Disable instructions with the sve attribute unless
17449 (movqi, movhi): Pass CONST_POLY_INT operaneds through
17450 aarch64_expand_mov_immediate.
17451 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17452 CNT[BHSD] immediates.
17453 (movti): Split CONST_POLY_INT moves into two halves.
17454 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17455 Split additions that need a temporary here if the destination
17456 is the stack pointer.
17457 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17458 (*add<mode>3_poly_1): New instruction.
17459 (set_clobber_cc): New expander.
17461 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17463 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17464 parameter and use it instead of GET_MODE_SIZE (innermode). Use
17465 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17466 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17467 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
17468 Change innermode from fixed_mode_size to machine_mode.
17469 (simplify_subreg): Update call accordingly. Handle a constant-sized
17470 subreg of a variable-length CONST_VECTOR.
17472 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17473 Alan Hayward <alan.hayward@arm.com>
17474 David Sherwood <david.sherwood@arm.com>
17476 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17477 (add_offset_to_base): New function, split out from...
17478 (create_mem_ref): ...here. When handling a scale other than 1,
17479 check first whether the address is valid without the offset.
17480 Add it into the base if so, leaving the index and scale as-is.
17482 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17485 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17486 fold_for_warn before checking if arg2 is INTEGER_CST.
17488 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
17490 * config/rs6000/predicates.md (load_multiple_operation): Delete.
17491 (store_multiple_operation): Delete.
17492 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17493 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17494 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17495 guarded by TARGET_STRING.
17496 (rs6000_output_load_multiple): Delete.
17497 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17498 OPTION_MASK_STRING / TARGET_STRING handling.
17499 (print_operand) <'N', 'O'>: Add comment that these are unused now.
17500 (const rs6000_opt_masks) <"string">: Change mask to 0.
17501 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17502 (MASK_STRING): Delete.
17503 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17505 (load_multiple): Delete.
17512 (store_multiple): Delete.
17519 (movmemsi_8reg): Delete.
17520 (corresponding unnamed define_insn): Delete.
17521 (movmemsi_6reg): Delete.
17522 (corresponding unnamed define_insn): Delete.
17523 (movmemsi_4reg): Delete.
17524 (corresponding unnamed define_insn): Delete.
17525 (movmemsi_2reg): Delete.
17526 (corresponding unnamed define_insn): Delete.
17527 (movmemsi_1reg): Delete.
17528 (corresponding unnamed define_insn): Delete.
17529 * config/rs6000/rs6000.opt (mno-string): New.
17530 (mstring): Replace by deprecation warning stub.
17531 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17533 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17535 * regrename.c (regrename_do_replace): If replacing the same
17536 reg multiple times, try to reuse last created gen_raw_REG.
17539 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17540 main to workaround a bug in GDB.
17542 2018-01-12 Tom de Vries <tom@codesourcery.com>
17545 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17547 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
17549 PR rtl-optimization/80481
17550 * ira-color.c (get_cap_member): New function.
17551 (allocnos_conflict_by_live_ranges_p): Use it.
17552 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17553 (setup_slot_coalesced_allocno_live_ranges): Ditto.
17555 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
17558 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17559 (*saddl_se_1): Ditto.
17560 (*ssubsi_1): Ditto.
17561 (*ssubl_se_1): Ditto.
17563 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17565 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17566 rather than wi::to_widest for DR_INITs.
17567 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17568 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17569 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17571 (vect_analyze_group_access_1): Note that here.
17573 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17575 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17576 polynomial type sizes.
17578 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17580 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17581 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17582 (gimple_add_tmp_var): Likewise.
17584 2018-01-12 Martin Liska <mliska@suse.cz>
17586 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17587 (gimple_alloc_sizes): Likewise.
17588 (dump_gimple_statistics): Use PRIu64 in printf format.
17589 * gimple.h: Change uint64_t to int.
17591 2018-01-12 Martin Liska <mliska@suse.cz>
17593 * tree-core.h: Use uint64_t instead of int.
17594 * tree.c (tree_node_counts): Likewise.
17595 (tree_node_sizes): Likewise.
17596 (dump_tree_statistics): Use PRIu64 in printf format.
17598 2018-01-12 Martin Liska <mliska@suse.cz>
17600 * Makefile.in: As qsort_chk is implemented in vec.c, add
17601 vec.o to linkage of gencfn-macros.
17602 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17603 passing the info to record_node_allocation_statistics.
17604 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17606 * ggc-common.c (struct ggc_usage): Add operator== and use
17607 it in operator< and compare function.
17608 * mem-stats.h (struct mem_usage): Likewise.
17609 * vec.c (struct vec_usage): Remove operator< and compare
17610 function. Can be simply inherited.
17612 2018-01-12 Martin Jambor <mjambor@suse.cz>
17615 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17616 * tree-ssa-math-opts.c: Include domwalk.h.
17617 (convert_mult_to_fma_1): New function.
17618 (fma_transformation_info): New type.
17619 (fma_deferring_state): Likewise.
17620 (cancel_fma_deferring): New function.
17621 (result_of_phi): Likewise.
17622 (last_fma_candidate_feeds_initial_phi): Likewise.
17623 (convert_mult_to_fma): Added deferring logic, split actual
17624 transformation to convert_mult_to_fma_1.
17625 (math_opts_dom_walker): New type.
17626 (math_opts_dom_walker::after_dom_children): New method, body moved
17627 here from pass_optimize_widening_mul::execute, added deferring logic
17629 (pass_optimize_widening_mul::execute): Moved most of code to
17630 math_opts_dom_walker::after_dom_children.
17631 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17632 * config/i386/i386.c (ix86_option_override_internal): Added
17633 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17635 2018-01-12 Richard Biener <rguenther@suse.de>
17638 * dwarf2out.c (gen_variable_die): Do not reset old_die for
17639 inline instance vars.
17641 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
17644 * config/rx/rx.c (rx_is_restricted_memory_address):
17645 Handle SUBREG case.
17647 2018-01-12 Richard Biener <rguenther@suse.de>
17649 PR tree-optimization/80846
17650 * target.def (split_reduction): New target hook.
17651 * targhooks.c (default_split_reduction): New function.
17652 * targhooks.h (default_split_reduction): Declare.
17653 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17654 target requests first reduce vectors by combining low and high
17656 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17657 (get_vectype_for_scalar_type_and_size): Export.
17658 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17659 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17660 * doc/tm.texi: Regenerate.
17661 * config/i386/i386.c (ix86_split_reduction): Implement
17662 TARGET_VECTORIZE_SPLIT_REDUCTION.
17664 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17667 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17668 in PIC mode except for TARGET_VXWORKS_RTP.
17669 * config/sparc/sparc.c: Include cfgrtl.h.
17670 (TARGET_INIT_PIC_REG): Define.
17671 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17672 (sparc_pic_register_p): New predicate.
17673 (sparc_legitimate_address_p): Use it.
17674 (sparc_legitimize_pic_address): Likewise.
17675 (sparc_delegitimize_address): Likewise.
17676 (sparc_mode_dependent_address_p): Likewise.
17677 (gen_load_pcrel_sym): Remove 4th parameter.
17678 (load_got_register): Adjust call to above. Remove obsolete stuff.
17679 (sparc_expand_prologue): Do not call load_got_register here.
17680 (sparc_flat_expand_prologue): Likewise.
17681 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17682 (sparc_use_pseudo_pic_reg): New function.
17683 (sparc_init_pic_reg): Likewise.
17684 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17685 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17687 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
17689 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17690 Add item for branch_cost.
17692 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17694 PR rtl-optimization/83565
17695 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17696 not extend the result to a larger mode for rotate operations.
17697 (num_sign_bit_copies1): Likewise.
17699 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17702 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17704 Use values-Xc.o for -pedantic.
17705 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17707 2018-01-12 Martin Liska <mliska@suse.cz>
17710 * ipa-devirt.c (final_warning_record::grow_type_warnings):
17712 (possible_polymorphic_call_targets): Use it.
17713 (ipa_devirt): Likewise.
17715 2018-01-12 Martin Liska <mliska@suse.cz>
17717 * profile-count.h (enum profile_quality): Use 0 as invalid
17718 enum value of profile_quality.
17720 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
17722 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17723 -mext-string options.
17725 2018-01-12 Richard Biener <rguenther@suse.de>
17727 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17728 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17729 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17731 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17733 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17735 * configure.ac (--with-long-double-format): Add support for the
17736 configuration option to change the default long double format on
17738 * config.gcc (powerpc*-linux*-*): Likewise.
17739 * configure: Regenerate.
17740 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17741 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17742 used without modification.
17744 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17746 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17747 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17748 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17749 MISC_BUILTIN_SPEC_BARRIER.
17750 (rs6000_init_builtins): Likewise.
17751 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17753 (speculation_barrier): New define_insn.
17754 * doc/extend.texi: Document __builtin_speculation_barrier.
17756 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17759 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17760 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17761 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17763 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
17764 integral modes instead of "ss" and "sd".
17765 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17766 vectors with 32-bit and 64-bit elements.
17767 (vecdupssescalarmodesuffix): New mode attribute.
17768 (vec_dup<mode>): Use it.
17770 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
17773 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17774 frame if argument is passed on stack.
17776 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17779 * ree.c (combine_reaching_defs): Optimize also
17780 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17781 reg2=any_extend(exp); reg1=reg2;, formatting fix.
17783 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17785 PR middle-end/83189
17786 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17788 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17790 PR middle-end/83718
17791 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17792 after they are computed.
17794 2018-01-11 Bin Cheng <bin.cheng@arm.com>
17796 PR tree-optimization/83695
17797 * gimple-loop-linterchange.cc
17798 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17799 reset cached scev information after interchange.
17800 (pass_linterchange::execute): Remove call to scev_reset_htab.
17802 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17804 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17805 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17806 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17807 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17808 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17809 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17810 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17811 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17812 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17813 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17814 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17815 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17816 (V_lane_reg): Likewise.
17817 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17819 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17820 (vfmal_lane_low<mode>_intrinsic,
17821 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17822 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17823 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17824 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17825 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17826 vfmsl_lane_high<mode>_intrinsic): New define_insns.
17828 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17830 * config/arm/arm-cpus.in (fp16fml): New feature.
17831 (ALL_SIMD): Add fp16fml.
17832 (armv8.2-a): Add fp16fml as an option.
17833 (armv8.3-a): Likewise.
17834 (armv8.4-a): Add fp16fml as part of fp16.
17835 * config/arm/arm.h (TARGET_FP16FML): Define.
17836 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17838 * config/arm/arm-modes.def (V2HF): Define.
17839 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17840 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17841 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17842 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17843 vfmsl_low, vfmsl_high): New set of builtins.
17844 * config/arm/iterators.md (PLUSMINUS): New code iterator.
17845 (vfml_op): New code attribute.
17846 (VFMLHALVES): New int iterator.
17847 (VFML, VFMLSEL): New mode attributes.
17848 (V_reg): Define mapping for V2HF.
17849 (V_hi, V_lo): New mode attributes.
17850 (VF_constraint): Likewise.
17851 (vfml_half, vfml_half_selector): New int attributes.
17852 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17854 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17855 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17857 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17858 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17859 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17860 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
17862 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17863 Document new effective target and option set.
17865 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17867 * config/arm/arm-cpus.in (armv8_4): New feature.
17868 (ARMv8_4a): New fgroup.
17869 (armv8.4-a): New arch.
17870 * config/arm/arm-tables.opt: Regenerate.
17871 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17872 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17873 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17874 Add matching rules for -march=armv8.4-a and extensions.
17875 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17877 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
17880 * config/rx/rx.md (BW): New mode attribute.
17881 (sync_lock_test_and_setsi): Add mode suffix to insn output.
17883 2018-01-11 Richard Biener <rguenther@suse.de>
17885 PR tree-optimization/83435
17886 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17887 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17888 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17890 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17891 Alan Hayward <alan.hayward@arm.com>
17892 David Sherwood <david.sherwood@arm.com>
17894 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17896 (aarch64_classify_address): Initialize it. Track polynomial offsets.
17897 (aarch64_print_address_internal): Use it to check for a zero offset.
17899 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17900 Alan Hayward <alan.hayward@arm.com>
17901 David Sherwood <david.sherwood@arm.com>
17903 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17904 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17905 Return a poly_int64 rather than a HOST_WIDE_INT.
17906 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17907 rather than a HOST_WIDE_INT.
17908 * config/aarch64/aarch64.h (aarch64_frame): Protect with
17909 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
17910 hard_fp_offset, frame_size, initial_adjust, callee_offset and
17911 final_offset from HOST_WIDE_INT to poly_int64.
17912 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17913 to_constant when getting the number of units in an Advanced SIMD
17915 (aarch64_builtin_vectorized_function): Check for a constant number
17917 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17919 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17920 attribute instead of GET_MODE_NUNITS.
17921 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17922 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17923 GET_MODE_SIZE for fixed-size registers.
17924 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17925 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17926 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17927 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17928 (aarch64_print_operand, aarch64_print_address_internal)
17929 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17930 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17931 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17932 Handle polynomial GET_MODE_SIZE.
17933 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
17934 wider than SImode without modification.
17935 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17936 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17937 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17938 passing and returning SVE modes.
17939 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17940 rather than GEN_INT.
17941 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17942 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17943 (aarch64_allocate_and_probe_stack_space): Likewise.
17944 (aarch64_layout_frame): Cope with polynomial offsets.
17945 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17946 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
17947 polynomial offsets.
17948 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17949 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17950 poly_int64 rather than a HOST_WIDE_INT.
17951 (aarch64_get_separate_components, aarch64_process_components)
17952 (aarch64_expand_prologue, aarch64_expand_epilogue)
17953 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17954 (aarch64_anchor_offset): New function, split out from...
17955 (aarch64_legitimize_address): ...here.
17956 (aarch64_builtin_vectorization_cost): Handle polynomial
17957 TYPE_VECTOR_SUBPARTS.
17958 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17960 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17961 number of elements from the PARALLEL rather than the mode.
17962 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17963 rather than GET_MODE_BITSIZE.
17964 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17965 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17966 (aarch64_expand_vec_perm_const_1): Handle polynomial
17967 d->perm.length () and d->perm elements.
17968 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
17969 Apply to_constant to d->perm elements.
17970 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17971 polynomial CONST_VECTOR_NUNITS.
17972 (aarch64_move_pointer): Take amount as a poly_int64 rather
17974 (aarch64_progress_pointer): Avoid temporary variable.
17975 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17976 the mode attribute instead of GET_MODE.
17978 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17979 Alan Hayward <alan.hayward@arm.com>
17980 David Sherwood <david.sherwood@arm.com>
17982 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17983 x exists before using it.
17984 (aarch64_add_constant_internal): Rename to...
17985 (aarch64_add_offset_1): ...this. Replace regnum with separate
17986 src and dest rtxes. Handle the case in which they're different,
17987 including when the offset is zero. Replace scratchreg with an rtx.
17988 Use 2 additions if there is no spare register into which we can
17989 move a 16-bit constant.
17990 (aarch64_add_constant): Delete.
17991 (aarch64_add_offset): Replace reg with separate src and dest
17992 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
17993 Use aarch64_add_offset_1.
17994 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17995 an rtx rather than an int. Take the delta as a poly_int64
17996 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
17997 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17998 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17999 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18000 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18001 and aarch64_add_sp.
18002 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18003 aarch64_add_constant.
18005 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18007 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18008 Use scalar_float_mode.
18010 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18012 * config/aarch64/aarch64-simd.md
18013 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18014 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18015 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18016 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18017 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18018 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18019 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18020 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18021 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18022 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18024 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18027 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18028 targ_options->x_arm_arch_string is non NULL.
18030 2018-01-11 Tamar Christina <tamar.christina@arm.com>
18032 * config/aarch64/aarch64.h
18033 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
18035 2018-01-11 Sudakshina Das <sudi.das@arm.com>
18038 * expmed.c (emit_store_flag_force): Swap if const op0
18039 and change VOIDmode to mode of op0.
18041 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18043 PR rtl-optimization/83761
18044 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18045 than bytes to mode_for_size.
18047 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18049 PR middle-end/83189
18050 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18051 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18054 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18056 PR middle-end/83575
18057 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18058 when in layout mode.
18059 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18060 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18063 2018-01-10 Michael Collison <michael.collison@arm.com>
18065 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18066 * config/aarch64/aarch64-option-extension.def: Add
18067 AARCH64_OPT_EXTENSION of 'fp16fml'.
18068 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18069 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18070 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18071 * config/aarch64/constraints.md (Ui7): New constraint.
18072 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18073 (VFMLA_SEL_W): Ditto.
18076 (VFMLA16_LOW): New int iterator.
18077 (VFMLA16_HIGH): Ditto.
18078 (UNSPEC_FMLAL): New unspec.
18079 (UNSPEC_FMLSL): Ditto.
18080 (UNSPEC_FMLAL2): Ditto.
18081 (UNSPEC_FMLSL2): Ditto.
18082 (f16mac): New code attribute.
18083 * config/aarch64/aarch64-simd-builtins.def
18084 (aarch64_fmlal_lowv2sf): Ditto.
18085 (aarch64_fmlsl_lowv2sf): Ditto.
18086 (aarch64_fmlalq_lowv4sf): Ditto.
18087 (aarch64_fmlslq_lowv4sf): Ditto.
18088 (aarch64_fmlal_highv2sf): Ditto.
18089 (aarch64_fmlsl_highv2sf): Ditto.
18090 (aarch64_fmlalq_highv4sf): Ditto.
18091 (aarch64_fmlslq_highv4sf): Ditto.
18092 (aarch64_fmlal_lane_lowv2sf): Ditto.
18093 (aarch64_fmlsl_lane_lowv2sf): Ditto.
18094 (aarch64_fmlal_laneq_lowv2sf): Ditto.
18095 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18096 (aarch64_fmlalq_lane_lowv4sf): Ditto.
18097 (aarch64_fmlsl_lane_lowv4sf): Ditto.
18098 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18099 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18100 (aarch64_fmlal_lane_highv2sf): Ditto.
18101 (aarch64_fmlsl_lane_highv2sf): Ditto.
18102 (aarch64_fmlal_laneq_highv2sf): Ditto.
18103 (aarch64_fmlsl_laneq_highv2sf): Ditto.
18104 (aarch64_fmlalq_lane_highv4sf): Ditto.
18105 (aarch64_fmlsl_lane_highv4sf): Ditto.
18106 (aarch64_fmlalq_laneq_highv4sf): Ditto.
18107 (aarch64_fmlsl_laneq_highv4sf): Ditto.
18108 * config/aarch64/aarch64-simd.md:
18109 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18110 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18111 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18112 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18113 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18114 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18115 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18116 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18117 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18118 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18119 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18120 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18121 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18122 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18123 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18124 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18125 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18126 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18127 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18128 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18129 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18130 (vfmlsl_low_u32): Ditto.
18131 (vfmlalq_low_u32): Ditto.
18132 (vfmlslq_low_u32): Ditto.
18133 (vfmlal_high_u32): Ditto.
18134 (vfmlsl_high_u32): Ditto.
18135 (vfmlalq_high_u32): Ditto.
18136 (vfmlslq_high_u32): Ditto.
18137 (vfmlal_lane_low_u32): Ditto.
18138 (vfmlsl_lane_low_u32): Ditto.
18139 (vfmlal_laneq_low_u32): Ditto.
18140 (vfmlsl_laneq_low_u32): Ditto.
18141 (vfmlalq_lane_low_u32): Ditto.
18142 (vfmlslq_lane_low_u32): Ditto.
18143 (vfmlalq_laneq_low_u32): Ditto.
18144 (vfmlslq_laneq_low_u32): Ditto.
18145 (vfmlal_lane_high_u32): Ditto.
18146 (vfmlsl_lane_high_u32): Ditto.
18147 (vfmlal_laneq_high_u32): Ditto.
18148 (vfmlsl_laneq_high_u32): Ditto.
18149 (vfmlalq_lane_high_u32): Ditto.
18150 (vfmlslq_lane_high_u32): Ditto.
18151 (vfmlalq_laneq_high_u32): Ditto.
18152 (vfmlslq_laneq_high_u32): Ditto.
18153 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18154 (AARCH64_FL_FOR_ARCH8_4): New.
18155 (AARCH64_ISA_F16FML): New ISA flag.
18156 (TARGET_F16FML): New feature flag for fp16fml.
18157 (doc/invoke.texi): Document new fp16fml option.
18159 2018-01-10 Michael Collison <michael.collison@arm.com>
18161 * config/aarch64/aarch64-builtins.c:
18162 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18163 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18164 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18165 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18166 (AARCH64_ISA_SHA3): New ISA flag.
18167 (TARGET_SHA3): New feature flag for sha3.
18168 * config/aarch64/iterators.md (sha512_op): New int attribute.
18169 (CRYPTO_SHA512): New int iterator.
18170 (UNSPEC_SHA512H): New unspec.
18171 (UNSPEC_SHA512H2): Ditto.
18172 (UNSPEC_SHA512SU0): Ditto.
18173 (UNSPEC_SHA512SU1): Ditto.
18174 * config/aarch64/aarch64-simd-builtins.def
18175 (aarch64_crypto_sha512hqv2di): New builtin.
18176 (aarch64_crypto_sha512h2qv2di): Ditto.
18177 (aarch64_crypto_sha512su0qv2di): Ditto.
18178 (aarch64_crypto_sha512su1qv2di): Ditto.
18179 (aarch64_eor3qv8hi): Ditto.
18180 (aarch64_rax1qv2di): Ditto.
18181 (aarch64_xarqv2di): Ditto.
18182 (aarch64_bcaxqv8hi): Ditto.
18183 * config/aarch64/aarch64-simd.md:
18184 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18185 (aarch64_crypto_sha512su0qv2di): Ditto.
18186 (aarch64_crypto_sha512su1qv2di): Ditto.
18187 (aarch64_eor3qv8hi): Ditto.
18188 (aarch64_rax1qv2di): Ditto.
18189 (aarch64_xarqv2di): Ditto.
18190 (aarch64_bcaxqv8hi): Ditto.
18191 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18192 (vsha512h2q_u64): Ditto.
18193 (vsha512su0q_u64): Ditto.
18194 (vsha512su1q_u64): Ditto.
18195 (veor3q_u16): Ditto.
18196 (vrax1q_u64): Ditto.
18197 (vxarq_u64): Ditto.
18198 (vbcaxq_u16): Ditto.
18199 * config/arm/types.md (crypto_sha512): New type attribute.
18200 (crypto_sha3): Ditto.
18201 (doc/invoke.texi): Document new sha3 option.
18203 2018-01-10 Michael Collison <michael.collison@arm.com>
18205 * config/aarch64/aarch64-builtins.c:
18206 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18207 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18208 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18209 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18210 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18211 (AARCH64_ISA_SM4): New ISA flag.
18212 (TARGET_SM4): New feature flag for sm4.
18213 * config/aarch64/aarch64-simd-builtins.def
18214 (aarch64_sm3ss1qv4si): Ditto.
18215 (aarch64_sm3tt1aq4si): Ditto.
18216 (aarch64_sm3tt1bq4si): Ditto.
18217 (aarch64_sm3tt2aq4si): Ditto.
18218 (aarch64_sm3tt2bq4si): Ditto.
18219 (aarch64_sm3partw1qv4si): Ditto.
18220 (aarch64_sm3partw2qv4si): Ditto.
18221 (aarch64_sm4eqv4si): Ditto.
18222 (aarch64_sm4ekeyqv4si): Ditto.
18223 * config/aarch64/aarch64-simd.md:
18224 (aarch64_sm3ss1qv4si): Ditto.
18225 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18226 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18227 (aarch64_sm4eqv4si): Ditto.
18228 (aarch64_sm4ekeyqv4si): Ditto.
18229 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18230 (sm3part_op): Ditto.
18231 (CRYPTO_SM3TT): Ditto.
18232 (CRYPTO_SM3PART): Ditto.
18233 (UNSPEC_SM3SS1): New unspec.
18234 (UNSPEC_SM3TT1A): Ditto.
18235 (UNSPEC_SM3TT1B): Ditto.
18236 (UNSPEC_SM3TT2A): Ditto.
18237 (UNSPEC_SM3TT2B): Ditto.
18238 (UNSPEC_SM3PARTW1): Ditto.
18239 (UNSPEC_SM3PARTW2): Ditto.
18240 (UNSPEC_SM4E): Ditto.
18241 (UNSPEC_SM4EKEY): Ditto.
18242 * config/aarch64/constraints.md (Ui2): New constraint.
18243 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18244 * config/arm/types.md (crypto_sm3): New type attribute.
18245 (crypto_sm4): Ditto.
18246 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18247 (vsm3tt1aq_u32): Ditto.
18248 (vsm3tt1bq_u32): Ditto.
18249 (vsm3tt2aq_u32): Ditto.
18250 (vsm3tt2bq_u32): Ditto.
18251 (vsm3partw1q_u32): Ditto.
18252 (vsm3partw2q_u32): Ditto.
18253 (vsm4eq_u32): Ditto.
18254 (vsm4ekeyq_u32): Ditto.
18255 (doc/invoke.texi): Document new sm4 option.
18257 2018-01-10 Michael Collison <michael.collison@arm.com>
18259 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18260 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18261 (AARCH64_FL_FOR_ARCH8_4): New.
18262 (AARCH64_FL_V8_4): New flag.
18263 (doc/invoke.texi): Document new armv8.4-a option.
18265 2018-01-10 Michael Collison <michael.collison@arm.com>
18267 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18268 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18269 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18270 * config/aarch64/aarch64-option-extension.def: Add
18271 AARCH64_OPT_EXTENSION of 'sha2'.
18272 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18273 (crypto): Disable sha2 and aes if crypto disabled.
18274 (crypto): Enable aes and sha2 if enabled.
18275 (simd): Disable sha2 and aes if simd disabled.
18276 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18278 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18279 (TARGET_SHA2): New feature flag for sha2.
18280 (TARGET_AES): New feature flag for aes.
18281 * config/aarch64/aarch64-simd.md:
18282 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18283 conditional on TARGET_AES.
18284 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18285 (aarch64_crypto_sha1hsi): Make pattern conditional
18287 (aarch64_crypto_sha1hv4si): Ditto.
18288 (aarch64_be_crypto_sha1hv4si): Ditto.
18289 (aarch64_crypto_sha1su1v4si): Ditto.
18290 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18291 (aarch64_crypto_sha1su0v4si): Ditto.
18292 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18293 (aarch64_crypto_sha256su0v4si): Ditto.
18294 (aarch64_crypto_sha256su1v4si): Ditto.
18295 (doc/invoke.texi): Document new aes and sha2 options.
18297 2018-01-10 Martin Sebor <msebor@redhat.com>
18299 PR tree-optimization/83781
18300 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18303 2018-01-11 Martin Sebor <msebor@gmail.com>
18304 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18306 PR tree-optimization/83501
18307 PR tree-optimization/81703
18309 * tree-ssa-strlen.c (get_string_cst): Rename...
18310 (get_string_len): ...to this. Handle global constants.
18311 (handle_char_store): Adjust.
18313 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
18314 Jim Wilson <jimw@sifive.com>
18316 * config/riscv/riscv-protos.h (riscv_output_return): New.
18317 * config/riscv/riscv.c (struct machine_function): New naked_p field.
18318 (riscv_attribute_table, riscv_output_return),
18319 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18320 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18321 (riscv_compute_frame_info): Only compute frame->mask if not a naked
18323 (riscv_expand_prologue): Add early return for naked function.
18324 (riscv_expand_epilogue): Likewise.
18325 (riscv_function_ok_for_sibcall): Return false for naked function.
18326 (riscv_set_current_function): New.
18327 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18328 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18329 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18330 * doc/extend.texi (RISC-V Function Attributes): New.
18332 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18334 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18335 check for 128-bit long double before checking TCmode.
18336 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18337 128-bit long doubles before checking TFmode or TCmode.
18338 (FLOAT128_IBM_P): Likewise.
18340 2018-01-10 Martin Sebor <msebor@redhat.com>
18342 PR tree-optimization/83671
18343 * builtins.c (c_strlen): Unconditionally return zero for the empty
18345 Use -Warray-bounds for warnings.
18346 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18347 for non-constant array indices with COMPONENT_REF, arrays of
18348 arrays, and pointers to arrays.
18349 (gimple_fold_builtin_strlen): Determine and set length range for
18350 non-constant character arrays.
18352 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
18354 PR middle-end/81897
18355 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18358 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
18360 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18362 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18365 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18366 VECTOR_MEM_ALTIVEC_OR_VSX_P.
18367 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18368 indexed_or_indirect_operand predicate.
18369 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18370 (*vsx_le_perm_load_v8hi): Likewise.
18371 (*vsx_le_perm_load_v16qi): Likewise.
18372 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18373 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18374 (*vsx_le_perm_store_v8hi): Likewise.
18375 (*vsx_le_perm_store_v16qi): Likewise.
18376 (eight unnamed splitters): Likewise.
18378 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18380 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18381 * config/rs6000/emmintrin.h: Likewise.
18382 * config/rs6000/mmintrin.h: Likewise.
18383 * config/rs6000/xmmintrin.h: Likewise.
18385 2018-01-10 David Malcolm <dmalcolm@redhat.com>
18388 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18390 * tree.c (tree_nop_conversion): Return true for location wrapper
18392 (maybe_wrap_with_location): New function.
18393 (selftest::check_strip_nops): New function.
18394 (selftest::test_location_wrappers): New function.
18395 (selftest::tree_c_tests): Call it.
18396 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18397 (maybe_wrap_with_location): New decl.
18398 (EXPR_LOCATION_WRAPPER_P): New macro.
18399 (location_wrapper_p): New inline function.
18400 (tree_strip_any_location_wrapper): New inline function.
18402 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
18405 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18406 stack_realign_offset for the largest alignment of stack slot
18408 (ix86_find_max_used_stack_alignment): New function.
18409 (ix86_finalize_stack_frame_flags): Use it. Set
18410 max_used_stack_alignment if we don't realign stack.
18411 * config/i386/i386.h (machine_function): Add
18412 max_used_stack_alignment.
18414 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
18416 * config/arm/arm.opt (-mbranch-cost): New option.
18417 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18420 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
18423 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18424 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18426 2018-01-10 Richard Biener <rguenther@suse.de>
18429 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18430 early out so it also covers the case where we have a non-NULL
18433 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18435 PR tree-optimization/83753
18436 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18437 for non-strided grouped accesses if the number of elements is 1.
18439 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18442 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18443 * i386.h (TARGET_USE_GATHER): Define.
18444 * x86-tune.def (X86_TUNE_USE_GATHER): New.
18446 2018-01-10 Martin Liska <mliska@suse.cz>
18449 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18450 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18452 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18453 CLEANUP_NO_PARTITIONING is not set.
18455 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18457 * doc/rtl.texi: Remove documentation of (const ...) wrappers
18458 for vectors, as a partial revert of r254296.
18459 * rtl.h (const_vec_p): Delete.
18460 (const_vec_duplicate_p): Don't test for vector CONSTs.
18461 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18462 * expmed.c (make_tree): Likewise.
18465 * common.md (E, F): Use CONSTANT_P instead of checking for
18467 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18468 checking for CONST_VECTOR.
18470 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18472 PR middle-end/83575
18473 * predict.c (force_edge_cold): Handle in more sane way edges
18474 with no prediction.
18476 2018-01-09 Carl Love <cel@us.ibm.com>
18478 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18480 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18481 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18482 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18483 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
18484 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18485 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
18486 * config/rs6000/rs6000-protos.h: Add extern defition for
18487 rs6000_generate_float2_double_code.
18488 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18490 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18491 (float2_v2df): Add define_expand.
18493 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
18496 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18497 op_mode in the force_to_mode call.
18499 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18501 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18502 instead of checking each element individually.
18503 (aarch64_evpc_uzp): Likewise.
18504 (aarch64_evpc_zip): Likewise.
18505 (aarch64_evpc_ext): Likewise.
18506 (aarch64_evpc_rev): Likewise.
18507 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18508 instead of checking each element individually. Return true without
18510 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18511 whether all selected elements come from the same input, instead of
18512 checking each element individually. Remove calls to gen_rtx_REG,
18513 start_sequence and end_sequence and instead assert that no rtl is
18516 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18518 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18519 order of HIGH and CONST checks.
18521 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18523 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18524 if the destination isn't an SSA_NAME.
18526 2018-01-09 Richard Biener <rguenther@suse.de>
18528 PR tree-optimization/83668
18529 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18531 (canonicalize_loop_form): ... here, renamed from ...
18532 (canonicalize_loop_closed_ssa_form): ... this and amended to
18533 swap successor edges for loop exit blocks to make us use
18534 the RPO order we need for initial schedule generation.
18536 2018-01-09 Joseph Myers <joseph@codesourcery.com>
18538 PR tree-optimization/64811
18539 * match.pd: When optimizing comparisons with Inf, avoid
18540 introducing or losing exceptions from comparisons with NaN.
18542 2018-01-09 Martin Liska <mliska@suse.cz>
18545 * asan.c (shadow_mem_size): Add gcc_assert.
18547 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
18549 Don't save registers in main().
18552 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18553 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18554 * config/avr/avr.c (avr_set_current_function): Don't error if
18555 naked, OS_task or OS_main are specified at the same time.
18556 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18558 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18560 * common/config/avr/avr-common.c (avr_option_optimization_table):
18561 Switch on -mmain-is-OS_task for optimizing compilations.
18563 2018-01-09 Richard Biener <rguenther@suse.de>
18565 PR tree-optimization/83572
18566 * graphite.c: Include cfganal.h.
18567 (graphite_transform_loops): Connect infinite loops to exit
18568 and remove fake edges at the end.
18570 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18572 * ipa-inline.c (edge_badness): Revert accidental checkin.
18574 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18577 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18578 symbols; not inline clones.
18580 2018-01-09 Jakub Jelinek <jakub@redhat.com>
18583 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18584 hard registers. Formatting fixes.
18586 PR preprocessor/83722
18587 * gcc.c (try_generate_repro): Pass
18588 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18589 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18592 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
18593 Kito Cheng <kito.cheng@gmail.com>
18595 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18596 (riscv_leaf_function_p): Delete.
18597 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18599 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18601 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18603 (do_ifelse): New function.
18604 (do_isel): New function.
18605 (do_sub3): New function.
18606 (do_add3): New function.
18607 (do_load_mask_compare): New function.
18608 (do_overlap_load_compare): New function.
18609 (expand_compare_loop): New function.
18610 (expand_block_compare): Call expand_compare_loop() when appropriate.
18611 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18612 option description.
18613 (-mblock-compare-inline-loop-limit): New option.
18615 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18618 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18619 Reverse order of second and third operands in first alternative.
18620 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18621 of first and second elements in UNSPEC_VPERMR vector.
18622 (altivec_expand_vec_perm_le): Likewise.
18624 2018-01-08 Jeff Law <law@redhat.com>
18626 PR rtl-optimizatin/81308
18627 * tree-switch-conversion.c (cfg_altered): New file scoped static.
18628 (process_switch): If group_case_labels makes a change, then set
18630 (pass_convert_switch::execute): If a switch is converted, then
18631 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
18633 PR rtl-optimization/81308
18634 * recog.c (split_all_insns): Conditionally cleanup the CFG after
18637 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
18639 PR target/83663 - Revert r255946
18640 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18641 generation for cases where splatting a value is not useful.
18642 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18643 across a vec_duplicate and a paradoxical subreg forming a vector
18644 mode to a vec_concat.
18646 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18648 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18649 -march=armv8.3-a variants.
18650 * config/arm/t-multilib: Likewise.
18651 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
18653 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18655 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18657 (cceq_ior_compare_complement): Give it a name so I can use it, and
18658 change boolean_or_operator predicate to boolean_operator so it can
18659 be used to generate a crand.
18660 (eqne): New code iterator.
18661 (bd/bd_neg): New code_attrs.
18662 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18663 a single define_insn.
18664 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18665 decrement (bdnzt/bdnzf/bdzt/bdzf).
18666 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18667 with the new names of the branch decrement patterns, and added the
18668 names of the branch decrement conditional patterns.
18670 2018-01-08 Richard Biener <rguenther@suse.de>
18672 PR tree-optimization/83563
18673 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18676 2018-01-08 Richard Biener <rguenther@suse.de>
18678 PR middle-end/83713
18679 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18681 2018-01-08 Richard Biener <rguenther@suse.de>
18683 PR tree-optimization/83685
18684 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18685 references to abnormals.
18687 2018-01-08 Richard Biener <rguenther@suse.de>
18690 * dwarf2out.c (output_indirect_strings): Handle empty
18691 skeleton_debug_str_hash.
18692 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18694 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18696 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18697 (emit_store_direct): Likewise.
18698 (arc_trampoline_adjust_address): Likewise.
18699 (arc_asm_trampoline_template): New function.
18700 (arc_initialize_trampoline): Use asm_trampoline_template.
18701 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18702 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18703 * config/arc/arc.md (flush_icache): Delete pattern.
18705 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18707 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18708 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18711 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18714 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18715 by not USED_FOR_TARGET.
18716 (make_pass_resolve_sw_modes): Likewise.
18718 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18720 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18723 2018-01-08 Richard Biener <rguenther@suse.de>
18725 PR middle-end/83580
18726 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18728 2018-01-08 Richard Biener <rguenther@suse.de>
18730 PR middle-end/83517
18731 * match.pd ((t * 2) / 2) -> t): Add missing :c.
18733 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
18735 PR middle-end/81897
18736 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18737 basic blocks with a small number of successors.
18738 (convert_control_dep_chain_into_preds): Improve handling of
18740 (dump_predicates): Split apart into...
18741 (dump_pred_chain): ...here...
18742 (dump_pred_info): ...and here.
18743 (can_one_predicate_be_invalidated_p): Add debugging printfs.
18744 (can_chain_union_be_invalidated_p): Improve check for invalidation
18746 (uninit_uses_cannot_happen): Avoid unnecessary if
18747 convert_control_dep_chain_into_preds yielded nothing.
18749 2018-01-06 Martin Sebor <msebor@redhat.com>
18751 PR tree-optimization/83640
18752 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18753 subtracting negative offset from size.
18754 (builtin_access::overlap): Adjust offset bounds of the access to fall
18755 within the size of the object if possible.
18757 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
18759 PR rtl-optimization/83699
18760 * expmed.c (extract_bit_field_1): Restrict the vector usage of
18761 extract_bit_field_as_subreg to cases in which the extracted
18762 value is also a vector.
18764 * lra-constraints.c (process_alt_operands): Test for the equivalence
18765 substitutions when detecting a possible reload cycle.
18767 2018-01-06 Jakub Jelinek <jakub@redhat.com>
18770 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18771 by default if flag_selective_schedling{,2}. Formatting fixes.
18773 PR rtl-optimization/83682
18774 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18775 if it has non-VECTOR_MODE element mode.
18776 (vec_duplicate_p): Likewise.
18778 PR middle-end/83694
18779 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18780 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18782 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18785 * config/i386/i386-builtin.def
18786 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18787 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18788 Require also OPTION_MASK_ISA_AVX512F in addition to
18789 OPTION_MASK_ISA_GFNI.
18790 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18791 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18792 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18793 to OPTION_MASK_ISA_GFNI.
18794 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18795 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18796 OPTION_MASK_ISA_AVX512BW.
18797 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18798 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18799 addition to OPTION_MASK_ISA_GFNI.
18800 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18801 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18802 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18803 to OPTION_MASK_ISA_GFNI.
18804 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18805 a requirement for all ISAs rather than any of them with a few
18807 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18809 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18810 bitmasks to be enabled with 3 exceptions, instead of requiring any
18811 enabled ISA with lots of exceptions.
18812 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18813 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18814 Change avx512bw in isa attribute to avx512f.
18815 * config/i386/sgxintrin.h: Add license boilerplate.
18816 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
18817 to __AVX512F__ and __AVX512VL to __AVX512VL__.
18818 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18819 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18821 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18822 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18823 temporarily sse2 rather than sse if not enabled already.
18826 * config/i386/sse.md (VI248_VLBW): Rename to ...
18827 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
18828 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18829 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18830 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18831 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18832 mode iterator instead of VI248_VLBW.
18834 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
18836 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18837 (record_modified): Skip clobbers; add debug output.
18838 (param_change_prob): Use sreal frequencies.
18840 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18842 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18843 punt for user-aligned variables.
18845 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18847 * tree-chrec.c (chrec_contains_symbols): Return true for
18850 2018-01-05 Sudakshina Das <sudi.das@arm.com>
18853 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18854 of (x|y) == x for BICS pattern.
18856 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18858 PR tree-optimization/83605
18859 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18860 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18863 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
18865 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18866 * config/epiphany/rtems.h: New file.
18868 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18869 Uros Bizjak <ubizjak@gmail.com>
18872 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18873 QIreg_operand instead of register_operand predicate.
18874 * config/i386/i386.c (ix86_rop_should_change_byte_p,
18875 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18876 comments instead of -fmitigate[-_]rop.
18878 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18881 * cgraphunit.c (symbol_table::compile): Switch to text_section
18882 before calling assembly_start debug hook.
18883 * run-rtl-passes.c (run_rtl_passes): Likewise.
18886 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18888 * tree-vrp.c (extract_range_from_binary_expr_1): Check
18889 range_int_cst_p rather than !symbolic_range_p before calling
18890 extract_range_from_multiplicative_op_1.
18892 2018-01-04 Jeff Law <law@redhat.com>
18894 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18895 redundant test in assertion.
18897 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18899 * doc/rtl.texi: Document machine_mode wrapper classes.
18901 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18903 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18904 using tree_to_uhwi.
18906 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18908 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18909 the VEC_PERM_EXPR fold to fail.
18911 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18914 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18915 to switched_sections.
18917 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18920 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18921 test for d.testing.
18923 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
18926 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18927 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18929 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18932 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18933 is BLKmode and bitpos not zero or mode change is needed.
18935 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18938 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18941 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
18944 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18945 instead of MULT rtx. Update all corresponding splitters.
18946 (*saddl_se): Ditto.
18947 (*ssub<modesuffix>): Ditto.
18948 (*ssubl_se): Ditto.
18949 (*cmp_sadd_di): Update split patterns.
18950 (*cmp_sadd_si): Ditto.
18951 (*cmp_sadd_sidi): Ditto.
18952 (*cmp_ssub_di): Ditto.
18953 (*cmp_ssub_si): Ditto.
18954 (*cmp_ssub_sidi): Ditto.
18955 * config/alpha/predicates.md (const23_operand): New predicate.
18956 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18957 Look for ASHIFT, not MULT inner operand.
18958 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18960 2018-01-04 Martin Liska <mliska@suse.cz>
18962 PR gcov-profile/83669
18963 * gcov.c (output_intermediate_file): Add version to intermediate
18965 * doc/gcov.texi: Document new field 'version' in intermediate
18966 file format. Fix location of '-k' option of gcov command.
18968 2018-01-04 Martin Liska <mliska@suse.cz>
18971 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18973 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18975 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18977 2018-01-03 Martin Sebor <msebor@redhat.com>
18979 PR tree-optimization/83655
18980 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18981 checking calls with invalid arguments.
18983 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18985 * tree-vect-stmts.c (vect_get_store_rhs): New function.
18986 (vectorizable_mask_load_store): Delete.
18987 (vectorizable_call): Return false for masked loads and stores.
18988 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
18989 instead of gimple_assign_rhs1.
18990 (vectorizable_load): Handle IFN_MASK_LOAD.
18991 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18995 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18997 (vectorizable_mask_load_store): ...here.
18998 (vectorizable_load): ...and here.
19000 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19002 * tree-vect-stmts.c (vect_build_all_ones_mask)
19003 (vect_build_zero_merge_argument): New functions, split out from...
19004 (vectorizable_load): ...here.
19006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19008 * tree-vect-stmts.c (vect_check_store_rhs): New function,
19010 (vectorizable_mask_load_store): ...here.
19011 (vectorizable_store): ...and here.
19013 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19015 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19017 (vectorizable_mask_load_store): ...here.
19019 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19021 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19022 (vect_model_store_cost): Take a vec_load_store_type instead of a
19024 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19025 (vect_model_store_cost): Take a vec_load_store_type instead of a
19027 (vectorizable_mask_load_store): Update accordingly.
19028 (vectorizable_store): Likewise.
19029 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19031 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19033 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19034 IFN_MASK_LOAD calls here rather than...
19035 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19038 Alan Hayward <alan.hayward@arm.com>
19039 David Sherwood <david.sherwood@arm.com>
19041 * expmed.c (extract_bit_field_1): For vector extracts,
19042 fall back to extract_bit_field_as_subreg if vec_extract
19045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19046 Alan Hayward <alan.hayward@arm.com>
19047 David Sherwood <david.sherwood@arm.com>
19049 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19050 they are variable or constant sized.
19051 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19052 slots for constant-sized data.
19054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19055 Alan Hayward <alan.hayward@arm.com>
19056 David Sherwood <david.sherwood@arm.com>
19058 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19059 handling COND_EXPRs with boolean comparisons, try to find a better
19060 basis for the mask type than the boolean itself.
19062 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19064 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19065 is calculated and how it can be overridden.
19066 * genmodes.c (max_bitsize_mode_any_mode): New variable.
19067 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19069 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19072 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19073 Alan Hayward <alan.hayward@arm.com>
19074 David Sherwood <david.sherwood@arm.com>
19076 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19077 Remove the mode argument.
19078 (aarch64_simd_valid_immediate): Remove the mode and inverse
19080 * config/aarch64/iterators.md (bitsize): New iterator.
19081 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19082 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19083 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19084 aarch64_simd_valid_immediate.
19085 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19086 (aarch64_reg_or_bic_imm): Likewise.
19087 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19088 with an insn_type enum and msl with a modifier_type enum.
19089 Replace element_width with a scalar_mode. Change the shift
19090 to unsigned int. Add constructors for scalar_float_mode and
19091 scalar_int_mode elements.
19092 (aarch64_vect_float_const_representable_p): Delete.
19093 (aarch64_can_const_movi_rtx_p)
19094 (aarch64_simd_scalar_immediate_valid_for_move)
19095 (aarch64_simd_make_constant): Update call to
19096 aarch64_simd_valid_immediate.
19097 (aarch64_advsimd_valid_immediate_hs): New function.
19098 (aarch64_advsimd_valid_immediate): Likewise.
19099 (aarch64_simd_valid_immediate): Remove mode and inverse
19100 arguments. Rewrite to use the above. Use const_vec_duplicate_p
19101 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19102 and aarch64_float_const_representable_p on the result.
19103 (aarch64_output_simd_mov_immediate): Remove mode argument.
19104 Update call to aarch64_simd_valid_immediate and use of
19105 simd_immediate_info.
19106 (aarch64_output_scalar_simd_mov_immediate): Update call
19109 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19110 Alan Hayward <alan.hayward@arm.com>
19111 David Sherwood <david.sherwood@arm.com>
19113 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19114 (mode_nunits): Likewise CONST_MODE_NUNITS.
19115 * machmode.def (ADJUST_NUNITS): Document.
19116 * genmodes.c (mode_data::need_nunits_adj): New field.
19117 (blank_mode): Update accordingly.
19118 (adj_nunits): New variable.
19119 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19121 (emit_mode_size_inline): Set need_bytesize_adj for all modes
19122 listed in adj_nunits.
19123 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19124 listed in adj_nunits. Don't emit case statements for such modes.
19125 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19126 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
19127 nothing if adj_nunits is nonnull.
19128 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19129 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19130 (emit_mode_fbit): Update use of print_maybe_const_decl.
19131 (emit_move_size): Likewise. Treat the array as non-const
19133 (emit_mode_adjustments): Handle adj_nunits.
19135 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19137 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19138 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19139 (VECTOR_MODES): Use it.
19140 (make_vector_modes): Take the prefix as an argument.
19142 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19143 Alan Hayward <alan.hayward@arm.com>
19144 David Sherwood <david.sherwood@arm.com>
19146 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19147 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19148 for MODE_VECTOR_BOOL.
19149 * machmode.def (VECTOR_BOOL_MODE): Document.
19150 * genmodes.c (VECTOR_BOOL_MODE): New macro.
19151 (make_vector_bool_mode): New function.
19152 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19154 * lto-streamer-in.c (lto_input_mode_table): Likewise.
19155 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19157 * stor-layout.c (int_mode_for_mode): Likewise.
19158 * tree.c (build_vector_type_for_mode): Likewise.
19159 * varasm.c (output_constant_pool_2): Likewise.
19160 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19161 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
19162 for MODE_VECTOR_BOOL.
19163 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19164 of mode class checks.
19165 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19166 instead of a list of mode class checks.
19167 (expand_vector_scalar_condition): Likewise.
19168 (type_for_widest_vector_mode): Handle BImode as an inner mode.
19170 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19171 Alan Hayward <alan.hayward@arm.com>
19172 David Sherwood <david.sherwood@arm.com>
19174 * machmode.h (mode_size): Change from unsigned short to
19176 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19177 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19178 or if measurement_type is not polynomial.
19179 (fixed_size_mode::includes_p): Check for constant-sized modes.
19180 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19181 return a poly_uint16 rather than an unsigned short.
19182 (emit_mode_size): Change the type of mode_size from unsigned short
19183 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
19184 (emit_mode_adjustments): Cope with polynomial vector sizes.
19185 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19187 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19189 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19190 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19191 * caller-save.c (setup_save_areas): Likewise.
19192 (replace_reg_with_saved_mem): Likewise.
19193 * calls.c (emit_library_call_value_1): Likewise.
19194 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19195 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19196 (gen_lowpart_for_combine): Likewise.
19197 * convert.c (convert_to_integer_1): Likewise.
19198 * cse.c (equiv_constant, cse_insn): Likewise.
19199 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19200 (cselib_subst_to_values): Likewise.
19201 * dce.c (word_dce_process_block): Likewise.
19202 * df-problems.c (df_word_lr_mark_ref): Likewise.
19203 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19204 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19205 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19206 (rtl_for_decl_location): Likewise.
19207 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19208 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19209 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19210 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19211 (expand_expr_real_1): Likewise.
19212 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19213 (pad_below): Likewise.
19214 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19215 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19216 * ira.c (get_subreg_tracking_sizes): Likewise.
19217 * ira-build.c (ira_create_allocno_objects): Likewise.
19218 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19219 (ira_sort_regnos_for_alter_reg): Likewise.
19220 * ira-costs.c (record_operand_costs): Likewise.
19221 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19222 (resolve_simple_move): Likewise.
19223 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19224 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19225 (lra_constraints): Likewise.
19226 (CONST_POOL_OK_P): Reject variable-sized modes.
19227 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19228 (add_pseudo_to_slot, lra_spill): Likewise.
19229 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19230 * optabs-query.c (get_best_extraction_insn): Likewise.
19231 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19232 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19233 (expand_mult_highpart, valid_multiword_target_p): Likewise.
19234 * recog.c (offsettable_address_addr_space_p): Likewise.
19235 * regcprop.c (maybe_mode_change): Likewise.
19236 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19237 * regrename.c (build_def_use): Likewise.
19238 * regstat.c (dump_reg_info): Likewise.
19239 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19240 (find_reloads, find_reloads_subreg_address): Likewise.
19241 * reload1.c (eliminate_regs_1): Likewise.
19242 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19243 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19244 (simplify_binary_operation_1, simplify_subreg): Likewise.
19245 * targhooks.c (default_function_arg_padding): Likewise.
19246 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19247 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19248 (verify_gimple_assign_ternary): Likewise.
19249 * tree-inline.c (estimate_move_cost): Likewise.
19250 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19251 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19252 (get_address_cost_ainc): Likewise.
19253 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19254 (vect_supportable_dr_alignment): Likewise.
19255 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19256 (vectorizable_reduction): Likewise.
19257 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19258 (vectorizable_operation, vectorizable_load): Likewise.
19259 * tree.c (build_same_sized_truth_vector_type): Likewise.
19260 * valtrack.c (cleanup_auto_inc_dec): Likewise.
19261 * var-tracking.c (emit_note_insn_var_location): Likewise.
19262 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19263 (ADDR_VEC_ALIGN): Likewise.
19265 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19266 Alan Hayward <alan.hayward@arm.com>
19267 David Sherwood <david.sherwood@arm.com>
19269 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19271 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19272 or if measurement_type is polynomial.
19273 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19274 * combine.c (make_extraction): Likewise.
19275 * dse.c (find_shift_sequence): Likewise.
19276 * dwarf2out.c (mem_loc_descriptor): Likewise.
19277 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19278 (extract_bit_field, extract_low_bits): Likewise.
19279 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19280 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19281 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19282 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19283 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19284 * reload.c (find_reloads): Likewise.
19285 * reload1.c (alter_reg): Likewise.
19286 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19287 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19288 * tree-if-conv.c (predicate_mem_writes): Likewise.
19289 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19290 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19291 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19292 * valtrack.c (dead_debug_insert_temp): Likewise.
19293 * varasm.c (mergeable_constant_section): Likewise.
19294 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19297 Alan Hayward <alan.hayward@arm.com>
19298 David Sherwood <david.sherwood@arm.com>
19300 * expr.c (expand_assignment): Cope with polynomial mode sizes
19301 when assigning to a CONCAT.
19303 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19304 Alan Hayward <alan.hayward@arm.com>
19305 David Sherwood <david.sherwood@arm.com>
19307 * machmode.h (mode_precision): Change from unsigned short to
19309 (mode_to_precision): Return a poly_uint16 rather than an unsigned
19311 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19312 or if measurement_type is not polynomial.
19313 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
19314 in which the mode is already known to be a scalar_int_mode.
19315 * genmodes.c (emit_mode_precision): Change the type of mode_precision
19316 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
19318 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19319 for GET_MODE_PRECISION.
19320 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19321 for GET_MODE_PRECISION.
19322 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19324 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19325 (expand_field_assignment, make_extraction): Likewise.
19326 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19327 (get_last_value): Likewise.
19328 * convert.c (convert_to_integer_1): Likewise.
19329 * cse.c (cse_insn): Likewise.
19330 * expr.c (expand_expr_real_1): Likewise.
19331 * lra-constraints.c (simplify_operand_subreg): Likewise.
19332 * optabs-query.c (can_atomic_load_p): Likewise.
19333 * optabs.c (expand_atomic_load): Likewise.
19334 (expand_atomic_store): Likewise.
19335 * ree.c (combine_reaching_defs): Likewise.
19336 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19337 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19338 * tree.h (type_has_mode_precision_p): Likewise.
19339 * ubsan.c (instrument_si_overflow): Likewise.
19341 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19342 Alan Hayward <alan.hayward@arm.com>
19343 David Sherwood <david.sherwood@arm.com>
19345 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19346 polynomial numbers of units.
19347 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19348 (valid_vector_subparts_p): New function.
19349 (build_vector_type): Remove temporary shim and take the number
19350 of units as a poly_uint64 rather than an int.
19351 (build_opaque_vector_type): Take the number of units as a
19352 poly_uint64 rather than an int.
19353 * tree.c (build_vector_from_ctor): Handle polynomial
19354 TYPE_VECTOR_SUBPARTS.
19355 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19356 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19357 (build_vector_from_val): If the number of units is variable,
19358 use build_vec_duplicate_cst for constant operands and
19359 VEC_DUPLICATE_EXPR otherwise.
19360 (make_vector_type): Remove temporary is_constant ().
19361 (build_vector_type, build_opaque_vector_type): Take the number of
19362 units as a poly_uint64 rather than an int.
19363 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19365 * cfgexpand.c (expand_debug_expr): Likewise.
19366 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19367 (store_constructor, expand_expr_real_1): Likewise.
19368 (const_scalar_mask_from_tree): Likewise.
19369 * fold-const-call.c (fold_const_reduction): Likewise.
19370 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19371 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19372 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19373 (fold_relational_const): Likewise.
19374 (native_interpret_vector): Likewise. Change the size from an
19375 int to an unsigned int.
19376 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19377 TYPE_VECTOR_SUBPARTS.
19378 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19379 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19380 duplicating a non-constant operand into a variable-length vector.
19381 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19382 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19383 * ipa-icf.c (sem_variable::equals): Likewise.
19384 * match.pd: Likewise.
19385 * omp-simd-clone.c (simd_clone_subparts): Likewise.
19386 * print-tree.c (print_node): Likewise.
19387 * stor-layout.c (layout_type): Likewise.
19388 * targhooks.c (default_builtin_vectorization_cost): Likewise.
19389 * tree-cfg.c (verify_gimple_comparison): Likewise.
19390 (verify_gimple_assign_binary): Likewise.
19391 (verify_gimple_assign_ternary): Likewise.
19392 (verify_gimple_assign_single): Likewise.
19393 * tree-pretty-print.c (dump_generic_node): Likewise.
19394 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19395 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19396 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19397 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19398 (vect_shift_permute_load_chain): Likewise.
19399 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19400 (expand_vector_condition, optimize_vector_constructor): Likewise.
19401 (lower_vec_perm, get_compute_type): Likewise.
19402 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19403 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19404 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19405 (vect_recog_mask_conversion_pattern): Likewise.
19406 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19407 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19408 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19409 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19410 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19411 (vectorizable_shift, vectorizable_operation, vectorizable_store)
19412 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19413 (supportable_widening_operation): Likewise.
19414 (supportable_narrowing_operation): Likewise.
19415 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19417 * varasm.c (output_constant): Likewise.
19419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19420 Alan Hayward <alan.hayward@arm.com>
19421 David Sherwood <david.sherwood@arm.com>
19423 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19424 so that both the length == 3 and length != 3 cases set up their
19425 own permute vectors. Add comments explaining why we know the
19426 number of elements is constant.
19427 (vect_permute_load_chain): Likewise.
19429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19430 Alan Hayward <alan.hayward@arm.com>
19431 David Sherwood <david.sherwood@arm.com>
19433 * machmode.h (mode_nunits): Change from unsigned char to
19435 (ONLY_FIXED_SIZE_MODES): New macro.
19436 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19437 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19438 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19440 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19441 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19442 or if measurement_type is not polynomial.
19443 * genmodes.c (ZERO_COEFFS): New macro.
19444 (emit_mode_nunits_inline): Make mode_nunits_inline return a
19446 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19447 Use ZERO_COEFFS when emitting initializers.
19448 * data-streamer.h (bp_pack_poly_value): New function.
19449 (bp_unpack_poly_value): Likewise.
19450 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19451 for GET_MODE_NUNITS.
19452 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19453 for GET_MODE_NUNITS.
19454 * tree.c (make_vector_type): Remove temporary shim and make
19455 the real function take the number of units as a poly_uint64
19456 rather than an int.
19457 (build_vector_type_for_mode): Handle polynomial nunits.
19458 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19459 * emit-rtl.c (const_vec_series_p_1): Likewise.
19460 (gen_rtx_CONST_VECTOR): Likewise.
19461 * fold-const.c (test_vec_duplicate_folding): Likewise.
19462 * genrecog.c (validate_pattern): Likewise.
19463 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19464 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19465 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19466 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19467 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19468 * rtlanal.c (subreg_get_info): Likewise.
19469 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19470 (vect_grouped_load_supported): Likewise.
19471 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19472 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19473 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19474 (simplify_const_unary_operation, simplify_binary_operation_1)
19475 (simplify_const_binary_operation, simplify_ternary_operation)
19476 (test_vector_ops_duplicate, test_vector_ops): Likewise.
19477 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19478 instead of CONST_VECTOR_NUNITS.
19479 * varasm.c (output_constant_pool_2): Likewise.
19480 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19481 explicit-encoded elements in the XVEC for variable-length vectors.
19483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19485 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19487 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19488 Alan Hayward <alan.hayward@arm.com>
19489 David Sherwood <david.sherwood@arm.com>
19491 * coretypes.h (fixed_size_mode): Declare.
19492 (fixed_size_mode_pod): New typedef.
19493 * builtins.h (target_builtins::x_apply_args_mode)
19494 (target_builtins::x_apply_result_mode): Change type to
19495 fixed_size_mode_pod.
19496 * builtins.c (apply_args_size, apply_result_size, result_vector)
19497 (expand_builtin_apply_args_1, expand_builtin_apply)
19498 (expand_builtin_return): Update accordingly.
19500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19502 * cse.c (hash_rtx_cb): Hash only the encoded elements.
19503 * cselib.c (cselib_hash_rtx): Likewise.
19504 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19505 CONST_VECTOR encoding.
19507 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19508 Jeff Law <law@redhat.com>
19511 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19512 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19513 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19514 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19517 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19518 explicitly probe *sp in a noreturn function if there were any callee
19519 register saves or frame pointer is needed.
19521 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19524 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19525 BLKmode for ternary, binary or unary expressions.
19528 * var-tracking.c (delete_vta_debug_insn): New inline function.
19529 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19530 insns from get_insns () to NULL instead of each bb separately.
19531 Use delete_vta_debug_insn. No longer static.
19532 (vt_debug_insns_local, variable_tracking_main_1): Adjust
19533 delete_vta_debug_insns callers.
19534 * rtl.h (delete_vta_debug_insns): Declare.
19535 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19536 instead of variable_tracking_main.
19538 2018-01-03 Martin Sebor <msebor@redhat.com>
19540 PR tree-optimization/83603
19541 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19542 arguments past the endof the argument list in functions declared
19543 without a prototype.
19544 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19545 Avoid checking when arguments are null.
19547 2018-01-03 Martin Sebor <msebor@redhat.com>
19550 * doc/extend.texi (attribute const): Fix a typo.
19551 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19552 issuing -Wsuggest-attribute for void functions.
19554 2018-01-03 Martin Sebor <msebor@redhat.com>
19556 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19557 offset_int::from instead of wide_int::to_shwi.
19558 (maybe_diag_overlap): Remove assertion.
19559 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19560 * gimple-ssa-sprintf.c (format_directive): Same.
19561 (parse_directive): Same.
19562 (sprintf_dom_walker::compute_format_length): Same.
19563 (try_substitute_return_value): Same.
19565 2018-01-03 Jeff Law <law@redhat.com>
19567 PR middle-end/83654
19568 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19569 non-constant residual for zero at runtime and avoid probing in
19570 that case. Reorganize code for trailing problem to mirror handling
19573 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19575 PR tree-optimization/83501
19576 * tree-ssa-strlen.c (get_string_cst): New.
19577 (handle_char_store): Call get_string_cst.
19579 2018-01-03 Martin Liska <mliska@suse.cz>
19581 PR tree-optimization/83593
19582 * tree-ssa-strlen.c: Include tree-cfg.h.
19583 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19584 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19585 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19587 (strlen_dom_walker::before_dom_children): Call
19588 gimple_purge_dead_eh_edges. Dump tranformation with details
19590 (strlen_dom_walker::before_dom_children): Update call by adding
19591 new argument cleanup_eh.
19592 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19594 2018-01-03 Martin Liska <mliska@suse.cz>
19597 * cif-code.def (VARIADIC_THUNK): New enum value.
19598 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19601 2018-01-03 Jan Beulich <jbeulich@suse.com>
19603 * sse.md (mov<mode>_internal): Tighten condition for when to use
19604 vmovdqu<ssescalarsize> for TI and OI modes.
19606 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19608 Update copyright years.
19610 2018-01-03 Martin Liska <mliska@suse.cz>
19613 * ipa-visibility.c (function_and_variable_visibility): Skip
19614 functions with noipa attribure.
19616 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19618 * gcc.c (process_command): Update copyright notice dates.
19619 * gcov-dump.c (print_version): Ditto.
19620 * gcov.c (print_version): Ditto.
19621 * gcov-tool.c (print_version): Ditto.
19622 * gengtype.c (create_file): Ditto.
19623 * doc/cpp.texi: Bump @copying's copyright year.
19624 * doc/cppinternals.texi: Ditto.
19625 * doc/gcc.texi: Ditto.
19626 * doc/gccint.texi: Ditto.
19627 * doc/gcov.texi: Ditto.
19628 * doc/install.texi: Ditto.
19629 * doc/invoke.texi: Ditto.
19631 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19633 * vector-builder.h (vector_builder::m_full_nelts): Change from
19634 unsigned int to poly_uint64.
19635 (vector_builder::full_nelts): Update prototype accordingly.
19636 (vector_builder::new_vector): Likewise.
19637 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19638 (vector_builder::operator ==): Likewise.
19639 (vector_builder::finalize): Likewise.
19640 * int-vector-builder.h (int_vector_builder::int_vector_builder):
19641 Take the number of elements as a poly_uint64 rather than an
19643 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19644 from unsigned int to poly_uint64.
19645 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19646 (vec_perm_indices::new_vector): Likewise.
19647 (vec_perm_indices::length): Likewise.
19648 (vec_perm_indices::nelts_per_input): Likewise.
19649 (vec_perm_indices::input_nelts): Likewise.
19650 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19651 number of elements per input as a poly_uint64 rather than an
19652 unsigned int. Use the original encoding for variable-length
19653 vectors, rather than clamping each individual element.
19654 For the second and subsequent elements in each pattern,
19655 clamp the step and base before clamping their sum.
19656 (vec_perm_indices::series_p): Handle polynomial element counts.
19657 (vec_perm_indices::all_in_range_p): Likewise.
19658 (vec_perm_indices_to_tree): Likewise.
19659 (vec_perm_indices_to_rtx): Likewise.
19660 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19661 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19662 (tree_vector_builder::new_binary_operation): Handle polynomial
19663 element counts. Return false if we need to know the number
19664 of elements at compile time.
19665 * fold-const.c (fold_vec_perm): Punt if the number of elements
19666 isn't known at compile time.
19668 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19670 * vec-perm-indices.h (vec_perm_builder): Change element type
19671 from HOST_WIDE_INT to poly_int64.
19672 (vec_perm_indices::element_type): Update accordingly.
19673 (vec_perm_indices::clamp): Handle polynomial element_types.
19674 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19675 (vec_perm_indices::all_in_range_p): Likewise.
19676 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19678 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19679 polynomial vec_perm_indices element types.
19680 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19681 * fold-const.c (fold_vec_perm): Likewise.
19682 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19683 * tree-vect-generic.c (lower_vec_perm): Likewise.
19684 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19685 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19686 element type to HOST_WIDE_INT.
19688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19689 Alan Hayward <alan.hayward@arm.com>
19690 David Sherwood <david.sherwood@arm.com>
19692 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19693 rather than an int. Use plus_constant.
19694 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19695 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19698 Alan Hayward <alan.hayward@arm.com>
19699 David Sherwood <david.sherwood@arm.com>
19701 * calls.c (emit_call_1, expand_call): Change struct_value_size from
19702 a HOST_WIDE_INT to a poly_int64.
19704 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19705 Alan Hayward <alan.hayward@arm.com>
19706 David Sherwood <david.sherwood@arm.com>
19708 * calls.c (load_register_parameters): Cope with polynomial
19709 mode sizes. Require a constant size for BLKmode parameters
19710 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
19711 forces a parameter to be padded at the lsb end in order to
19712 fill a complete number of words, require the parameter size
19713 to be ordered wrt UNITS_PER_WORD.
19715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19716 Alan Hayward <alan.hayward@arm.com>
19717 David Sherwood <david.sherwood@arm.com>
19719 * reload1.c (spill_stack_slot_width): Change element type
19720 from unsigned int to poly_uint64_pod.
19721 (alter_reg): Treat mode sizes as polynomial.
19723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19724 Alan Hayward <alan.hayward@arm.com>
19725 David Sherwood <david.sherwood@arm.com>
19727 * reload.c (complex_word_subreg_p): New function.
19728 (reload_inner_reg_of_subreg, push_reload): Use it.
19730 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19731 Alan Hayward <alan.hayward@arm.com>
19732 David Sherwood <david.sherwood@arm.com>
19734 * lra-constraints.c (process_alt_operands): Reject matched
19735 operands whose sizes aren't ordered.
19736 (match_reload): Refer to this check here.
19738 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19739 Alan Hayward <alan.hayward@arm.com>
19740 David Sherwood <david.sherwood@arm.com>
19742 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19743 that the mode size is in the set {1, 2, 4, 8, 16}.
19745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19746 Alan Hayward <alan.hayward@arm.com>
19747 David Sherwood <david.sherwood@arm.com>
19749 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19750 Use plus_constant instead of gen_rtx_PLUS.
19752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19753 Alan Hayward <alan.hayward@arm.com>
19754 David Sherwood <david.sherwood@arm.com>
19756 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19757 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19758 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19759 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19760 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19761 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19762 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19763 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19764 * config/i386/i386.c (ix86_push_rounding): ...this new function.
19765 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19767 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19768 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19769 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19770 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19771 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19772 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19773 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19774 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19775 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19776 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19778 * expr.c (emit_move_resolve_push): Treat the input and result
19779 of PUSH_ROUNDING as a poly_int64.
19780 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19781 (emit_push_insn): Likewise.
19782 * lra-eliminations.c (mark_not_eliminable): Likewise.
19783 * recog.c (push_operand): Likewise.
19784 * reload1.c (elimination_effects): Likewise.
19785 * rtlanal.c (nonzero_bits1): Likewise.
19786 * calls.c (store_one_arg): Likewise. Require the padding to be
19787 known at compile time.
19789 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19790 Alan Hayward <alan.hayward@arm.com>
19791 David Sherwood <david.sherwood@arm.com>
19793 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19794 Use plus_constant instead of gen_rtx_PLUS.
19796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19797 Alan Hayward <alan.hayward@arm.com>
19798 David Sherwood <david.sherwood@arm.com>
19800 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19801 rather than an int.
19803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19804 Alan Hayward <alan.hayward@arm.com>
19805 David Sherwood <david.sherwood@arm.com>
19807 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19808 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19809 via stack temporaries. Treat the mode size as polynomial too.
19811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19812 Alan Hayward <alan.hayward@arm.com>
19813 David Sherwood <david.sherwood@arm.com>
19815 * expr.c (expand_expr_real_2): When handling conversions involving
19816 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19817 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
19818 as a poly_uint64 too.
19820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19821 Alan Hayward <alan.hayward@arm.com>
19822 David Sherwood <david.sherwood@arm.com>
19824 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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 * combine.c (can_change_dest_mode): Handle polynomial
19831 REGMODE_NATURAL_SIZE.
19832 * expmed.c (store_bit_field_1): Likewise.
19833 * expr.c (store_constructor): Likewise.
19834 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19835 and polynomial REGMODE_NATURAL_SIZE.
19836 (gen_lowpart_common): Likewise.
19837 * reginfo.c (record_subregs_of_mode): Likewise.
19838 * rtlanal.c (read_modify_subreg_p): Likewise.
19840 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19841 Alan Hayward <alan.hayward@arm.com>
19842 David Sherwood <david.sherwood@arm.com>
19844 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19845 numbers of elements.
19847 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19848 Alan Hayward <alan.hayward@arm.com>
19849 David Sherwood <david.sherwood@arm.com>
19851 * match.pd: Cope with polynomial numbers of vector 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 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19858 in a POINTER_PLUS_EXPR.
19860 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19861 Alan Hayward <alan.hayward@arm.com>
19862 David Sherwood <david.sherwood@arm.com>
19864 * omp-simd-clone.c (simd_clone_subparts): New function.
19865 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19866 (ipa_simd_modify_function_body): Likewise.
19868 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19869 Alan Hayward <alan.hayward@arm.com>
19870 David Sherwood <david.sherwood@arm.com>
19872 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19873 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19874 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19875 (expand_vector_condition, vector_element): Likewise.
19876 (subparts_gt): New function.
19877 (get_compute_type): Use subparts_gt.
19878 (count_type_subparts): Delete.
19879 (expand_vector_operations_1): Use subparts_gt instead of
19880 count_type_subparts.
19882 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19883 Alan Hayward <alan.hayward@arm.com>
19884 David Sherwood <david.sherwood@arm.com>
19886 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19887 (vect_compile_time_alias): ...this new function. Do the calculation
19888 on poly_ints rather than trees.
19889 (vect_prune_runtime_alias_test_list): Update call accordingly.
19891 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19892 Alan Hayward <alan.hayward@arm.com>
19893 David Sherwood <david.sherwood@arm.com>
19895 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19897 (vect_schedule_slp_instance): Likewise.
19899 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19900 Alan Hayward <alan.hayward@arm.com>
19901 David Sherwood <david.sherwood@arm.com>
19903 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19904 constant and extern definitions for variable-length vectors.
19905 (vect_get_constant_vectors): Note that the number of units
19906 is known to be constant.
19908 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19909 Alan Hayward <alan.hayward@arm.com>
19910 David Sherwood <david.sherwood@arm.com>
19912 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19913 of units as polynomial. Choose between WIDE and NARROW based
19916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19917 Alan Hayward <alan.hayward@arm.com>
19918 David Sherwood <david.sherwood@arm.com>
19920 * tree-vect-stmts.c (simd_clone_subparts): New function.
19921 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19924 Alan Hayward <alan.hayward@arm.com>
19925 David Sherwood <david.sherwood@arm.com>
19927 * tree-vect-stmts.c (vectorizable_call): Treat the number of
19928 vectors as polynomial. Use build_index_vector for
19929 IFN_GOMP_SIMD_LANE.
19931 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19932 Alan Hayward <alan.hayward@arm.com>
19933 David Sherwood <david.sherwood@arm.com>
19935 * tree-vect-stmts.c (get_load_store_type): Treat the number of
19936 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19937 for variable-length vectors.
19938 (vectorizable_mask_load_store): Treat the number of units as
19939 polynomial, asserting that it is constant if the condition has
19940 already been enforced.
19941 (vectorizable_store, vectorizable_load): Likewise.
19943 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19944 Alan Hayward <alan.hayward@arm.com>
19945 David Sherwood <david.sherwood@arm.com>
19947 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19948 of units as polynomial. Punt if we can't tell at compile time
19949 which vector contains the final result.
19951 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19952 Alan Hayward <alan.hayward@arm.com>
19953 David Sherwood <david.sherwood@arm.com>
19955 * tree-vect-loop.c (vectorizable_induction): Treat the number
19956 of units as polynomial. Punt on SLP inductions. Use an integer
19957 VEC_SERIES_EXPR for variable-length integer reductions. Use a
19958 cast of such a series for variable-length floating-point
19961 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19962 Alan Hayward <alan.hayward@arm.com>
19963 David Sherwood <david.sherwood@arm.com>
19965 * tree.h (build_index_vector): Declare.
19966 * tree.c (build_index_vector): New function.
19967 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19968 of units as polynomial, forcibly converting it to a constant if
19969 vectorizable_reduction has already enforced the condition.
19970 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
19971 to create a {1,2,3,...} vector.
19972 (vectorizable_reduction): Treat the number of units as polynomial.
19973 Choose vectype_in based on the largest scalar element size rather
19974 than the smallest number of units. Enforce the restrictions
19977 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19978 Alan Hayward <alan.hayward@arm.com>
19979 David Sherwood <david.sherwood@arm.com>
19981 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19982 number of units as polynomial.
19984 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19985 Alan Hayward <alan.hayward@arm.com>
19986 David Sherwood <david.sherwood@arm.com>
19988 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19989 * target.def (autovectorize_vector_sizes): Return the vector sizes
19990 by pointer, using vector_sizes rather than a bitmask.
19991 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19992 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19993 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19995 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19996 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19997 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19998 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19999 * omp-general.c (omp_max_vf): Likewise.
20000 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20001 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20002 * tree-vect-loop.c (vect_analyze_loop): Likewise.
20003 * tree-vect-slp.c (vect_slp_bb): Likewise.
20004 * doc/tm.texi: Regenerate.
20005 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20007 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20008 the vector size as a poly_uint64 rather than an unsigned int.
20009 (current_vector_size): Change from an unsigned int to a poly_uint64.
20010 (get_vectype_for_scalar_type): Update accordingly.
20011 * tree.h (build_truth_vector_type): Take the size and number of
20012 units as a poly_uint64 rather than an unsigned int.
20013 (build_vector_type): Add a temporary overload that takes
20014 the number of units as a poly_uint64 rather than an unsigned int.
20015 * tree.c (make_vector_type): Likewise.
20016 (build_truth_vector_type): Take the number of units as a poly_uint64
20017 rather than an unsigned int.
20019 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20020 Alan Hayward <alan.hayward@arm.com>
20021 David Sherwood <david.sherwood@arm.com>
20023 * target.def (get_mask_mode): Take the number of units and length
20024 as poly_uint64s rather than unsigned ints.
20025 * targhooks.h (default_get_mask_mode): Update accordingly.
20026 * targhooks.c (default_get_mask_mode): Likewise.
20027 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20028 * doc/tm.texi: Regenerate.
20030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20031 Alan Hayward <alan.hayward@arm.com>
20032 David Sherwood <david.sherwood@arm.com>
20034 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20035 * omp-general.c (omp_max_vf): Likewise.
20036 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20037 (expand_omp_simd): Handle polynomial safelen.
20038 * omp-low.c (omplow_simd_context): Add a default constructor.
20039 (omplow_simd_context::max_vf): Change from int to poly_uint64.
20040 (lower_rec_simd_input_clauses): Update accordingly.
20041 (lower_rec_input_clauses): Likewise.
20043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20044 Alan Hayward <alan.hayward@arm.com>
20045 David Sherwood <david.sherwood@arm.com>
20047 * tree-vectorizer.h (vect_nunits_for_cost): New function.
20048 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20049 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20050 (vect_analyze_slp_cost): Likewise.
20051 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20052 (vect_model_load_cost): Likewise.
20054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20055 Alan Hayward <alan.hayward@arm.com>
20056 David Sherwood <david.sherwood@arm.com>
20058 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20059 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20060 from an unsigned int * to a poly_uint64_pod *.
20061 (calculate_unrolling_factor): New function.
20062 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
20064 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20065 Alan Hayward <alan.hayward@arm.com>
20066 David Sherwood <david.sherwood@arm.com>
20068 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20069 from an unsigned int to a poly_uint64.
20070 (_loop_vec_info::slp_unrolling_factor): Likewise.
20071 (_loop_vec_info::vectorization_factor): Change from an int
20073 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20074 (vect_get_num_vectors): New function.
20075 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20076 (vect_get_num_copies): Use vect_get_num_vectors.
20077 (vect_analyze_data_ref_dependences): Change max_vf from an int *
20078 to an unsigned int *.
20079 (vect_analyze_data_refs): Change min_vf from an int * to a
20081 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20082 than an unsigned HOST_WIDE_INT.
20083 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20084 (vect_analyze_data_ref_dependence): Change max_vf from an int *
20085 to an unsigned int *.
20086 (vect_analyze_data_ref_dependences): Likewise.
20087 (vect_compute_data_ref_alignment): Handle polynomial vf.
20088 (vect_enhance_data_refs_alignment): Likewise.
20089 (vect_prune_runtime_alias_test_list): Likewise.
20090 (vect_shift_permute_load_chain): Likewise.
20091 (vect_supportable_dr_alignment): Likewise.
20092 (dependence_distance_ge_vf): Take the vectorization factor as a
20093 poly_uint64 rather than an unsigned HOST_WIDE_INT.
20094 (vect_analyze_data_refs): Change min_vf from an int * to a
20096 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20097 vfm1 as a poly_uint64 rather than an int. Make the same change
20098 for the returned bound_scalar.
20099 (vect_gen_vector_loop_niters): Handle polynomial vf.
20100 (vect_do_peeling): Likewise. Update call to
20101 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20102 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20104 * tree-vect-loop.c (vect_determine_vectorization_factor)
20105 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20106 (vect_get_known_peeling_cost): Likewise.
20107 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20108 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20109 (vect_transform_loop): Likewise. Use the lowest possible VF when
20110 updating the upper bounds of the loop.
20111 (vect_min_worthwhile_factor): Make static. Return an unsigned int
20112 rather than an int.
20113 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20114 polynomial unroll factors.
20115 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20116 (vect_make_slp_decision): Likewise.
20117 (vect_supported_load_permutation_p): Likewise, and polynomial
20119 (vect_analyze_slp_cost): Handle polynomial vf.
20120 (vect_slp_analyze_node_operations): Likewise.
20121 (vect_slp_analyze_bb_1): Likewise.
20122 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20123 than an unsigned HOST_WIDE_INT.
20124 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20125 (vectorizable_load): Handle polynomial vf.
20126 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20128 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20130 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20131 Alan Hayward <alan.hayward@arm.com>
20132 David Sherwood <david.sherwood@arm.com>
20134 * match.pd: Handle bit operations involving three constants
20135 and try to fold one pair.
20137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20139 * tree-vect-loop-manip.c: Include gimple-fold.h.
20140 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20141 niters_maybe_zero parameters. Handle other cases besides a step of 1.
20142 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20143 Add a path that uses a step of VF instead of 1, but disable it
20145 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20146 and niters_no_overflow parameters. Update calls to
20147 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20148 Create a new SSA name if the latter choses to use a ste other
20149 than zero, and return it via niters_vector_mult_vf_var.
20150 * tree-vect-loop.c (vect_transform_loop): Update calls to
20151 vect_do_peeling, vect_gen_vector_loop_niters and
20152 slpeel_make_loop_iterate_ntimes.
20153 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20154 (vect_gen_vector_loop_niters): Update declarations after above changes.
20156 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
20158 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20159 128-bit round to integer instructions.
20160 (ceil<mode>2): Likewise.
20161 (btrunc<mode>2): Likewise.
20162 (round<mode>2): Likewise.
20164 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20166 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20167 unaligned VSX load/store on P8/P9.
20168 (expand_block_clear): Allow the use of unaligned VSX
20169 load/store on P8/P9.
20171 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20173 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20175 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20176 swap associated with both a load and a store.
20178 2018-01-02 Andrew Waterman <andrew@sifive.com>
20180 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20181 * config/riscv/riscv.md (clear_cache): Use it.
20183 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
20185 * web.c: Remove out-of-date comment.
20187 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20189 * expr.c (fixup_args_size_notes): Check that any existing
20190 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20191 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20192 (emit_single_push_insn): ...here.
20194 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20196 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20197 (const_vector_encoded_nelts): New function.
20198 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20199 (const_vector_int_elt, const_vector_elt): Declare.
20200 * emit-rtl.c (const_vector_int_elt_1): New function.
20201 (const_vector_elt): Likewise.
20202 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20203 of CONST_VECTOR_ELT.
20205 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20207 * expr.c: Include rtx-vector-builder.h.
20208 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20209 directly on the tree encoding.
20210 (const_vector_from_tree): Likewise.
20211 * optabs.c: Include rtx-vector-builder.h.
20212 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20213 sequence of "u" values.
20214 * vec-perm-indices.c: Include rtx-vector-builder.h.
20215 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20216 directly on the vec_perm_indices encoding.
20218 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20220 * doc/rtl.texi (const_vector): Describe new encoding scheme.
20221 * Makefile.in (OBJS): Add rtx-vector-builder.o.
20222 * rtx-vector-builder.h: New file.
20223 * rtx-vector-builder.c: Likewise.
20224 * rtl.h (rtx_def::u2): Add a const_vector field.
20225 (CONST_VECTOR_NPATTERNS): New macro.
20226 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20227 (CONST_VECTOR_DUPLICATE_P): Likewise.
20228 (CONST_VECTOR_STEPPED_P): Likewise.
20229 (CONST_VECTOR_ENCODED_ELT): Likewise.
20230 (const_vec_duplicate_p): Check for a duplicated vector encoding.
20231 (unwrap_const_vec_duplicate): Likewise.
20232 (const_vec_series_p): Check for a non-duplicated vector encoding.
20233 Say that the function only returns true for integer vectors.
20234 * emit-rtl.c: Include rtx-vector-builder.h.
20235 (gen_const_vec_duplicate_1): Delete.
20236 (gen_const_vector): Call gen_const_vec_duplicate instead of
20237 gen_const_vec_duplicate_1.
20238 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20239 (gen_const_vec_duplicate): Use rtx_vector_builder.
20240 (gen_const_vec_series): Likewise.
20241 (gen_rtx_CONST_VECTOR): Likewise.
20242 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20243 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20244 Build a new vector rather than modifying a CONST_VECTOR in-place.
20245 (handle_special_swappables): Update call accordingly.
20246 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20247 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20248 Build a new vector rather than modifying a CONST_VECTOR in-place.
20249 (handle_special_swappables): Update call accordingly.
20251 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20253 * simplify-rtx.c (simplify_const_binary_operation): Use
20254 CONST_VECTOR_ELT instead of XVECEXP.
20256 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20258 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20259 the selector elements to be different from the data elements
20260 if the selector is a VECTOR_CST.
20261 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20262 ssizetype for the selector.
20264 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20266 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20267 before testing each element individually.
20268 * tree-vect-generic.c (lower_vec_perm): Likewise.
20270 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20272 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20273 * selftest-run-tests.c (selftest::run_tests): Call it.
20274 * vector-builder.h (vector_builder::operator ==): New function.
20275 (vector_builder::operator !=): Likewise.
20276 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20277 (vec_perm_indices::all_from_input_p): New function.
20278 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20279 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20280 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20281 instead of reading the VECTOR_CST directly. Detect whether both
20282 vector inputs are the same before constructing the vec_perm_indices,
20283 and update the number of inputs argument accordingly. Use the
20284 utility functions added above. Only construct sel2 if we need to.
20286 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20288 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20289 the broadcast of the low byte.
20290 (expand_mult_highpart): Use an explicit encoding for the permutes.
20291 * optabs-query.c (can_mult_highpart_p): Likewise.
20292 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20293 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20294 (vectorizable_bswap): Likewise.
20295 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20296 explicit encoding for the power-of-2 permutes.
20297 (vect_permute_store_chain): Likewise.
20298 (vect_grouped_load_supported): Likewise.
20299 (vect_permute_load_chain): Likewise.
20301 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20303 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20304 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20305 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20306 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20307 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20308 (vect_gen_perm_mask_any): Likewise.
20310 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20312 * int-vector-builder.h: New file.
20313 * vec-perm-indices.h: Include int-vector-builder.h.
20314 (vec_perm_indices): Redefine as an int_vector_builder.
20315 (auto_vec_perm_indices): Delete.
20316 (vec_perm_builder): Redefine as a stand-alone class.
20317 (vec_perm_indices::vec_perm_indices): New function.
20318 (vec_perm_indices::clamp): Likewise.
20319 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20320 (vec_perm_indices::new_vector): New function.
20321 (vec_perm_indices::new_expanded_vector): Update for new
20322 vec_perm_indices class.
20323 (vec_perm_indices::rotate_inputs): New function.
20324 (vec_perm_indices::all_in_range_p): Operate directly on the
20325 encoded form, without computing elided elements.
20326 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20327 encoding. Update for new vec_perm_indices class.
20328 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20329 the given vec_perm_builder.
20330 (expand_vec_perm_var): Update vec_perm_builder constructor.
20331 (expand_mult_highpart): Use vec_perm_builder instead of
20332 auto_vec_perm_indices.
20333 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20334 vec_perm_indices instead of auto_vec_perm_indices. Use a single
20335 or double series encoding as appropriate.
20336 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20337 vec_perm_indices instead of auto_vec_perm_indices.
20338 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20339 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20340 (vect_permute_store_chain): Likewise.
20341 (vect_grouped_load_supported): Likewise.
20342 (vect_permute_load_chain): Likewise.
20343 (vect_shift_permute_load_chain): Likewise.
20344 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20345 (vect_transform_slp_perm_load): Likewise.
20346 (vect_schedule_slp_instance): Likewise.
20347 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20348 (vectorizable_mask_load_store): Likewise.
20349 (vectorizable_bswap): Likewise.
20350 (vectorizable_store): Likewise.
20351 (vectorizable_load): Likewise.
20352 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20353 vec_perm_indices instead of auto_vec_perm_indices. Use
20354 tree_to_vec_perm_builder to read the vector from a tree.
20355 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20356 vec_perm_builder instead of a vec_perm_indices.
20357 (have_whole_vector_shift): Use vec_perm_builder and
20358 vec_perm_indices instead of auto_vec_perm_indices. Leave the
20359 truncation to calc_vec_perm_mask_for_shift.
20360 (vect_create_epilog_for_reduction): Likewise.
20361 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20362 from auto_vec_perm_indices to vec_perm_indices.
20363 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20364 instead of changing individual elements.
20365 (aarch64_vectorize_vec_perm_const): Use new_vector to install
20366 the vector in d.perm.
20367 * config/arm/arm.c (expand_vec_perm_d::perm): Change
20368 from auto_vec_perm_indices to vec_perm_indices.
20369 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20370 instead of changing individual elements.
20371 (arm_vectorize_vec_perm_const): Use new_vector to install
20372 the vector in d.perm.
20373 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20374 Update vec_perm_builder constructor.
20375 (rs6000_expand_interleave): Likewise.
20376 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20377 (rs6000_expand_interleave): Likewise.
20379 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20381 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20382 to qimode could truncate the indices.
20383 * optabs.c (expand_vec_perm_var): Likewise.
20385 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20387 * Makefile.in (OBJS): Add vec-perm-indices.o.
20388 * vec-perm-indices.h: New file.
20389 * vec-perm-indices.c: Likewise.
20390 * target.h (vec_perm_indices): Replace with a forward class
20392 (auto_vec_perm_indices): Move to vec-perm-indices.h.
20393 * optabs.h: Include vec-perm-indices.h.
20394 (expand_vec_perm): Delete.
20395 (selector_fits_mode_p, expand_vec_perm_var): Declare.
20396 (expand_vec_perm_const): Declare.
20397 * target.def (vec_perm_const_ok): Replace with...
20398 (vec_perm_const): ...this new hook.
20399 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20400 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20401 * doc/tm.texi: Regenerate.
20402 * optabs.def (vec_perm_const): Delete.
20403 * doc/md.texi (vec_perm_const): Likewise.
20404 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20405 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20406 expand_vec_perm for constant permutation vectors. Assert that
20407 the mode of variable permutation vectors is the integer equivalent
20408 of the mode that is being permuted.
20409 * optabs-query.h (selector_fits_mode_p): Declare.
20410 * optabs-query.c: Include vec-perm-indices.h.
20411 (selector_fits_mode_p): New function.
20412 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20413 is defined, instead of checking whether the vec_perm_const_optab
20414 exists. Use targetm.vectorize.vec_perm_const instead of
20415 targetm.vectorize.vec_perm_const_ok. Check whether the indices
20416 fit in the vector mode before using a variable permute.
20417 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20418 vec_perm_indices instead of an rtx.
20419 (expand_vec_perm): Replace with...
20420 (expand_vec_perm_const): ...this new function. Take the selector
20421 as a vec_perm_indices rather than an rtx. Also take the mode of
20422 the selector. Update call to shift_amt_for_vec_perm_mask.
20423 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20424 Use vec_perm_indices::new_expanded_vector to expand the original
20425 selector into bytes. Check whether the indices fit in the vector
20426 mode before using a variable permute.
20427 (expand_vec_perm_var): Make global.
20428 (expand_mult_highpart): Use expand_vec_perm_const.
20429 * fold-const.c: Includes vec-perm-indices.h.
20430 * tree-ssa-forwprop.c: Likewise.
20431 * tree-vect-data-refs.c: Likewise.
20432 * tree-vect-generic.c: Likewise.
20433 * tree-vect-loop.c: Likewise.
20434 * tree-vect-slp.c: Likewise.
20435 * tree-vect-stmts.c: Likewise.
20436 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20438 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20439 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20440 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20441 (aarch64_vectorize_vec_perm_const): ...this new function.
20442 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20443 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20444 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20445 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20446 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20447 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20448 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20450 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
20451 check for NEON modes.
20452 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20453 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20454 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20455 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20457 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
20458 the old VEC_PERM_CONST conditions.
20459 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20460 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20461 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20462 (ia64_vectorize_vec_perm_const_ok): Merge into...
20463 (ia64_vectorize_vec_perm_const): ...this new function.
20464 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20465 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20466 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20467 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20468 * config/mips/mips.c (mips_expand_vec_perm_const)
20469 (mips_vectorize_vec_perm_const_ok): Merge into...
20470 (mips_vectorize_vec_perm_const): ...this new function.
20471 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20472 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20473 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20474 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20475 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20476 (rs6000_expand_vec_perm_const): Delete.
20477 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20479 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20480 (altivec_expand_vec_perm_const_le): Take each operand individually.
20481 Operate on constant selectors rather than rtxes.
20482 (altivec_expand_vec_perm_const): Likewise. Update call to
20483 altivec_expand_vec_perm_const_le.
20484 (rs6000_expand_vec_perm_const): Delete.
20485 (rs6000_vectorize_vec_perm_const_ok): Delete.
20486 (rs6000_vectorize_vec_perm_const): New function.
20487 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20488 an element count and rtx array.
20489 (rs6000_expand_extract_even): Update call accordingly.
20490 (rs6000_expand_interleave): Likewise.
20491 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20492 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20493 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20494 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20495 (rs6000_expand_vec_perm_const): Delete.
20496 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20497 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20498 (altivec_expand_vec_perm_const_le): Take each operand individually.
20499 Operate on constant selectors rather than rtxes.
20500 (altivec_expand_vec_perm_const): Likewise. Update call to
20501 altivec_expand_vec_perm_const_le.
20502 (rs6000_expand_vec_perm_const): Delete.
20503 (rs6000_vectorize_vec_perm_const_ok): Delete.
20504 (rs6000_vectorize_vec_perm_const): New function. Remove stray
20505 reference to the SPE evmerge intructions.
20506 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20507 an element count and rtx array.
20508 (rs6000_expand_extract_even): Update call accordingly.
20509 (rs6000_expand_interleave): Likewise.
20510 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20511 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20513 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20515 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20517 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20518 vector mode and that that mode matches the mode of the data
20520 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20521 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
20522 directly using expand_vec_perm_1 when forcing selectors into
20524 (expand_vec_perm_var): New function, split out from expand_vec_perm.
20526 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20528 * optabs-query.h (can_vec_perm_p): Delete.
20529 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20530 * optabs-query.c (can_vec_perm_p): Split into...
20531 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20532 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20533 particular selector is valid.
20534 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20535 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20536 (vect_grouped_load_supported): Likewise.
20537 (vect_shift_permute_load_chain): Likewise.
20538 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20539 (vect_transform_slp_perm_load): Likewise.
20540 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20541 (vectorizable_bswap): Likewise.
20542 (vect_gen_perm_mask_checked): Likewise.
20543 * fold-const.c (fold_ternary_loc): Likewise. Don't take
20544 implementations of variable permutation vectors into account
20545 when deciding which selector to use.
20546 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20547 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20548 with a false third argument.
20549 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20550 to test whether the constant selector is valid and can_vec_perm_var_p
20551 to test whether a variable selector is valid.
20553 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20555 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20556 * optabs-query.c (can_vec_perm_p): Likewise.
20557 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20558 instead of vec_perm_indices.
20559 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20560 (vect_gen_perm_mask_checked): Likewise,
20561 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20562 (vect_gen_perm_mask_checked): Likewise,
20564 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20566 * optabs-query.h (qimode_for_vec_perm): Declare.
20567 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20568 (qimode_for_vec_perm): ...this new function.
20569 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20571 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20573 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20574 does not have a conditional at the top.
20576 2018-01-02 Richard Biener <rguenther@suse.de>
20578 * ipa-inline.c (big_speedup_p): Fix expression.
20580 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20583 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20586 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20590 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20591 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20592 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20593 cond_taken_branch_cost 3->4.
20595 2018-01-01 Jakub Jelinek <jakub@redhat.com>
20597 PR tree-optimization/83581
20598 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20599 TODO_cleanup_cfg if any changes have been made.
20601 PR middle-end/83608
20602 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20603 convert_modes if target mode has the right side, but different mode
20606 PR middle-end/83609
20607 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20608 last argument when extracting from CONCAT. If either from_real or
20609 from_imag is NULL, use expansion through memory. If result is not
20610 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20611 the parts directly to inner mode, if even that fails, use expansion
20614 PR middle-end/83623
20615 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20616 check for bswap in mode rather than HImode and use that in expand_unop
20619 Copyright (C) 2018 Free Software Foundation, Inc.
20621 Copying and distribution of this file, with or without modification,
20622 are permitted in any medium without royalty provided the copyright
20623 notice and this notice are preserved.