1 2018-07-20 Richard Biener <rguenther@suse.de>
4 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5 to cover -flto-partition=none.
7 2018-07-20 Martin Liska <mliska@suse.cz>
9 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
10 (get_decl_source_range): Remove unused function.
12 2018-07-20 Richard Biener <rguenther@suse.de>
14 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
15 (struct vn_phi_s): Likewise.
16 (struct vn_reference_s): Likewise.
17 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
18 for searching the slot of an entry known to be in the hash itself.
19 (vn_phi_hasher::equal): Likewise.
20 (vn_reference_hasher::equal): Likewise.
21 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
23 (optimistic_info, current_info): Remove, keeping only valid_info.
24 (vn_reference_lookup_1): Remove fallback lookup.
25 (vn_reference_lookup_2): Likewise.
26 (vn_nary_op_lookup_1): Likewise.
27 (vn_phi_lookup): Likewise.
28 (vn_nary_build_or_lookup_1): Make sure to not chain the built
30 (vn_reference_insert): Adjust, chain the inserted hash element
32 (vn_reference_insert_pieces): Likewise.
33 (visit_reference_op_call): Likewise.
34 (vn_nary_op_insert_into): Chain the inserted hash element at
36 (vn_nary_op_insert_pieces): Adjust.
37 (vn_nary_op_insert): Likewise.
38 (vn_nary_op_insert_stmt): Likewise.
39 (vn_phi_insert): Adjust, chain the inserted hash element at
41 (process_scc): Remove clearing and copying the optimistic
42 table. Instead remove elements inserted during an optimistic
43 iteration from the single table we maintain.
44 (init_scc_vn): Adjust.
45 (free_scc_vn): Likewise.
46 (sccvn_dom_walker::record_cond): Likewise.
47 (sccvn_dom_walker::after_dom_children): Likewise.
49 2018-07-19 Martin Sebor <msebor@redhat.com>
51 PR tree-optimization/84047
52 PR tree-optimization/83776
53 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
54 (check_array_bounds): Call it.
56 2018-07-19 Martin Sebor <msebor@redhat.com>
58 * align.h (align_flags): Use member initialization.
60 2018-07-19 David Malcolm <dmalcolm@redhat.com>
62 * Makefile.in (OBJS): Add optinfo.o.
63 * coretypes.h (class symtab_node): New forward decl.
64 (struct cgraph_node): New forward decl.
65 (class varpool_node): New forward decl.
66 * dump-context.h: New file.
67 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
69 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
70 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
71 (set_alt_dump_file): Likewise.
72 (dump_context::~dump_context): New dtor.
73 (dump_gimple_stmt): Move implementation to...
74 (dump_context::dump_gimple_stmt): ...this new member function.
75 Add the stmt to any pending optinfo, creating one if need be.
76 (dump_gimple_stmt_loc): Move implementation to...
77 (dump_context::dump_gimple_stmt_loc): ...this new member function.
78 Start a new optinfo and add the stmt to it.
79 (dump_gimple_expr): Move implementation to...
80 (dump_context::dump_gimple_expr): ...this new member function.
81 Add the stmt to any pending optinfo, creating one if need be.
82 (dump_gimple_expr_loc): Move implementation to...
83 (dump_context::dump_gimple_expr_loc): ...this new member function.
84 Start a new optinfo and add the stmt to it.
85 (dump_generic_expr): Move implementation to...
86 (dump_context::dump_generic_expr): ...this new member function.
87 Add the tree to any pending optinfo, creating one if need be.
88 (dump_generic_expr_loc): Move implementation to...
89 (dump_context::dump_generic_expr_loc): ...this new member
90 function. Add the tree to any pending optinfo, creating one if
92 (dump_printf): Move implementation to...
93 (dump_context::dump_printf_va): ...this new member function. Add
94 the text to any pending optinfo, creating one if need be.
95 (dump_printf_loc): Move implementation to...
96 (dump_context::dump_printf_loc_va): ...this new member function.
97 Start a new optinfo and add the stmt to it.
98 (dump_dec): Move implementation to...
99 (dump_context::dump_dec): ...this new member function. Add the
100 value to any pending optinfo, creating one if need be.
101 (dump_context::dump_symtab_node): New member function.
102 (dump_context::get_scope_depth): New member function.
103 (dump_context::begin_scope): New member function.
104 (dump_context::end_scope): New member function.
105 (dump_context::ensure_pending_optinfo): New member function.
106 (dump_context::begin_next_optinfo): New member function.
107 (dump_context::end_any_optinfo): New member function.
108 (dump_context::s_current): New global.
109 (dump_context::s_default): New global.
110 (dump_scope_depth): Delete global.
111 (dumpfile_ensure_any_optinfo_are_flushed): New function.
112 (dump_symtab_node): New function.
113 (get_dump_scope_depth): Reimplement in terms of dump_context.
114 (dump_begin_scope): Likewise.
115 (dump_end_scope): Likewise.
116 (selftest::temp_dump_context::temp_dump_context): New ctor.
117 (selftest::temp_dump_context::~temp_dump_context): New dtor.
118 (selftest::verify_item): New function.
119 (ASSERT_IS_TEXT): New macro.
120 (ASSERT_IS_TREE): New macro.
121 (ASSERT_IS_GIMPLE): New macro.
122 (selftest::test_capture_of_dump_calls): New test.
123 (selftest::dumpfile_c_tests): Call it.
124 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
125 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
126 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
128 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
129 (dump_node, dump_bb): Move these unrelated decls.
130 (class dump_manager): Add leading comment.
131 * optinfo.cc: New file.
132 * optinfo.h: New file.
134 2018-07-19 Michael Collison <michael.collison@arm.com>
135 Richard Henderson <rth@redhat.com>
137 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
138 (subti): Handle op1 zero.
139 (subvti4, usub4ti4): New.
140 (*sub<GPI>3_compare1_imm): New.
141 (sub<GPI>3_carryinCV): New.
142 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
143 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
145 2018-07-19 Michael Collison <michael.collison@arm.com>
146 Richard Henderson <rth@redhat.com>
148 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
149 (addti3): Create simpler code if low part is already known to be 0.
150 (addvti4, uaddvti4): New.
151 (*add<GPI>3_compareC_cconly_imm): New.
152 (*add<GPI>3_compareC_cconly): New.
153 (*add<GPI>3_compareC_imm): New.
154 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
155 handle constants within this pattern..
156 (*add<GPI>3_compareV_cconly_imm): New.
157 (*add<GPI>3_compareV_cconly): New.
158 (*add<GPI>3_compareV_imm): New.
159 (add<GPI>3_compareV): New.
160 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
161 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
162 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
163 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
164 with 'comparison' operator.
165 (*add<GPI>3_compareV_cconly_imm): Ditto.
166 (*add<GPI>3_compareV_cconly): Ditto.
167 (*add<GPI>3_compareV_imm): Ditto.
168 (add<GPI>3_compareV): Ditto.
169 (add<mode>3_carryinC): Ditto.
170 (*add<mode>3_carryinC_zero): Ditto.
171 (*add<mode>3_carryinC): Ditto.
172 (add<mode>3_carryinV): Ditto.
173 (*add<mode>3_carryinV_zero): Ditto.
174 (*add<mode>3_carryinV): Ditto.
176 2018-07-19 Michael Collison <michael.collison@arm.com>
177 Richard Henderson <rth@redhat.com>
179 * config/aarch64/aarch64-modes.def (CC_V): New.
180 * config/aarch64/aarch64-protos.h
181 (aarch64_addti_scratch_regs): Declare
182 (aarch64_subvti_scratch_regs): Declare.
183 (aarch64_expand_subvti): Declare.
184 (aarch64_gen_unlikely_cbranch): Declare
185 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
186 for signed overflow using CC_Vmode.
187 (aarch64_get_condition_code_1): Handle CC_Vmode.
188 (aarch64_gen_unlikely_cbranch): New function.
189 (aarch64_addti_scratch_regs): New function.
190 (aarch64_subvti_scratch_regs): New function.
191 (aarch64_expand_subvti): New function.
193 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
195 * config/aarch64/aarch64-option-extensions.def: New entry for profile
197 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
198 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
201 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
204 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
205 address check not strict.
207 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
209 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
211 (store_pair_lanes<mode>): Likewise.
212 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
213 enum value 'ADDR_QUERY_LDP_STP_N'.
214 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
215 (aarch64_print_address_internal): Add declaration.
216 (aarch64_print_ldpstp_address): Remove.
217 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
218 (aarch64_print_operand): Change printing of 'y'.
219 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
220 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
221 'true' rather than '1'.
222 * gcc/config/aarch64/constraints.md (Uml): Likewise.
223 (Uml): Rename to Umn.
226 2018-07-19 Richard Biener <rguenther@suse.de>
228 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
230 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
231 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
232 (vn_reference_hasher): Likewise.
233 (struct vn_tables_s): Remove obstack and alloc-pool members.
234 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
235 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
236 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
237 (vn_reference_insert_pieces): Likewise.
238 (alloc_vn_nary_op_noinit): Adjust.
239 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
241 (shared_lookup_phiargs): Remove.
242 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
243 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
244 (visit_reference_op_call): Likewise.
245 (copy_nary, copy_phi, copy_reference): Remove.
246 (process_scc): Rewind the obstack when iterating. Do not
247 copy the elements to valid_info but just move them from one
248 hashtable to the other.
249 (allocate_vn_table): Adjust.
250 (free_vn_table): Likewise.
251 (init_scc_vn): Likewise.
252 (free_scc_vn): Likewise.
254 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
257 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
258 indirect_return as function type attribute.
259 (ix86_attribute_table): Change indirect_return to function
261 * doc/extend.texi: Update indirect_return attribute.
263 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
265 * wide-int.h (widest2_int): New.
266 * gimple-fold.c (arith_overflowed_p): Use it.
267 * tree.h (widest2_int_cst): New.
268 * tree-vrp.c (wide_int_binop_overflow): Rename from
270 Rewrite to work on trees.
271 (extract_range_from_multiplicative_op_1): Abstract code to...
272 (wide_int_range_min_max): ...here.
273 (wide_int_range_cross_product): ...and here.
274 (extract_range_from_binary_expr_1): Abstract overflow code to...
275 (wide_int_range_mult_wrapping): ...here.
276 * tree-vrp.h (wide_int_range_cross_product): New.
277 (wide_int_range_mult_wrapping): New.
279 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
280 Julia Koval <julia.koval@intel.com>
282 * config/i386/x86-tune-costs.h (skylake_memcpy,
283 skylake_memset): Replace rep_prefix with unrolling for size 512.
285 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
288 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
291 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
293 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
294 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
295 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
296 previously known as "PowerPC AltiVec Built-in Functions". Move
297 some material to new subsubsections "PowerPC AltiVec Built-in
298 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
300 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
301 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
302 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
303 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
305 2018-07-18 Richard Biener <rguenther@suse.de>
307 PR tree-optimization/86557
308 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
311 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
313 * config/s390/s390.c (s390_function_profiler): Generate CFI.
315 2018-07-17 Jeff Law <law@redhat.com>
317 * config/arm/arm.c (get_label_padding): Update for recent
318 changes to label_to_alignment.
320 PR tree-optimization/86010
321 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
323 * config/mips/mips.c (vr4130_align_insns): Update for recent
324 changes to label_to_alignment.
326 * config/frv/frv.c (frv_label_align): Update for recent changes
327 to label_to_alignment.
329 * config/nios2/nios2.c (nios2_label_align): Update for recent
330 changes which dropped ALIGN_LABELS_LOG.
332 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
334 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
335 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
337 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
339 * config/arc/arc.c (arc_label_align): Use align_labels instead of
340 deprecated align_labels_log.
342 2018-07-17 Richard Biener <rguenther@suse.de>
345 * dwarf2out.c (init_sections_and_labels): Always generate
346 a debug_line_str_section for early LTO debug.
347 (dwarf2out_finish): Reset debug_line_str_hash output early.
348 Bump counter for extra dwarf5 .debug_loc labels to not conflict
350 (dwarf2out_early_finish): Output debug_line_str.
352 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
354 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
355 index register on z196 or later.
357 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
359 * config/s390/s390.c (s390_default_align): Set default function
361 (s390_override_options_after_change): Call s390_default align.
362 (s390_option_override_internal): Call s390_default_align.
363 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
365 2018-07-17 Jakub Jelinek <jakub@redhat.com>
368 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
369 to _looptemp_ clauses, other than the first two.
371 2018-07-17 Martin Liska <mliska@suse.cz>
373 * opts.c: Do not enable OPT_falign_* for -Os.
375 2018-07-17 Martin Liska <mliska@suse.cz>
377 * align.h (MAX_CODE_ALIGN): New.
378 (MAX_CODE_ALIGN_VALUE): New.
379 * common/config/i386/i386-common.c (ix86_handle_option):
380 (MAX_CODE_ALIGN): Moved to align.h.
381 * final.c (MAX_CODE_ALIGN): Likewise.
382 * opts.c (parse_and_check_align_values):
383 (MAX_CODE_ALIGN): Likewise.
384 (MAX_CODE_ALIGN_VALUE): Likewise.
386 2018-07-17 Martin Liska <mliska@suse.cz>
388 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
389 in order to fulfil coding style.
390 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
391 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
392 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
393 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
394 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
395 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
396 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
397 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
398 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
400 2018-07-17 Martin Liska <mliska@suse.cz>
403 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
404 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
405 align_flags of label_to_alignment.
406 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
408 * config/m68k/m68k.c: Do not use removed align_labels_value and
410 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
411 (LOOP_ALIGN): Likewise.
412 (LABEL_ALIGN): Likewise.
413 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
414 Remove not used macro.
415 (rs6000_loop_align): Change return type to align_flags.
416 (rs6000_loop_align_max_skip): Remove.
417 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
418 Change return type to align_flags.
419 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
420 Remove not used macro.
421 (rs6000_loop_align): Change return type to align_flags.
422 (rs6000_loop_align_max_skip): Remove.
423 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
424 * config/rx/rx-protos.h (rx_align_for_label): Make it
426 * config/rx/rx.c (rx_align_for_label): Change return type
428 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
430 into align_flags class.
431 (LABEL_ALIGN): Likewise.
432 (LOOP_ALIGN): Likewise.
433 * config/s390/s390.c (s390_label_align): Use align_flags
435 (s390_asm_output_function_label): Likewise.
436 * config/sh/sh.c (sh_override_options_after_change):
437 Use align_flags class directly without macros.
438 (find_barrier): Likewise.
439 (barrier_align): Likewise.
440 (sh_loop_align): Likewise.
441 * config/spu/spu.c (spu_option_override):
442 Use align_flags_tuple::get_value instead of removed macros.
443 (spu_sched_init): Likewise.
444 * config/spu/spu.h (GTY): Likewise.
445 * config/visium/visium.c (visium_option_override):
446 Set "8" as default secondary alignment.
447 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
448 in order to guarantee secondary alignment of 8.
449 * coretypes.h: Include align.h header file.
450 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
451 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
452 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
453 * doc/tm.texi.in: Likewise.
454 * final.c (struct label_alignment): Remove not used structure.
455 (LABEL_ALIGN): Change type to align_flags.
456 (LOOP_ALIGN): Likewise.
457 (JUMP_ALIGN): Likewise.
458 (default_loop_align_max_skip): Remove.
459 (default_label_align_max_skip): Likewise.
460 (default_jump_align_max_skip): Likewise.
461 (default_label_align_after_barrier_max_skip):
462 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
463 (LABEL_TO_MAX_SKIP): Remove.
464 (label_to_alignment): Return align_flags type instead of integer.
465 (label_to_max_skip): Remove.
466 (align_fuzz): Use align_flags type.
467 (compute_alignments): Use align_flags type and use align_flags::max
468 to combine multiple alignments.
469 (grow_label_align): Grow vec instead of C array.
470 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
471 (shorten_branches): Use align_flags type and use align_flags::max
472 to combine multiple alignments.
473 (final_scan_insn_1): Remove usage of secondary alignment that comes
474 from label alignment, but instead use proper secondary alignment
475 which is computed in grow_label_align.
476 * flags.h (struct align_flags_tuple): Move to align.h.
477 (struct align_flags): Likewise.
478 (state_align_loops): Rename to align_loops.
479 (state_align_jumps): Rename to align_jumps.
480 (state_align_labels): Rename to align_labels.
481 (state_align_functions): Rename to align_functions.
482 (align_loops_log): Remove.
483 (align_jumps_log): Remove.
484 (align_labels_log): Remove.
485 (align_functions_log): Remove.
486 (align_loops_max_skip): Remove.
487 (align_jumps_max_skip): Remove.
488 (align_labels_max_skip): Remove.
489 (align_functions_max_skip): Remove.
490 (align_loops_value): Remove.
491 (align_jumps_value): Remove.
492 (align_labels_value): Remove.
493 (align_functions_value): Remove.
494 * output.h (label_to_alignment): Change return type to align_flags.
495 (label_to_max_skip): Remove.
496 * target.def: Remove loop_align_max_skip, label_align_max_skip,
497 jump_align_max_skip macros.
498 * targhooks.h (default_loop_align_max_skip): Remove.
499 (default_label_align_max_skip): Likewise.
500 (default_jump_align_max_skip): Likewise.
501 (default_label_align_after_barrier_max_skip): Remove.
502 * toplev.c (read_log_maxskip): Use ::normalize function.
503 (parse_N_M): Remove not used argument and also call ::normalize.
504 (parse_alignment_opts): Do not pass unused arguments.
505 * varasm.c (assemble_start_function): Use directly align_functions
506 instead of removed macros.
507 * system.h: Do not poison removed macros.
509 2018-07-17 Jakub Jelinek <jakub@redhat.com>
512 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
513 and cond temporaries don't have reference type if iterator has
514 pointer type. For init use &for_pre_body instead of pre_p if
515 for_pre_body is non-empty.
517 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
519 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
520 double-double modes to SFmode directly directly.
521 (trunc<mode>sf2_fprs): Delete.
523 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
525 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
526 for conversions between IFmode and the decimal floating point modes.
527 (init_float128_ieee): Use the correct names for conversions between
528 KFmode and the decimal floating point modes.
530 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
532 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
533 for the conversions between TDmode and IFmode.
534 (init_float128_ieee): Use more correct names for the conversions
535 between TDmode and KFmode.
537 2018-07-16 Jakub Jelinek <jakub@redhat.com>
539 PR tree-optimization/86526
540 * builtins.c (expand_builtin_memcmp): Formatting fixes.
541 (inline_expand_builtin_string_cmp): Likewise.
542 (inline_string_cmp): Likewise. Use c_readstr instead of
543 builtin_memcpy_read_str. Add unit_mode temporary.
545 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
548 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
549 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
551 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
553 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
554 Alphabetize prototypes of built-in functions, separating out
555 built-in functions that are listed in this section but should be
558 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
561 * expmed.c (emit_store_flag): Do not emit setcc followed by a
562 conditional move when trapping comparison was split to a
563 non-trapping one (and vice versa).
565 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
567 * config/s390/s390.c (s390_function_profiler): Generate nops
568 instead of profiler call sequences.
569 * config/s390/s390.opt: Add the new option.
571 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
573 * config/s390/s390.c (s390_function_profiler): Generate
574 __mcount_loc section.
575 * config/s390/s390.opt: Add the new option.
577 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
579 * common.opt: Add the new warning.
580 * config/s390/s390.c (s390_function_profiler): Emit "brasl
581 %r0,__fentry__" when -mfentry is specified.
582 (s390_option_override_internal): Disallow -mfentry for 31-bit
584 * config/s390/s390.opt: Add the new option.
586 2018-07-16 Richard Biener <rguenther@suse.de>
589 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
590 for function-local FUNCTION_DECL and RESULT_DECL immediately.
592 2018-07-16 Martin Liska <mliska@suse.cz>
595 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
598 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
600 * config/arc/arcHS.md: Update ARCHS scheduling rules.
602 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
604 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
606 * config/arc/arc-cpus.def (hs4x): New cpu.
608 * config/arc/arc-tables.opt: Regenerate.
609 * config/arc/arc.c (arc_sched_issue_rate): New function.
610 (TARGET_SCHED_ISSUE_RATE): Define.
611 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
612 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
614 (attr tune): Add ARCHS4x tune values.
615 (attr tune_dspmpy): Define.
616 (*tst): Correct instruction type.
617 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
618 * config/arc/arcHS4x.md: New file.
619 * config/arc/fpu.md: Update instruction type attributes.
620 * config/arc/t-multilib: Regenerate.
622 2018-07-16 Tom de Vries <tdevries@suse.de>
625 * var-tracking.c (vt_initialize): Fix pre_dec handling.
627 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
629 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
632 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
634 PR tree-optimization/86514
635 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
636 conversion to a boolean type from a type with greater precision.
638 2018-07-16 Tom de Vries <tdevries@suse.de>
640 * var-tracking.c (vt_initialize): Print adjusted insn slim if
641 dump_flags request TDF_SLIM.
643 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
645 * fold-const.c (int_const_binop_1): Abstract...
646 (wide_int_binop): ...wide int code here.
647 (poly_int_binop): ...poly int code here.
648 Abstract the rest of int_const_binop_1 into int_const_binop.
649 * fold-const.h (wide_int_binop): New.
650 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
651 Remove useless PLUS/MINUS_EXPR case.
652 (zero_nonzero_bits_from_vr): Move wide int code...
653 (zero_nonzero_bits_from_bounds): ...here.
654 (extract_range_from_binary_expr_1): Move mask optimization code...
655 (range_easy_mask_min_max): ...here.
656 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
657 (range_easy_mask_min_max): New.
659 2018-07-15 Jeff Law <law@redhat.com>
662 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
665 2018-07-14 Jim Wilson <jimw@sifive.com>
667 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
669 2018-07-14 Paul Koning <ni1d@arrl.net>
671 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
673 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
675 * lto-streamer-out.c (copy_function_or_variable): Dump info about
678 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
679 Steve Munroe <munroesj52@gmail.com>
681 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
682 (_mm_andnot_si128): Likewise.
683 (_mm_or_si128): Likewise.
684 (_mm_xor_si128): Likewise.
686 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
689 * builtins.c (expand_builtin_memcmp): Inline the calls first
690 when result_eq is false.
691 (expand_builtin_strcmp): Inline the calls first.
692 (expand_builtin_strncmp): Likewise.
693 (inline_string_cmp): New routine. Expand a string compare
694 call by using a sequence of char comparison.
695 (inline_expand_builtin_string_cmp): New routine. Inline expansion
696 a call to str(n)cmp/memcmp.
697 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
699 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
701 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
703 * config/arm/driver-arm.c: Include arm-native.h.
704 (host_detect_local_cpu): Use auto-generated data tables.
705 (vendors, arm_cpu_table): Delete. Move part information to ...
706 * config/arm/arm-cpus.in: ... here.
707 * config/arm/parsecpu.awk (gen_native): New function.
708 (vendor, part): New CPU fields.
709 (END): Add support for building the native CPU detection tables.
710 * config/arm/t-arm (arm-native.h): Add build rule.
711 (driver-arm.o): Add dependency on arm-native.h.
713 2018-07-13 Richard Biener <rguenther@suse.de>
716 * match.pd (addr1 - addr2): Allow either of the operand to
719 2018-07-13 Tom de Vries <tdevries@suse.de>
721 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
724 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
726 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
727 arrays instead of numbered variables.
729 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
731 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
732 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
734 2018-07-13 Richard Biener <rguenther@suse.de>
737 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
738 instead of get_context_die.
740 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
741 Richard Biener <rguenther@suse.de>
744 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
745 that the loop latch destination where phi is defined.
747 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
749 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
750 (riscv_expand_epilogue): Add assertion to check interrupt mode.
751 (riscv_set_current_function): Extract getting interrupt type to new
753 (riscv_get_interrupt_type): New function.
754 (riscv_merge_decl_attributes): New function, checking interrupt type is
756 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
758 2018-07-12 Paul Koning <ni1d@arrl.net>
760 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
763 2018-07-12 Paul Koning <ni1d@arrl.net>
765 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
766 zero reference, add doloop_end instead.
767 * doc/md.texi (decrement_and_branch_until_zero): Remove.
768 (Looping patterns): Remove decrement_and_branch_until_zero. Add
769 detail for doloop_end.
771 2018-07-12 Martin Sebor <msebor@redhat.com>
774 * attribs.c (decl_attributes): Reject conflicting attributes before
775 calling attribute handlers.
777 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
779 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
781 (gcc::dump_manager::get_dump_file_name): likewise.
782 (dump_begin): Likewise.
783 * dumpfile.h (dump_begin): Update prototype.
784 (gcc::dump_manager::get_dump_file_name,
785 gcc::dump_manager::get_dump_file_name): Update prototype.
787 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
789 * internal-fn.h (vectorizable_internal_fn_p): New function.
790 * tree-vect-slp.c (compatible_calls_p): Likewise.
791 (vect_build_slp_tree_1): Remove nops argument. Handle calls
792 to internal functions.
793 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
795 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
797 * fold-const.h (inverse_conditions_p): Declare.
798 * fold-const.c (inverse_conditions_p): New function.
799 * match.pd: Use inverse_conditions_p. Add folds of view_converts
800 that test the inverse condition of a conditional internal function.
801 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
802 * internal-fn.c (internal_fn_mask_index): Handle conditional
804 (vectorized_internal_fn_supported_p): New function.
805 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
806 (any_pred_load_store): Replace with...
807 (need_to_predicate): ...this new variable.
808 (redundant_ssa_names): New variable.
809 (ifcvt_can_use_mask_load_store): Move initial checks to...
810 (ifcvt_can_predicate): ...this new function. Handle tree codes
811 for which a conditional internal function exists.
812 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
813 instead of ifcvt_can_use_mask_load_store. Update after variable
815 (predicate_load_or_store): New function, split out from
816 predicate_mem_writes.
817 (check_redundant_cond_expr): New function.
818 (value_available_p): Likewise.
819 (predicate_rhs_code): Likewise.
820 (predicate_mem_writes): Rename to...
821 (predicate_statements): ...this. Use predicate_load_or_store
822 and predicate_rhs_code.
823 (combine_blocks, tree_if_conversion): Update after above name changes.
824 (ifcvt_local_dce): Handle redundant_ssa_names.
825 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
826 general conditional functions.
827 * tree-vect-stmts.c (vectorizable_call): Likewise.
829 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
830 Alan Hayward <alan.hayward@arm.com>
831 David Sherwood <david.sherwood@arm.com>
833 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
834 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
835 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
836 plus and minus and convert them into IFN_COND_FMA-based sequences.
837 (convert_mult_to_fma): Handle conditional plus and minus.
839 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
841 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
842 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
843 (cond_fnms_optab): New optabs.
844 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
846 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
847 * internal-fn.h (get_conditional_internal_fn): Declare.
848 (get_unconditional_internal_fn): Likewise.
849 * internal-fn.c (cond_ternary_direct): New macro.
850 (expand_cond_ternary_optab_fn): Likewise.
851 (direct_cond_ternary_optab_supported_p): Likewise.
852 (FOR_EACH_COND_FN_PAIR): Likewise.
853 (get_conditional_internal_fn): New function.
854 (get_unconditional_internal_fn): Likewise.
855 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
856 (gimple_match_op::gimple_match_op): Add a new overload for 5
858 (gimple_match_op::set_op): Likewise.
859 (gimple_resimplify5): Declare.
860 * genmatch.c (decision_tree::gen): Generate simplifications for
862 * gimple-match-head.c (gimple_simplify): Define an overload for
863 5 operands. Handle calls with 5 arguments in the top-level overload.
864 (convert_conditional_op): Handle conversions from unconditional
865 internal functions to conditional ones.
866 (gimple_resimplify5): New function.
867 (build_call_internal): Pass a fifth operand.
868 (maybe_push_res_to_seq): Likewise.
869 (try_conditional_simplification): Try converting conditional
870 internal functions to unconditional internal functions.
871 Handle 3-operand unconditional forms.
872 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
873 Define ternary equivalents of the current rules for binary conditional
875 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
877 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
878 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
879 (optab): Handle them.
880 (SVE_COND_FP_TERNARY): New int iterator.
881 (sve_fmla_op, sve_fmad_op): New int attributes.
882 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
883 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
884 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
886 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
888 * target.def (preferred_else_value): New target hook.
889 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
890 * doc/tm.texi: Regenerate.
891 * targhooks.h (default_preferred_else_value): Declare.
892 * targhooks.c (default_preferred_else_value): New function.
893 * internal-fn.h (conditional_internal_fn_code): Declare.
894 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
895 (get_conditional_internal_fn): Use it.
896 (conditional_internal_fn_code): New function.
897 * gimple-match.h (gimple_match_cond): New struct.
898 (gimple_match_op): Add a cond member function.
899 (gimple_match_op::gimple_match_op): Update all forms to take a
901 * genmatch.c (expr::gen_transform): Use the same condition as res_op
902 for the suboperation, but don't specify a particular else_value.
903 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
904 (visit_nary_op, visit_reference_op_load): Pass
905 gimple_match_cond::UNCOND to the gimple_match_op constructor.
906 * gimple-match-head.c: Include tree-eh.h
907 (convert_conditional_op): New function.
908 (maybe_resimplify_conditional_op): Likewise.
909 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
910 (gimple_resimplify2): Likewise.
911 (gimple_resimplify3): Likewise.
912 (gimple_resimplify4): Likewise.
913 (maybe_push_res_to_seq): Return null for conditional operations.
914 (try_conditional_simplification): New function.
915 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
917 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
919 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
921 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
923 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
925 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
927 (hash_tree): Do not hash DECL_FCONTEXT
928 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
929 Do not stream DECL_FCONTEXT.
930 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
931 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
933 2018-07-12 Richard Biener <rguenther@suse.de>
936 * dwarf2out.c (gen_block_die): Only output blocks when they have
937 at least one !DECL_IGNORED_P variable.
939 2018-07-12 Richard Biener <rguenther@suse.de>
942 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
943 Remove -mieee-fp handling.
945 2018-07-12 Richard Biener <rguenther@suse.de>
947 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
948 left-over from last patch.
950 2018-07-12 Jakub Jelinek <jakub@redhat.com>
952 PR tree-optimization/86492
953 * gimple-ssa-store-merging.c
954 (imm_store_chain_info::coalesce_immediate_stores): Call
955 check_no_overlap even for the merge_overlapping case. Formatting fix.
957 2018-07-12 Richard Biener <rguenther@suse.de>
960 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
961 move possibly trapping operations into the conditional.
963 2018-07-12 Richard Biener <rguenther@suse.de>
965 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
966 (vn_lookup_simplify_result): Remove recursion limit applied
968 (vn_nary_build_or_lookup_1): Adjust.
969 (try_to_simplify): Likewise.
970 * gimple-match-head.c (gimple_resimplify1): Instead apply one
972 (gimple_resimplify2): Likewise.
973 (gimple_resimplify3): Likewise.
974 (gimple_resimplify4): Likewise.
976 2018-07-11 Jakub Jelinek <jakub@redhat.com>
978 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
979 Use __mmask64 type instead of __mmask8 for __M argument.
980 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
981 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
983 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
984 __mmask16 for __M argument.
985 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
986 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
987 to __mmask16 instead of __mmask8.
988 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
989 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
990 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
991 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
992 instead of __mmask16 for __U argument.
993 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
994 __mmask16 instead of __mmask8 for __U argument.
995 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
997 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
999 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1001 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1003 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1005 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1007 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1009 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1011 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1013 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1015 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1016 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1017 return type as well as __M argument type and all casts from __mmask8
1019 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1020 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1021 return type as well as __M argument type and all casts from __mmask8
1023 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1024 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1025 return type as well as __M argument type and all casts from __mmask8
1027 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1028 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1029 return type as well as __M argument type and all casts from __mmask8
1031 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1032 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1035 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
1037 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1038 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1041 2018-07-11 Paul Koning <ni1d@arrl.net>
1043 * doc/md.texi (define_subst): Document how multiple occurrences of
1044 the same argument in the replacement pattern are handled.
1046 2018-07-11 Paul Koning <ni1d@arrl.net>
1048 * doc/extend.texi (Common Variable Attributes): Move "mode" into
1050 (Common Type Attributes): Add "mode" attribute.
1052 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
1054 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1055 stream DECL_ORIGINAL_TYPE.
1056 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1057 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1058 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1059 Do not walk original type.
1060 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1062 (write_ts_decl_non_common_tree_pointers): Do not stream
1064 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1065 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1067 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1069 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1070 thread twice from the same starting edge.
1072 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1074 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1075 * gimple.c (gimple_call_nonnull_result_p): ...here...
1076 (gimple_call_nonnull_arg): ...and here.
1077 * gimple.h (gimple_call_nonnull_result_p): New.
1078 (gimple_call_nonnull_arg): New.
1080 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
1082 * config/arm/arm-cpus.in: Move information from fpu field of each
1083 cpu definition to the isa field.
1084 * config/arm/parsecpu.awk (fpu): Delete match rule.
1085 (gen_comm_data): Don't add bits from the CPU's FPU entry.
1087 2018-07-11 Richard Biener <rguenther@suse.de>
1090 * dwarf2out.c (init_sections_and_labels): Use
1091 output_asm_line_debug_info consistently.
1092 (dwarf2out_early_finish): Likewise.
1093 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1096 2018-07-11 Richard Biener <rguenther@suse.de>
1098 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1099 Rework father_bb setting in a way to avoid propagating constants
1100 multiple times on a loop body.
1102 2018-07-10 Mark Wielaard <mark@klomp.org>
1105 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1107 2018-07-10 Richard Biener <rguenther@suse.de>
1109 * hash-map.h (hash_map::iterator::operator*): Return
1110 references to key and value.
1112 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1115 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1116 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1117 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1118 (gimplify_omp_for): For composite loops, move outer
1119 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1120 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
1121 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
1122 TREE_LIST for both the original class iterator and the "last" helper
1123 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
1124 loop, remember has_decl_expr from outer composite loops for the
1125 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1127 2018-07-09 Martin Sebor <msebor@redhat.com>
1131 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1132 accessing implicitly initialized array elements.
1133 * expr.c (string_constant): Handle string initializers of
1134 character arrays within aggregates.
1135 * gimple-fold.c (fold_array_ctor_reference): Add argument.
1136 Store element offset. As a special case, handle zero size.
1137 (fold_nonarray_ctor_reference): Same.
1138 (fold_ctor_reference): Add argument. Store subobject offset.
1139 * gimple-fold.h (fold_ctor_reference): Add argument.
1141 2018-07-09 Paul Koning <ni1d@arrl.net>
1143 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1144 (pdp11_insn_cost): New function.
1145 (pdp11_md_asm_adjust): New function.
1146 (TARGET_INVALID_WITHIN_DOLOOP): Define.
1147 (pdp11_rtx_costs): Update to match machine better.
1148 (output_addr_const_pdp11): Correct format mismatch warnings.
1149 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1150 * config/pdp11/pdp11.md: General change to add base_cost and/or
1151 length attributes for use by new pdp11_insn_cost function.
1152 (MIN_BRANCH): Correct definition.
1154 (doloop_end): Use standard pattern name for looping pattern.
1155 (doloop_end_nocc): New.
1156 (movsf): Add another constraint alternative.
1157 (zero_extendqihi2): Add constraint alternatives for not in place
1159 (zero_extendhisi2): Remove.
1160 (shift patterns): Add CC handling variants.
1164 (define_peephole2): New peephole to recognize mov that sets CC for
1167 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1169 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1170 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1173 2018-07-09 Jakub Jelinek <jakub@redhat.com>
1176 * real.c (real_nextafter): Return true if result is denormal.
1178 2018-07-09 Martin Liska <mliska@suse.cz>
1180 * common.opt: Add back wrongly removed attribute.
1182 2018-07-09 Richard Biener <rguenther@suse.de>
1185 * dwarf2out.c (gen_block_die): For an early generated DIE
1186 always output high/low PC attributes.
1188 2018-07-09 Tom de Vries <tdevries@suse.de>
1190 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1191 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1192 onto VAR_DECL with abstract origin.
1194 2018-07-07 Jim Wilson <jimw@sifive.com>
1196 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1198 2018-07-07 Tom de Vries <tdevries@suse.de>
1200 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1202 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
1204 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1206 (combine_bound): Use wide-int overflow calculation instead of
1208 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1210 * fold-const.c (int_const_binop_2): Same.
1211 (extract_muldiv_1): Same.
1212 (fold_div_compare): Same.
1213 (fold_abs_const): Same.
1215 * poly-int.h (add): Same.
1219 * predict.c (predict_iv_comparison): Same.
1220 * profile-count.c (slow_safe_scale_64bit): Same.
1221 * simplify-rtx.c (simplify_const_binary_operation): Same.
1222 * tree-chrec.c (tree_fold_binomial): Same.
1223 * tree-data-ref.c (split_constant_offset_1): Same.
1224 * tree-if-conv.c (idx_within_array_bound): Same.
1225 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1226 * tree-ssa-phiopt.c (minmax_replacement): Same.
1227 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1228 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1229 * vr-values.c (vr_values::adjust_range_with_scev): Same.
1230 * wide-int.cc (wi::add_large): Same.
1231 (wi::mul_internal): Same.
1232 (wi::sub_large): Same.
1233 (wi::divmod_internal): Same.
1234 * wide-int.h: Change overflow type to overflow_type for neg, add,
1235 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1236 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1237 mul_internal, divmod_internal.
1238 (overflow_type): New enum.
1239 (accumulate_overflow): New.
1241 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1243 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1244 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1246 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1248 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1249 argument is checked for zero before entering loop, avoid checking again.
1251 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1253 * gimplify.h (generic_expr_could_trap_p): Set as global function.
1254 * gimplify.h (generic_expr_could_trap_p): Likwise.
1255 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1257 2018-07-06 Jakub Jelinek <jakub@redhat.com>
1259 PR tree-optimization/86401
1260 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1261 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1262 (fold_bit_and_mask): ... here. New helper function for match.pd.
1263 * fold-const.h (fold_bit_and_mask): Declare.
1264 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1266 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1269 * target.def (translate_mode_attribute): New hook.
1270 * targhooks.h (default_translate_mode_attribute): Declare.
1271 * targhooks.c (default_translate_mode_attribute): New function.
1272 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1273 * doc/tm.texi: Regenerate.
1274 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1275 (rs6000_translate_mode_attribute): New function.
1277 2018-07-06 Paul Koning <ni1d@arrl.net>
1279 * doc/md.texi (define_split): Document DONE and FAIL.
1280 (define_peephole2): Ditto.
1282 2018-07-05 Jeff Law <law@redhat.com>
1284 PR tree-optimization/86010
1285 * tree-ssa-dse.c (compute_trims): More aggressively trim at
1286 both the head and tail of mem* and str* calls.
1288 2018-07-05 Jim Wilson <jimw@sifive.com>
1290 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1292 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
1294 * config/aarch64/aarch64-simd.md: correct flags text for
1295 MIN_EXPR replacement.
1297 2018-07-05 James Clarke <jrtc27@jrtc27.com>
1299 * configure: Regenerated.
1301 2018-07-05 Carl Love <cel@us.ibm.com>
1303 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1304 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1305 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1306 VSX_BUILTIN_DOUBLEL_V4SF.
1308 2018-07-05 Martin Sebor <msebor@redhat.com>
1311 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1312 than its domain to compute its the upper bound of a char array.
1314 2018-07-05 Nathan Sidwell <nathan@acm.org>
1316 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1317 * doc/cpp.texi: Update comment.
1318 * doc/tm.texi: Rebuilt.
1319 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1320 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1321 * doc/extend.texi (Backwards Compatibility): Clarify it is system
1322 headers affected by extern "C".
1323 * system.h: Poison NO_IMPLICIT_EXTERN_C.
1324 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1325 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1326 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1327 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1328 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1329 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1330 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1331 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1332 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1333 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1334 config/sparc/sp64-elf.h, config/spu/spu.h,
1335 config/stormy16/stormy16.h, config/v850/v850.h,
1336 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1337 define NO_IMPLICIT_EXTERN_C.
1338 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1340 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1343 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1344 instead of GET_MODE_SIZE when comparing Units.
1346 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1349 * rtlanal.c (set_noop_p): Constrain on mode change,
1350 include hard-reg-set.h
1352 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1354 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1356 2018-07-05 Jakub Jelinek <jakub@redhat.com>
1359 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1362 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1364 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1366 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1369 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1371 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1373 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
1376 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1378 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
1380 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1381 neg_*_op* variables.
1383 2018-07-04 Martin Liska <mliska@suse.cz>
1385 * tree-switch-conversion.c: Define
1386 max_ratio_for_speed and max_ratio_for_size constants.
1388 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1389 Martin Liska <mliska@suse.cz>
1394 * common.opt: Rename align options with 'str_' prefix.
1395 * common/config/i386/i386-common.c (set_malign_value): New
1397 (ix86_handle_option): Use it to set -falign-* options/
1398 * config/aarch64/aarch64-protos.h (struct tune_params): Change
1399 type from int to string.
1400 * config/aarch64/aarch64.c: Update default values from int
1402 * config/alpha/alpha.c (alpha_override_options_after_change):
1404 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1405 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1406 max skip conditionally.
1407 * config/i386/freebsd.h (SUBALIGN_LOG): New.
1408 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1409 max skip conditionally.
1410 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1411 max skip conditionally.
1412 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1413 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1414 max skip conditionally.
1415 * config/i386/i386.c (struct ptt): Change type from int to
1417 (ix86_default_align): Set default values.
1418 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1419 max skip conditionally.
1420 * config/i386/iamcu.h (SUBALIGN_LOG): New.
1421 (ASM_OUTPUT_MAX_SKIP_ALIGN):
1422 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1423 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1424 max skip conditionally.
1425 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1426 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1427 * config/i386/x86-64.h (SUBALIGN_LOG): New.
1428 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1429 max skip conditionally.
1430 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1431 * config/ia64/ia64.c (ia64_option_override): Set default values
1432 for alignment options.
1433 * config/m68k/m68k.c: Handle new str_align_* options.
1434 * config/mips/mips.c (mips_set_compression_mode): Change
1436 (mips_option_override): Set default values for options.
1437 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1439 * config/rs6000/rs6000.c (rs6000_option_override_internal):
1441 * config/rx/rx.c (rx_option_override): Likewise.
1442 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1443 (LABEL_ALIGN): Use align_labels_log.
1444 (LOOP_ALIGN): Use align_loops_align.
1445 * config/s390/s390.c (s390_asm_output_function_label): Use new
1447 * config/sh/sh.c (sh_override_options_after_change):
1448 Change type of constants.
1449 * config/spu/spu.c (spu_sched_init): Likewise.
1450 * config/sparc/sparc.c (sparc_option_override): Set default
1452 * config/visium/visium.c (visium_option_override): Likewise.
1453 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1454 emit p2align format with last argument if it's not needed.
1455 * doc/invoke.texi: Document extended format of -falign-*.
1456 * final.c: Use align_labels alignment.
1457 * flags.h (struct target_flag_state): Change type to use
1459 (struct align_flags_tuple): New.
1460 (struct align_flags): Likewise.
1461 (align_loops_log): Redefine macro to use new types.
1462 (align_loops_max_skip): Redefine macro to use new types.
1463 (align_jumps_log): Redefine macro to use new types.
1464 (align_jumps_max_skip): Redefine macro to use new types.
1465 (align_labels_log): Redefine macro to use new types.
1466 (align_labels_max_skip): Redefine macro to use new types.
1467 (align_functions_log): Redefine macro to use new types.
1468 (align_loops): Redefine macro to use new types.
1469 (align_jumps): Redefine macro to use new types.
1470 (align_labels): Redefine macro to use new types.
1471 (align_functions): Redefine macro to use new types.
1472 (align_functions_max_skip): Redefine macro to use new types.
1473 (align_loops_value): New macro.
1474 (align_jumps_value): New macro.
1475 (align_labels_value): New macro.
1476 (align_functions_value): New macro.
1477 * function.c (invoke_set_current_function_hook): Propagate
1478 alignment values from flags to global variables default in
1480 * ipa-icf.c (sem_function::equals_wpa): Use
1481 cl_optimization_option_eq instead of memcmp.
1482 * lto-streamer.h (cl_optimization_stream_out): Support streaming
1484 (cl_optimization_stream_in): Likewise.
1485 * optc-save-gen.awk: Support strings in cl_optimization.
1486 * opth-gen.awk: Likewise.
1487 * opts.c (finish_options): Remove error checking of invalid
1489 (MAX_CODE_ALIGN): Remove.
1490 (MAX_CODE_ALIGN_VALUE): Likewise.
1491 (parse_and_check_align_values): New function.
1492 (check_alignment_argument): Likewise.
1493 (common_handle_option): Use check_alignment_argument.
1494 * opts.h (parse_and_check_align_values): Declare.
1495 * toplev.c (init_alignments): Remove.
1496 (read_log_maxskip): New.
1497 (parse_N_M): Likewise.
1498 (parse_alignment_opts): Likewise.
1499 (backend_init_target): Remove usage of init_alignments.
1500 * toplev.h (parse_alignment_opts): Declare.
1501 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1503 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1504 * tree.c (cl_option_hasher::equal): New.
1505 * varasm.c: Use new global macros.
1507 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1509 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1510 Use a simpler align directive also if MAXSKIP = ALIGN-1.
1511 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1512 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1513 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1514 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1515 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1516 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1517 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1518 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1519 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1520 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1521 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1523 2018-07-04 Martin Liska <mliska@suse.cz>
1524 Jonathan Wakely <jwakely@redhat.com>
1526 * coverage.c: Use correct type.
1527 * doc/invoke.texi: Language correction.
1529 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
1532 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1533 ENDBRANCH for non-tail call which may return via indirect branch.
1534 * doc/extend.texi: Document indirect_return attribute.
1536 2018-07-03 Martin Sebor <msebor@redhat.com>
1538 PR tree-optimization/86274
1539 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1541 (format_floating): Correct handling of infinities and NaNs.
1543 2018-07-03 Martin Sebor <msebor@redhat.com>
1545 * print-tree.c (print_real_cst): New function.
1546 (print_node_brief): Call it.
1547 (print_node): Ditto.
1549 2018-07-03 Jeff Law <law@redhat.com>
1551 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1552 into a single pattern.
1554 * config/h8300/h8300.md (ors code_iterator): New.
1555 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1556 a single pattern and single splitter.
1557 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1558 (iorqi3_1, xorqi3_1): Likewise.
1559 (iorqi3, xorqi3 expanders): Similarly.
1561 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1562 (movmd_internal) into a single pattern using the P mode iterator.
1563 (movmd splitters): Similarly.
1564 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1565 (movsd splitters): Similarly.
1567 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1568 ADDB, ADDW and ADDL into a single ADD attribute which selects the
1569 right table based on the size of the operand.
1570 * config/h8300/h8300.md (length_table): Corresponding changes. All
1571 references to "addb", "addw" and "addl" changed to "add".
1572 (btst patterns): Merge two variants into a single pattern.
1573 (tstqi, tsthi): Likewise.
1574 (addhi3_incdec, addsi3_incdec): Likewise.
1575 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1576 (mulhi3, mulsi3): Likewise.
1577 (udivhi3, udivsi3): Likewise.
1578 (divhi3, divsi3): Likewise.
1579 (andorqi3, andorhi3, andorsi3): Likewise.
1581 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
1584 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1585 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1587 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1589 PR tree-optimization/85694
1590 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1591 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1593 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1594 (<u>avg<mode>3_ceil): New patterns.
1596 2018-07-03 David Malcolm <dmalcolm@redhat.com>
1598 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1599 scan-tree-dump directive.
1600 * gcc.dg/vect/slp-perm-2.c: Likewise.
1601 * gcc.dg/vect/slp-perm-3.c: Likewise.
1602 * gcc.dg/vect/slp-perm-5.c: Likewise.
1603 * gcc.dg/vect/slp-perm-6.c: Likewise.
1604 * gcc.dg/vect/slp-perm-7.c: Likewise.
1605 * gcc.dg/vect/slp-perm-8.c: Likewise.
1607 2018-07-03 Marek Polacek <polacek@redhat.com>
1610 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1612 2018-07-03 Richard Biener <rguenther@suse.de>
1615 * tree-ssa-structalias.c (find_func_clobbers): Properly
1616 handle indirect calls.
1618 2018-07-03 Jeff Law <law@redhat.com>
1620 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1621 (shifts): New code iterator.
1622 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1623 expander. Fix HImode handling on H8/SX.
1624 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1625 (subqi3, subhi3, subsi3 expanders): Likewise.
1626 (andqi3, andhi3, andsi3 expanders): Likewise.
1627 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1628 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1629 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1630 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1631 (zero_extendqihi2, zero_extendqisi2): Likewise.
1632 (extendqihi2, extendqisi2): Likewise.
1633 (rotlqi3, rotlhi3, rotlsi3): Likewise.
1634 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1635 (rotlqi3_1, rotlhi3_1): Likewise.
1636 (logicalhi3_sn, logicalsi3_sn): Likewise.
1637 (logicalhi3, logicalsi3): Likewise.
1639 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1641 * tree-vect-patterns.c (vect_recog_rotate_pattern)
1642 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1643 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1644 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1645 type to append_pattern_def_seq instead of creating a stmt_vec_info
1647 (build_mask_conversion): Likewise. Remove vinfo argument.
1648 (vect_add_conversion_to_patterm): Likewise, renaming to...
1649 (vect_add_conversion_to_pattern): ...this.
1650 (vect_recog_mask_conversion_pattern): Update call to
1651 build_mask_conversion. Pass the vector type to
1652 append_pattern_def_seq here too.
1653 (vect_recog_gather_scatter_pattern): Update call to
1654 vect_add_conversion_to_pattern.
1656 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1658 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1659 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1660 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1661 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1662 STMT_VINFO_PATTERN_DEF_SEQ to null here.
1663 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1664 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1665 append_pattern_def_seq instead of new_pattern_def_seq.
1666 (vect_recog_divmod_pattern): Do both of the above.
1667 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1670 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1672 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1673 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1674 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1675 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1676 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1677 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1678 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1679 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1680 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1681 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1682 parameter with a single stmt_vec_info.
1683 (vect_recog_func_ptr): Likewise.
1684 (vect_recog_gather_scatter_pattern): Likewise, folding in...
1685 (vect_try_gather_scatter_pattern): ...this.
1686 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1687 the stmt_vec_info of the statement to be matched. Don't clear
1688 STMT_VINFO_RELATED_STMT.
1689 (vect_pattern_recog): Update call accordingly.
1691 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1693 PR tree-optimization/85694
1694 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1695 (uavgM3_ceil): Document new optabs.
1696 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1697 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1699 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1700 (savg_ceil_optab): New optabs.
1701 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1702 (vect_vect_recog_func_ptrs): Add it.
1703 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1704 constant directly from the associated lhs.
1706 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1708 * tree-vect-patterns.c (vect_split_statement): New function.
1709 (vect_convert_input): Use it to try to split an existing cast.
1711 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1713 * poly-int.h (print_hex): New function.
1714 * dumpfile.h (dump_dec, dump_hex): Declare.
1715 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1716 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1717 min_input_precision, operation_precision and operation_sign.
1718 * tree-vect-patterns.c (vect_get_range_info): New function.
1719 (vect_same_loop_or_bb_p, vect_single_imm_use)
1720 (vect_operation_fits_smaller_type): Delete.
1721 (vect_look_through_possible_promotion): Add an optional
1722 single_use_p parameter.
1723 (vect_recog_over_widening_pattern): Rewrite to use new
1724 stmt_vec_info infomration. Handle one operation at a time.
1725 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1726 (vect_truncatable_operation_p, vect_set_operation_type)
1727 (vect_set_min_input_precision): New functions.
1728 (vect_determine_min_output_precision_1): Likewise.
1729 (vect_determine_min_output_precision): Likewise.
1730 (vect_determine_precisions_from_range): Likewise.
1731 (vect_determine_precisions_from_users): Likewise.
1732 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1733 (vect_vect_recog_func_ptrs): Put over_widening first.
1735 (vect_pattern_recog): Call vect_determine_precisions.
1737 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1739 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1740 statements that have been replaced by further pattern statements.
1741 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1743 2018-07-03 Richard Biener <rguenther@suse.de>
1745 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1746 always set *dt. Dump vectype in vectype overload.
1747 * dumpfile.h (dump_gimple_expr): New function.
1748 (dump_gimple_expr_loc): Likewise.
1749 * dumpfile.c (dump_gimple_expr): New function.
1750 (dump_gimple_expr_loc): Likewise.
1752 2018-07-02 Jeff Law <law@redhat.com>
1754 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1755 the H8/300, H8/300H and H8/S variants into a single pattern.
1756 (movhi_h8300, movqi_h8300hs): Similarly.
1757 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1758 (QHI mode iterator): New.
1760 * config/h8300/h8300.md: Remove trailing whitespace.
1762 2018-07-02 Jim Wilson <jimw@sifive.com>
1764 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1765 instead of emit_insn for interrupt returns.
1766 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1767 (riscv_sret, riscv_uret): Likewise.
1769 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1771 * pretty-print.c (selftest::test_pp_format): Move save and restore
1772 of quotes to class auto_fix_quotes, and add an instance.
1773 * selftest.c: Include "intl.h".
1774 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1775 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1776 * selftest.h (selftest::auto_fix_quotes): New class.
1778 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
1780 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1781 (aarch64_sve_prepare_conditional_op): Remove.
1782 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1783 Allow aarch64_simd_reg_or_zero as select operand; remove
1784 the aarch64_sve_prepare_conditional_op call.
1785 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1786 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1787 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1788 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1789 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1790 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1791 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1792 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1793 and a splitters to match all of the *_any patterns.
1794 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1796 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1797 (SVE_COND_FP_BINARY_REV): Remove.
1798 (sve_int_op_rev, sve_fp_op_rev): New.
1799 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
1800 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
1801 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
1802 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
1803 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
1804 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
1805 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
1806 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
1807 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
1809 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
1810 Remove match_dup 1 from the inner unspec.
1811 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1813 * config/aarch64/aarch64.md (movprfx): New attr.
1814 (length): Default movprfx to 8.
1815 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
1816 (*madd<SVE_I>, *msub<SVE_I): Likewise.
1817 (*<su>mul<SVE_I>3_highpart): Likewise.
1818 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
1819 (*v<ASHIFT><SVE_I>3): Likewise.
1820 (*<su><MAXMIN><SVE_I>3): Likewise.
1821 (*<su><MAXMIN><SVE_F>3): Likewise.
1822 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
1823 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
1824 (*div<SVE_F>4): Likewise.
1826 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
1828 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
1831 2018-07-02 Richard Biener <rguenther@suse.de>
1833 PR tree-optimization/86363
1834 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
1835 memset argument refers to a non-variable address.
1837 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1839 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
1840 {PLUS,MINUS}_EXPR code to...
1841 (adjust_symbolic_bound): ...here,
1842 (combine_bound): ...here,
1843 (set_value_range_with_overflow): ...and here.
1845 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1847 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
1849 (extract_range_from_abs_expr): ...here.
1851 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
1853 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
1854 -fno-omit-frame-pointer when not optimizing.
1856 2018-07-02 Martin Liska <mliska@suse.cz>
1859 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
1860 (propagate_nothrow): Likewise.
1862 2018-07-02 Martin Liska <mliska@suse.cz>
1865 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
1867 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1869 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
1870 function in r262149, changing "loc" param from source_location to
1871 const dump_location_t &.
1872 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
1873 declaration, as above.
1875 2018-07-01 Paul Koning <ni1d@arrl.net>
1877 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1878 -munit-asm, -mgnu-asm, -mdec-asm.
1879 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
1880 (pdp11_output_labelref): New.
1881 (pdp11_output_def): New.
1882 (pdp11_output_addr_vec_elt): New.
1883 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
1884 %# and %@ format codes.
1885 (pdp11_option_override): New.
1886 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
1887 (pdp11_output_ident): New.
1888 (pdp11_asm_named_section): New.
1889 (pdp11_asm_init_sections): New.
1890 (pdp11_file_start): New.
1891 (pdp11_file_end): New.
1892 (output_ascii): Use .ascii/.asciz for -mdec-asm.
1893 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
1894 %o, like %c but octal.
1895 (pdp11_option_override): New.
1896 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
1898 (DATA_SECTION_ASM_OP): Ditto.
1899 (READONLY_DATA_SECTION_ASM_OP): New.
1900 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
1901 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
1902 (ASM_OUTPUT_LABELREF): Ditto.
1903 (ASM_OUTPUT_DEF): Ditto.
1904 (ASM_OUTPUT_EXTERNAL): New.
1905 (ASM_OUTPUT_SOURCE_FILENAME): New.
1906 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
1907 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
1908 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
1909 %# and %@ format codes.
1910 * config/pdp11/pdp11.opt (mgnu-asm): New.
1911 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
1912 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
1913 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
1915 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
1917 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
1918 dereferencing path[] beyond its length.
1920 (debug_all_paths): New.
1921 (rewire_first_differing_edge): New.
1922 (adjust_paths_after_duplication): New.
1923 (duplicate_thread_path): Call adjust_paths_after_duplication.
1925 (thread_through_all_blocks): Add new argument to
1926 duplicate_thread_path.
1928 2018-06-30 Jim Wilson <jimw@sifive.com>
1930 * config/riscv/predicates.md (p2m1_shift_operand): New.
1931 (high_mask_shift_operand): New.
1932 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
1933 pattern using p2m1_shift_operand.
1934 (lshsi3_zero_extend_3+2): New combiner pattern using
1935 high_mask_shift_operand.
1937 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1939 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
1941 (vect_recog_rotate_pattern): ...here.
1942 (vect_convert_input): Try to insert casts of invariants in the
1944 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
1945 preheader to be empty.
1947 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1949 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
1950 vector type. If given, install it in the new statement's
1952 (vect_element_precision): New function.
1953 (vect_unpromoted_value): New struct.
1954 (vect_unpromoted_value::vect_unpromoted_value): New function.
1955 (vect_unpromoted_value::set_op): Likewise.
1956 (vect_look_through_possible_promotion): Likewise.
1957 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
1958 (vect_widened_op_tree, vect_convert_input): Likewise.
1959 (vect_convert_inputs, vect_convert_output): Likewise.
1960 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
1961 to handle the optional cast of the multiplication result and
1962 vect_widened_op_tree to detect the widened multiplication itself.
1963 Do not require the input and output of promotion casts to have
1964 the same sign, but base the signedness of the operation on the
1965 input rather than the result. If the pattern includes two
1966 promotions, check that those promotions have the same sign.
1967 Do not restrict the MULT_EXPR handling to a double-width result;
1968 handle quadruple-width results and wider. Use vect_convert_inputs
1969 to convert the inputs to the common type.
1970 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
1971 to handle the optional cast of the ABS result. Also allow a sign
1972 change or a sign extension between the ABS and MINUS.
1973 Use vect_widened_op_tree to detect the widened subtraction and use
1974 vect_convert_inputs to convert the inputs to the common type.
1975 (vect_handle_widen_op_by_const): Delete.
1976 (vect_recog_widen_op_pattern): New function.
1977 (vect_recog_widen_mult_pattern): Use it.
1978 (vect_recog_widen_shift_pattern): Likewise.
1979 (vect_recog_widen_sum_pattern): Use
1980 vect_look_through_possible_promotion to handle the promoted
1983 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1985 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
1986 the containing gimple_seq *.
1987 * gimple-iterator.h (gsi_for_stmt): Declare it.
1988 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
1989 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
1990 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1991 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1992 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
1994 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
1996 (vect_mark_pattern_stmts): ...here. Handle cases in which the
1997 statement being replaced is part of an existing pattern
1998 definition sequence, inserting the new pattern statements before
2000 (vect_pattern_recog_1): Don't return a bool. If the statement
2001 is already part of a pattern, instead apply pattern matching
2002 to the pattern definition statements. Don't clear the
2003 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2004 (vect_pattern_recog): Don't break after the first match;
2005 continue processing the pattern definition statements instead.
2006 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2008 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2010 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2011 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2012 (vect_recog_widen_sum_pattern): Use it.
2014 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2016 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2017 phi is not a pattern statement and has not been replaced by
2018 a pattern statement.
2019 * tree-vect-patterns.c (type_conversion_p): Don't check
2020 STMT_VINFO_IN_PATTERN_P.
2021 (vect_recog_vector_vector_shift_pattern): Likewise.
2022 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2023 the pattern statement rather than the original statement; check
2024 directly for a WIDEN_MULT_EXPR here.
2025 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2026 vect_is_simple_use to return the pattern statement rather
2027 than the original statement; use is_pattern_stmt_p to check
2028 for such a pattern statement.
2029 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2030 to return the pattern statement rather than the original statement;
2031 don't do the same transformation here.
2032 (vect_is_simple_use): If the defining statement has been replaced
2033 by a pattern statement, return the pattern statement instead.
2034 Remove the corresponding (local) transformation from the vectype
2037 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2039 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2040 end and default to null.
2041 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2042 (vectorizable_reduction): Update calls accordingly, dropping the
2043 gimple ** argument if the passed-back statement isn't needed.
2044 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2045 (vect_recog_rotate_pattern): Likewise.
2046 (vect_recog_mask_conversion_pattern): Likewise.
2047 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2048 (vect_mask_constant_operand_p): Likewise.
2049 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2050 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2051 (get_group_load_store_type, get_load_store_type): Likewise.
2052 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2053 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2054 (vectorizable_conversion, vectorizable_assignment): Likewise.
2055 (vectorizable_shift, vectorizable_operation): Likewise.
2056 (vectorizable_store, vect_is_simple_cond): Likewise.
2057 (vectorizable_condition, vectorizable_comparison): Likewise.
2058 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2059 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2060 and move it to the end. Cope with null def_stmt_outs.
2062 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2064 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2066 2018-06-29 Jeff Law <law@redhat.com>
2068 * config/v850/v850.c (v850_legitimate_address_p): Handle large
2069 displacements for TARGET_V850E2V3 and newer.
2070 (TARGET_LRA_P): Remove. Defaults to LRA now.
2071 * config/v850/v850.md (sign23byte_load): Remove.
2072 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2073 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2075 2018-06-29 Martin Liska <mliska@suse.cz>
2078 * coverage.c (coverage_init): Mangle full path name.
2079 * doc/invoke.texi: Document the change.
2080 * gcov-io.c (mangle_path): New.
2081 * gcov-io.h (mangle_path): Likewise.
2082 * gcov.c (mangle_name): Use mangle_path for path mangling.
2084 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2086 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2087 if starting source register is not even.
2089 2018-06-29 Martin Liska <mliska@suse.cz>
2091 PR tree-optimization/86263
2092 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2093 Make edge redirection.
2095 2018-06-29 David Malcolm <dmalcolm@redhat.com>
2097 * dumpfile.c (dump_loc): Add indentation based on scope depth.
2098 (dump_scope_depth): New variable.
2099 (get_dump_scope_depth): New function.
2100 (dump_begin_scope): New function.
2101 (dump_end_scope): New function.
2102 * dumpfile.h (get_dump_scope_depth): New declaration.
2103 (dump_begin_scope): New declaration.
2104 (dump_end_scope): New declaration.
2105 (class auto_dump_scope): New class.
2106 (AUTO_DUMP_SCOPE): New macro.
2107 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2110 2018-06-29 Richard Biener <rguenther@suse.de>
2112 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2113 compute_all_dependences succeeds.
2114 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2115 exceed --param loop-max-datarefs-for-datadeps.
2117 2018-06-29 Jakub Jelinek <jakub@redhat.com>
2119 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2121 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
2124 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2125 alternative 0 in preferred_for_speed attribute.
2127 2018-06-28 Paul Koning <ni1d@arrl.net>
2129 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2130 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2131 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2132 * config/pdp11/pdp11.md: Correct "length" attribute calculation
2133 for shift insn patterns.
2135 2018-06-28 David Malcolm <dmalcolm@redhat.com>
2137 * cgraph.c (cgraph_node::get_body): Replace assignments to
2138 "dump_file" with calls to set_dump_file.
2139 * dumpfile.c (alt_dump_file): Make static, and group with...
2140 (alt_flags): ...this definition.
2141 (dumps_are_enabled): New variable.
2142 (refresh_dumps_are_enabled): New function.
2143 (set_dump_file): New function.
2144 (set_alt_dump_file): New function.
2145 (gcc::dump_manager::dump_start): Replace assignments to
2146 "dump_file" and "alt_dump_file" with calls to set_dump_file and
2148 (gcc::dump_manager::dump_finish): Likewise.
2149 * dumpfile.h (alt_dump_file): Delete decl.
2150 (dumps_are_enabled): New variable decl.
2151 (set_dump_file): New function decl.
2152 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2154 * tree-nested.c (lower_nested_functions): Replace assignments to
2155 "dump_file" with calls to set_dump_file.
2157 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2159 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2160 goto_locus of each outgoing edge of each basic block.
2162 2018-06-28 Richard Biener <rguenther@suse.de>
2164 * dwarf2out.c (decl_scope_table): Remove.
2165 (push_decl_scope): Likewise.
2166 (pop_decl_scope): Likewise.
2167 (gen_type_die_for_member): Do not call push/pop_decl_scope.
2168 (gen_struct_or_union_type_die): Likewise.
2169 (gen_tagged_type_die): Likewise.
2170 (dwarf2out_init): Do not initialize decl_scope_table.
2171 (dwarf2out_c_finalize): Do not free it.
2173 2018-06-28 Richard Biener <rguenther@suse.de>
2175 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2176 deciding whether to not re-use a DIE.
2178 2018-06-28 Richard Biener <rguenther@suse.de>
2180 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2181 DW_AT_abstract_origin attribute.
2183 2018-06-28 Martin Liska <mliska@suse.cz>
2185 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2186 Use newly introduced constants.
2187 * tree-switch-conversion.h (struct jump_table_cluster):
2188 Define max_ratio_for_size and max_ratio_for_speed.
2190 2018-06-28 Martin Liska <mliska@suse.cz>
2192 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2193 Add new checking assert to catch invalid state.
2194 (jump_table_cluster::can_be_handled): Handle single case
2196 (jump_table_cluster::is_beneficial): Bail out for such case.
2197 (bit_test_cluster::find_bit_tests):
2198 Add new checking assert to catch invalid state.
2199 (bit_test_cluster::can_be_handled): Handle single case
2201 (bit_test_cluster::is_beneficial): Bail out for such case.
2202 (switch_decision_tree::analyze_switch_statement):
2205 2018-06-28 Martin Liska <mliska@suse.cz>
2207 * common.opt: Introduce -completion option.
2208 * gcc.c (driver_handle_option): Handle it.
2209 (driver::main): Print completions if completion
2211 * opt-suggestions.c (option_proposer::get_completions):
2213 (option_proposer::suggest_completion): Likewise.
2214 (option_proposer::find_param_completions): Likewise.
2215 (verify_autocompletions): Likewise.
2216 (test_completion_valid_options): Likewise.
2217 (test_completion_valid_params): Likewise.
2218 (in_completion_p): Likewise.
2219 (empty_completion_p): Likewise.
2220 (test_completion_partial_match): Likewise.
2221 (test_completion_garbage): Likewise.
2222 (opt_proposer_c_tests): Likewise.
2223 * opt-suggestions.h: Declare new functions.
2224 * opts.c (common_handle_option): Handle OPT__completion_.
2225 * selftest-run-tests.c (selftest::run_tests): Add
2226 opt_proposer_c_tests.
2227 * selftest.c (assert_str_startswith): New.
2228 * selftest.h (assert_str_startswith): Likewise.
2229 (opt_proposer_c_tests): New.
2230 (ASSERT_STR_STARTSWITH): Likewise.
2232 2018-06-28 Martin Liska <mliska@suse.cz>
2234 * Makefile.in: Add opt-suggestions.o.
2235 * gcc-main.c: Include opt-suggestions.h.
2236 * gcc.c (driver::driver): Likewise.
2237 (driver::~driver): Remove m_option_suggestions.
2238 (driver::build_option_suggestions): Moved to option_proposer.
2239 (driver::suggest_option): Likewise.
2240 (driver::handle_unrecognized_options): Use option_proposer.
2241 * gcc.h (class driver): Add new memver m_option_proposer.
2242 * opt-suggestions.c: New file.
2243 * opt-suggestions.h: New file.
2245 2018-06-28 Martin Liska <mliska@suse.cz>
2247 * vec.h (class auto_string_vec): New (moved from auto_argvec).
2248 (auto_string_vec::~auto_string_vec): Likewise.
2250 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2252 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2253 prevent_decl_creation_for_types fields up and add reset_location field.
2254 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2255 statement if id->reset_location is true.
2256 (copy_edges_for_bb): Do not set goto_locus on the new edges if
2257 id->reset_location is true.
2258 (copy_phis_for_bb): Force input_location on the arguments if
2259 id->reset_location is true.
2260 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2261 is set on the function to be inlined.
2263 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
2265 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2267 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
2269 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2270 registers for Pmode.
2271 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2272 hard registers for the clobbered pseudo.
2274 2018-06-27 Paul Koning <ni1d@arrl.net>
2276 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2277 mutually exclusive options.
2278 * config/pdp11/constraints.md (h): New constraint.
2279 (O): Update definition to match shift code generation.
2280 (D): New constraint.
2281 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2283 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2285 (output_jump): Change arguments.
2286 (pdp11_fixed_cc_regs): New function.
2287 (pdp11_cc_mode): Ditto.
2288 (pdp11_expand_shift): Ditto.
2289 (pdp11_assemble_shift): Ditto.
2290 (pdp11_small_shift): Ditto.
2291 (pdp11_branch_cost): Remove.
2292 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2294 (pdp11_register_move_cost): Update for CC registers.
2295 (pdp11_rtx_costs): Add case for LSHIFTRT.
2296 (pdp11_output_jump): Add CCNZ mode conditional branches.
2297 (notice_update_cc_on_set): Remove.
2298 (pdp11_cc_mode): New function.
2299 (simple_memory_operand): Correct pre/post decrement case.
2300 (no_side_effect_operand): New function.
2301 (pdp11_regno_reg_class): Add CC_REGS class.
2302 (pdp11_fixed_cc_regs): New function.
2303 (pdp11_small_shift): New function.
2304 (pdp11_expand_shift): New function to expand shift insns.
2305 (pdp11_assemble_shift): New function to output shifts.
2306 (pdp11_branch_cost): Remove.
2307 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2308 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2309 (WCHAR_TYPE): Ditto.
2310 (PTRDIFF_TYPE): Ditto.
2311 (ADJUST_INSN_LENGTH): New macro.
2312 (FIXED_REGISTERS): Add CC registers.
2313 (CALL_USED_REGISTERS): Ditto.
2315 (REG_CLASS_NAMES): Ditto.
2316 (REG_CLASS_CONTENTS): Ditto.
2317 (SELECT_CC_MODE): Use new function.
2318 (TARGET_FLAGS_REGNUM): New macro.
2319 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2320 (cc0_reg_rtx): Remove.
2321 (CC_STATUS_MDEP): Remove.
2322 (CC_STATUS_MDEFP_INIT): Remove.
2323 (CC_IN_FPU): Remove.
2324 (NOTICE_UPDATE_CC): Remove.
2325 (REGISTER_NAMES): Add CC registers.
2326 (BRANCH_COST): Change to constant 1.
2327 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2329 * config/pdp11/pdp11.opt (mbcopy): Remove.
2330 (mbcopy-builtin): Remove.
2331 (mbranch-cheap): Remove.
2332 (mbranch-expensive): Remove.
2333 * config/pdp11/predicates.md (expand_shift_operand): Update to
2334 match shift code generation.
2335 (ccnz_operator): New predicate.
2336 * doc/invoke.texi (PDP-11 Options): Remove deleted options
2337 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2338 Remove non-existent option -mabshi, -mno-abshi. Document mutually
2340 * doc/md.texi (PDP-11): Document new D and h constraints. Update
2341 description of O constraint.
2343 2018-06-27 Jeff Law <law@redhat.com>
2344 Austin Law <austinklaw@gmail.com>
2346 * config/v850/v850.md (addsi3_set_flags): New pattern.
2347 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2348 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2349 (zero_extendhisi2_v850_set_flags): Likewise.
2350 (zero_extendqisi2_v850_set_flags): Likewise.
2351 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2352 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2353 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2355 * config/v850/v850-protos.h (notice_update_cc): Remove.
2356 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2357 (v850_print_operand): Handle 'D' and "d".
2358 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2359 Add handling of arithmetic/logical operations compared against zero.
2360 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2361 Do not look at v850_compare_op, instead get mode from last argument.
2362 (v850_gen_compare): Remove
2363 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2364 after reload for prologue insns.
2365 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2367 (construct_save_jarl): Likewise.
2368 (TARGET_FLAGS_REGNUM): Define.
2369 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2370 (NOTICE_UPDATE_CC): Remove.
2371 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2372 than cc0. Conditionalize on reload_completed.
2373 (cmpsi_insn, setfcc_insn): Likewise.
2374 (tst1 splitter): Turn into define_and_split which sets the flags
2376 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2377 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2378 (cstoresf4, cstoredf4): Clobber the flags.
2379 (cmpsi, cmpsf, cmpdf): Remove expanders.
2380 (setf_insn): Remove pattern.
2381 (addsi3): Turn into define_and_split which clobbers the flags after
2382 reload and a suitable pattern (addsi3_clobber_flags) for use after
2384 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2385 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2386 (ashrsi3, ashrsi3_v850e2): Likewise.
2387 (bins): Clobber the flags.
2388 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2389 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2390 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2391 (call_value_internal_short, call_value_internal_long): Likewise.
2392 (callt_save_interrupt, callt_return_interrupt): Likewise.
2393 (save_interrupt, return_interrupt): Likewise.
2394 (callt_save_all_interrupt, save_all_interrupt): Likewise.
2395 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2396 (restore_all_interrupt, _restore_all_interrupt): Likewise.
2397 (All FP comparisons): Only allow after reload has completed.
2399 (divh, divhu): Tweak output template.
2400 (branch_z_normal, branch_z_invert): Remove
2401 (branch_nz_normal, branch_nz_invert): Likewise.
2402 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2404 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2405 * config/v850/v850.c (notice_update_cc): Remove.
2406 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
2407 (CC_NO_CARRY): Likewise.
2408 (NOTICE_UPDATE_CC): Define to nothing.
2409 * config/v850/v850.md: Remove block comment on cc0 handling
2410 Remove "cc" attribute from all patterns. Remove cc_status handling
2411 from all patterns. Minor formatting fixes.
2413 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2415 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2416 (cortex-a76.cortex-a55): Likewise.
2417 * config/aarch64/aarch64-tune.md: Regenerate.
2418 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2419 cortex-a76.cortex-a55.
2421 2018-06-27 Jeff Law <law@redhat.com>
2423 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2424 (MULTILIB_DIRNAMES): Similarly.
2426 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
2428 * gimple.h (gimple_return_retbnd): Delete.
2429 (gimple_return_set_retbnd): Likewise.
2430 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2431 gimple_return_set_retbnd.
2432 * gimple-pretty-print.c (dump_gimple_return): Remove call to
2433 gimple_return_retbnd and adjust.
2434 * tree-inline.h (struct copy_body_data): Remove retbnd field.
2435 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2436 Explicitly return NULL in a couple more cases. Move assertion
2437 on debug statements and remove unreachable code.
2438 (reset_debug_binding): Do not test id->retbnd.
2439 (expand_call_inline): Do not set it.
2441 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2443 * configure.ac: Add --disable-gcov option.
2444 * configure: Regenerate.
2445 * Makefile.in: Honour @enable_gcov@.
2446 * doc/install.texi: Document --disable-gcov.
2448 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2450 * config/arm/arm-cpus.in (cortex-a76): New entry.
2451 (cortex-a76.cortex-a55): Likewise.
2452 * config/arm/arm-tables.opt: Regenerate.
2453 * config/arm/arm-tune.md: Likewise.
2454 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2455 * doc/invoke.texi (ARM Options): Document cortex-a76 and
2456 cortex-a76.cortex-a55.
2458 2018-06-27 Tamar Christina <tamar.christina@arm.com>
2461 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2463 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
2465 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2467 (EPILOGUE_USES): Likewise.
2469 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
2471 * tree-inline.c (remap_location): New function extracted from...
2472 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
2473 (copy_phis_for_bb): ...here. Call remap_location.
2474 (copy_cfg_body): Adjust call to copy_edges_for_bb.
2476 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2478 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2479 unaligned vsx for 16B memset.
2481 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
2484 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2485 ieee128_float_type_node to long_double_type_node unless
2486 TARGET_LONG_DOUBLE_128 is set.
2488 2018-06-26 David Malcolm <dmalcolm@redhat.com>
2490 * cfgloop.c (get_loop_location): Convert return type from
2491 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2492 by implicit construction from rtx_insn *, and using
2493 dump_user_location_t::from_function_decl for the fallback case.
2494 * cfgloop.h (get_loop_location): Convert return type from
2495 location_t to dump_user_location_t.
2496 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2497 dump_printf_loc to pass in a dump_location_t rather than a
2498 location_t, via the gimple stmt.
2499 * coverage.c (get_coverage_counts): Update calls to
2500 dump_printf_loc to pass in dump_location_t rather than a
2502 * doc/optinfo.texi (Dump types): Convert example of
2503 dump_printf_loc from taking "locus" to taking "insn". Update
2504 description of the "_loc" calls to cover dump_location_t.
2505 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2507 (dump_user_location_t::dump_user_location_t): New constructors,
2508 from gimple *stmt and rtx_insn *.
2509 (dump_user_location_t::from_function_decl): New function.
2510 (dump_loc): Make static.
2511 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2512 const dump_location_t &.
2513 (dump_generic_expr_loc): Delete.
2514 (dump_printf_loc): Convert param "loc" from location_t to
2515 const dump_location_t &.
2516 (selftest::test_impl_location): New function.
2517 (selftest::dumpfile_c_tests): New function.
2518 * dumpfile.h: Include "profile-count.h".
2519 (class dump_user_location_t): New class.
2520 (struct dump_impl_location_t): New struct.
2521 (class dump_location_t): New class.
2522 (dump_printf_loc): Convert 2nd param from source_location to
2523 const dump_location_t &.
2524 (dump_generic_expr_loc): Delete.
2525 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2526 const dump_location_t &.
2527 * gimple-fold.c (fold_gimple_assign): Update call to
2528 dump_printf_loc to pass in a dump_location_t rather than a
2529 location_t, via the gimple stmt.
2530 (gimple_fold_call): Likewise.
2531 * gimple-loop-interchange.cc
2532 (loop_cand::analyze_iloop_reduction_var): Update for change to
2533 check_reduction_path.
2534 (tree_loop_interchange::interchange): Update for change to
2536 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2537 change in return-type of find_loop_location.
2538 (graphite_regenerate_ast_isl): Likewise.
2539 * graphite-optimize-isl.c (optimize_isl): Likewise.
2540 * graphite.c (graphite_transform_loops): Likewise.
2541 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2542 pass in a dump_location_t rather than a location_t, via the
2544 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2545 * ipa.c (walk_polymorphic_call_targets): Likewise.
2546 * loop-unroll.c (report_unroll): Convert "locus" param from
2547 location_t to dump_location_t.
2548 (decide_unrolling): Update for change to get_loop_location's
2550 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2551 location_t to dump_user_location_t.
2552 (grid_find_single_omp_among_assignments_1): Updates calls to
2553 dump_printf_loc to pass in a dump_location_t rather than a
2554 location_t, via the gimple stmt.
2555 (grid_parallel_clauses_gridifiable): Convert "tloc" from
2556 location_t to dump_location_t. Updates calls to dump_printf_loc
2557 to pass in a dump_location_t rather than a location_t, via the
2559 (grid_inner_loop_gridifiable_p): Likewise.
2560 (grid_dist_follows_simple_pattern): Likewise.
2561 (grid_gfor_follows_tiling_pattern): Likewise.
2562 (grid_target_follows_gridifiable_pattern): Likewise.
2563 (grid_attempt_target_gridification): Convert initialization
2564 of local "grid" from memset to zero-initialization; FIXME: does
2565 this require C++11? Update call to dump_printf_loc to pass in a
2566 optinfo_location rather than a location_t, via the gimple stmt.
2567 * profile.c (read_profile_edge_counts): Updates call to
2568 dump_printf_loc to pass in a dump_location_t rather than a
2570 (compute_branch_probabilities): Likewise.
2571 * selftest-run-tests.c (selftest::run_tests): Call
2573 * selftest.h (dumpfile_c_tests): New decl.
2574 * tree-loop-distribution.c (pass_loop_distribution::execute):
2575 Update for change in return type of find_loop_location.
2576 * tree-parloops.c (parallelize_loops): Likewise.
2577 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2578 "locus" from location_t to dump_user_location_t.
2579 (canonicalize_loop_induction_variables): Likewise.
2580 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2581 for change in return type of find_loop_location.
2582 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2583 to dump_printf_loc to pass in a dump_location_t rather than a
2584 location_t, via the stmt.
2585 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2587 * tree-vect-loop-manip.c (find_loop_location): Convert return
2588 type from source_location to dump_user_location_t.
2589 (vect_do_peeling): Update for above change.
2590 (vect_loop_versioning): Update for change in type of
2592 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2593 from location_t to dump_user_location_t.
2594 (vect_estimate_min_profitable_iters): Update for change in type
2596 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2597 location_t to dump_location_t.
2598 (vect_slp_bb): Update for change in type of vect_location.
2599 * tree-vectorizer.c (vect_location): Convert from source_location
2600 to dump_user_location_t.
2601 (try_vectorize_loop_1): Update for change in vect_location's type.
2602 (vectorize_loops): Likewise.
2603 (increase_alignment): Likewise.
2604 * tree-vectorizer.h (vect_location): Convert from source_location
2605 to dump_user_location_t.
2606 (find_loop_location): Convert return type from source_location to
2607 dump_user_location_t.
2608 (check_reduction_path): Convert 1st param from location_t to
2609 dump_user_location_t.
2610 * value-prof.c (check_counter): Update call to dump_printf_loc to
2611 pass in a dump_user_location_t rather than a location_t; update
2612 call to error_at for change in type of "locus".
2613 (check_ic_target): Update call to dump_printf_loc to
2614 pass in a dump_user_location_t rather than a location_t, via the
2617 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
2619 * config/s390/s390.h (enum processor_flags): Do not use
2620 default tune parameter when -march was specified.
2622 2018-06-26 Jakub Jelinek <jakub@redhat.com>
2625 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2626 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2629 2018-06-26 Richard Biener <rguenther@suse.de>
2631 PR tree-optimization/86287
2633 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2634 (vect_analyze_loop): Initialize n_stmts.
2636 2018-06-26 Richard Biener <rguenther@suse.de>
2639 * fold-const.c (fold_convertible_p): Pointer extension
2642 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
2645 * dwarf2out.c (loc_list_has_views): Adjust comments.
2646 (dw_loc_list): Split single cross-partition range with
2649 2018-06-25 Jeff Law <law@redhat.com>
2651 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2652 on -mbig-switch by default.
2654 * config/v850/predicates.md (const_float_1_operand): Fix match_code
2656 (const_float_0_operand): Remove unused predicate.
2657 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2658 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2659 (recipsf2): New expander. Original pattern now called
2661 (recipdf2, recipdf2_insn): Similarly.
2662 (rsqrtsf2, rsqrtsf2_insn): Similarly
2663 (rsqrtdf2, rsqrtdf2_insn): Similarly
2665 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
2667 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2668 Simplify logic for FreeBSD (twice).
2670 2018-06-25 Martin Sebor <msebor@redhat.com>
2672 PR tree-optimization/86204
2673 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2674 a strnlen result if it's less than the length of the string.
2676 2018-06-25 Martin Sebor <msebor@redhat.com>
2678 PR tree-optimization/85700
2679 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2680 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2681 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2683 2018-06-25 Martin Sebor <msebor@redhat.com>
2685 * doc/extend.texi (Zero-length arrays): Update and clarify.
2687 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
2689 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2690 added IEEE/IBM long double multilib support on PowerPC little
2691 endian Linux systems.
2692 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2693 (MULTILIB_DEFAULTS): Likewise.
2694 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2696 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2697 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2698 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2700 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
2703 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2704 (REORDER_45): Likewise.
2706 2018-06-25 Jeff Law <law@redhat.com>
2708 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2709 dividend to 32 bits. Adjust length.
2710 (udivmodhi4): Cleanup output template. Fix length.
2712 2018-06-25 Carl Love <cel@us.ibm.com>
2714 * config/rs6000/vsx.md: Change word selector to prefered location.
2716 2018-06-25 Richard Biener <rguenther@suse.de>
2718 PR tree-optimization/86304
2719 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2720 epilogue-if-converted loops as well.
2722 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
2724 * lto-section-out.c (lto_begin_section): Do not print section
2725 name for noaddr and unnumbered dumps.
2727 2018-06-25 Richard Biener <rguenther@suse.de>
2729 * tree-vectorizer.h (struct vec_info_shared): New structure
2730 with parts split out from struct vec_info and loop_nest from
2731 struct _loop_vec_info.
2732 (struct vec_info): Adjust accordingly.
2733 (struct _loop_vec_info): Likewise.
2734 (LOOP_VINFO_LOOP_NEST): Adjust.
2735 (LOOP_VINFO_DATAREFS): Likewise.
2736 (LOOP_VINFO_DDRS): Likewise.
2737 (struct _bb_vec_info): Likewise.
2738 (BB_VINFO_DATAREFS): Likewise.
2739 (BB_VINFO_DDRS): Likewise.
2740 (struct _stmt_vec_info): Add dr_aux member.
2741 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2742 (DR_MISALIGNMENT_UNINITIALIZED): New.
2743 (set_dr_misalignment): Adjust.
2744 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2745 (vect_analyze_loop): Adjust prototype.
2746 (vect_analyze_loop_form): Likewise.
2747 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2748 Compute dependences lazily.
2749 (vect_record_base_alignments): Use shared datarefs/ddrs.
2750 (vect_verify_datarefs_alignment): Likewise.
2751 (vect_analyze_data_refs_alignment): Likewise.
2752 (vect_analyze_data_ref_accesses): Likewise.
2753 (vect_analyze_data_refs): Likewise.
2754 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2755 constructor parameter for shared part.
2756 (vect_analyze_loop_form): Pass in shared part and adjust.
2757 (vect_analyze_loop_2): Pass in storage for the number of
2758 stmts. Move loop nest finding to the caller. Compute
2760 (vect_analyze_loop): Pass in shared part.
2761 (vect_transform_loop): Verify shared datarefs are unchanged.
2762 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2763 constructor parameter for shared part.
2764 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2765 (vect_slp_bb): Verify shared datarefs are unchanged before
2767 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2769 (new_stmt_vec_info): Initialize DR_AUX misalignment to
2770 DR_MISALIGNMENT_UNINITIALIZED.
2771 * tree-vectorizer.c (vec_info::vec_info): Add constructor
2772 parameter for shared part.
2773 (vec_info::~vec_info): Adjust.
2774 (vec_info_shared::vec_info_shared): New.
2775 (vec_info_shared::~vec_info_shared): Likewise.
2776 (vec_info_shared::save_datarefs): Likewise.
2777 (vec_info_shared::check_datarefs): Likewise.
2778 (try_vectorize_loop_1): Construct shared part live for analyses
2779 of a single loop for multiple vector sizes.
2780 * tree-parloops.c (gather_scalar_reductions): Adjust.
2782 2018-06-25 Richard Biener <rguenther@suse.de>
2784 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2785 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2786 (vect_analyze_data_refs): Remove similar code from here and
2787 simplify accordingly.
2789 2018-06-25 Richard Biener <rguenther@suse.de>
2791 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2792 for reverse storage order accesses rather than asserting
2793 they cannot happen here.
2795 2018-06-25 Tom de Vries <tdevries@suse.de>
2798 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
2799 Use data16 instead of .byte for insn prefix.
2801 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
2804 * parser.c (make_char_string_pack): Pass this literal chars
2805 through cpp_interpret_string.
2806 (cp_parser_userdef_numeric_literal): Check the result of
2807 make_char_string_pack.
2809 2018-06-24 Maya Rashish <coypu@sdf.org>
2811 * ginclude/stddef.h: Simplify conditions around avoiding
2812 re-definition of __size_t.
2814 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2816 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
2817 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
2819 2018-06-22 Maya Rashish <coypu@sdf.org>
2821 * doc/invoke.texi (mno-fancy-math-387): Update for changes
2822 made to OpenBSD and NetBSD through the years.
2824 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
2826 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2827 behavior of vec_pack (vector double, vector double) to match
2828 behavior of vec_float2 (vector double, vector double).
2830 2018-06-22 Olivier Hainque <hainque@adacore.com>
2832 * gimplify.c (gimplify_function_tree): Prevent creation
2833 of a trampoline for the address of the current function
2834 passed to entry/exit instrumentation hooks.
2836 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
2839 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
2842 2018-06-22 Martin Liska <mliska@suse.cz>
2844 PR tree-optimization/86263
2845 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2846 Bail out if is_enabled is false.
2847 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
2849 (jump_table_cluster::is_enabled): New function.
2851 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2853 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2854 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
2855 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
2856 (lto_input_ts_binfo_tree_pointers): Likewise.
2857 * tree-streamer-out.c (streamer_write_tree_bitfields,
2858 write_ts_binfo_tree_pointers): Likewise.
2859 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2861 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2863 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2865 2018-06-22 Martin Liska <mliska@suse.cz>
2867 * symbol-summary.h (get): Make it pure and inline move
2868 functionality from ::get function.
2869 (get): Remove and inline into ::get and ::get_create.
2870 (get_create): Move code from ::get function.
2872 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2875 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
2876 -x assembler-with-cpp.
2878 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2880 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
2881 _FILE_OFFSET_BITS=64 for C++.
2883 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
2885 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
2886 conversion insn that shows up when pr85657-3.c is compiled using
2887 IEEE 128-bit long double.
2888 (neg<mode>2_internal): Use the correct mode to check whether the
2889 mode is IBM extended.
2890 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
2891 multiply and divide external functions from being created more
2894 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2896 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
2898 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
2899 the edge can be forwarded.
2900 (cfg_layout_merge_blocks): Likewise.
2902 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2904 * except.c (finish_eh_generation): Commit edge insertions only after
2905 the EH edges have been redirected from post-landing to landing pads.
2907 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2909 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
2910 create_tmp_var_for to create the FRAME decl.
2911 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
2913 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2915 * tree-inline.c (copy_edges_for_bb): Minor tweak.
2916 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
2917 debug statement when resetting its value.
2918 (expand_call_inline): Copy the locus of the call onto the assignment
2919 of the return value, if any. Use local variable in more cases.
2921 2018-06-21 Martin Liska <mliska@suse.cz>
2923 * ipa-pure-const.c (propagate_nothrow): Use
2924 funct_state_summaries->get.
2925 (dump_malloc_lattice): Likewise.
2926 (propagate_malloc): Likewise.
2928 2018-06-21 Richard Biener <rguenther@suse.de>
2930 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
2931 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
2932 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
2934 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
2935 BLOCK_ABSTRACT_ORIGIN unconditionally.
2937 2018-06-21 David Malcolm <dmalcolm@redhat.com>
2939 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
2941 * ipa-reference.c (ipa_reference_c_finalize): Delete
2942 ipa_ref_opt_sum_summaries and set it to NULL.
2944 2018-06-21 Tom de Vries <tdevries@suse.de>
2946 PR tree-optimization/85859
2947 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
2948 test with comment from bb_no_side_effects_p.
2950 2018-06-21 Richard Biener <rguenther@suse.de>
2952 PR tree-optimization/86232
2953 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
2954 max for constant niter.
2956 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2958 * config/aarch64/aarch64-simd.md
2959 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
2961 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2963 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
2964 Make opernads of the unspec commutative.
2966 2018-06-21 Richard Biener <rguenther@suse.de>
2968 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
2969 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
2970 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
2971 (vect_analyze_data_ref_dependence): Re-order checks to deal with
2973 (vect_record_base_alignments): Do not record base alignment
2974 for gathers or scatters.
2975 (vect_compute_data_ref_alignment): Drop return value that is always
2976 true. Bail out early for gathers or scatters.
2977 (vect_enhance_data_refs_alignment): Bail out early for gathers
2979 (vect_find_same_alignment_drs): Likewise.
2980 (vect_analyze_data_refs_alignment): Remove dead code.
2981 (vect_slp_analyze_and_verify_node_alignment): Likewise.
2982 (vect_analyze_data_refs): For possible gathers or scatters do
2983 not create an alternate DR, just check their possible validity
2984 and mark them. Adjust DECL_NONALIASED handling to not rely
2986 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
2987 update inits of gathers or scatters.
2988 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
2989 Also copy gather/scatter flag to pattern vinfo.
2991 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
2993 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2994 behavior of vec_packsu (vector unsigned long long, vector unsigned
2995 long long) to match behavior of vec_packs with same signature.
2997 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2998 Thomas Schwinge <thomas@codesourcery.com>
2999 Cesar Philippidis <cesar@codesourcery.com>
3001 * gimplify.c (gimplify_scan_omp_clauses): Add support for
3002 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3003 (gimplify_adjust_omp_clauses): Likewise.
3004 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3005 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3006 (gimplify_omp_target_update): Update handling of acc update and
3008 * omp-low.c (install_var_field): Remove unused parameter
3009 base_pointers_restrict.
3010 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3011 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3013 (omp_target_base_pointers_restrict_p): Delete.
3014 (scan_omp_target): Update call to scan_sharing_clauses.
3015 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3017 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3018 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3019 (convert_local_omp_clauses): Likewise.
3020 * tree-pretty-print.c (dump_omp_clause): Likewise.
3021 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
3023 (omp_clause_code_name): Likewise.
3025 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3028 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3031 PR tree-optimization/86231
3032 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
3033 anti-range don't overwrite *vr0min before using it to compute *vr0max.
3035 2018-06-20 Tom de Vries <tdevries@suse.de>
3037 PR tree-optimization/86097
3038 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3039 iv type if signedness of iv type is not the same as that of *nit.
3041 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3043 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
3044 EDGE_EH edges, verify they are all EDGE_EH.
3046 2018-06-20 Maya Rashish <coypu@sdf.org>
3048 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3050 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3052 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3053 * config/aarch64/aarch64.c (xgene1_tunings): Add
3054 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3055 (aarch64_mode_valid_for_sched_fusion_p):
3056 Allow 16-byte modes.
3057 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3058 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3060 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3062 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3063 * config/aarch64/iterators.md (VQ2): New mode iterator.
3065 2018-06-20 Martin Liska <mliska@suse.cz>
3067 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3068 Change default ratio from 10 to 8.
3070 2018-06-20 Martin Liska <mliska@suse.cz>
3072 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3074 (bit_test_cluster::find_bit_tests): Likewise.
3075 (switch_decision_tree::analyze_switch_statement): Find clusters.
3076 * tree-switch-conversion.h (struct jump_table_cluster): Document
3079 2018-06-20 Martin Liska <mliska@suse.cz>
3081 * tree-switch-conversion.c (switch_conversion::collect):
3082 Record m_uniq property.
3083 (switch_conversion::expand): Bail out for special conditions.
3084 (group_cluster::~group_cluster): New.
3085 (group_cluster::group_cluster): Likewise.
3086 (group_cluster::dump): Likewise.
3087 (jump_table_cluster::emit): New.
3088 (switch_decision_tree::fix_phi_operands_for_edges): New.
3089 (struct case_node): Remove struct.
3090 (jump_table_cluster::can_be_handled): New.
3091 (case_values_threshold): Moved to header.
3092 (reset_out_edges_aux): Likewise.
3093 (jump_table_cluster::is_beneficial): New.
3094 (bit_test_cluster::can_be_handled): Likewise.
3095 (add_case_node): Remove.
3096 (bit_test_cluster::is_beneficial): New.
3097 (case_bit_test::cmp): New.
3098 (bit_test_cluster::emit): New.
3099 (expand_switch_as_decision_tree_p): Remove.
3100 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3101 (fix_phi_operands_for_edge): Likewise.
3102 (switch_decision_tree::analyze_switch_statement): New.
3103 (compute_cases_per_edge): Move ...
3104 (switch_decision_tree::compute_cases_per_edge): ... here.
3105 (try_switch_expansion): Likewise.
3106 (switch_decision_tree::try_switch_expansion): Likewise.
3107 (record_phi_operand_mapping): Likewise.
3108 (switch_decision_tree::record_phi_operand_mapping): Likewise.
3109 (emit_case_decision_tree): Likewise.
3110 (switch_decision_tree::emit): Likewise.
3111 (balance_case_nodes): Likewise.
3112 (switch_decision_tree::balance_case_nodes): Likewise.
3113 (dump_case_nodes): Likewise.
3114 (switch_decision_tree::dump_case_nodes): Likewise.
3115 (emit_jump): Likewise.
3116 (switch_decision_tree::emit_jump): Likewise.
3117 (emit_cmp_and_jump_insns): Likewise.
3118 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3119 (emit_case_nodes): Likewise.
3120 (switch_decision_tree::emit_case_nodes): Likewise.
3121 (conditional_probability): Remove.
3122 * tree-switch-conversion.h (enum cluster_type): New.
3124 (struct cluster): Likewise.
3125 (cluster::cluster): Likewise.
3126 (struct simple_cluster): Likewise.
3127 (simple_cluster::simple_cluster): Likewise.
3128 (struct group_cluster): Likewise.
3129 (struct jump_table_cluster): Likewise.
3130 (struct bit_test_cluster): Likewise.
3131 (struct min_cluster_item): Likewise.
3132 (struct case_tree_node): Likewise.
3133 (case_tree_node::case_tree_node): Likewise.
3134 (jump_table_cluster::case_values_threshold): Likewise.
3135 (struct case_bit_test): Likewise.
3136 (struct switch_decision_tree): Likewise.
3137 (struct switch_conversion): Likewise.
3138 (switch_decision_tree::reset_out_edges_aux): Likewise.
3140 2018-06-20 Martin Liska <mliska@suse.cz>
3142 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3143 (hoist_edge_and_branch_if_true): Likewise.
3144 (expand_switch_using_bit_tests_p): Likewise.
3145 (struct case_bit_test): Likewise.
3146 (case_bit_test_cmp): Likewise.
3147 (emit_case_bit_tests): Likewise.
3148 (switch_conversion::switch_conversion): New class.
3149 (struct switch_conv_info): Remove old struct.
3150 (collect_switch_conv_info): More to ...
3151 (switch_conversion::collect): ... this.
3152 (check_range): Likewise.
3153 (switch_conversion::check_range): Likewise.
3154 (check_all_empty_except_final): Likewise.
3155 (switch_conversion::check_all_empty_except_final): Likewise.
3156 (check_final_bb): Likewise.
3157 (switch_conversion::check_final_bb): Likewise.
3158 (create_temp_arrays): Likewise.
3159 (switch_conversion::create_temp_arrays): Likewise.
3160 (free_temp_arrays): Likewise.
3161 (gather_default_values): Likewise.
3162 (switch_conversion::gather_default_values): Likewise.
3163 (build_constructors): Likewise.
3164 (switch_conversion::build_constructors): Likewise.
3165 (constructor_contains_same_values_p): Likewise.
3166 (switch_conversion::contains_same_values_p): Likewise.
3167 (array_value_type): Likewise.
3168 (switch_conversion::array_value_type): Likewise.
3169 (build_one_array): Likewise.
3170 (switch_conversion::build_one_array): Likewise.
3171 (build_arrays): Likewise.
3172 (switch_conversion::build_arrays): Likewise.
3173 (gen_def_assigns): Likewise.
3174 (switch_conversion::gen_def_assigns): Likewise.
3175 (prune_bbs): Likewise.
3176 (switch_conversion::prune_bbs): Likewise.
3177 (fix_phi_nodes): Likewise.
3178 (switch_conversion::fix_phi_nodes): Likewise.
3179 (gen_inbound_check): Likewise.
3180 (switch_conversion::gen_inbound_check): Likewise.
3181 (process_switch): Use the newly created class.
3182 (switch_conversion::expand): New.
3183 (switch_conversion::~switch_conversion): New.
3184 * tree-switch-conversion.h: New file.
3186 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3188 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3189 tree-vect-patterns.c.
3190 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3191 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
3192 (vect_recog_sad_pattern): Likewise.
3193 (vect_recog_widen_sum_pattern): Likewise.
3194 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
3195 (vect_recog_widen_shift_pattern): Remove the type_in argument.
3196 (vect_recog_rotate_pattern): Likewise.
3197 (vect_recog_mult_pattern): Likewise.
3198 (vect_recog_vector_vector_shift_pattern): Likewise.
3199 (vect_recog_divmod_pattern): Likewise.
3200 (vect_recog_mixed_size_cond_pattern): Likewise.
3201 (vect_recog_bool_pattern): Likewise.
3202 (vect_recog_mask_conversion_pattern): Likewise.
3203 (vect_try_gather_scatter_pattern): Likewise.
3204 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
3205 (vect_recog_over_widening_pattern): Likewise.
3206 (vect_recog_gather_scatter_pattern): Likewise.
3207 (vect_recog_func_ptr): Move from tree-vectorizer.h
3208 (vect_vect_recog_func_ptrs): Move further down the file.
3209 (vect_recog_func): Likewise. Remove the third argument.
3210 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3211 (vect_pattern_recog_1): Expect the pattern function to do any
3212 necessary target tests. Also expect it to provide a vector type.
3213 Remove the type_in handling.
3215 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3217 * tree-vect-patterns.c (vect_pattern_detected): New function.
3218 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3219 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3220 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3221 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3222 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3223 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3224 (vect_recog_mask_conversion_pattern)
3225 (vect_try_gather_scatter_pattern): Likewise.
3227 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3229 * tree-vect-patterns.c (vect_get_internal_def): New function.
3230 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3231 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3232 (search_type_for_mask_1): Use it.
3234 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3236 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3237 redundant WIDEN_SUM_EXPR handling.
3238 (vect_recog_sad_pattern): Likewise.
3240 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3242 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3243 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3244 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3245 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3246 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3248 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3250 * tree-vect-stmts.c (vectorizable_call): Make sure that we
3251 use the stmt_vec_info of the original bb statement for the
3252 new zero assignment, even if the call is part of a pattern.
3254 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3256 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3257 that the sequence is attached to the original statement rather
3258 than the pattern statement.
3259 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3260 PATTERN_DEF_SEQ from the original statement rather than
3261 the main pattern statement.
3262 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3263 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3264 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3266 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3268 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3269 definition statements before the early exit for statements that aren't
3271 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3273 (vect_transform_loop): ...here. Process pattern definition
3274 statements without first checking whether the main pattern
3275 statement is live or relevant.
3277 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3279 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3280 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3282 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
3284 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3285 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3286 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3287 (expand_block_compare): Change select_block_compare_mode call.
3288 (expand_strncmp_align_check): Use new functions, fix comment.
3289 (emit_final_str_compare_gpr): New function.
3290 (expand_strn_compare): Refactor and clean up code.
3291 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3293 2018-06-19 Tony Reix <tony.reix@atos.com>
3294 Damien Bergamini <damien.bergamini@atos.com>
3295 David Edelsohn <dje.gcc@gmail.com>
3297 * collect2.c (static_obj): New variable.
3298 (static_libs): New variable.
3299 (is_in_list): Uncomment declaration.
3300 (main): Track AIX libraries linked statically.
3301 (is_in_list): Uncomment definition.
3302 (scan_prog_file): Don't add AIX shared libraries initializer
3303 to constructor list if linking statically.
3305 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3307 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3309 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3311 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
3313 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3316 2018-06-19 Martin Liska <mliska@suse.cz>
3318 * config/i386/i386.c (ix86_can_inline_p): Do not use
3319 ipa_fn_summaries::get_create.
3320 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3322 (devirtualization_time_bonus): Likewise.
3323 (ipcp_propagate_stage): Likewise.
3324 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3325 (edge_set_predicate): Likewise.
3326 (evaluate_conditions_for_known_args): Likewise.
3327 (evaluate_properties_for_edge): Likewise.
3328 (ipa_call_summary::reset): Tranform to ...
3329 (ipa_call_summary::~ipa_call_summary): ... this.
3330 (ipa_fn_summary::reset): Transform to ...
3331 (ipa_fn_summary::~ipa_fn_summary): ... this.
3332 (ipa_fn_summary_t::remove): Rename to ...
3333 (ipa_fn_summary_t::remove_callees): ... this.
3334 (ipa_fn_summary_t::duplicate): Use placement new
3335 instead of memory copy.
3336 (ipa_call_summary_t::duplicate): Likewise.
3337 (ipa_call_summary_t::remove): Remove.
3338 (dump_ipa_call_summary): Change get_create to get.
3339 (ipa_dump_fn_summary): Dump only when summary exists.
3340 (analyze_function_body): Use symbol_summary::get instead
3342 (compute_fn_summary): Likewise.
3343 (estimate_edge_devirt_benefit): Likewise.
3344 (estimate_edge_size_and_time): Likewise.
3345 (inline_update_callee_summaries): Likewise.
3346 (remap_edge_change_prob): Likewise.
3347 (remap_edge_summaries): Likewise.
3348 (ipa_merge_fn_summary_after_inlining): Likewise.
3349 (write_ipa_call_summary): Likewise.
3350 (ipa_fn_summary_write): Likewise.
3351 (ipa_free_fn_summary): Likewise.
3352 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3353 (struct ipa_call_summary): Likewise.
3354 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3356 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3357 (estimate_size_after_inlining): Likewise.
3358 (estimate_growth): Likewise.
3359 (growth_likely_positive): Likewise.
3360 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3361 (inline_call): Likewise.
3362 * ipa-inline.c (caller_growth_limits): Likewise.
3363 (can_inline_edge_p): Likewise.
3364 (can_inline_edge_by_limits_p): Likewise.
3365 (compute_uninlined_call_time): Likewise.
3366 (compute_inlined_call_time): Likewise.
3367 (want_inline_small_function_p): Likewise.
3368 (edge_badness): Likewise.
3369 (update_caller_keys): Likewise.
3370 (update_callee_keys): Likewise.
3371 (inline_small_functions): Likewise.
3372 (inline_to_all_callers_1): Likewise.
3373 (dump_overall_stats): Likewise.
3374 (early_inline_small_functions): Likewise.
3375 (early_inliner): Likewise.
3376 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3377 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3378 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3379 * ipa-split.c (execute_split_functions): Likewise.
3380 * symbol-summary.h: Likewise.
3381 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3383 2018-06-19 Richard Biener <rguenther@suse.de>
3385 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3386 (vectorize_loops): ... here. Fix dbgcnt handling.
3387 (try_vectorize_loop): Wrap try_vectorize_loop_1.
3389 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
3392 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3393 ieee128 argument takes up only one (vector) register, not two (floating
3396 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3398 * gimplify.c (gimplify_init_constructor): Really never clear for an
3399 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3401 2018-06-19 Richard Biener <rguenther@suse.de>
3403 PR tree-optimization/86179
3404 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3405 after failed recognition.
3407 2018-06-18 Martin Sebor <msebor@redhat.com>
3410 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3411 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3412 Handle integer subtraction.
3413 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3414 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3416 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3418 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3419 param from rtx to rtx_insn *.
3420 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3422 (frv_ifcvt_modify_insn): Likwise.
3423 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3424 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
3425 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3426 as_a <rtx_insn *> cast to local "unprotected_region" once
3427 it's been established that it's not NULL or pc_rtx.
3428 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3429 param "sethi" from rtx to rtx_insn *.
3430 (nds32_group_float_insns): Likewise for param "insn".
3431 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3433 (vax_output_int_subtract): Likewise.
3434 * config/vax/vax.c (vax_output_int_add): Likewise for param
3436 (vax_output_int_subtract): Likewise.
3437 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3438 (emit_pattern_after): Likewise for param "after".
3439 (emit_insn_after): Likewise.
3440 (emit_jump_insn_after): Likewise.
3441 (emit_call_insn_after): Likewise.
3442 (emit_debug_insn_after): Likewise.
3443 (emit_pattern_before): Likewise for param "before".
3444 (emit_insn_before): Likewise.
3445 (emit_jump_insn_before): Likewise.
3446 * final.c (get_insn_template): Likewise for param "insn", removing
3448 * output.h (get_insn_template): Likewise for 2nd param.
3449 * rtl.h (emit_insn_before): Likewise.
3450 (emit_jump_insn_before): Likewise.
3451 (emit_debug_insn_before_noloc): Likewise.
3452 (emit_insn_after): Likewise.
3453 (emit_jump_insn_after): Likewise.
3454 (emit_call_insn_after): Likewise.
3455 (emit_debug_insn_after): Likewise.
3456 (set_insn_deleted): Likewise for param.
3458 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
3461 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3462 floating point modes, so that IFmode is numerically greater than
3463 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3464 to declare the ordering. This prevents IFmode from being
3465 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3466 machine. Include rs6000-modes.h to share the fractional values
3467 between genmodes* and the rest of the compiler.
3471 * config/rs6000/rs6000-modes.h: New file.
3472 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3473 meaning of rs6000_long_double_size so that 126..128 selects an
3474 appropriate 128-bit floating point type.
3475 (rs6000_option_override_internal): Likewise.
3476 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3477 (TARGET_LONG_DOUBLE_128): Change the meaning of
3478 rs6000_long_double_size so that 126..128 selects an appropriate
3479 128-bit floating point type.
3480 (LONG_DOUBLE_TYPE_SIZE): Update comment.
3481 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3482 source and destination to match the standard usage.
3483 (truncifkf2): Likewise.
3484 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3485 ISA 2.07 to use an explicit clobber, instead of passing in a
3487 (copysign<mode>3_soft): Likewise.
3489 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3491 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3492 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3493 (vect_slp_analyze_instance_dependence): Likewise.
3494 (vect_enhance_data_refs_alignment): Likewise.
3495 (vect_analyze_data_refs_alignment): Likewise.
3496 (vect_slp_analyze_and_verify_instance_alignment
3497 (vect_analyze_data_ref_accesses): Likewise.
3498 (vect_prune_runtime_alias_test_list): Likewise.
3499 (vect_analyze_data_refs): Likewise.
3500 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3501 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3502 (vect_analyze_scalar_cycles_1): Likewise.
3503 (vect_get_loop_niters): Likewise.
3504 (vect_analyze_loop_form_1): Likewise.
3505 (vect_update_vf_for_slp): Likewise.
3506 (vect_analyze_loop_operations): Likewise.
3507 (vect_analyze_loop): Likewise.
3508 (vectorizable_induction): Likewise.
3509 (vect_transform_loop): Likewise.
3510 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3511 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3512 (vect_make_slp_decision): Likewise.
3513 (vect_detect_hybrid_slp): Likewise.
3514 (vect_slp_analyze_operations): Likewise.
3515 (vect_slp_bb): Likewise.
3516 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3517 (vectorizable_bswap): Likewise.
3518 (vectorizable_call): Likewise.
3519 (vectorizable_simd_clone_call): Likewise.
3520 (vectorizable_conversion): Likewise.
3521 (vectorizable_assignment): Likewise.
3522 (vectorizable_shift): Likewise.
3523 (vectorizable_operation): Likewise.
3524 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3526 2018-06-18 Martin Sebor <msebor@redhat.com>
3528 PR tree-optimization/81384
3529 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3530 * builtins.c (expand_builtin_strnlen): New function.
3531 (expand_builtin): Call it.
3532 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3533 * builtins.def (BUILT_IN_STRNLEN): New.
3534 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3535 Warn for bounds in excess of maximum object size.
3536 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3537 single-value ranges. Handle strnlen.
3538 (handle_builtin_strlen): Handle strnlen.
3539 (strlen_check_and_optimize_stmt): Same.
3540 * doc/extend.texi (Other Builtins): Document strnlen.
3542 2018-06-18 Maya Rashish <coypu@sdf.org>
3544 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3545 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3546 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3548 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3550 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3552 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3554 * tree.c (escaped_string::escape): Replace cast to char * by
3555 const_cast<char *> (unescaped).
3557 2018-06-18 Nick Clifton <nickc@redhat.com>
3560 * tree.c (escaped_string): New class. Converts an unescaped
3561 string into its escaped equivalent.
3562 (warn_deprecated_use): Use the new class to convert the
3563 deprecation message, if present.
3564 (test_escaped_strings): New self test.
3565 (test_c_tests): Add test_escaped_strings.
3566 * doc/extend.texi (deprecated): Add a note that the
3567 deprecation message is affected by the -fmessage-length
3568 option, and that control characters will be escaped.
3569 (#pragma GCC error): Document this pragma.
3570 (#pragma GCC warning): Likewise.
3571 * doc/invoke.texi (-fmessage-length): Document this option's
3572 effect on the #warning and #error preprocessor directives and
3573 the deprecated attribute.
3575 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
3577 * tree.c (decl_value_expr_lookup): Revert latest change.
3578 (decl_value_expr_insert): Likewise.
3580 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
3582 * gimplify.c (nonlocal_vlas): Delete.
3583 (nonlocal_vla_vars): Likewise.
3584 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3586 (gimplify_body): Do not create and destroy nonlocal_vlas.
3587 * tree-nested.c: Include diagnostic.h.
3588 (use_pointer_in_frame): Tweak.
3589 (lookup_field_for_decl): Add assertion and declare the transformation.
3590 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3591 internal error when the reference is in a wrong context. Do not
3592 create a debug decl by default.
3593 (note_nonlocal_block_vlas): Delete.
3594 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3595 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
3596 create a debug decl by default.
3597 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3598 call is in a wrong context.
3599 (fixup_vla_decls): New function.
3600 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
3601 debug variables were created.
3602 * tree.c (decl_value_expr_lookup): Add checking assertion.
3603 (decl_value_expr_insert): Likewise.
3605 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3608 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3609 * tree-scalar-evolution.c (interpret_expr): Likewise.
3610 (expression_expensive_p): Likewise.
3611 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3612 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3613 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3614 (ssa_defined_by_minus_one_stmt_p): New.
3616 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3619 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3620 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3621 * dojump.c (do_jump): Likewise.
3622 * expr.c (expand_expr_real_2): Check operand type's sign.
3623 * fold-const.c (const_unop): Handle ABSU_EXPR.
3624 (fold_abs_const): Likewise.
3625 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3626 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3627 (strip_sign_op_1): Likesise.
3628 * match.pd: Add new pattern to generate ABSU_EXPR.
3629 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3630 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3631 * tree-eh.c (operation_could_trap_helper_p): Likewise.
3632 * tree-inline.c (estimate_operator_cost): Likewise.
3633 * tree-pretty-print.c (dump_generic_node): Likewise.
3634 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3635 * tree.def (ABSU_EXPR): New.
3637 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3640 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3641 documented as preserved for backward compatibility only.
3642 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3644 PR rtl-optimization/86108
3645 * bb-reorder.c (create_forwarder_block): Renamed to ...
3646 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
3647 jump from new landing pad to the second part.
3648 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3651 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3654 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3655 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3656 Only call store_expr for halves if the mode is the same.
3659 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3660 Fix up comment formatting.
3662 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3664 * typed-splay-tree.h (typed_splay_tree::remove): New function.
3665 (typed_splay_tree::closure,
3666 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3667 (typed_splay_tree::typed_splay_tree,
3668 typed_splay_tree::operator =): Declared private.
3669 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3670 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3671 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3672 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3673 typed_splay_tree::splay_tree_splay,
3674 typed_splay_tree::splay_tree_foreach_helper,
3675 typed_splay_tree::splay_tree_insert,
3676 typed_splay_tree::splay_tree_remove,
3677 typed_splay_tree::splay_tree_lookup,
3678 typed_splay_tree::splay_tree_predecessor,
3679 typed_splay_tree::splay_tree_successor,
3680 typed_splay_tree::splay_tree_min,
3681 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3682 (typed_splay_tree::root, typed_splay_tree::comp,
3683 typed_splay_tree::delete_key,
3684 typed_splay_tree::delete_value): New data members.
3685 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3686 typed_splay_tree::remove.
3688 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
3690 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3691 -mginv and -mno-ginv to the assembler.
3692 * config/mips/mips.opt (-mcrc): New option.
3694 * doc/invoke.text (-mcrc): Document.
3697 2018-06-15 Nick Clifton <nickc@redhat.com>
3700 * tree.c (escaped_string): New class. Converts an unescaped
3701 string into its escaped equivalent.
3702 (warn_deprecated_use): Use the new class to convert the
3703 deprecation message, if present.
3704 (test_escaped_strings): New self test.
3705 (test_c_tests): Add test_escaped_strings.
3706 * doc/extend.texi (deprecated): Add a note that the
3707 deprecation message is affected by the -fmessage-length
3708 option, and that control characters will be escaped.
3709 (#pragma GCC error): Document this pragma.
3710 (#pragma GCC warning): Likewise.
3711 * doc/invoke.texi (-fmessage-length): Document this option's
3712 effect on the #warning and #error preprocessor directives and
3713 the deprecated attribute.
3715 2018-06-15 Richard Biener <rguenther@suse.de>
3717 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3718 here, also noting vector size used.
3719 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
3720 size used in MSG_OPTIMIZED_LOCATIONS dump.
3721 (pass_slp_vectorize::execute): Adjust.
3723 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
3726 * config/arc/arc.c (arc_return_address_register): Fix
3729 2018-06-15 Richard Biener <rguenther@suse.de>
3732 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3733 leave useless conversion stripping to force_gimple_operand_gsi.
3734 (gimplify_build2): Likewise.
3735 (gimplify_build1): Likewise.
3737 2018-06-15 Richard Biener <rguenther@suse.de>
3740 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3741 before adjusting their block.
3743 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3745 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3746 multilibs for *-*-rtems*.
3747 * config/riscv/t-rtems: New file.
3749 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3752 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3753 unsigned_type_for returns NULL.
3756 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3757 subregs of multi-word pseudos unless the float mode has word size.
3759 2018-06-14 Richard Biener <rguenther@suse.de>
3762 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3763 duplicate and harmful type_hash_canon.
3764 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3766 2018-06-14 Richard Biener <rguenther@suse.de>
3769 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3772 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3774 * config/rtems.h (STDINT_LONG32): Define.
3776 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
3777 Prachi Godbole <prachi.godbole@imgtec.com>
3779 * config/mips/mips-cpus.def: Define P6600.
3780 * config/mips/mips-tables.opt: Regenerate.
3781 * config/mips/mips.c (mips_ucbranch_type): New enum.
3782 (mips_rtx_cost_data): Add support for P6600.
3783 (mips_issue_rate): Likewise.
3784 (mips_multipass_dfa_lookahead): Likewise.
3785 (mips_avoid_hazard): Likewise.
3786 (mips_reorg_process_insns): Likewise.
3787 (mips_classify_branch_p6600): New function.
3788 * config/mips/mips.h (TUNE_P6600): New define.
3789 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3790 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3791 * config/mips/mips.md: Include p6600.md.
3792 (processor): Add p6600.
3793 * config/mips/p6600.md: New file.
3794 * doc/invoke.texi: Add p6600 to supported architectures.
3796 2018-06-13 Martin Sebor <msebor@redhat.com>
3798 PR tree-optimization/86114
3799 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3801 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3803 2018-06-13 Richard Biener <rguenther@suse.de>
3805 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
3806 Properly set vector type of the intermediate stmt.
3807 * tree-vect-stmts.c (vectorizable_operation): The destination
3808 var always has vectype_out type.
3810 2018-06-13 Jeff Law <law@redhat.com>
3812 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
3813 integer 0 for argument to print_rtl_with_bb.
3814 (rl78_reorg): Likewise.
3816 2018-06-13 David Malcolm <dmalcolm@redhat.com>
3818 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
3819 from rtx to rtx_insn *.
3820 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
3822 (add_sched_insns_for_speculation): Likewise for local "target",
3823 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3824 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
3825 from rtx_insn ** to rtx_code_label **.
3826 (reorg_emit_nops): Likewise.
3827 (c6x_reorg): Likewise for local "call_labels".
3828 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
3830 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
3831 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
3832 the loops over LABEL_REFS.
3833 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
3835 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3836 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
3837 (split_branches): Strengthen local "olabel" from rtx to
3838 rtx_insn *, adding a safe_as_a cast.
3839 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
3841 (add_insn_after): Likewise for first two params.
3842 (add_insn_before): Likewise.
3843 (remove_insn): Likewise for param.
3844 (emit_pattern_before_noloc): Likewise for second and third params.
3845 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
3846 (emit_call_insn_before_noloc): Likewise.
3847 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
3849 (emit_barrier_before): Likewise.
3850 (emit_label_before): Strengthen "label" param from "rtx" to
3851 "rtx_code_label *". Strengthen "before" param from "rtx" to
3853 (emit_insn_after_1): Strengthen "after" param from "rtx" to
3855 (emit_pattern_after_noloc): Likewise.
3856 (emit_insn_after_noloc): Likewise.
3857 (emit_jump_insn_after_noloc): Likewise.
3858 (emit_call_insn_after_noloc): Likewise.
3859 (emit_debug_insn_after_noloc): Likewise.
3860 (emit_barrier_after): Likewise.
3861 (emit_label_after): Likewise for both params.
3862 (emit_pattern_after_setloc): Likewise for "after" param. Convert
3863 "loc" param from "int" to "location_t".
3864 (emit_insn_after_setloc): Likewise.
3865 (emit_jump_insn_after_setloc): Likewise.
3866 (emit_call_insn_after_setloc): Likewise.
3867 (emit_debug_insn_after_setloc): Likewise.
3868 (emit_pattern_before_setloc): Likewise for "before" param. Convert
3869 "loc" param from "int" to "location_t".
3870 (emit_pattern_before): Convert NULL_RTX to NULL.
3871 (emit_insn_before_setloc): Convert "loc" param from "int" to
3873 (emit_jump_insn_before_setloc): Likewise.
3874 (emit_call_insn_before_setloc): Likewise.
3875 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
3876 rtx_insn *. Convert "loc" param from "int" to "location_t".
3877 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
3878 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
3879 Convert 3rd param from "int" to "location_t".
3880 (emit_barrier_before, emit_barrier_after, next_real_insn):
3881 Strengthen param from rtx to rtx_insn *.
3882 (emit_label_before): Strengthen 1st param from "rtx" to
3883 "rtx_code_label *". Strengthen 2nd param from "rtx" to
3885 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
3886 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
3887 Strengthen 2nd param from "rtx" to "rtx_insn *".
3888 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
3889 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
3890 Likewise. Convert 3rd param from "int" to "location_t".
3891 (emit_label_after): Strengthen 1st param from "rtx" to
3893 (next_real_insn, remove_insn): Strengthen param from "rtx" to
3895 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
3896 from "rtx" to "rtx_insn *".
3898 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
3900 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
3901 bodies streamed in with -Q.
3902 * dumpfile.c (dump_files): Add lto-stream-out dump file.
3903 * dumpfile.h (tree_dump_index): Add lto_stream_out.
3904 * gimple-streamer-out.c: Include gimple-pretty-print.h
3905 (output_bb): Dump stmts streamed.
3906 * lto-section-out.c: Include print-tree.h
3907 (lto_begin_section): Dump sections created.
3908 (lto_output_decl_index): Dump decl encoded.
3909 * lto-streamer-out.c: Include print-tree.h
3910 (create_output_block): Dump output block created.
3911 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
3912 (output_function): Dump function output.
3913 (output_constructor): Dump constructor streamed.
3914 (write_global_stream): Output indexes encoded.
3915 (produce_asm_for_decls): Dump streams encoded.
3916 * lto-streamer.c (streamer_dump_file): New global var.
3917 * lto-streamer.h (streamer_dump_file): Declare.
3918 * passes.c (ipa_write_summaries): Initialize streamer dump.
3919 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
3922 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
3925 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
3926 offsets for register save directives. Emit a second batch of save
3927 directives, if need be, when the function accesses prior frames.
3929 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3931 * config/arc/fpu.md (fmasf4): Force operand to register.
3932 (fnmasf4): Likewise.
3934 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3936 * config/arc/arc-protos.h (arc_pad_return): Remove.
3937 * config/arc/arc.c (machine_function): Remove force_short_suffix
3939 (arc_print_operand): Adjust printing of '&'.
3940 (arc_verify_short): Remove conditional printing of short suffix.
3941 (arc_final_prescan_insn): Remove reference to size_reason.
3942 (pad_return): New function.
3943 (arc_reorg): Call pad_return.
3944 (arc_pad_return): Remove.
3945 (arc_init_machine_status): Remove reference to force_short_suffix.
3946 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3947 (attr length): When attribute iscompact is true force to 2
3948 regardless; in the case of maybe check if we want to force the
3949 instruction to have 4 bytes length.
3950 (nopv): Change it to generate 4 byte long nop as well.
3951 (blockage): New pattern.
3952 (simple_return): Remove call to arc_pad_return.
3953 (p_return_i): Likewise.
3955 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3957 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
3959 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3961 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
3964 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3966 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
3967 for ARC700 and ARCv2.
3969 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
3972 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
3973 operands[2] instead of operands[1].
3976 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
3978 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
3979 case, check whether the outer register overlaps an unallocatable
3980 register, not just whether it fits the required class.
3982 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
3984 * poly-int.h (can_div_trunc_p): Add new overload in which all values
3986 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
3987 (memrefs_conflict_p): Likewise.
3988 (init_alias_analysis): Likewise.
3989 * cfgexpand.c (expand_debug_expr): Likewise.
3990 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
3991 * cse.c (fold_rtx): Likewise.
3992 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
3993 * expr.c (emit_block_move_hints): Likewise.
3994 (clear_storage_hints, push_block, emit_push_insn): Likewise.
3995 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
3996 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
3997 (emit_group_store): Likewise.
3998 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
3999 to read the PRE/POST_MODIFY increment.
4000 * calls.c (store_one_arg): Use strip_offset.
4001 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4003 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4005 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4006 (simplify_binary_operation_1): Extend CONST_INT handling to
4008 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4009 than a HOST_WIDE_INT.
4010 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4012 (adjust_mems, add_stores): Update accodingly.
4013 (vt_canonicalize_addr): Track polynomial offsets.
4014 (emit_note_insn_var_location): Likewise.
4015 (vt_add_function_parameter): Likewise.
4016 (vt_initialize): Likewise.
4018 2018-06-12 Jeff Law <law@redhat.com>
4020 * config.gcc (alpha*-*-freebsd*): Remove.
4021 * config/alpha/freebsd.h: Remove.
4023 2018-06-12 David Malcolm <dmalcolm@redhat.com>
4026 * spellcheck-tree.c (levenshtein_distance): Rename to...
4027 (get_edit_distance): ...this, and update for underlying renaming.
4028 * spellcheck-tree.h (levenshtein_distance): Rename to...
4029 (get_edit_distance): ...this.
4030 * spellcheck.c (levenshtein_distance): Rename to...
4031 (get_edit_distance): ...this. Convert from Levenshtein distance
4032 to Damerau-Levenshtein distance by supporting transpositions of
4033 adjacent characters. Rename "v1" to "v_next" and "v0" to
4035 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4036 (selftest::test_edit_distance_unit_test_oneway): ...this, and
4037 update for underlying renaming.
4038 (selftest::levenshtein_distance_unit_test): Rename to...
4039 (selftest::test_get_edit_distance_unit): ...this, and update for
4040 underlying renaming.
4041 (selftest::test_find_closest_string): Add example from PR 69968
4042 where transposition helps
4043 (selftest::test_metric_conditions): Update for renaming.
4044 (selftest::test_metric_conditions): Likewise.
4045 (selftest::spellcheck_c_tests): Likewise.
4046 * spellcheck.h (levenshtein_distance): Rename both overloads to...
4047 (get_edit_distance): ...this.
4048 (best_match::consider): Update for renaming.
4050 2018-06-12 Martin Sebor <msebor@redhat.com>
4052 PR tree-optimization/85259
4053 * builtins.c (compute_objsize): Handle constant offsets.
4054 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4055 true iff a warning has been issued.
4056 * gimple.h (gimple_nonartificial_location): New function.
4057 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4058 gimple_nonartificial_location and handle -Wno-system-headers.
4059 (handle_builtin_stxncpy): Same.
4061 2018-06-12 Martin Sebor <msebor@redhat.com>
4064 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4066 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
4068 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4069 BUILTIN_VEC_XST entries for pointer to double and long long.
4071 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
4074 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4076 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4079 2018-06-12 Martin Liska <mliska@suse.cz>
4081 * doc/options.texi: Document IntegerRange.
4083 2018-06-12 Martin Liska <mliska@suse.cz>
4085 * config/i386/i386.opt: Make MPX-related options as Deprecated.
4086 * opt-functions.awk: Handle Deprecated flag.
4087 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4089 (read_cmdline_option): Report warning for a deprecated option.
4090 * opts.h (struct cl_option): Add new field cl_deprecated.
4091 (CL_ERR_DEPRECATED): New.
4093 2018-06-12 Martin Liska <mliska@suse.cz>
4095 * doc/options.texi: Document Deprecated option flag.
4097 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4099 * config/arc/arc-arch.h (arc_extras): New enum.
4100 (arc_cpu_t):Add field extra.
4101 (arc_cpu_types): Consider the extras.
4102 * config/arc/arc-cpus.def: Add extras info.
4103 * config/arc/arc-opts.h (processor_type): Consider extra field.
4104 * config/arc/arc.c (arc_override_options): Handle extra field.
4106 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4108 * config/arc/arc-arch.h: Update ARC_OPTX macro.
4109 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4111 * config/arc/arc.c (arc_init): Update pic warning.
4112 (irq_range): Update irq range parsing warnings.
4113 (arc_override_options): Update various warning messages.
4114 (arc_handle_aux_attribute): Likewise.
4116 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
4118 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4120 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4122 * doc/sourcebuild.texi: Document usage of line number 0 in verify
4123 compiler messages directives.
4125 2018-06-12 Matthew Fortune <mfortune@gmail.com>
4127 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4128 * config/mips/mips-tables.opt: Regenerate.
4129 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4131 * doc/invoke.texi: Document -march=i6500.
4133 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
4135 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4136 (i6400_gpmul): Add cpu_unit.
4137 (i6400_gpdiv): Likewise.
4138 (i6400_msa_add_d): Update reservations.
4139 (i6400_msa_int_add) Likewise.
4140 (i6400_msa_short_logic3) Likewise.
4141 (i6400_msa_short_logic2) Likewise.
4142 (i6400_msa_short_logic) Likewise.
4143 (i6400_msa_move) Likewise.
4144 (i6400_msa_cmp) Likewise.
4145 (i6400_msa_short_float2) Likewise.
4146 (i6400_msa_div_d) Likewise.
4147 (i6400_msa_long_logic1) Likewise.
4148 (i6400_msa_long_logic2) Likewise.
4149 (i6400_msa_mult) Likewise.
4150 (i6400_msa_long_float2) Likewise.
4151 (i6400_msa_long_float4) Likewise.
4152 (i6400_msa_long_float5) Likewise.
4153 (i6400_msa_long_float8) Likewise.
4154 (i6400_fpu_fadd): Include frint type.
4155 (i6400_fpu_store): New define_insn_reservation.
4156 (i6400_fpu_load): Likewise.
4157 (i6400_fpu_move): Likewise.
4158 (i6400_fpu_fcmp): Likewise.
4159 (i6400_fpu_fmadd): Likewise.
4160 (i6400_int_mult): Include imul3nc type and update reservation.
4161 (i6400_int_div): Include idiv3 type and update reservation.
4162 (i6400_int_load): Update to check type not move_type.
4163 (i6400_int_store): Likewise.
4164 (i6400_int_prefetch): Set zero latency.
4166 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
4168 * gcc.c: Document new %@{...} sequence.
4169 (LINK_COMMAND_SPEC): Use it for the -L switches.
4170 (cpp_unique_options): Use it for the -I switches.
4171 (at_file_argbuf): New global variable.
4172 (in_at_file): Likewise.
4173 (alloc_args): Create at_file_argbuf.
4174 (clear_args): Truncate at_file_argbuf.
4175 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4176 (open_at_file): New function.
4177 (close_at_file): Likewise.
4178 (create_at_file): Delete.
4179 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4182 (validate_switches_from_spec): Deal with %@{...} sequence.
4183 (validate_switches): Likewise.
4184 (driver::finalize): Call clear_args.
4186 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4188 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4190 2018-06-11 Martin Sebor <msebor@redhat.com>
4192 * doc/invoke.texi (-Wall): List -Wc++17-compat.
4193 (Wno-class-memaccess): Add @opindex.
4194 (Wno-templates, Wno-multiple-inheritance): Same.
4195 (Wno-virtual-inheritance, Wno-namespaces): Same.
4196 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4197 (Wno-format-overflow, Wno-format-truncation): Same.
4198 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4199 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4200 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4201 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4202 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4203 (Wno-misspelled-isr): Same.
4205 2018-06-11 Martin Sebor <msebor@redhat.com>
4207 * PR tree-optimization/86083
4208 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4210 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4212 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4214 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4217 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4218 on the correct operand.
4219 (*movdi_internal64): Ditto.
4221 2018-06-11 Martin Liska <mliska@suse.cz>
4223 PR tree-optimization/86089
4224 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4226 2018-06-11 Julia Koval <julia.koval@intel.com>
4228 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4229 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4230 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4232 2018-06-11 Olivier Hainque <hainque@adacore.com>
4234 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4235 for Ada with strict dwarf2.
4237 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
4240 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4243 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
4245 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4247 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
4249 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4252 2018-06-08 Martin Liska <mliska@suse.cz>
4254 * tree-cfg.h (debug_function): Fix argument type to match
4257 2018-06-08 Martin Liska <mliska@suse.cz>
4259 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4260 Remove usage of MPX-related (and removed) fields.
4261 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4263 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4265 * cfg.c (debug): Use TDF_NONE rather than 0.
4266 * cfghooks.c (debug): Likewise.
4267 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4268 (struct dump_option_value_info): Convert to...
4269 (struct kv_pair): ...this template type.
4270 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4272 (optinfo_verbosity_options): Likewise.
4273 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4275 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4276 than int for "optgroup_flags" param.
4277 (dump_generic_expr_loc): Use dump_flags_t rather than int for
4279 (dump_dec): Likewise.
4280 (dump_finish): Use TDF_NONE rather than 0.
4281 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4282 rather than int for "optgroup_flags" param. Use TDF_NONE rather
4283 than 0. Update for change to option_ptr.
4284 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4285 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
4286 0. Update for changes to optinfo_verbosity_options and
4288 (opt_info_switch_p): Convert optgroup_flags from int to
4290 (dump_basic_block): Use dump_flags_t rather than int
4291 for "dump_kind" param.
4292 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4293 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4294 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4295 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4296 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4297 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4298 TDF_NONE): Convert from macros to...
4299 (enum dump_flag): ...this new enum.
4300 (dump_flags_t): Update to use enum.
4301 (operator|, operator&, operator~, operator|=, operator&=):
4302 Implement for dump_flags_t.
4303 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4304 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4305 Convert from macros to...
4306 (enum optgroup_flag): ...this new enum.
4307 (optgroup_flags_t): New typedef.
4308 (operator|, operator|=): Implement for optgroup_flags_t.
4309 (struct dump_file_info): Convert field "alt_flags" to
4310 dump_flags_t. Convert field "optgroup_flags" to
4312 (dump_basic_block): Use dump_flags_t rather than int for param.
4313 (dump_generic_expr_loc): Likewise.
4314 (dump_dec): Likewise.
4315 (dump_register): Convert param "optgroup_flags" to
4317 (opt_info_enable_passes): Likewise.
4318 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4320 * gimple-pretty-print.c (debug): Likewise.
4321 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4322 (merged_store_group::apply_stores): Likewise.
4323 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4324 * gimple.c (verify_gimple_pp): Likewise.
4325 * graphite-poly.c (print_pbb_body): Likewise.
4326 * passes.c (pass_manager::register_one_dump_file): Convert
4327 local "optgroup_flags" to optgroup_flags_t.
4328 * print-tree.c (print_node): Use TDF_NONE rather than 0.
4330 (debug_body): Likewise.
4331 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4332 to optgroup_flags_t.
4333 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4335 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4336 (convert_mult_to_fma): Likewise.
4337 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4338 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4339 * tree-vect-data-refs.c (dump_lower_bound): Convert param
4340 "dump_kind" to dump_flags_t.
4342 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4344 * config/rs6000/rs6000.c (min, max): Delete.
4346 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4348 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4349 -mabi=spe and -mabi=no-spe.
4351 2018-06-08 Martin Liska <mliska@suse.cz>
4353 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4354 where we expect an existing summary.
4356 2018-06-08 Martin Liska <mliska@suse.cz>
4358 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4359 * ipa-inline.h (estimate_edge_growth): Likewise.
4361 2018-06-08 Martin Liska <mliska@suse.cz>
4363 * cgraph.c (function_version_hasher::hash): Use
4364 cgraph_node::get_uid ().
4365 (function_version_hasher::equal):
4366 * cgraph.h (cgraph_node::get_uid): New method.
4367 * ipa-inline.c (update_caller_keys): Use
4368 cgraph_node::get_uid ().
4369 (update_callee_keys): Likewise.
4370 * ipa-utils.c (searchc): Likewise.
4371 (ipa_reduced_postorder): Likewise.
4372 * lto-cgraph.c (input_node): Likewise.
4373 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4374 * symbol-summary.h (symtab_insertion): Likewise.
4375 (symtab_removal): Likewise.
4376 (symtab_duplication): Likewise.
4377 * tree-pretty-print.c (dump_function_header): Likewise.
4378 * tree-sra.c (convert_callers_for_node): Likewise.
4380 2018-06-08 Martin Liska <mliska@suse.cz>
4382 * cgraph.c (symbol_table::create_edge): Always assign a new
4384 (symbol_table::free_edge): Do not recycle numbers.
4385 * cgraph.h (cgraph_edge::get): New method.
4386 * symbol-summary.h (symtab_removal): Use it.
4387 (symtab_duplication): Likewise.
4388 (call_summary::hashable_uid): Remove.
4390 2018-06-08 Martin Liska <mliska@suse.cz>
4392 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4393 (initialize_growth_caches): Remove.
4394 (free_growth_caches): Likewise.
4395 (do_estimate_edge_time): Use edge_growth_cache.
4396 (do_estimate_edge_size): Likewise.
4397 (do_estimate_edge_hints): Likewise.
4398 * ipa-inline.c (reset_edge_caches): Likewise.
4399 (recursive_inlining): Likewise.
4400 (inline_small_functions): Likewise.
4401 * ipa-inline.h (initialize_growth_caches): Remove.
4402 (estimate_edge_size): Likewise.
4403 (estimate_edge_time): Likewise.
4404 (estimate_edge_hints): Likewise.
4405 (reset_edge_growth_cache): Likewise.
4406 * symbol-summary.h (call_summary::remove): New method.
4408 2018-06-08 Martin Liska <mliska@suse.cz>
4410 * ipa-cp.c (class edge_clone_summary): New summary.
4411 (grow_edge_clone_vectors): Remove.
4412 (ipcp_edge_duplication_hook): Remove.
4413 (class edge_clone_summary_t): New call_summary class.
4414 (ipcp_edge_removal_hook): Remove.
4415 (edge_clone_summary_t::duplicate): New function.
4416 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4417 (create_specialized_node): Likewise.
4418 (ipcp_driver): Initialize edge_clone_summaries and do not
4421 2018-06-08 Martin Liska <mliska@suse.cz>
4423 * symbol-summary.h (get): New function.
4424 (call_summary::m_initialize_when_cloning): New class member.
4426 2018-06-08 Martin Liska <mliska@suse.cz>
4428 * cgraph.c (cgraph_node::remove): Do not recycle uid.
4429 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4430 (symbol_table::allocate_cgraph_symbol): Do not set uid.
4431 * passes.c (uid_hash_t): Record removed_nodes by their uids.
4432 (remove_cgraph_node_from_order): Use the removed_nodes set.
4433 (do_per_function_toporder): Likwise.
4434 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4435 instead of summary_uid.
4436 (symtab_removal): Likewise.
4437 (symtab_duplication): Likewise.
4439 2018-06-08 Martin Liska <mliska@suse.cz>
4441 * ipa-cp.c (ipcp_store_bits_results): Use
4442 ipcp_transformation_sum.
4443 (ipcp_store_vr_results): Likewise.
4444 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4446 (ipcp_transformation_initialize): ... this.
4447 (ipa_set_node_agg_value_chain):
4448 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4449 (write_ipcp_transformation_info): Likewise.
4450 (read_ipcp_transformation_info): Likewise.
4451 (ipcp_update_bits): Likewise.
4452 (ipcp_update_vr): Likewise.
4453 (ipcp_transform_function): Likewise.
4454 * ipa-prop.h: Rename ipcp_transformation_summary to
4455 ipcp_transformation.
4456 (class ipcp_transformation_t): New function summary.
4457 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4458 (ipa_get_agg_replacements_for_node): Likewise.
4460 2018-06-08 Martin Liska <mliska@suse.cz>
4462 * ipa-pure-const.c (struct funct_state_d): Do it class instead
4464 (class funct_state_summary_t): New function_summary class.
4465 (has_function_state): Remove.
4466 (get_function_state): Likewise.
4467 (set_function_state): Likewise.
4468 (add_new_function): Likewise.
4469 (funct_state_summary_t::insert): New function.
4470 (duplicate_node_data): Remove.
4471 (remove_node_data): Remove.
4472 (funct_state_summary_t::duplicate): New function.
4473 (register_hooks): Create new funct_state_summaries.
4474 (pure_const_generate_summary): Use it.
4475 (pure_const_write_summary): Likewise.
4476 (pure_const_read_summary): Likewise.
4477 (propagate_pure_const): Likewise.
4478 (propagate_nothrow): Likewise.
4479 (dump_malloc_lattice): Likewise.
4480 (propagate_malloc): Likewise.
4481 (execute): Do not register hooks, just remove summary
4483 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4486 2018-06-08 Martin Liska <mliska@suse.cz>
4488 * ipa-reference.c (remove_node_data): Remove.
4489 (duplicate_node_data): Likewise.
4490 (class ipa_ref_var_info_summary_t): New class.
4491 (class ipa_ref_opt_summary_t): Likewise.
4492 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4493 (get_reference_optimization_summary): Use
4494 ipa_ref_opt_sum_summaries.
4495 (set_reference_vars_info): Remove.
4496 (set_reference_optimization_summary): Likewise.
4497 (ipa_init): Create summaries.
4498 (init_function_info): Use function summary.
4499 (ipa_ref_opt_summary_t::duplicate): New function.
4500 (ipa_ref_opt_summary_t::remove): New function.
4501 (get_read_write_all_from_node): Fix GNU coding style.
4502 (propagate): Use function summary.
4503 (write_node_summary_p): Fix GNU coding style.
4504 (stream_out_bitmap): Likewise.
4505 (ipa_reference_read_optimization_summary): Use function summary.
4506 (ipa_reference_c_finalize): Do not release hooks.
4508 2018-06-08 Martin Liska <mliska@suse.cz>
4510 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4511 (analyze_function_body): Extract multiple calls of get_create.
4512 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4513 * ipa-inline.c (recursive_inlining): Use ::get method.
4514 * ipa-inline.h (estimate_edge_growth): Likewise.
4516 2018-06-08 Martin Liska <mliska@suse.cz>
4518 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4520 (hsa_function_summary::hsa_function_summary): Use the new enum
4522 (hsa_gpu_implementation_p): Use hsa_summaries::get.
4523 * hsa-gen.c (hsa_get_host_function): Likewise.
4524 (get_brig_function_name): Likewise.
4525 * ipa-hsa.c (process_hsa_functions): Likewise.
4526 (ipa_hsa_write_summary): Likewise.
4527 * symbol-summary.h (symtab_duplication): Use ::get function/
4528 (get): New function.
4530 2018-06-08 Martin Liska <mliska@suse.cz>
4532 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4534 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4535 (hsa_register_kernel): Likewise.
4536 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4537 * hsa-gen.c (hsa_get_host_function): Likewise.
4538 (get_brig_function_name): Likewise.
4539 (generate_hsa): Likewise.
4540 (pass_gen_hsail::execute): Likewise.
4541 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4542 (devirtualization_time_bonus): Likewise.
4543 (ipcp_propagate_stage): Likewise.
4544 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4545 (edge_set_predicate): Likewise.
4546 (evaluate_conditions_for_known_args): Likewise.
4547 (evaluate_properties_for_edge): Likewise.
4548 (ipa_fn_summary::reset): Likewise.
4549 (ipa_fn_summary_t::duplicate): Likewise.
4550 (dump_ipa_call_summary): Likewise.
4551 (ipa_dump_fn_summary): Likewise.
4552 (analyze_function_body): Likewise.
4553 (compute_fn_summary): Likewise.
4554 (estimate_edge_devirt_benefit): Likewise.
4555 (estimate_edge_size_and_time): Likewise.
4556 (estimate_calls_size_and_time): Likewise.
4557 (estimate_node_size_and_time): Likewise.
4558 (inline_update_callee_summaries): Likewise.
4559 (remap_edge_change_prob): Likewise.
4560 (remap_edge_summaries): Likewise.
4561 (ipa_merge_fn_summary_after_inlining): Likewise.
4562 (ipa_update_overall_fn_summary): Likewise.
4563 (read_ipa_call_summary): Likewise.
4564 (inline_read_section): Likewise.
4565 (write_ipa_call_summary): Likewise.
4566 (ipa_fn_summary_write): Likewise.
4567 (ipa_free_fn_summary): Likewise.
4568 * ipa-hsa.c (process_hsa_functions): Likewise.
4569 (ipa_hsa_write_summary): Likewise.
4570 (ipa_hsa_read_section): Likewise.
4571 * ipa-icf.c (sem_function::merge): Likewise.
4572 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4573 (do_estimate_edge_time): Likewise.
4574 (estimate_size_after_inlining): Likewise.
4575 (estimate_growth): Likewise.
4576 (growth_likely_positive): Likewise.
4577 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4578 (inline_call): Likewise.
4579 * ipa-inline.c (caller_growth_limits): Likewise.
4580 (can_inline_edge_p): Likewise.
4581 (can_inline_edge_by_limits_p): Likewise.
4582 (compute_uninlined_call_time): Likewise.
4583 (compute_inlined_call_time): Likewise.
4584 (want_inline_small_function_p): Likewise.
4585 (edge_badness): Likewise.
4586 (update_caller_keys): Likewise.
4587 (update_callee_keys): Likewise.
4588 (recursive_inlining): Likewise.
4589 (inline_small_functions): Likewise.
4590 (inline_to_all_callers_1): Likewise.
4591 (dump_overall_stats): Likewise.
4592 (early_inline_small_functions): Likewise.
4593 (early_inliner): Likewise.
4594 * ipa-inline.h (estimate_edge_growth): Likewise.
4595 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4596 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4597 * ipa-prop.h (IPA_NODE_REF): Likewise.
4598 (IPA_EDGE_REF): Likewise.
4599 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4600 (propagate_malloc): Likewise.
4601 * ipa-split.c (execute_split_functions): Likewise.
4602 * symbol-summary.h: Rename get to get_create.
4604 (get_create): Likewise.
4605 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4607 2018-06-08 Martin Liska <mliska@suse.cz>
4609 * symbol-summary.h (release): Move definition out of class
4611 (symtab_removal): Likewise.
4612 (symtab_duplication): Likewise.
4614 2018-06-08 Martin Liska <mliska@suse.cz>
4616 * symbol-summary.h (function_summary): Move constructor
4617 implementation out of class declaration.
4618 (release): Likewise.
4619 (symtab_insertion): Likewise.
4620 (symtab_removal): Likewise.
4621 (symtab_duplication): Likewise.
4624 2018-06-08 Martin Liska <mliska@suse.cz>
4626 * Makefile.in: Remove support for MPX (macros, related functions,
4627 fields in cgraph_node, ...).
4628 * builtin-types.def (BT_BND): Likewise.
4629 (BT_FN_BND_CONST_PTR): Likewise.
4630 (BT_FN_CONST_PTR_BND): Likewise.
4631 (BT_FN_VOID_PTR_BND): Likewise.
4632 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4633 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4634 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4635 (expand_builtin_mempcpy_with_bounds): Likewise.
4636 (expand_builtin_memset_with_bounds): Likewise.
4637 (expand_builtin_memset_args): Likewise.
4638 (std_expand_builtin_va_start): Likewise.
4639 (expand_builtin): Likewise.
4640 (expand_builtin_with_bounds): Likewise.
4641 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4642 (DEF_LIB_BUILTIN_CHKP): Likewise.
4643 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4644 (DEF_CHKP_BUILTIN): Likewise.
4645 (BUILT_IN_MEMCPY): Likewise.
4646 (BUILT_IN_MEMMOVE): Likewise.
4647 (BUILT_IN_MEMPCPY): Likewise.
4648 (BUILT_IN_MEMSET): Likewise.
4649 (BUILT_IN_STPCPY): Likewise.
4650 (BUILT_IN_STRCAT): Likewise.
4651 (BUILT_IN_STRCHR): Likewise.
4652 (BUILT_IN_STRCPY): Likewise.
4653 (BUILT_IN_STRLEN): Likewise.
4654 (BUILT_IN_MEMCPY_CHK): Likewise.
4655 (BUILT_IN_MEMMOVE_CHK): Likewise.
4656 (BUILT_IN_MEMPCPY_CHK): Likewise.
4657 (BUILT_IN_MEMSET_CHK): Likewise.
4658 (BUILT_IN_STPCPY_CHK): Likewise.
4659 (BUILT_IN_STRCAT_CHK): Likewise.
4660 (BUILT_IN_STRCPY_CHK): Likewise.
4661 * calls.c (store_bounds): Likewise.
4662 (emit_call_1): Likewise.
4663 (special_function_p): Likewise.
4664 (maybe_warn_nonstring_arg): Likewise.
4665 (initialize_argument_information): Likewise.
4666 (finalize_must_preallocate): Likewise.
4667 (compute_argument_addresses): Likewise.
4668 (expand_call): Likewise.
4669 * cfgexpand.c (expand_call_stmt): Likewise.
4670 (expand_return): Likewise.
4671 (expand_gimple_stmt_1): Likewise.
4672 (pass_expand::execute): Likewise.
4673 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4674 (cgraph_node::remove): Likewise.
4675 (cgraph_node::dump): Likewise.
4676 (cgraph_node::verify_node): Likewise.
4677 * cgraph.h (chkp_function_instrumented_p): Likewise.
4678 (symtab_node::get_alias_target): Likewise.
4679 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4680 (cgraph_local_p): Likewise.
4681 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4682 (cgraph_edge::rebuild_references): Likewise.
4683 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4684 (walk_polymorphic_call_targets): Likewise.
4685 (cgraph_node::expand_thunk): Likewise.
4686 (symbol_table::output_weakrefs): Likewise.
4687 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4688 (ix86_handle_option): Likewise.
4689 * config/i386/constraints.md: Likewise.
4690 * config/i386/i386-builtin-types.def (BND): Likewise.
4694 * config/i386/i386-builtin.def (BDESC_END): Likewise.
4695 (BDESC_FIRST): Likewise.
4697 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4698 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4699 * config/i386/i386.c (enum reg_class): Likewise.
4700 (ix86_target_string): Likewise.
4701 (ix86_option_override_internal): Likewise.
4702 (ix86_conditional_register_usage): Likewise.
4703 (ix86_valid_target_attribute_inner_p): Likewise.
4704 (ix86_set_indirect_branch_type): Likewise.
4705 (ix86_set_current_function): Likewise.
4706 (ix86_function_arg_regno_p): Likewise.
4707 (init_cumulative_args): Likewise.
4708 (ix86_function_arg_advance): Likewise.
4709 (ix86_function_arg): Likewise.
4710 (ix86_pass_by_reference): Likewise.
4711 (ix86_function_value_regno_p): Likewise.
4712 (ix86_function_value_1): Likewise.
4713 (ix86_function_value_bounds): Likewise.
4714 (ix86_return_in_memory): Likewise.
4715 (ix86_setup_incoming_vararg_bounds): Likewise.
4716 (ix86_va_start): Likewise.
4717 (indirect_thunk_need_prefix): Likewise.
4718 (print_reg): Likewise.
4719 (ix86_print_operand): Likewise.
4720 (ix86_expand_call): Likewise.
4721 (ix86_output_function_return): Likewise.
4722 (reg_encoded_number): Likewise.
4723 (BDESC_VERIFYS): Likewise.
4724 (ix86_init_mpx_builtins): Likewise.
4725 (ix86_init_builtins): Likewise.
4726 (ix86_emit_cmove): Likewise.
4727 (ix86_emit_move_max): Likewise.
4728 (ix86_expand_builtin): Likewise.
4729 (ix86_builtin_mpx_function): Likewise.
4730 (ix86_get_arg_address_for_bt): Likewise.
4731 (ix86_load_bounds): Likewise.
4732 (ix86_store_bounds): Likewise.
4733 (ix86_load_returned_bounds): Likewise.
4734 (ix86_store_returned_bounds): Likewise.
4735 (ix86_class_likely_spilled_p): Likewise.
4736 (ix86_hard_regno_mode_ok): Likewise.
4737 (x86_order_regs_for_local_alloc): Likewise.
4738 (ix86_mitigate_rop): Likewise.
4739 (ix86_bnd_prefixed_insn_p): Likewise.
4740 (ix86_mpx_bound_mode): Likewise.
4741 (ix86_make_bounds_constant): Likewise.
4742 (ix86_initialize_bounds): Likewise.
4743 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4744 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4745 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4746 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4747 (TARGET_CHKP_BOUND_MODE): Likewise.
4748 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4749 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4750 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4751 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4752 * config/i386/i386.h (TARGET_MPX): Likewise.
4753 (TARGET_MPX_P): Likewise.
4754 (VALID_BND_REG_MODE): Likewise.
4755 (FIRST_BND_REG): Likewise.
4756 (LAST_BND_REG): Likewise.
4757 (enum reg_class): Likewise.
4758 (BND_REG_P): Likewise.
4759 (BND_REGNO_P): Likewise.
4760 (BNDmode): Likewise.
4761 (ADJUST_INSN_LENGTH): Likewise.
4762 * config/i386/i386.md: Likewise.
4763 * config/i386/i386.opt: Likewise.
4764 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4765 (defined): Likewise.
4766 (LINK_MPX): Likewise.
4767 (MPX_SPEC): Likewise.
4768 (LIBMPX_SPEC): Likewise.
4769 (LIBMPXWRAPPERS_SPEC): Likewise.
4770 (CHKP_SPEC): Likewise.
4771 * config/i386/predicates.md: Likewise.
4772 * dbxout.c (dbxout_type): Likewise.
4773 * doc/extend.texi: Likewise.
4774 * doc/invoke.texi: Likewise.
4775 * doc/md.texi: Likewise.
4776 * doc/tm.texi: Likewise.
4777 * doc/tm.texi.in: Likewise.
4778 * dwarf2out.c (is_base_type): Likewise.
4779 (gen_formal_types_die): Likewise.
4780 (gen_subprogram_die): Likewise.
4781 (gen_type_die_with_usage): Likewise.
4782 (gen_decl_die): Likewise.
4783 (dwarf2out_late_global_decl): Likewise.
4784 * expr.c (expand_assignment): Likewise.
4785 (emit_storent_insn): Likewise.
4786 (store_expr_with_bounds): Likewise.
4787 (store_expr): Likewise.
4788 (expand_expr_real_1): Likewise.
4789 * expr.h (store_expr_with_bounds): Likewise.
4790 * function.c (use_register_for_decl): Likewise.
4791 (struct bounds_parm_data): Likewise.
4792 (assign_parms_augmented_arg_list): Likewise.
4793 (assign_parm_find_entry_rtl): Likewise.
4794 (assign_parm_is_stack_parm): Likewise.
4795 (assign_parm_load_bounds): Likewise.
4796 (assign_bounds): Likewise.
4797 (assign_parms): Likewise.
4798 (expand_function_start): Likewise.
4799 * gcc.c (CHKP_SPEC): Likewise.
4800 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4801 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
4802 (wrestrict_dom_walker::check_call): Likewise.
4803 * gimple.c (gimple_build_call_from_tree): Likewise.
4804 * gimple.h (enum gf_mask): Likewise.
4805 (gimple_call_with_bounds_p): Likewise.
4806 (gimple_call_set_with_bounds): Likewise.
4807 * gimplify.c (gimplify_init_constructor): Likewise.
4808 * ipa-cp.c (initialize_node_lattices): Likewise.
4809 (propagate_constants_across_call): Likewise.
4810 (find_more_scalar_values_for_callers_subset): Likewise.
4811 * ipa-hsa.c (process_hsa_functions): Likewise.
4812 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
4813 * ipa-icf.c (sem_function::merge): Likewise.
4814 * ipa-inline.c (early_inliner): Likewise.
4815 * ipa-pure-const.c (warn_function_noreturn): Likewise.
4816 (warn_function_cold): Likewise.
4817 (propagate_pure_const): Likewise.
4818 * ipa-ref.h (enum GTY): Likewise.
4819 * ipa-split.c (find_retbnd): Likewise.
4820 (consider_split): Likewise.
4821 (split_function): Likewise.
4822 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4823 * ipa.c (walk_polymorphic_call_targets): Likewise.
4824 (symbol_table::remove_unreachable_nodes): Likewise.
4825 (process_references): Likewise.
4826 (cgraph_build_static_cdtor_1): Likewise.
4827 * lto-cgraph.c (lto_output_node): Likewise.
4828 (output_refs): Likewise.
4829 (compute_ltrans_boundary): Likewise.
4830 (input_overwrite_node): Likewise.
4831 (input_node): Likewise.
4832 (input_cgraph_1): Likewise.
4833 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
4834 * passes.c (pass_manager::execute_early_local_passes): Likewise.
4835 (class pass_chkp_instrumentation_passes): Likewise.
4836 (make_pass_chkp_instrumentation_passes): Likewise.
4837 * passes.def: Likewise.
4838 * rtl.h (struct GTY): Likewise.
4839 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
4840 * stor-layout.c (layout_type): Likewise.
4841 * symtab.c: Likewise.
4842 * target.def: Likewise.
4843 * targhooks.c (default_chkp_bound_type): Likewise.
4844 (default_chkp_bound_mode): Likewise.
4845 (default_builtin_chkp_function): Likewise.
4846 (default_chkp_function_value_bounds): Likewise.
4847 (default_chkp_make_bounds_constant): Likewise.
4848 (default_chkp_initialize_bounds): Likewise.
4849 * targhooks.h (default_chkp_bound_type): Likewise.
4850 (default_chkp_bound_mode): Likewise.
4851 (default_builtin_chkp_function): Likewise.
4852 (default_chkp_function_value_bounds): Likewise.
4853 (default_chkp_make_bounds_constant): Likewise.
4854 (default_chkp_initialize_bounds): Likewise.
4855 * toplev.c (compile_file): Likewise.
4856 (process_options): Likewise.
4857 * tree-core.h (DEF_BUILTIN): Likewise.
4858 (DEF_BUILTIN_CHKP): Likewise.
4859 * tree-inline.c (declare_return_variable): Likewise.
4860 (remap_gimple_stmt): Likewise.
4861 (copy_bb): Likewise.
4862 (initialize_inlined_parameters): Likewise.
4863 (expand_call_inline): Likewise.
4864 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
4865 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
4866 (make_pass_ipa_chkp_produce_thunks): Likewise.
4867 (make_pass_chkp): Likewise.
4868 (make_pass_chkp_opt): Likewise.
4869 (make_pass_chkp_instrumentation_passes): Likewise.
4870 * tree-pretty-print.c (dump_generic_node): Likewise.
4871 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
4872 * tree-ssa-dce.c (propagate_necessity): Likewise.
4873 (eliminate_unnecessary_stmts): Likewise.
4874 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
4875 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4876 * tree-ssa-sccvn.h: Likewise.
4877 * tree-ssa-strlen.c (get_string_length): Likewise.
4878 (valid_builtin_call): Likewise.
4879 (adjust_last_stmt): Likewise.
4880 (handle_builtin_strchr): Likewise.
4881 (handle_builtin_strcpy): Likewise.
4882 (handle_builtin_stxncpy): Likewise.
4883 (handle_builtin_memcpy): Likewise.
4884 (handle_builtin_strcat): Likewise.
4885 (strlen_check_and_optimize_stmt): Likewise.
4886 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
4887 * tree-streamer-in.c: Likewise.
4888 * tree-streamer.c (record_common_node): Likewise.
4889 * tree.c (tree_code_size): Likewise.
4890 (wide_int_to_tree_1): Likewise.
4891 (type_contains_placeholder_1): Likewise.
4892 (build_common_tree_nodes): Likewise.
4893 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
4894 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
4895 (POINTER_BOUNDS_P): Likewise.
4896 (BOUNDED_TYPE_P): Likewise.
4897 (BOUNDED_P): Likewise.
4898 (CALL_WITH_BOUNDS_P): Likewise.
4899 (pointer_bounds_type_node): Likewise.
4900 * value-prof.c (gimple_ic): Likewise.
4901 * var-tracking.c (vt_add_function_parameters): Likewise.
4902 * varasm.c (make_decl_rtl): Likewise.
4903 (assemble_start_function): Likewise.
4904 (output_constant): Likewise.
4905 (maybe_assemble_visibility): Likewise.
4906 * varpool.c (ctor_for_folding): Likewise.
4907 * chkp-builtins.def: Remove.
4908 * ipa-chkp.c: Remove.
4909 * ipa-chkp.h: Remove.
4910 * rtl-chkp.c: Remove.
4911 * rtl-chkp.h: Remove.
4912 * tree-chkp-opt.c: Remove.
4913 * tree-chkp.c: Remove.
4914 * tree-chkp.h: Remove.
4916 2018-06-07 Carl Love <cel@us.ibm.com>
4918 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4919 vextract_fp_from_shortl): Add BE support.
4921 2018-06-07 Paul Koning <ni1d@arrl.net>
4923 * compare-elim.c (try_merge_compare): Don't merge compare if
4924 address contains a side effect.
4925 (try_eliminate_compare): Likewise.
4927 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
4929 * config.gcc: Support "tremont".
4930 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
4931 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4933 * config/i386/i386.c (m_TREMONT): Define.
4934 (processor_target_table): Add "tremont".
4935 (PTA_TREMONT): Define.
4936 (ix86_lea_outperforms): Add TARGET_TREMONT.
4937 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
4938 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
4939 and M_INTEL_GOLDMONT_PLUS.
4940 (fold_builtin_cpu): Add "tremont".
4941 (ix86_add_stmt_cost): Add TARGET_TREMONT.
4942 (ix86_option_override_internal): Add "tremont".
4943 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
4944 (processor_type): Add PROCESSOR_TREMONT.
4945 * config/i386/x86-tune.def: Add m_TREMONT.
4946 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
4948 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4950 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
4951 symbol defined for msp430i* devices to be lower case.
4953 gcc/testsuite/gcc.target/msp430/
4954 * msp430i-device-symbol.c: New test.
4955 * msp430f-device-symbol.c: New test.
4956 * msp430.h: New test header file.
4958 2018-06-07 Richard Biener <rguenther@suse.de>
4960 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
4961 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
4962 Properly wrap signed arithmetic if overflow wraps.
4964 2018-06-07 Jakub Jelinek <jakub@redhat.com>
4966 PR tree-optimization/69615
4967 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
4968 of a cast from a same precision integral SSA_NAME in a bb dominated
4969 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
4970 cast to utype if rhs2 has already a compatible type.
4972 2018-06-07 Richard Biener <rguenther@suse.de>
4974 PR tree-optimization/85935
4975 * graphite-scop-detection.c (find_params_in_bb): Analyze
4976 condition operands with respect to the correct loop. Assert
4977 the analysis doesn't fail.
4979 2018-06-04 Carl Love <cel@us.ibm.com>
4981 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
4982 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
4983 as it is slightly cheaper.
4984 (first_match_or_eos_index_<mode>):
4985 Calculate index using natural element order.
4986 (first_match_index_<mode>):
4987 Calculate index using natural element order.
4988 (first_match_or_eos_index_<mode>):
4989 Calculate index using natural order.
4990 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4991 for BE and LE modes.
4992 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4993 P9V_BUILTIN_VCLZLSBB_V16QI.
4994 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4997 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
4999 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5000 indentation and line wrap for many prototypes. Add missing
5001 @smallexample directives around block of prototypes for vec_xl and
5004 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
5006 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5007 track if we pass or return IEEE 128-bit floating point.
5008 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5009 C++ mangling that is compatible with GCC 8.1.
5010 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5011 (init_cumulative_args): Note if we pass or return IEEE 128-bit
5012 floating point types.
5013 (rs6000_function_arg_advance_1): Likewise.
5014 (rs6000_mangle_type): Optionally generate mangled names that match
5015 what GCC 8.1 generated for IEEE 128-bit floating point types.
5016 (rs6000_globalize_decl_name): If we have an external function that
5017 passes or returns IEEE 128-bit types, generate a weak reference
5018 from the mangled name used in GCC 8.1 to the current mangled
5020 (rs6000_init_builtins): Make __ibm128 use the long double type if
5021 long double is IBM extended double. Make __float128 use the long
5022 double type if long double is IEEE 128-bit.
5025 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5026 macro for __ibm128 built-in functions.
5027 (PACK_IF): Add __ibm128 pack/unpack functions.
5028 (UNPACK_IF): Likewise.
5029 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5030 enable long double built-in functions if long double is IEEE
5031 128-bit floating point.
5032 (rs6000_invalid_builtin): Update long double built-in function
5034 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5035 functions, adjust the built-in function to use the long double
5036 built-in function if __ibm128 and long double are the same type.
5037 * doc/extend.texi (PowerPC builtins): Update documention for
5038 __builtin_{,un}pack_longdouble. Add documentation for
5039 __builtin_{,un}pack_ibm128.
5041 2018-06-06 Jim Wilson <jimw@sifive.com>
5043 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5044 (struct machine_function): New field interrupt_mode.
5045 (riscv_handle_type_attribute): New function. Add forward declaration.
5046 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5047 (riscv_expand_epilogue): Check interrupt_mode field.
5048 (riscv_set_current_function): Check interrupt attribute args and
5049 set interrupt_mode field.
5050 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5051 (riscv_sret, riscv_uret): New.
5052 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5053 new arguments to interrupt attribute.
5055 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
5058 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5059 Don't handle -mcpu=power8 if -mpower9-vector is also used.
5061 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5063 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5064 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5065 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5066 several redundant entries.
5068 2018-06-06 David Malcolm <dmalcolm@redhat.com>
5070 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5071 type from "rtx" to "rtx_insn *".
5072 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5073 for local "call_insn", removing cast.
5074 (ix86_expand_call): Likewise, introducing a "call_insn" local.
5076 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
5078 PR tree-optimization/86066
5079 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5080 for BIT_INSERT_EXPR stores.
5082 2018-06-06 Richard Biener <rguenther@suse.de>
5084 PR tree-optimization/86062
5085 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5086 component refs ontop
5087 of to be offsetted base.
5089 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5091 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5092 to be static and remove check on interrupt attribute name.
5094 gcc/testsuite/gcc.target/msp430/
5095 * function-attributes-4.c: New test.
5096 * static-interrupts.c: New test.
5098 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
5100 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5101 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5103 2018-06-05 Steve Ellcey <sellcey@cavium.com>
5106 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5108 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5109 Remove second argument, change how error is called.
5110 (aarch64_layout_arg): Remove second argument from
5111 aarch64_err_no_fpadvsimd call.
5112 (aarch64_init_cumulative_args): Ditto.
5113 (aarch64_gimplify_va_arg_expr): Ditto.
5114 * config/aarch64/aarch64.md (mov<mode>): Ditto.
5116 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
5118 * config/i386/i386.md (simple_return_indirect_internal): New expander.
5119 (*simple_return_indirect_internal<mode>): Rename from
5120 simple_return_indirect_internal. Use W mode iterator.
5121 (rstorssp): New expander.
5122 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
5123 (clrssbsy): New expander.
5124 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
5126 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
5128 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5130 (cmse_check_pointed_object): Likewise.
5132 2018-06-05 Martin Liska <mliska@suse.cz>
5134 PR gcov-profile/47618
5135 * doc/invoke.texi: Document how -fprofile-dir format
5138 2018-06-05 Richard Biener <rguenther@suse.de>
5140 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5141 removal pretend DOM info isn't available so we do not update
5142 it and only remove edges, not dominated blocks. Actually free
5143 DOM info in case we removed something. Remove unreachable blocks.
5144 (mfb_keep_latches): Work with either DOM info or marked backedges.
5145 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5146 first. Mark backedges if DOM info isn't available.
5147 (Re-)compute DOM info after cleanup_control_flow_pre.
5149 2018-06-05 Richard Biener <rguenther@suse.de>
5151 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5152 (locus_discrim_hasher::hash): Adjust.
5153 (locus_discrim_hasher::equal): Likewise.
5154 (next_discriminator_for_locus): Work on line directly.
5155 (same_line_p): Pass in expanded locus1 as well.
5156 (assign_discriminators): Avoid redundant location expansions.
5158 2018-06-05 Richard Biener <rguenther@suse.de>
5160 PR tree-optimization/86046
5161 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5162 if required after clearing TREE_ADDRESSABLE.
5164 2018-06-05 Richard Biener <rguenther@suse.de>
5166 PR tree-optimization/86047
5167 * tree-ssa-loop.c (for_each_index): Glob handling of all
5168 decls and constants and really handle all of them.
5170 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5173 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5174 qualifier_void_pointer and qualifier_const_void_pointer.
5175 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5176 (arm_init_builtins): Handle the above.
5177 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5178 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5179 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5182 2018-06-05 Martin Liska <mliska@suse.cz>
5184 * auto-profile.c (read_autofdo_file): Do not use
5185 gcov_ctr_summary struct.
5186 (afdo_callsite_hot_enough_for_early_inline): Likewise.
5187 * coverage.c (struct counts_entry): Likewise.
5188 (read_counts_file): Read just single summary entry.
5189 (get_coverage_counts): Use gcov_summary struct.
5190 * coverage.h (get_coverage_counts): Likewise.
5191 * gcov-dump.c (dump_working_sets): Likewise.
5192 (tag_summary): Dump just single summary.
5193 * gcov-io.c (gcov_write_summary): Write just histogram
5195 (gcov_read_summary): Read just single summary.
5196 (compute_working_sets): Use gcov_summary struct.
5197 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5198 of GCOV_COUNTERS_SUMMABLE.
5199 (GCOV_COUNTERS_SUMMABLE): Remove.
5200 (GCOV_FIRST_VALUE_COUNTER): Replace with
5201 GCOV_COUNTER_V_INTERVAL.
5202 (struct gcov_ctr_summary): Remove.
5203 (struct gcov_summary): Directly use fields of former
5205 (compute_working_sets): Use gcov_summary struct.
5206 * gcov.c (read_count_file): Do not use ctrs fields.
5207 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5209 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5211 * profile.c: Likewise.
5212 * profile.h: Likewise.
5214 2018-06-05 Martin Liska <mliska@suse.cz>
5216 PR gcov-profile/84846
5217 * gcov.c (output_lines): Print working directory only
5218 in intermediate format.
5220 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
5222 * config/s390/s390-builtin-types.def: Add void function type.
5223 * config/s390/s390-builtins.def: Use the function type for the
5226 2018-06-04 Jim Wilson <jimw@sifive.com>
5228 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5230 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5231 and maybe_eh_return. Change regno to unsigned int. Use new args to
5232 handle EH_RETURN_DATA_REGNO registers properly.
5233 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5234 (riscv_expand_epilogue): Update comment. Change argument name and
5235 type. Update code to use new name and type. Pass new args to
5236 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
5238 * config/riscv/riscv.md (NORMAL_RETURN): New.
5239 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5240 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5241 (eh_return): Call gen_eh_return_internal and emit barrier.
5242 (eh_return_internal): Call riscv_expand_epilogue.
5244 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
5246 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5247 bit_insertion field and declare can_be_merged_into method.
5248 (merged_store_group::can_be_merged_into): New method.
5249 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5250 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
5251 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5253 2018-06-04 Richard Biener <rguenther@suse.de>
5255 PR tree-optimization/85955
5256 * builtins.c (fold_builtin_sincos): Convert pointers to
5257 destination to appropriate type before dereferencing.
5259 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
5261 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5263 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
5265 * expr.c (expand_expr_real_1): Force the operand into memory if
5266 its TYPE_MODE is BLKmode and if there is no integer mode for
5267 the number of bits being extracted.
5269 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5273 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5274 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5276 2018-06-04 Richard Biener <rguenther@suse.de>
5278 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5279 (cleanup_tree_cfg_noloop): ... single caller. Do
5280 start_recording_case_labels later.
5282 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
5284 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5285 to _IMMINTRIN_H_INCLUDED.
5286 * config/i386/pconfigintrin.h: Ditto.
5287 * config/i386/waitpkgintrin.h: Ditto.
5288 * config/i386/immintrin.h: Add includes for sgxintrin.h,
5289 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5290 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5291 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5292 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5293 waitpkgintrin.h and cldemoteintrin.h.
5295 2018-06-04 Richard Biener <rguenther@suse.de>
5297 PR tree-optimization/86038
5298 * tracer.c (find_best_successor): Check probability for
5299 being initialized, bail out if not.
5301 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
5304 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5305 of bits to ignore when comparing architectures.
5307 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5309 PR tree-optimization/69615
5310 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5311 maximum or minimum of the type, try to merge it also as if
5312 range1 is + [-, x - 1] or + [x + 1, -].
5315 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5317 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
5319 PR tree-optimization/86034
5320 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5321 the unsigned bitfield type in a bit insertion sequence if it does not
5322 have a larger precision than the bitfield size.
5323 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5325 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
5327 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5329 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5331 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5332 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5333 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5334 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5336 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5338 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5339 Disable -fdelete-null-pointer-checks for ELF toolchain.
5341 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5342 Kito Cheng <kito.cheng@gmail.com>
5344 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5345 (nds32le-*-*, nds32be-*-*): Integrate checking process.
5346 (nds32*-*-*): Add glibc and uclibc conditions.
5347 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5348 (TARGET_EXCEPT_UNWIND_INFO): Define.
5349 * config/nds32/elf.h: New file.
5350 * config/nds32/linux.h: New file.
5351 * config/nds32/nds32-elf.opt: New file.
5352 * config/nds32/nds32-linux.opt: New file.
5353 * config/nds32/nds32-fp-as-gp.c
5354 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5355 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5357 (nds32_asm_file_end): Ditto.
5358 (nds32_print_operand): Ditto.
5359 (nds32_insert_attributes): Ditto.
5360 (nds32_init_libfuncs): New function.
5361 (TARGET_HAVE_TLS): Define.
5362 (TARGET_INIT_LIBFUNCS): Define.
5363 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5365 (TARGET_ELF): Apply different mcmodel setting.
5366 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5367 been migrated into elf.h and linux.h files.
5368 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5369 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5370 (mcmodel): The content has been migrated into nds32-elf.opt and
5371 nds32-linux.opt files.
5372 * config/nds32/t-elf: New file.
5373 * config/nds32/t-linux: New file.
5375 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5376 Shiva Chen <shiva0217@gmail.com>
5378 * config/nds32/constants.md (unspec_volatile_element): Add
5379 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5380 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5382 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5383 (make_pass_nds32_fp_as_gp): Declare.
5384 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5386 (nds32_asm_function_end_prologue): Remove unused asm output.
5387 (nds32_asm_function_begin_epilogue): Remove unused asm output.
5388 (nds32_asm_file_start): Output necessary fp_as_gp information.
5389 (nds32_option_override): Adjust register usage.
5390 (nds32_expand_prologue): Consider fp_as_gp situation.
5391 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5392 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5395 (simple_return): Ditto.
5396 (omit_fp_begin): Output special directive for fp_as_gp.
5397 (omit_fp_end): Output special directive for fp_as_gp.
5398 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5399 mforbid-fp-as-gp): New options.
5401 2018-06-01 Mark Wielaard <mark@klomp.org>
5403 * dwarf2out.c (dwarf2out_finish): Remove generation of
5404 DW_AT_loclists_base.
5406 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5408 * gimple-ssa-store-merging.c: Include gimple-fold.h.
5409 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5410 (struct merged_store_group): Add bit_insertion field.
5411 (dump_char_array): Use standard hexadecimal format.
5412 (merged_store_group::merged_store_group): Set bit_insertion to false.
5413 (merged_store_group::apply_stores): Use optimal buffer size. Deal
5414 with BIT_INSERT_EXPR stores. Move up code updating the mask and
5415 also print the mask in the dump file.
5416 (pass_store_merging::gate): Minor tweak.
5417 (imm_store_chain_info::coalesce_immediate): Fix wrong association
5418 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
5419 stores with INTEGER_CST stores.
5420 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5421 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5422 and use it throughout. Generate bit insertion sequences if need be.
5423 (pass_store_merging::process_store): Remove redundant condition.
5424 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5426 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
5428 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5429 the 128-bit floating point types. Fix function comment.
5431 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5433 * config/aarch64/aarch64-simd.md
5434 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5436 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5439 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5441 PR tree-optimization/85989
5442 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5444 (backprop::intersect_uses): Check it when deciding whether this
5445 is a backedge reference.
5446 (backprop::process_block): Add each phi to m_visited_phis
5447 after visiting it, then clear it at the end.
5449 2018-06-01 Richard Biener <rguenther@suse.de>
5451 * tree-vectorizer.h (vect_dr_stmt): New function.
5452 (vect_get_load_cost): Adjust.
5453 (vect_get_store_cost): Likewise.
5454 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5455 Use vect_dr_stmt instead of DR_SMTT.
5456 (vect_record_base_alignments): Likewise.
5457 (vect_calculate_target_alignment): Likewise.
5458 (vect_compute_data_ref_alignment): Likewise and make static.
5459 (vect_update_misalignment_for_peel): Likewise.
5460 (vect_verify_datarefs_alignment): Likewise.
5461 (vector_alignment_reachable_p): Likewise.
5462 (vect_get_data_access_cost): Likewise. Pass down
5463 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5464 (vect_get_peeling_costs_all_drs): Likewise.
5465 (vect_peeling_hash_get_lowest_cost): Likewise.
5466 (vect_enhance_data_refs_alignment): Likewise.
5467 (vect_find_same_alignment_drs): Likewise.
5468 (vect_analyze_data_refs_alignment): Likewise.
5469 (vect_analyze_group_access_1): Likewise.
5470 (vect_analyze_group_access): Likewise.
5471 (vect_analyze_data_ref_access): Likewise.
5472 (vect_analyze_data_ref_accesses): Likewise.
5473 (vect_vfa_segment_size): Likewise.
5474 (vect_small_gap_p): Likewise.
5475 (vectorizable_with_step_bound_p): Likewise.
5476 (vect_prune_runtime_alias_test_list): Likewise.
5477 (vect_analyze_data_refs): Likewise.
5478 (vect_supportable_dr_alignment): Likewise.
5479 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5480 (vect_gen_prolog_loop_niters): Likewise.
5481 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5482 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5484 (vect_recog_mask_conversion_pattern): Likewise.
5485 (vect_try_gather_scatter_pattern): Likewise.
5486 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5487 to vect_get_store_cost.
5488 (vect_get_store_cost): Get stmt_info instead of DR.
5489 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5490 (vect_get_load_cost): Get stmt_info instead of DR.
5492 2018-06-01 Richard Biener <rguenther@suse.de>
5495 * gimple-fold.c (var_decl_component_p): Also allow offsetted
5496 vars wrapped in MEM_REFs.
5498 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5500 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5501 Fix subreg tests so that we only return a choice between
5502 GENERAL_REGS and FP_REGS if the original classes included both.
5504 2018-06-01 Richard Biener <rguenther@suse.de>
5507 * tree-ssa-structalias.c (get_function_part_constraint):
5508 Handle NULL fi->decl.
5509 (find_func_aliases_for_call): Properly handle indirect
5510 fi from direct call.
5511 (find_func_clobbers): Likewise.
5512 (ipa_pta_execute): Likewise.
5513 (create_variable_info_for): For functions that are ifunc_resolver
5514 resolve to a varinfo that contains the result of the resolver call.
5515 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5518 2018-05-31 Michael Collison <michael.collison@arm.com>
5520 * config/aarch64/aarch64.md:
5521 (*fix_to_zero_extenddfdi2): New pattern.
5522 * gcc.target/aarch64/fix_extend1.c: New testcase.
5524 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
5528 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5529 and BUILT_IN_STRNCMP_EQ.
5530 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5531 BUILT_IN_STRNCMP_EQ.
5532 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5533 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5534 (gimple_fold_builtin): Likewise.
5535 * tree-ssa-strlen.c (compute_string_length): New function.
5536 (determine_min_obsize): New function.
5537 (handle_builtin_string_cmp): New function to handle calls to
5538 string compare functions.
5539 (strlen_optimize_stmt): Add handling to builtin string compare
5541 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5542 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5543 * tree.c (build_common_builtin_nodes): Add new defines of
5544 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5546 2018-05-31 Jakub Jelinek <jakub@redhat.com>
5549 * bb-reorder.c (pass_partition_blocks::gate): Return false for
5550 functions with naked attribute.
5552 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5554 * config/i386/sse.md (avx_vec_concat<mode>):
5555 Substitute concat_tg_mode mode attribute with xtg_mode.
5556 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5557 (concat_tg_mode): Remove mode attribute.
5559 2018-05-31 Martin Sebor <msebor@redhat.com>
5562 * calls.c (alloc_max_size): Correct a logic error/typo.
5563 Treat excessive arguments as infinite. Warn for invalid arguments.
5564 * doc/invoke.texi (-Walloc-size-larger-than): Update.
5566 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
5569 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5570 and movx for Haswell.
5572 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
5573 Cesar Philippidis <cesar@codesourcery.com>
5576 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5577 when emitting error on private/firstprivate reductions.
5578 * omp-low.c (lower_omp_target): Avoid reference-type processing
5579 on pointers for firstprivate clause.
5581 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5583 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5586 * config/aarch64/aarch64-simd.md
5587 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5588 (aarch64_ld1_x3_<mode>): Likewise
5589 (aarch64_st1x2<VALLDIF:mode>): Likewise
5590 (aarch64_st1_x2_<mode>): Likewise
5591 (aarch64_st1x3<VALLDIF:mode>): Likewise
5592 (aarch64_st1_x3_<mode>): Likewise
5593 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5594 (vld1_s8_x3): Likewise.
5595 (vld1_u16_x3): Likewise.
5596 (vld1_s16_x3): Likewise.
5597 (vld1_u32_x3): Likewise.
5598 (vld1_s32_x3): Likewise.
5599 (vld1_u64_x3): Likewise.
5600 (vld1_s64_x3): Likewise.
5601 (vld1_f16_x3): Likewise.
5602 (vld1_f32_x3): Likewise.
5603 (vld1_f64_x3): Likewise.
5604 (vld1_p8_x3): Likewise.
5605 (vld1_p16_x3): Likewise.
5606 (vld1_p64_x3): Likewise.
5607 (vld1q_u8_x3): Likewise.
5608 (vld1q_s8_x3): Likewise.
5609 (vld1q_u16_x3): Likewise.
5610 (vld1q_s16_x3): Likewise.
5611 (vld1q_u32_x3): Likewise.
5612 (vld1q_s32_x3): Likewise.
5613 (vld1q_u64_x3): Likewise.
5614 (vld1q_s64_x3): Likewise.
5615 (vld1q_f16_x3): Likewise.
5616 (vld1q_f32_x3): Likewise.
5617 (vld1q_f64_x3): Likewise.
5618 (vld1q_p8_x3): Likewise.
5619 (vld1q_p16_x3): Likewise.
5620 (vld1q_p64_x3): Likewise.
5621 (vst1_s64_x2): Likewise.
5622 (vst1_u64_x2): Likewise.
5623 (vst1_f64_x2): Likewise.
5624 (vst1_s8_x2): Likewise.
5625 (vst1_p8_x2): Likewise.
5626 (vst1_s16_x2): Likewise.
5627 (vst1_p16_x2): Likewise.
5628 (vst1_s32_x2): Likewise.
5629 (vst1_u8_x2): Likewise.
5630 (vst1_u16_x2): Likewise.
5631 (vst1_u32_x2): Likewise.
5632 (vst1_f16_x2): Likewise.
5633 (vst1_f32_x2): Likewise.
5634 (vst1_p64_x2): Likewise.
5635 (vst1q_s8_x2): Likewise.
5636 (vst1q_p8_x2): Likewise.
5637 (vst1q_s16_x2): Likewise.
5638 (vst1q_p16_x2): Likewise.
5639 (vst1q_s32_x2): Likewise.
5640 (vst1q_s64_x2): Likewise.
5641 (vst1q_u8_x2): Likewise.
5642 (vst1q_u16_x2): Likewise.
5643 (vst1q_u32_x2): Likewise.
5644 (vst1q_u64_x2): Likewise.
5645 (vst1q_f16_x2): Likewise.
5646 (vst1q_f32_x2): Likewise.
5647 (vst1q_f64_x2): Likewise.
5648 (vst1q_p64_x2): Likewise.
5649 (vst1_s64_x3): Likewise.
5650 (vst1_u64_x3): Likewise.
5651 (vst1_f64_x3): Likewise.
5652 (vst1_s8_x3): Likewise.
5653 (vst1_p8_x3): Likewise.
5654 (vst1_s16_x3): Likewise.
5655 (vst1_p16_x3): Likewise.
5656 (vst1_s32_x3): Likewise.
5657 (vst1_u8_x3): Likewise.
5658 (vst1_u16_x3): Likewise.
5659 (vst1_u32_x3): Likewise.
5660 (vst1_f16_x3): Likewise.
5661 (vst1_f32_x3): Likewise.
5662 (vst1_p64_x3): Likewise.
5663 (vst1q_s8_x3): Likewise.
5664 (vst1q_p8_x3): Likewise.
5665 (vst1q_s16_x3): Likewise.
5666 (vst1q_p16_x3): Likewise.
5667 (vst1q_s32_x3): Likewise.
5668 (vst1q_s64_x3): Likewise.
5669 (vst1q_u8_x3): Likewise.
5670 (vst1q_u16_x3): Likewise.
5671 (vst1q_u32_x3): Likewise.
5672 (vst1q_u64_x3): Likewise.
5673 (vst1q_f16_x3): Likewise.
5674 (vst1q_f32_x3): Likewise.
5675 (vst1q_f64_x3): Likewise.
5676 (vst1q_p64_x3): Likewise.
5678 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5680 * config/msp430/msp430.c (msp430_output_labelref): Prepend
5681 user_label_prefix to name.
5683 * tree-core.h: Update comment about the format of NAME string
5684 passed to handler in attribute_spec.
5686 * config/msp430/msp430.md: Remove erroneous subreg expression from
5687 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5688 zero_extend{q,h}isi2.
5690 2018-05-30 Borislav Petkov <bp@suse.de>
5692 * doc/extend.texi: Document some architecture specific
5693 constraints and sort entries.
5695 2018-05-30 Martin Sebor <msebor@redhat.com>
5698 * builtins.c (expand_builtin_stpcpy_1): New function.
5699 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5700 only if the former succeeds.
5702 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5704 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5707 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5709 * doc/invoke.texi (-flinker-output): Document
5711 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5713 * passes.c (ipa_write_summaries): Only modify statements if body
5715 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5716 incrementally linking.
5717 (ipa_passes): Likewise.
5718 * lto-cgraph.c (lto_output_node): When incrementally linking do not
5719 pass down resolution info.
5720 * common.opt (flag_incremental_link): Update info.
5721 * gcc.c (plugin specs): Turn flinker-output=* to
5722 -plugin-opt=-linker-output-known
5723 * toplev.c (compile_file): Also cut compilation when doing incremental
5725 * flag-types. (enum lto_partition_model): Add
5726 LTO_LINKER_OUTPUT_NOLTOREL.
5727 (invoke.texi): Add -flinker-output docs.
5728 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5729 link same way as WPA; do not stream in dead initializers.
5731 * dwarf2out.c (dwarf2out_die_ref_for_decl,
5732 darf2out_register_external_decl): Support incremental link.
5734 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5736 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5738 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5740 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5741 it down to simple_object_copy_lto_debug_sections.
5742 (run_gcc): Determine incremental LTO link time and configure
5743 lto1 into non-wpa mode, disable renaming of debug sections.
5745 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
5747 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5748 descriptions of various incorrectly documented functions.
5750 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
5753 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5754 address check not strict.
5756 2018-05-30 Richard Biener <rguenther@suse.de>
5758 PR tree-optimization/85964
5759 * tracer.c (better_p): Drop initialized count check, we only
5760 call the function with initialized counts now.
5761 (find_best_successor): Do find a best edge if one
5762 has uninitialized count.
5763 (find_best_predecessor): Likewise. Do BB frequency check only
5764 if count is initialized.
5766 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
5768 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5769 (aarch64_ldrstr_offset_compare): New.
5770 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5771 load/store orderings.
5772 (aarch64_gen_adjusted_ldpstp): Likewise.
5774 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
5776 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5777 Check for subset of GENERAL_REGS and FP_REGS.
5778 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5781 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
5783 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5784 and wi::to_poly_offset. Add the current offset and then check
5785 whether the sum fits, rather than using an unchecked addition of
5786 a checked term. Check for a shwi rather than a uhwi.
5787 * expr.c (get_bit_range): Use tree_to_poly_uint64.
5788 (store_constructor): Use poly_int_tree_p.
5789 (expand_expr_real_1): Likewise.
5790 * function.c (assign_temp): Likewise.
5791 * fold-const.c (const_binop): Use poly_int_tree_p and
5793 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
5795 * ipa-icf-gimple.c (func_checker::compare_operand): Use
5796 to_poly_offset for MEM offsets.
5797 * ipa-icf.c (sem_variable::equals): Likewise.
5798 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5799 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5800 wi::to_poly_offset for BIT_FIELD_REF offsets.
5801 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5803 * var-tracking.c (emit_note_insn_var_location): Use
5804 tree_to_poly_uint64.
5806 2018-05-29 Jim Wilson <jimw@sifive.com>
5808 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
5810 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
5813 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
5814 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
5816 (sse4_1_round<mode>2): Use nonimmediate_operand
5817 for operand 1 predicate.
5819 2018-05-29 Martin Sebor <msebor@redhat.com>
5820 Richard Biener <rguenther@suse.de>
5823 * calls.c (get_size_range): Call determine_value_range instead
5824 of get_value_range..
5825 * tree-vrp.h (determine_value_range): Declared new function.
5826 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
5828 2018-05-29 Richard Biener <rguenther@suse.de>
5830 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
5831 sure to use non-pattern stmts for get_earlier_stmt arguments.
5832 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
5833 called on pattern stmts.
5834 (get_later_stmt): Likewise.
5836 2018-05-29 Martin Liska <mliska@suse.cz>
5838 PR gcov-profile/85759
5839 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
5842 2018-05-29 Jakub Jelinek <jakub@redhat.com>
5844 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
5846 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
5850 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5851 VEC_PACK_FLOAT_EXPR): New tree codes.
5852 * tree-pretty-print.c (op_code_prio): Handle
5853 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5854 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5855 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5856 * tree-inline.c (estimate_operator_cost): Likewise.
5857 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
5858 * fold-const.c (const_binop): Likewise.
5859 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
5860 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5861 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5862 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
5863 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5864 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5865 * expr.c (expand_expr_real_2): Likewise.
5866 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
5867 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
5868 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
5870 * optabs.c (expand_widen_pattern_expr): For
5871 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
5872 sign from result type rather than operand's type.
5873 (expand_binop_directly): For vec_packu_float_optab and
5874 vec_packs_float_optab allow result type to be different from operand's
5876 * optabs-tree.c (optab_for_tree_code): Handle
5877 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5878 VEC_PACK_FLOAT_EXPR. Formatting fixes.
5879 * tree-vect-generic.c (expand_vector_operations_1): Handle
5880 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5881 VEC_PACK_FLOAT_EXPR.
5882 * tree-vect-stmts.c (supportable_widening_operation): Handle
5884 (supportable_narrowing_operation): Handle FLOAT_EXPR.
5885 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
5886 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
5887 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
5888 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
5890 (vec_pack<floatprefix>_float_<mode>): New expander.
5891 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
5893 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
5894 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
5895 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
5896 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
5897 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
5899 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
5900 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
5901 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5902 VEC_PACK_FLOAT_EXPR): Document.
5904 2018-05-29 Richard Biener <rguenther@suse.de>
5906 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
5908 (stmt_vec_info_vec): Make pointer.
5909 (init_stmt_vec_info_vec): Remove.
5910 (free_stmt_vec_info_vec): Likewise.
5911 (set_stmt_vec_info_vec): New function.
5912 (free_stmt_vec_infos): Likewise.
5913 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
5914 (set_vinfo_for_stmt): Likewise.
5915 (get_earlier_stmt): Likewise.
5916 (get_later_stmt): Likewise.
5917 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
5918 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
5919 (vec_info::~vec_info): Free stmt_vec_infos.
5920 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
5921 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
5922 (pass_slp_vectorize::execute): Likewise.
5923 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
5924 (free_stmt_vec_info_vec): Likewise.
5925 (set_stmt_vec_info_vec): New function.
5926 (free_stmt_vec_infos): Likewise.
5927 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
5928 the global stmt_vec_info_vec.
5929 * tree-parloops.c (gather_scalar_reductions): Use
5930 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
5933 2018-05-29 Richard Biener <rguenther@suse.de>
5935 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
5937 2018-05-29 Martin Liska <mliska@suse.cz>
5938 David Malcolm <dmalcolm@redhat.com>
5940 * vec.c (test_reverse): New.
5941 (vec_c_tests): Add new test.
5942 * vec.h (vl_ptr>::reverse): New function.
5944 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
5946 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
5948 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
5951 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5953 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
5955 2018-05-28 Richard Biener <rguenther@suse.de>
5957 PR tree-optimization/85933
5958 * tree-vect-data-refs.c (vect_record_base_alignments): Only
5959 look at stmts marked as vectorizable.
5961 2018-05-28 Richard Biener <rguenther@suse.de>
5963 PR tree-optimization/85934
5964 * tree-vect-generic.c (expand_vector_operations_1): Hoist
5965 vector boolean check before scalar optimization.
5967 2018-05-28 Jakub Jelinek <jakub@redhat.com>
5969 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
5972 2018-05-28 Mark Wielaard <mark@klomp.org>
5974 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
5975 if it is an expression containing a minus sign.
5977 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
5979 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
5981 2018-05-27 Paul Koning <ni1d@arrl.net>
5983 * config/pdp11/pdp11.md (truncsihi2): Remove.
5985 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
5986 Chung-Ju Wu <jasonwucj@gmail.com>
5988 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
5990 (unaligned_store_dw): Ditto.
5991 * config/nds32/nds32-memory-manipulation.c
5992 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
5993 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
5994 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
5995 (emit_setmem_word_loop): Rename to ...
5996 (emit_setmem_doubleword_loop): ... this.
5997 (nds32_gen_dup_4_byte_to_word_value): New function.
5998 (nds32_gen_dup_8_byte_to_double_word_value): New function.
5999 (nds32_expand_setmem_loop): Refine implementation.
6000 (nds32_expand_setmem_loop_v3m): Ditto.
6001 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6004 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6006 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6008 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6010 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6011 (nds32_init_machine_status): Initialize machine->attr_naked_p and
6012 machine->attr_no_prologue_p.
6013 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6014 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6015 (nds32_expand_epilogue): Consider attr_naked_p.
6016 (nds32_expand_epilogue_v3pop): Likewise.
6017 (nds32_can_use_return_insn): Likewise.
6018 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6019 attr_no_prologue_p fields.
6020 * config/nds32/nds32.opt (mret-in-naked-func): New option.
6022 2018-05-27 Jakub Jelinek <jakub@redhat.com>
6025 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6027 * config/i386/sse.md
6028 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6030 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6032 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6034 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6036 (*<floatsuffix>floatv2div2sf2): Rename to ...
6037 (*float<floatunssuffix>v2div2sf2): ... this.
6038 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6039 (float<floatunssuffix>v2div2sf2_mask): ... this.
6040 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6041 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6042 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6044 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6046 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6048 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6050 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6052 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6054 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6055 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6056 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6057 gen_ufix_truncv8dfv8si2.
6058 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6059 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6060 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6061 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6062 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6063 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6064 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6065 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6067 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6071 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6073 2018-05-25 Jim Wilson <jimw@sifive.com>
6075 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6076 * config/riscv/riscv.c (struct machine_function): Add
6077 interrupt_handler_p and attribute_checked_p fields.
6078 (riscv_attribute_table): Add interrupt.
6079 (riscv_interrupt_type_p): New.
6080 (riscv_save_reg_p): Save extra regs for interrupt handler.
6081 (riscv_use_save_libcall): Return false for interrupt handler.
6082 (riscv_first_stack_step): Add forward declaration.
6083 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
6084 for interrupt handler with large frame. Use it for saved reg list.
6085 (riscv_expand_prologue): Move flag_stack_usage_info support to
6086 eliminate duplication.
6087 (riscv_expand_epilogue): Generate mret for interrupt handler.
6088 (riscv_epilogue_uses): New.
6089 (riscv_can_use_return_insn): Return false for interrupt handler.
6090 (riscv_function_ok_for_sibcall): Likewise.
6091 (riscv_set_current_function): Add interrupt handler support.
6092 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6093 * config/riscv/riscv.md (UNSPECV_MRET): New.
6095 (riscv_frflags, riscv_fsflags): Use tab after opcode.
6097 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6099 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
6101 PR tree-optimization/85712
6102 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6103 this candidate has already been replaced in-situ by a copy.
6105 2018-05-25 Jason Merrill <jason@redhat.com>
6107 PR c++/80485 - inline function non-zero address.
6108 * symtab.c (nonzero_address): Check DECL_COMDAT.
6110 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
6113 * config/alpha/alpha.md (ashlsi3): New insn pattern.
6114 (*ashlsi_se): Rename from *ashldi_se. Define as sign
6115 extension of SImode operation. Use const123_operand predicate.
6116 (*saddsi_1): Remove.
6117 (*saddl_se_1): Ditto.
6119 (*ssubl_se_1): Ditto.
6120 * config/alpha/predicates.md (const123_operand): New predicate.
6121 * config/alpha/constraints.md (P): Use IN_RANGE.
6123 2018-05-25 Richard Biener <rguenther@suse.de>
6125 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6127 (ref_maybe_used_by_stmt_p): Likewise.
6128 (stmt_may_clobber_ref_p): Likewise.
6129 (stmt_may_clobber_ref_p_1): Likewise.
6130 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6132 (ref_maybe_used_by_stmt_p): Likewise.
6133 (stmt_may_clobber_ref_p): Likewise.
6134 (stmt_may_clobber_ref_p_1): Likewise.
6135 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6136 the alias oracle to disambiguate DRs with stmts DR analysis
6138 (vect_analyze_data_refs): Do not give up on not analyzable
6139 DRs for BB vectorization. Remove code truncating the dataref
6142 2018-05-25 Jakub Jelinek <jakub@redhat.com>
6145 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6146 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
6147 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6149 2018-05-25 Richard Biener <rguenther@suse.de>
6151 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6152 function, combining stmt data ref gathering and fatal analysis
6154 (vect_analyze_data_refs): Remove now redudnant code and simplify.
6155 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6156 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6157 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6158 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6160 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6162 PR tree-optimization/85720
6163 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6164 SCC if all partitions are builtins.
6165 (version_loop_by_alias_check): New parameter. Generate cancelable
6166 runtime alias check if all partitions are builtins.
6167 (distribute_loop): Update call to above function.
6169 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6171 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6172 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6173 (parm_default_def_partition_arg): Ditto.
6174 (set_parm_default_def_partition): Ditto.
6175 (get_parm_default_def_partitions): Ditto and make it static.
6176 (get_undefined_value_partitions): Ditto and make it static.
6177 (remove_ssa_form): Refactor call to init_var_map here.
6178 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6179 computation for loop region.
6180 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6181 (register_default_def): Delete.
6182 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6183 (parm_default_def_partition_arg): Ditto.
6184 (set_parm_default_def_partition): Ditto.
6185 (get_parm_default_def_partitions): Ditto and make it static.
6186 (get_undefined_value_partitions): Ditto and make it static.
6187 (coalesce_with_default, coalesce_with_default): Update comment.
6188 (create_coalesce_list_for_region): New func factored out from
6189 create_outofssa_var_map.
6190 (populate_coalesce_list_for_outofssa): New func factored out from
6191 create_outofssa_var_map and coalesce_ssa_name.
6192 (create_outofssa_var_map): Delete.
6193 (coalesce_ssa_name): Refactor to support live range computation.
6194 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6195 (get_parm_default_def_partitions): Delete.
6196 (get_undefined_value_partitions): Ditto.
6197 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6198 computation for loop region.
6199 (new_tree_live_info, loe_visit_block): Ditto.
6200 (live_worklist, set_var_live_on_entry): Ditto.
6201 (calculate_live_on_exit, verify_live_on_entry): Ditto.
6202 * tree-ssa-live.h (struct _var_map): New fields.
6203 (init_var_map): Change decl.
6204 (region_contains_p): New.
6206 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6208 * tree-ssa-live.h (live_merge_and_clear): Delete.
6210 2018-05-25 Richard Biener <rguenther@suse.de>
6213 * tree-dump.c (dequeue_and_dump): Remove access to removed
6214 operand 2 of a SWITCH_EXPR.
6216 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6218 * doc/sourcebuild.texi (vect_double_cond_arith): Include
6219 multiplication and division.
6220 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6221 (cond_udiv@var{m}, cond_umod@var{m}): Document.
6222 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6223 (cond_udiv_optab, cond_umod_optab): New optabs.
6224 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6225 (IFN_COND_RDIV): New internal functions.
6226 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6227 TRUNC_MOD_EXPR and RDIV_EXPR.
6228 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6229 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6231 (SVE_INT_BINARY): Include mult.
6232 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6233 (optab, sve_int_op): Handle mult.
6234 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6236 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6237 for SVE_INT_BINARY_SD.
6239 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6241 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6242 (optab, sve_int_op): Handle div and udiv.
6243 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6244 for SVE_INT_BINARY_SD.
6245 (*<optab><mode>3): New insn for the same.
6247 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6249 * tree-vect-patterns.c: Include predict.h.
6250 (vect_recog_divmod_pattern): Restrict check for division support
6251 to when optimizing for size.
6253 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6255 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6256 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6257 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6258 (gimple_match_op::set_op): Likewise.
6259 (gimple_resimplify4): Declare.
6260 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6261 (expr::gen_transform): Likewise.
6262 (decision_tree::gen): Generate a simplification routine for 4 operands.
6263 * gimple-match-head.c (gimple_simplify): Add an overload for
6264 4 operands. In the top-level function, handle up to 4 call
6265 arguments and call gimple_resimplify4.
6266 (gimple_resimplify4): New function.
6267 (build_call_internal): Pass a fourth operand.
6268 (maybe_push_to_seq): Likewise.
6269 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6270 Fold VEC_COND_EXPRs of an operation and a default value into
6271 an IFN_COND_* function if possible.
6272 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6274 (SVE_COND_FP_BINARY): Include them.
6275 (optab, sve_fp_op): Handle them.
6276 (SVE_INT_BINARY_REV): New code iterator.
6277 (SVE_COND_FP_BINARY_REV): New int iterator.
6278 (commutative): New int attribute.
6279 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6281 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6283 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6284 (*cond_<optab><mode>): New patterns for reversed operands.
6286 2018-05-25 Richard Biener <rguenther@suse.de>
6288 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6289 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6290 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6291 (STMT_VINFO_GROUPED_ACCESS): Adjust.
6292 * tree-vect-data-refs.c (everywhere): Adjust users.
6293 * tree-vect-loop.c (everywhere): Likewise.
6294 * tree-vect-slp.c (everywhere): Likewise.
6295 * tree-vect-stmts.c (everywhere): Likewise.
6296 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6298 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6300 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6302 (gcc_cv_as_section_exclude): ... this.
6303 Try Solaris as #exclude syntax.
6304 * configure: Regenerate.
6305 * config.in: Regenerate.
6306 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6308 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6309 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6311 * varasm.c (default_elf_asm_named_section): Don't check if
6312 HAVE_GAS_SECTION_EXCLUDE is defined.
6314 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6316 * doc/md.texi: Update the documentation of the cond_* optabs
6317 to mention the new final operand. Fix GET_MODE_NUNITS call.
6318 Describe the scalar case too.
6319 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6320 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6322 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6323 (get_conditional_internal_fn): Update comment.
6324 * tree-vect-loop.c (vectorizable_reduction): Pass the original
6325 accumulator value as a final argument to conditional functions.
6326 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6327 a define_expand and add an "else" operand. Assert for now that
6328 the else operand is equal to operand 2. Use SVE_INT_BINARY and
6329 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6330 (*cond_<optab><mode>): New patterns.
6331 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6332 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6333 (UNSPEC_COND_EOR): Delete.
6334 (optab): Remove associated mappings.
6335 (SVE_INT_BINARY): New code iterator.
6336 (sve_int_op): Remove int attribute and add "minus" to the code
6338 (SVE_COND_INT_OP): Delete.
6339 (SVE_COND_FP_OP): Rename to...
6340 (SVE_COND_FP_BINARY): ...this.
6342 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6344 * optabs.c (can_reuse_operands_p): New function.
6345 (maybe_legitimize_operands): Try to reuse the results for
6348 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6350 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6351 Add {q} suffix to insn mnemonic.
6353 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6355 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6356 (msp430_warn_func_return): New.
6358 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
6360 * fold-const.c (tree_nonzero_bits): New function.
6361 * fold-const.h (tree_nonzero_bits): Likewise.
6362 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6363 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6365 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6369 * varasm.c (assemble_alias): Check ifunc_resolver only on
6372 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6375 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6376 when memory input operand is handled.
6378 2018-05-24 Luis Machado <luis.machado@linaro.org>
6380 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6382 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6384 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6386 * match.pd: Delay FMA folds until after vectorization.
6388 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
6391 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6392 address check not strict.
6394 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6396 * gimple-match.h (gimple_match_op): New class.
6397 (mprts_hook): Replace parameters with a gimple_match_op *.
6398 (maybe_build_generic_op): Likewise.
6399 (gimple_simplified_result_is_gimple_val): Replace parameters with
6400 a const gimple_match_op *.
6401 (gimple_simplify): Replace code_helper * and tree * parameters with
6402 a gimple_match_op * parameter.
6403 (gimple_resimplify1): Replace code_helper *, tree and tree *
6404 parameters with a gimple_match_op * parameter.
6405 (gimple_resimplify2): Likewise.
6406 (gimple_resimplify3): Likewise.
6407 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6408 parameters with a gimple_match_op * parameter.
6409 * gimple-match-head.c (gimple_simplify): Change prototypes of
6410 auto-generated functions to take a gimple_match_op * instead of
6411 separate code_helper * and tree * parameters. Make the same
6412 change in the top-level overload and update calls to the
6413 gimple_resimplify routines. Update calls to the auto-generated
6414 functions and to maybe_push_res_to_seq in the publicly-facing
6415 operation-specific gimple_simplify overloads.
6416 (gimple_match_op::MAX_NUM_OPS): Define.
6417 (gimple_resimplify1): Replace rcode and ops with a single res_op
6418 parameter. Update call to gimple_simplify.
6419 (gimple_resimplify2): Likewise.
6420 (gimple_resimplify3): Likewise.
6421 (mprts_hook): Replace parameters with a gimple_match_op *.
6422 (maybe_build_generic_op): Likewise.
6423 (build_call_internal): Replace type, nargs and ops with
6424 a gimple_match_op *.
6425 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6426 with a single gimple_match_op *. Update calls to mprts_hook,
6427 build_call_internal and gimple_simplified_result_is_gimple_val.
6428 Factor out code that is common to the tree_code and combined_fn cases.
6429 * genmatch.c (expr::gen_transform): Replace tem_code and
6430 tem_ops with a gimple_match_op called tem_op. Update calls
6431 to the gimple_resimplify functions and maybe_push_res_to_seq.
6432 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6433 res_ops. Update call to the gimple_resimplify functions.
6434 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6435 (decision_tree::gen): Make the functions take a gimple_match_op *
6436 called res_op instead of separate res_code and res_ops parameters.
6437 Update call accordingly.
6438 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6439 and ops with a single res_op parameter. Update calls to
6440 maybe_build_generic_op and maybe_push_res_to_seq.
6441 (fold_stmt_1): Update calls to gimple_simplify and
6442 replace_stmt_with_simplification.
6443 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6444 and gimple_simplified_result_is_gimple_val.
6445 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6447 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6448 with a gimple_match_op *.
6449 (vn_nary_build_or_lookup): Likewise. Update call to
6450 vn_nary_build_or_lookup_1.
6451 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6452 gimple_match_op *. Update calls to the gimple_resimplify routines
6453 and to gimple_simplified_result_is_gimple_val.
6454 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6455 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6456 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6457 (visit_nary_op): Likewise.
6458 (visit_reference_op_load): Likewise.
6460 2018-05-23 Luis Machado <luis.machado@linaro.org>
6462 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6463 modifier for printing the step amount.
6465 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
6468 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6471 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
6473 * doc/sourcebuild.texi (Endianness): New subsubsection.
6475 2018-05-23 Luis Machado <luis.machado@linaro.org>
6477 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6478 <prefetch_dynamic_strides>: New const bool field.
6479 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6480 prefetch_dynamic_strides.
6481 (exynosm1_prefetch_tune): Likewise.
6482 (thunderxt88_prefetch_tune): Likewise.
6483 (thunderx_prefetch_tune): Likewise.
6484 (thunderx2t99_prefetch_tune): Likewise.
6485 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6487 (aarch64_override_options_internal): Update to set
6488 PARAM_PREFETCH_DYNAMIC_STRIDES.
6489 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6490 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6491 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6492 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6493 prefetch-dynamic-strides setting.
6495 2018-05-23 Luis Machado <luis.machado@linaro.org>
6497 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6498 <minimum_stride>: New const int field.
6499 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6500 minimum_stride field defaulting to -1.
6501 (exynosm1_prefetch_tune): Likewise.
6502 (thunderxt88_prefetch_tune): Likewise.
6503 (thunderx_prefetch_tune): Likewise.
6504 (thunderx2t99_prefetch_tune): Likewise.
6505 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6506 <default_opt_level>: Set to 3.
6507 (aarch64_override_options_internal): Update to set
6508 PARAM_PREFETCH_MINIMUM_STRIDE.
6509 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6510 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6511 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6512 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6513 stride is constant and is below the minimum stride threshold.
6515 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6517 * config/arm/arm-cpus.in (mode26): Delete.
6518 (armv4): Delete mode26 reference.
6519 * config/arm/arm.c (arm_configure_build_target): Delete use of
6522 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6524 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6526 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6527 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
6529 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
6530 (floatunsdidf2): Ditto.
6532 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6534 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6535 (fixuns_trunc<mode>si2_avx512f): Ditto.
6536 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6537 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6538 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6540 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6542 PR rtl-optimization/79985
6543 * df-scan.c (df_insn_refs_collect): Remove special case for
6544 global registers and asm statements.
6546 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6548 * extend.texi (Global Register Variables): Rewrite the bullet list.
6549 Note that the register is available for allocation. Note that access
6550 via inline asm must use constraints. Add note about async-signal
6551 handlers. Remove paragraph about automagic register selection.
6553 2018-05-23 Richard Biener <rguenther@suse.de>
6555 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6556 of fixed offset from memset VN.
6558 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
6560 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6562 (alloc_cand_and_find_basis): Initialize first_interp field.
6563 (slsr_process_mul): Modify first_interp field.
6564 (slsr_process_add): Likewise.
6565 (slsr_process_cast): Modify first_interp field for each new
6567 (slsr_process_copy): Likewise.
6568 (dump_candidate): Dump first_interp field.
6569 (replace_mult_candidate): Process all interpretations, not just
6571 (replace_rhs_if_not_dup): Likewise.
6572 (replace_one_candidate): Likewise.
6574 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
6576 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6578 (aarch64_needs_frame_chain): New function.
6579 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6581 2018-05-23 Sudakshina Das <sudi.das@arm.com>
6584 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6585 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6586 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6587 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6588 as true for strict-align.
6589 (aarch64_can_inline_p): Perform checks even when callee has no
6590 attributes to check for strict alignment.
6591 * doc/extend.texi (AArch64 Function Attributes): Document
6593 * doc/invoke.texi: (AArch64 Options): Likewise.
6595 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
6597 PR tree-optimization/85853
6598 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6599 the handling of the root of the node to...
6600 (vect_slp_analyze_node_operations_1): ...this new function,
6601 and run the whole thing with the child nodes' def types
6602 set according to their SLP node's def type.
6604 2018-05-23 Richard Biener <rguenther@suse.de>
6607 * tree-data-ref.c (create_runtime_alias_checks): Defer
6608 and ignore overflow warnings.
6610 2018-05-23 Yury Gribov <tetra2005@gmail.com>
6612 PR tree-optimization/85822
6613 * tree-vrp.c (is_masked_range_test): Fix handling of negative
6616 2018-05-23 Richard Biener <rguenther@suse.de>
6618 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6619 memset constants via native_interpret_expr.
6621 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
6624 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6626 (cgraph_node::create_alias): Likewise.
6627 (cgraph_node::get_availability): Check ifunc_resolver instead
6628 of looking up ifunc attribute.
6629 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6630 * varasm.c (do_assemble_alias): Likewise.
6631 (assemble_alias): Likewise.
6632 (default_binds_local_p_3): Likewise.
6633 * cgraph.h (cgraph_node): Add ifunc_resolver.
6634 (cgraph_node::only_called_directly_or_aliased_p): Return false
6636 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6638 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6639 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6640 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6641 instead of looking up ifunc attribute.
6643 2018-05-22 Luis Machado <luis.machado@linaro.org>
6645 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6647 2018-05-22 Martin Sebor <msebor@redhat.com>
6650 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6651 only when expasion succeeds.
6652 (expand_builtin_strcmp): Same.
6653 (expand_builtin_strncmp): Same.
6655 2018-05-22 Martin Sebor <msebor@redhat.com>
6657 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6659 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6660 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6662 * config/aarch64/aarch64-ldpstp.md: Replace uses of
6663 aarch64_mem_pair_operand with memory_operand and delete operand swapping
6665 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6666 Add check for legitimate_address.
6667 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6668 (aarch64_swap_ldrstr_operands): New.
6669 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6672 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6673 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6675 * config/aarch64/aarch64.md: New patterns to generate stp
6677 (store_pair_sw, store_pair_dw): New patterns to generate stp for
6678 single words and double words.
6679 (load_pair_sw, load_pair_dw): Likewise.
6680 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6682 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6684 * config/aarch64/aarch64-ldpstp.md: Modify peephole
6685 for different mode ldpstp and add peephole for merged zero stores.
6687 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6689 (aarch64_gen_store_pair): Rename calls to match new patterns.
6690 (aarch64_gen_load_pair): Rename calls to match new patterns.
6691 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6692 (load_pair<DREG:mode><DREG2:mode>): ... This.
6693 (store_pair<mode>): Rename to...
6694 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6695 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6697 (V_INT_EQUIV): Handle SImode.
6698 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6701 2018-05-22 Martin Sebor <msebor@redhat.com>
6704 * calls.c (maybe_warn_nonstring_arg): Use string length to set
6705 or ajust the presumed bound on an operation to avoid unnecessary
6708 2018-05-22 Martin Sebor <msebor@redhat.com>
6710 PR tree-optimization/85826
6711 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6712 assuming that a DECL necesarily has a constant size.
6714 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
6717 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6719 2018-05-22 Richard Biener <rguenther@suse.de>
6721 PR tree-optimization/85834
6722 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6723 non-constant and non-zero memset arguments.
6725 2018-05-22 Martin Liska <mliska@suse.cz>
6728 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6730 2018-05-22 Richard Biener <rguenther@suse.de>
6732 PR tree-optimization/85863
6733 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6734 comparisons when vectype is specified.
6735 (vectorizable_condition): Do not specify vectype for
6736 vect_is_simple_cond when SLP vectorizing.
6738 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
6741 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6742 define __ibm128 as long double.
6743 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6744 as a distinct type when IEEE 128-bit support is enabled.
6745 (init_float128_ieee): Fix up conversions between IFmode and IEEE
6746 128-bit types to use the correct functions.
6747 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6748 convert between 128-bit floating point types that have different
6749 modes but the same representation, instead of using gen_lowpart to
6751 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6753 (IFKF_reg): New attributes to give the register constraints for
6755 (extend<mode>tf2_internal): New insns to mark an explicit
6756 conversion between 128-bit floating point types that have a
6757 different mode but share the same representation.
6759 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
6761 PR tree-optimization/85814
6762 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6763 a null return from get_strinfo when unsharing the next
6764 strinfo in the chain.
6766 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6769 * varasm.c (weak_finish): Clean up weak_decls.
6771 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6773 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6774 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6775 UNSPEC_UADALP values.
6776 * config/aarch64/iterators.md (ABAL): New int iterator.
6779 (sur): Add mappings for the above.
6780 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6782 (aarch64_<sur>abal<mode>_4): Likewise.
6783 (aarch64_<sur>adalp<mode>_3): Likewise.
6784 (<sur>sadv16qi): New define_expand.
6786 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
6788 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6789 (*movdf_internal): Ditto.
6790 (*rcpsf2_sse): Ditto.
6791 (*rsqrtsf2_sse): Ditto.
6792 (*sqrt<mode>2_sse): Ditto.
6794 2018-05-21 Tamar Christina <tamar.christina@arm.com>
6796 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6798 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6799 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6800 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6801 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6803 * config/aarch64/arm_neon.h: Likewise.
6804 * config/aarch64/iterators.md (VQ_I): New.
6806 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
6808 * config.gcc: Add arc/t-multilib-linux to tmake_file for
6810 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
6813 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6815 * config/nds32/constraints.md (S): New constraint.
6816 * config/nds32/nds32.md (call_internal): Use constraint S.
6817 (call_value_internal): Likewise.
6818 (sibcall_internal): Likewise.
6819 (sibcall_value_internal): Likewise.
6821 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6822 Chung-Ju Wu <jasonwucj@gmail.com>
6824 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
6827 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6828 Chung-Ju Wu <jasonwucj@gmail.com>
6830 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
6831 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
6832 (nds32_rtx_costs_impl): Simplify.
6833 (nds32_address_cost_impl): Simplify.
6834 (nds32_init_rtx_costs): New function.
6835 (nds32_rtx_costs_speed_prefer): Likewise.
6836 (nds32_rtx_costs_size_prefer): Likewise.
6837 (nds32_address_cost_speed_prefer): Likewise.
6838 (nds32_address_cost_speed_fwprop): Likewise.
6839 (nds32_address_cost_size_prefer): Likewise.
6840 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
6841 * config/nds32/nds32.c (nds32_option_override): Use
6842 nds32_init_rtx_costs function.
6844 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6846 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
6847 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
6848 (TARGET_PIPELINE_N8): Likewise.
6849 (TARGET_PIPELINE_N10): Likewise.
6850 (TARGET_PIPELINE_N13): Likewise.
6851 (TARGET_PIPELINE_GRAYWOLF): Likewise.
6853 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
6855 * config/nds32/nds32-fpu.md: Update copyright year.
6857 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6859 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
6861 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6863 * config/nds32/nds32.c
6864 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
6865 * config/nds32/nds32.opt (minline-asm-r15): New option.
6867 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6869 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
6871 * config/nds32/nds32.md (abssi2): New pattern.
6873 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
6875 * config/i386/i386.md (rex64namesuffix): New mode attribute.
6876 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
6877 Merge insn pattern from sse_cvtsi2ss<round_name> and
6878 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
6879 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
6880 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
6881 using SWI48 mode iterator.
6882 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
6883 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
6884 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
6885 pattern from sse_cvttss2si<round_saeonly_name>
6886 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
6887 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
6888 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
6889 using SWI48 mode iterator.
6890 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
6891 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
6892 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
6893 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
6894 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
6895 using SWI48 mode iterator.
6896 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
6897 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
6898 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
6899 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
6900 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
6901 SWI48 mode iterator.
6902 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
6903 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
6904 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
6905 pattern from sse_cvttsd2si<round_saeonly_name>
6906 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
6908 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6910 * config/nds32/nds32-md-auxiliary.c
6911 (nds32_valid_smw_lwm_base_p): Refine.
6912 (nds32_output_smw_single_word): Refine.
6913 (nds32_output_smw_double_word): New.
6914 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
6916 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6918 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
6919 (nds32_output_stack_pop): Refine.
6920 (nds32_expand_unaligned_load): Refine.
6921 (nds32_expand_unaligned_store): Refine.
6923 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6924 Chung-Ju Wu <jasonwucj@gmail.com>
6926 * config/nds32/constants.md: Add TP_REGNUM constant.
6927 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
6928 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
6930 * config/nds32/nds32-doubleword.md: Consider flag_pic.
6931 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
6932 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
6933 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
6934 and PIC code generation.
6935 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
6937 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
6939 * config/nds32/nds32.md: Support TLS and PIC.
6940 * config/nds32/nds32.c: Support TLS and PIC.
6941 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
6942 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
6945 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6947 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
6948 mode with E_ prefix.
6950 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6951 Chung-Ju Wu <jasonwucj@gmail.com>
6953 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
6954 * config/nds32/nds32-md-auxiliary.c
6955 (symbolic_reference_mentioned_p): New.
6956 (nds32_legitimize_ict_address): New.
6957 (nds32_expand_ict_move): New.
6958 (nds32_indirect_call_referenced_p): New.
6959 (nds32_symbol_binds_local_p): Delete.
6960 (nds32_long_call_p): Modify.
6961 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
6962 * config/nds32/nds32-protos.h
6963 (symbolic_reference_mentioned_p): Declare.
6964 (nds32_legitimize_ict_address): Declare.
6965 (nds32_expand_ict_move): Declare.
6966 (nds32_indirect_call_referenced_p): Declare.
6967 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
6968 (nds32_relax_group): Use nds32_ict_const_p as condition.
6969 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
6970 (nds32_asm_file_start): Output ict_model directive in asm code.
6971 (nds32_legitimate_address_p): Consider indirect call.
6972 (nds32_print_operand): Consider indirect call.
6973 (nds32_print_operand_address): Consider indirect call.
6974 (nds32_insert_attributes): Handle "indirect_call" attribute.
6975 (TARGET_LEGITIMATE_ADDRESS_P): Define.
6976 (TARGET_LEGITIMATE_CONSTANT_P): Define.
6977 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
6978 (TARGET_DELEGITIMIZE_ADDRESS): Define.
6979 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
6980 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
6981 (TARGET_ICT_MODEL_SMALL): Define.
6982 (TARGET_ICT_MODEL_LARGE): Define.
6983 * config/nds32/nds32.md (movsi): Consider ict model.
6984 (call, call_value): Consider ict model.
6985 (sibcall, sibcall_value): Consider ict model.
6986 * config/nds32/nds32.opt (mict-model): New option.
6987 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
6990 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
6991 Monk Chiang <sh.chiang04@gmail.com>
6992 Jim Wilson <jimw@sifive.com>
6994 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
6995 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
6996 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
6997 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
6998 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
6999 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7000 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7001 compute save_libcall_adjustment properly.
7002 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7003 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7004 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7005 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7006 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7007 (ABI_SPEC): Handle mabi=ilp32e.
7008 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7009 (RVE): Add RVE mask.
7010 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7011 <-march>: Add rv32e as an example.
7013 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
7016 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7017 (intra_create_variable_infos): Handle C++ constructors.
7019 2018-05-18 Martin Liska <mliska@suse.cz>
7021 * passes.def: Remove a redundant pass.
7023 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
7026 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7028 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7030 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7032 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7034 (armv2, armv2a, armv3, armv3m): Delete architectures.
7035 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7036 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7037 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7039 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7040 (*mulsidi3adddi): Likewise.
7041 (mulsidi3): Likewise.
7042 (*mulsidi3_nov6): Likewise.
7043 (umulsidi3): Likewise.
7044 (umulsidi3_nov6): Likewise.
7045 (umaddsidi4): Likewise.
7046 (*umulsidi3adddi): Likewise.
7047 (smulsi3_highpart): Likewise.
7048 (*smulsi3_highpart_nov6): Likewise.
7049 (umulsi3_highpart): Likewise.
7050 (*umulsi3_highpart_nov6): Likewise.
7051 * config/arm/arm.h (arm_arch3m): Delete.
7052 * config/arm/arm.c (arm_arch3m): Delete.
7053 (arm_option_override_internal): Update armv3-related comment.
7054 (arm_configure_build_target): Delete use of isa_bit_mode32.
7055 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7056 (arm_rtx_costs_internal): Delete check of arm_arch3m.
7057 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7059 (mulusa3): Likewise.
7060 * config/arm/arm-protos.h (arm_arch3m): Delete.
7061 * config/arm/arm-tables.opt: Regenerate.
7062 * config/arm/arm-tune.md: Likewise.
7063 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7064 deleted architectures.
7066 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7068 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7069 (armv5t, armv5te): New features.
7070 (ARMv5, ARMv5e): Delete fgroups.
7071 (ARMv5t, ARMv5te): Adjust for above changes.
7073 (armv5, armv5e): Delete arches.
7074 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7076 (*call_reg_arm): Likewise.
7077 (*call_value_reg_armv5): Likewise.
7078 (*call_value_reg_arm): Likewise.
7079 (*call_symbol): Likewise.
7080 (*call_value_symbol): Likewise.
7081 (*sibcall_insn): Likewise.
7082 (*sibcall_value_insn): Likewise.
7084 (prefetch): Likewise.
7085 (define_split and define_peephole2 dependent on arm_arch5):
7087 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7089 (TARGET_ARM_QBIT): Likewise.
7090 (TARGET_DSP_MULTIPLY): Likewise.
7091 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7092 (arm_arch5, arm_arch5e): Delete.
7093 (arm_arch5t, arm_arch5te): Declare.
7094 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7095 (arm_arch5t): Declare.
7096 (arm_option_reconfigure_globals): Update for the above.
7097 (arm_options_perform_arch_sanity_checks): Update comment, replace
7098 use of arm_arch5 with arm_arch5t.
7099 (use_return_insn): Likewise.
7100 (arm_emit_call_insn): Likewise.
7101 (output_return_instruction): Likewise.
7102 (arm_final_prescan_insn): Likewise.
7103 (arm_coproc_builtin_available): Likewise.
7104 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7105 arm_arch5e with arm_arch5t and arm_arch5te.
7106 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7107 (arm_arch5t, arm_arch5te): Declare.
7108 * config/arm/arm-tables.opt: Regenerate.
7109 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7110 * config/arm/t-multilib: Likewise.
7111 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7112 instead of arm_arch5.
7113 (*call_reg_thumb1): Likewise.
7114 (*call_value_reg_thumb1_v5): Likewise.
7115 (*call_value_reg_thumb1): Likewise.
7116 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7118 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7120 2018-05-18 Martin Liska <mliska@suse.cz>
7122 PR gcov-profile/84846
7123 * doc/gcov.texi: Document -t option of gcov tool.
7125 2018-05-18 Martin Liska <mliska@suse.cz>
7127 PR gcov-profile/84846
7128 * gcov.c (print_usage): Add new -t option.
7129 (process_args): Handle the option.
7130 (generate_results): Use stdout as output when requested by
7133 2018-05-18 Martin Liska <mliska@suse.cz>
7135 PR gcov-profile/84846
7136 * coverage.c (coverage_init): Write PWD to .gcno file.
7137 * doc/gcov.texi: Document how working directory is printed.
7138 * gcov-dump.c (dump_gcov_file): Print PWD.
7139 * gcov.c (output_intermediate_file): Likewise.
7140 (read_graph_file): Read PWD string.
7141 (output_lines): Print PWD.
7143 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7146 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7147 for retval and return false if all args to phi are zero.
7149 2018-05-18 Richard Biener <rguenther@suse.de>
7151 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7153 (evrp_dom_walker::before_dom_children): Call it.
7155 2018-05-18 Richard Biener <rguenther@suse.de>
7157 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7158 results when processing array refs with variable index.
7160 2018-05-18 Toon Moene <toon@moene.org>
7162 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7163 directly after that of -floop-interchange. Indicate that both
7164 options are enabled by default when specifying -O3.
7166 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7168 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7169 iterator. Delete separate integer-mode vec_set<mode> expander.
7170 (aarch64_simd_vec_setv2di): Delete.
7171 (vec_setv2di): Delete.
7172 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7173 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
7174 the "w, r" alternative.
7176 2018-05-18 Martin Liska <mliska@suse.cz>
7178 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7179 * tree-pass.h (make_pass_lower_switch_O0): New function.
7180 * tree-switch-conversion.c (node_has_low_bound): Remove.
7181 (node_has_high_bound): Likewise.
7182 (node_is_bounded): Likewise.
7183 (class pass_lower_switch): Make it a template type and create
7185 (pass_lower_switch::execute): Add template argument.
7186 (make_pass_lower_switch): New function.
7187 (make_pass_lower_switch_O0): New function.
7188 (do_jump_if_equal): Remove.
7189 (emit_case_nodes): Simplify to just handle all 3 cases and leave
7190 all the hard work to tree optimization passes.
7192 2018-05-18 Martin Liska <mliska@suse.cz>
7194 * dbgcnt.c (limit_low): Renamed from limit.
7195 (limit_high): New variable.
7196 (dbg_cnt_is_enabled): Check for upper limit.
7197 (dbg_cnt): Adjust dumping.
7198 (dbg_cnt_set_limit_by_index): Add new argument for high
7200 (dbg_cnt_set_limit_by_name): Likewise.
7201 (dbg_cnt_process_single_pair): Parse new format.
7202 (dbg_cnt_process_opt): Use strtok.
7203 (dbg_cnt_list_all_counters): Remove 'value' and add
7205 * doc/invoke.texi: Document changes.
7207 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
7209 * doc/sourcebuild.texi (scalar_all_fma): Document.
7210 * tree.def (FMA_EXPR): Delete.
7211 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7212 * internal-fn.c (ternary_direct): New macro.
7213 (expand_ternary_optab_fn): Likewise.
7214 (direct_ternary_optab_supported_p): Likewise.
7215 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7216 * builtins.c (fold_builtin_fma): Delete.
7217 (fold_builtin_3): Don't call it.
7218 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7219 * expr.c (expand_expr_real_2): Likewise.
7220 * fold-const.c (operand_equal_p): Likewise.
7221 (fold_ternary_loc): Likewise.
7222 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7223 * gimple.c (DEFTREECODE): Likewise.
7224 * gimplify.c (gimplify_expr): Likewise.
7225 * optabs-tree.c (optab_for_tree_code): Likewise.
7226 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7227 * tree-eh.c (operation_could_trap_p): Likewise.
7228 (stmt_could_throw_1_p): Likewise.
7229 * tree-inline.c (estimate_operator_cost): Likewise.
7230 * tree-pretty-print.c (dump_generic_node): Likewise.
7231 (op_code_prio): Likewise.
7232 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7233 * tree-ssa-operands.c (get_expr_operands): Likewise.
7234 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7235 * fold-const-call.h (fold_fma): Delete.
7236 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7237 CFN_FNMA and CFN_FNMS.
7239 * genmatch.c (combined_fn): New enum.
7240 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7241 (commutative_op): New function.
7242 (commutate): Use it. Handle more than 2 operands.
7243 (dt_operand::gen_gimple_expr): Use commutative_op.
7244 (parser::parse_expr): Allow :c to be used with non-binary
7245 operators if the commutative operand is known.
7246 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7247 CFN_FMS, CFN_FNMA and CFN_FNMS.
7248 (backprop::process_assign_use): Remove FMA_EXPR handling.
7249 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7250 (gen_hsa_fma): New function.
7251 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7252 IFN_FNMA and IFN_FNMS.
7253 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7254 * gimple-fold.h (follow_all_ssa_edges): Declare.
7255 * gimple-fold.c (follow_all_ssa_edges): New function.
7256 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7257 gimple_build interface and use follow_all_ssa_edges to fold the result.
7258 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7259 instead of checking for optabs directly.
7260 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7261 rather than FMA_EXPRs.
7262 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7263 call to IFN_FMA instead of an FMA_EXPR.
7265 2018-05-17 Jim Wilson <jimw@sifive.com>
7267 * expr.c (do_tablejump): When converting index to Pmode, if we have a
7268 sign extended promoted subreg, and the range does not have the sign bit
7269 set, then do a sign extend.
7271 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7272 test, check for sign extended subreg and/or constant operands, and
7273 do a sign extend in that case.
7275 2018-05-17 Steve Ellcey <sellcey@cavium.com>
7277 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7278 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7280 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7281 Change logics_shift_reg to logics_shift_imm.
7282 (thunderx2t99_fp_loadpair_basic): Delete.
7283 (thunderx2t99_fp_storepair_basic): Delete.
7284 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7285 (thunderx2t99_asimd_polynomial): Delete.
7286 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7287 and neon_fp_mul_d_scalar_q.
7288 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7289 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7290 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7291 (thunderx2t99_asimd_lut): Add missing tbl types.
7292 (thunderx2t99_asimd_ext): Delete.
7293 (thunderx2t99_asimd_load1_1_mult): Delete.
7294 (thunderx2t99_asimd_load1_2_mult): Delete.
7295 (thunderx2t99_asimd_load1_ldp): New.
7296 (thunderx2t99_asimd_load1): New.
7297 (thunderx2t99_asimd_load2): Add missing *load2* types.
7298 (thunderx2t99_asimd_load3): New.
7299 (thunderx2t99_asimd_load4): New.
7300 (thunderx2t99_asimd_store1_1_mult): Delete.
7301 (thunderx2t99_asimd_store1_2_mult): Delete.
7302 (thunderx2t99_asimd_store2_mult): Delete.
7303 (thunderx2t99_asimd_store2_onelane): Delete.
7304 (thunderx2t99_asimd_store_stp): New.
7305 (thunderx2t99_asimd_store1): New.
7306 (thunderx2t99_asimd_store2): New.
7307 (thunderx2t99_asimd_store3): New.
7308 (thunderx2t99_asimd_store4): New.
7310 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
7312 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7313 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
7315 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
7316 Segher Boessenkool <segher@kernel.crashing.org>
7319 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7322 2018-05-17 Richard Biener <rguenther@suse.de>
7324 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7325 for pruning loop and prune defs feeding only already visited PHIs.
7327 2018-05-17 Richard Biener <rguenther@suse.de>
7329 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7331 2018-05-17 Bin Cheng <bin.cheng@arm.com>
7332 Richard Biener <rguenther@suse.de>
7334 PR tree-optimization/85793
7335 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7336 for VMAT_ELEMENTWISE.
7338 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7340 * internal-fn.h (lookup_internal_fn): Declare
7341 * internal-fn.c (lookup_internal_fn): New function.
7342 * gimple.c (gimple_build_call_from_tree): Handle calls to
7344 * gimple-pretty-print.c (dump_gimple_call): Print "." before
7345 internal function names.
7346 * tree-pretty-print.c (dump_generic_node): Likewise.
7347 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7349 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7351 * gimple-fold.h (gimple_build): Make the function forms take
7352 combined_fn rather than built_in_function.
7353 (gimple_simplify): Likewise.
7354 * gimple-match-head.c (gimple_simplify): Likewise.
7355 * gimple-fold.c (gimple_build): Likewise.
7356 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7357 rather than gimple_build_call_internal.
7358 (get_initial_defs_for_reduction): Likewise.
7359 (vect_create_epilog_for_reduction): Likewise.
7360 (vectorizable_live_operation): Likewise.
7362 2018-05-17 Martin Liska <mliska@suse.cz>
7364 * gimple-ssa-sprintf.c (format_directive): Do not use
7365 space in between 'G_' and '('.
7367 2018-05-17 Jakub Jelinek <jakub@redhat.com>
7370 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7371 even if the mask is not all ones.
7374 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7376 (ix86_gimple_fold_builtin): Likewise.
7379 * config/i386/i386.c: Include tree-vector-builder.h.
7380 (ix86_vector_shift_count): New function.
7381 (ix86_fold_builtin): Fold shift builtins by scalar count.
7382 (ix86_gimple_fold_builtin): Likewise.
7384 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7385 _mm512_setzero): New intrinsics.
7387 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
7388 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7390 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7391 code generation for cases where splatting a value is not useful.
7392 * simplify-rtx.c (simplify_ternary_operation): Simplify
7393 vec_merge across a vec_duplicate and a paradoxical subreg forming
7394 a vector mode to a vec_concat.
7396 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
7398 * config.gcc: Support "goldmont-plus".
7399 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7401 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7402 PROCESSOR_GOLDMONT_PLUS.
7403 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7404 (processor_target_table): Add "goldmont-plus".
7405 (PTA_GOLDMONT_PLUS): Define.
7406 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7407 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7408 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7409 (fold_builtin_cpu): Add "goldmont-plus".
7410 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7411 (ix86_option_override_internal): Add "goldmont-plus".
7412 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7413 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7414 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7415 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7417 2018-05-17 Richard Biener <rguenther@suse.de>
7419 PR tree-optimization/85757
7420 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7421 remove defs that only feed that PHI from further processing.
7423 2018-05-16 Jim Wilson <jimw@sifive.com>
7425 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7427 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7429 2018-05-16 Mark Wielaard <mark@klomp.org>
7431 * dwarf2out.c (count_index_strings): New function.
7432 (output_indirect_strings): Call count_index_strings and generate
7433 header for dwarf_version >= 5.
7435 2018-05-16 Mark Wielaard <mark@klomp.org>
7437 * dwarf2out.c (dwarf_FORM): New function.
7438 (set_indirect_string): Use dwarf_FORM.
7439 (reset_indirect_string): Likewise.
7440 (size_of_die): Likewise.
7441 (value_format): Likewise.
7442 (output_die): Likewise.
7443 (add_skeleton_AT_string): Likewise.
7444 (output_macinfo_op): Likewise.
7445 (index_string): Likewise.
7446 (output_index_string_offset): Likewise.
7447 (output_index_string): Likewise.
7448 (count_index_strings): Likewise.
7450 2018-05-16 Carl Love <cel@us.ibm.com>
7452 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7453 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7455 2018-05-16 Martin Jambor <mjambor@suse.cz>
7457 * ipa-prop.c (ipa_free_all_edge_args): Remove.
7458 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7460 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
7462 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7463 (fnma<mode>4): Likewise.
7464 (fms<mode>4): Likewise.
7465 (fnms<mode>4): Likewise.
7466 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7467 (aarch64_fnma<mode>4): Likewise.
7468 (aarch64_fms<mode>4): Likewise.
7469 (aarch64_fnms<mode>4): Likewise.
7470 (aarch64_fnmadd<mode>4): Likewise.
7472 2018-05-16 Jason Merrill <jason@redhat.com>
7474 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
7476 2018-05-16 Richard Biener <rguenther@suse.de>
7478 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7479 (dump_stmt_cost): Declare.
7480 (add_stmt_cost): Dump cost we add.
7481 (add_stmt_costs): New function.
7482 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7484 (vect_analyze_stmt): Adjust prototype.
7485 (vectorizable_condition): Likewise.
7486 (vectorizable_live_operation): Likewise.
7487 (vectorizable_reduction): Likewise.
7488 (vectorizable_induction): Likewise.
7489 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7490 cost vector to pass to vectorizable_ and record afterwards.
7491 (vect_model_reduction_cost): Take cost vector argument and adjust.
7492 (vect_model_induction_cost): Likewise.
7493 (vectorizable_reduction): Likewise.
7494 (vectorizable_induction): Likewise.
7495 (vectorizable_live_operation): Likewise.
7496 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7497 SLP_TREE_NUMBER_OF_VEC_STMTS.
7498 (vect_analyze_slp_cost_1): Remove.
7499 (vect_analyze_slp_cost): Likewise.
7500 (vect_slp_analyze_node_operations): Take visited args and
7501 a target cost vector. Avoid processing already visited stmt sets.
7502 (vect_slp_analyze_operations): Use a local cost vector to gather
7503 costs and register those of non-discarded instances.
7504 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7505 (vect_schedule_slp_instance): Remove copying of
7506 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
7508 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7509 adding cost. Record cost entry location.
7510 (vect_prologue_cost_for_slp_op): Function to compute cost of
7511 a constant or invariant generated for SLP vect in the prologue,
7512 split out from vect_analyze_slp_cost_1.
7513 (vect_model_simple_cost): Make static. Adjust for SLP costing.
7514 (vect_model_promotion_demotion_cost): Likewise.
7515 (vect_model_store_cost): Likewise, make static.
7516 (vect_model_load_cost): Likewise.
7517 (vectorizable_bswap): Add cost vector arg and adjust.
7518 (vectorizable_call): Likewise.
7519 (vectorizable_simd_clone_call): Likewise.
7520 (vectorizable_conversion): Likewise.
7521 (vectorizable_assignment): Likewise.
7522 (vectorizable_shift): Likewise.
7523 (vectorizable_operation): Likewise.
7524 (vectorizable_store): Likewise.
7525 (vectorizable_load): Likewise.
7526 (vectorizable_condition): Likewise.
7527 (vectorizable_comparison): Likewise.
7528 (can_vectorize_live_stmts): Likewise.
7529 (vect_analyze_stmt): Likewise.
7530 (vect_transform_stmt): Adjust calls to vectorizable_*.
7531 * tree-vectorizer.c: Include gimple-pretty-print.h.
7532 (dump_stmt_cost): New function.
7534 2018-05-16 Richard Biener <rguenther@suse.de>
7536 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7537 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7538 * tree-ssa-dse.c: Include tree-ssa-loop.h.
7539 (check_name): New callback.
7540 (dse_classify_store): Track cycles via a visited bitmap of PHI
7541 defs and simplify handling of in-loop and across loop dead stores
7542 and properly fail for loop-variant refs. Handle byte-tracking with
7543 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7546 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
7548 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7549 (vect_get_mask_type_for_stmt): Likewise.
7550 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7552 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
7553 to determine the statement's vector type and the vector type that
7554 should be used for calculating nunits. Deal with cases in which
7555 the type has to be deferred.
7556 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7557 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7558 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7559 (vect_determine_vf_for_stmt): New functions, split out from...
7560 (vect_determine_vectorization_factor): ...here.
7561 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7562 (vect_get_mask_type_for_stmt): New functions, split out from
7563 vect_determine_vectorization_factor.
7565 2018-05-16 Richard Biener <rguenther@suse.de>
7567 * tree-cfg.c (verify_gimple_assign_ternary): Properly
7568 verify the [VEC_]COND_EXPR embedded comparison.
7570 2018-05-15 Martin Sebor <msebor@redhat.com>
7572 PR tree-optimization/85753
7573 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7574 RECORD_TYPE in addition to ARRAY_TYPE.
7576 2018-05-15 Martin Sebor <msebor@redhat.com>
7579 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7581 2018-05-15 Richard Biener <rguenther@suse.de>
7583 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7584 add by_clobber_p one. Change algorithm to collect all defs
7585 representing uses we need to walk and try reducing them to
7586 a single one before failing.
7587 (dse_dom_walker::dse_optimize_stmt): Adjust.
7589 2018-05-13 Mark Wielaard <mark@klomp.org>
7591 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7592 (size_of_loc_descr): Likewise.
7593 (output_loc_operands): Likewise.
7594 (output_loc_operands_raw): Likewise.
7595 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7596 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7597 (hash_loc_operands): Likewise.
7598 (compare_loc_operands): Likewise.
7600 2018-05-14 Mark Wielaard <mark@klomp.org>
7602 * dwarf2out.c (count_index_addrs): New function.
7603 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7605 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7607 PR tree-optimization/83648
7608 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7609 return value as malloc candidate.
7611 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7614 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7615 param as true in call to suggest_attribute.
7617 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
7619 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7620 -mreadonly-in-sdata.
7622 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7624 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7626 (aarch64_crypto_aesd_fused): Likewise.
7628 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
7630 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7631 (movsi_aarch64): Likewise.
7632 (load_pairsi): Likewise.
7633 (load_pairdi): Likewise.
7634 (store_pairsi): Likewise.
7635 (store_pairdi): Likewise.
7636 (load_pairsf): Likewise.
7637 (load_pairdf): Likewise.
7638 (store_pairsf): Likewise.
7639 (store_pairdf): Likewise.
7640 (zero_extend): Likewise.
7641 (trunc): Swap alternatives.
7642 (fcvt_target): Add '?' to prefer w over r.
7644 2018-05-14 Jakub Jelinek <jakub@redhat.com>
7647 * config/i386/i386.md: Disallow non-commutative arithmetics in
7648 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7649 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
7650 in the peephole2 before it.
7652 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
7654 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7655 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7656 (ix86_handle_option): Handle -mcldemote.
7657 * config.gcc: New header.
7658 * config/i386/cldemoteintrin.h: New file.
7659 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7660 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7662 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7663 OPTION_MASK_ISA_CLDEMOTE.
7664 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7665 (ix86_valid_target_attribute_inner_p): Ditto.
7666 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7667 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7668 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7669 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7670 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7672 * config/i386/i386.opt: Add -mcldemote.
7673 * config/i386/x86intrin.h: New header.
7674 * doc/invoke.texi: Add -mcldemote.
7676 2018-05-14 Richard Biener <rguenther@suse.de>
7678 * doc/match-and-simplify.texi: Adjust :s documentation.
7680 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
7682 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7683 intended memcpy size.
7684 (REORDER_45): Likewise.
7686 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
7688 * sort.cc: New file.
7689 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7690 * vec.c (qsort_chk): Use gcc_qsort.
7691 * Makefile.in (OBJS-libcommon): Add sort.o.
7692 (build/sort.o): New target. Use it...
7693 (BUILD_RTL): ... here, and...
7694 (build/gencfn-macros): ... here, and...
7695 (build/genmatch): ... here.
7697 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7698 Chung-Ju Wu <jasonwucj@gmail.com>
7700 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7701 * config/nds32/nds32-graywolf.md: New file.
7702 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7703 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7705 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7706 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7707 * config/nds32/nds32.md (pipeline_model): Add graywolf.
7708 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7709 * config/nds32/pipelines.md: Include n15 settings.
7711 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7712 Chung-Ju Wu <jasonwucj@gmail.com>
7714 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7715 * config/nds32/nds32-n13.md: New file.
7716 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7717 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7719 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7720 * config/nds32/nds32.md (pipeline_model): Add n13.
7721 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7722 * config/nds32/pipelines.md: Include n13 settings.
7724 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7725 Chung-Ju Wu <jasonwucj@gmail.com>
7727 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7728 * config/nds32/nds32-n10.md: New file.
7729 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7730 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7732 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7733 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7734 * config/nds32/nds32.md (pipeline_model): Add n10.
7735 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7736 * config/nds32/pipelines.md: Include n10 settings.
7738 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
7739 Kito Cheng <kito.cheng@gmail.com>
7740 Chung-Ju Wu <jasonwucj@gmail.com>
7742 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7743 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7744 Add enum values for DSP extension instructions.
7745 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7747 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7748 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7750 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7751 * config/nds32/nds32-dspext.md: New file for DSP implementation.
7752 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7753 * config/nds32/nds32-intrinsic.md: Likewise.
7754 * config/nds32/nds32_intrinsic.h: Likewise.
7755 * config/nds32/nds32-md-auxiliary.c: Likewise.
7756 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7757 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7758 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7759 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7760 * config/nds32/nds32-protos.h: New declarations for DSP extension.
7761 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7762 TYPE_DMAC in switch statement.
7763 * config/nds32/nds32.c: New checking and implementation for DSP
7764 extension instructions.
7765 * config/nds32/nds32.h: Likewise.
7766 * config/nds32/nds32.md: Likewise.
7767 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7768 * config/nds32/predicates.md: Implement new predicates for DSP
7771 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7773 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7774 Reformat alternatives and attributes so it is easier to identify
7775 which constraints/attributes go with which instruction.
7776 (mov<mode>_hardfloat32, FMOVE64): Likewise.
7777 (mov<mode>_softfloat32, FMOVE64): Likewise.
7778 (mov<mode>_hardfloat64, FMOVE64): Likewise.
7779 (mov<mode>_softfloat64, FMOVE64): Likewise.
7781 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
7783 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7785 (Basic PowerPC Built-in Functions): The new name of the
7786 subsection previously known as "PowerPC Built-in Functions".
7787 (Basic PowerPC Built-in Functions Available on all Configurations):
7789 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7790 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7791 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7792 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7794 2018-05-11 Martin Jambor <mjambor@suse.cz>
7797 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7800 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7803 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7805 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
7807 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
7808 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
7809 (ix86_handle_option): Handle -mwaitpkg.
7810 * config.gcc: New header.
7811 * config/i386/cpuid.h (bit_WAITPKG): New bit.
7812 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
7813 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
7815 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7816 OPTION_MASK_ISA_WAITPKG.
7817 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
7818 (ix86_option_override_internal): Add PTA_WAITPKG.
7819 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
7820 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
7821 IX86_BUILTIN_TPAUSE.
7822 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
7823 __builtin_ia32_umwait and __builtin_ia32_tpause.
7824 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
7825 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
7826 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
7827 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
7828 UNSPECV_TPAUSE): New.
7829 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
7830 * config/i386/i386.opt: Add -mwaitpkg.
7831 * config/i386/waitpkgintrin.h: New file.
7832 * config/i386/x86intrin.h: New header.
7833 * doc/invoke.texi: Add -mwaitpkg.
7835 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7838 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
7840 (cortex-m0): Use armv6s-m isa.
7841 (cortex-m0plus): Likewise.
7842 (cortex-m1): Likewise.
7843 (cortex-m0.small-multiply): Likewise.
7844 (cortex-m0plus.small-multiply): Likewise.
7845 (cortex-m1.small-multiply): Likewise.
7847 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
7848 Jakub Jelinek <jakub@redhat.com>
7850 PR tree-optimization/85692
7851 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
7852 source permute as well.
7854 2018-05-11 Martin Liska <mliska@suse.cz>
7857 * doc/extend.texi: Document LLVM style format for no_sanitize
7860 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
7862 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
7863 mode_supports_vsx_dform_quad to mode_supports_dq_form.
7864 (mode_supports_vsx_dform_quad): Likewise.
7865 (mode_supports_vmx_dform): Move these functions to be next to the
7866 other mode_supports functions.
7867 (mode_supports_dq_form): Likewise.
7868 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
7869 mode_supports_dq_form.
7870 (reg_offset_addressing_ok_p): Likewise.
7871 (offsettable_ok_by_alignment): Likewise.
7872 (rs6000_legitimate_offset_address_p): Likewise.
7873 (legitimate_lo_sum_address_p): Likewise.
7874 (rs6000_legitimize_address): Likewise.
7875 (rs6000_legitimize_reload_address): Likewise.
7876 (rs6000_secondary_reload_inner): Likewise.
7877 (rs6000_preferred_reload_class): Likewise.
7878 (rs6000_output_move_128bit): Likewise.
7880 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7882 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
7883 Generate SImode target register for null target.
7884 <case IX86_BUILTIN_XGETBV>: Ditto.
7885 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
7886 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
7888 2018-05-10 Carl Love <cel@us.ibm.com>
7890 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7891 dcbtt and dcbtstt if operands[2] is 0.
7893 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7896 * config/i386/sse.md (usadv64qi): New expander.
7898 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
7900 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
7901 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
7902 -maltivec=be support.
7903 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
7904 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
7905 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
7906 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
7907 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
7908 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
7909 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
7910 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
7911 altivec_vsumsws): Adjust.
7912 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
7913 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
7914 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
7916 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
7917 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
7918 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
7919 (altivec_lve<VI_char>x): Delete expand.
7920 (*altivec_lve<VI_char>x_internal): Rename to...
7921 (altivec_lve<VI_char>x): ... this.
7922 (altivec_lvxl_<mode>): Delete expand.
7923 (*altivec_lvxl_<mode>_internal): Rename to ...
7924 (altivec_lvxl_<mode>): ... this.
7925 (altivec_stvxl_<mode>): Delete expand.
7926 (*altivec_stvxl_<mode>_internal): Rename to ...
7927 (altivec_stvxl_<mode>): ... this.
7928 (altivec_stve<VI_char>x): Delete expand.
7929 (*altivec_stve<VI_char>x_internal): Rename to ...
7930 (altivec_stve<VI_char>x): ... this.
7931 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
7932 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
7933 reduc_plus_scal_<mode>): Adjust.
7934 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
7936 (rs6000_cpu_cpp_builtins): Adjust.
7937 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
7938 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
7939 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
7940 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
7941 -maltivec=be support.
7942 (rs6000_split_vec_extract_var): Adjust.
7943 (rs6000_split_v4si_init): Adjust.
7944 (swap_selector_for_mode): Delete.
7945 (altivec_expand_lvx_be, altivec_expand_stvx_be,
7946 altivec_expand_stvex_be): Delete.
7947 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
7948 -maltivec=be support.
7949 (rs6000_gimple_fold_builtin): Ditto.
7950 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
7952 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
7953 (TARGET_DIRECT_MOVE_64BIT): Adjust.
7954 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
7955 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
7956 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
7957 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
7958 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
7959 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
7960 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
7961 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
7962 anonymous split): Adjust.
7963 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
7964 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
7966 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
7968 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
7969 when --with-gxx-include-dir is also specified.
7970 * configure: Regenerate.
7972 2018-05-09 Jim Wilson <jimw@sifive.com>
7975 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
7976 * config/riscv/t-withmultilib: New.
7977 * config/riscv/withmultilib.h: New.
7978 * doc/install.texi: Document RISC-V --with-multilib-list support.
7980 2018-05-09 Richard Biener <rguenther@suse.de>
7982 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
7984 (vect_bb_vectorization_profitable_p): Adjust. Compute
7985 actual scalar cost using the cost vector and the add_stmt_cost
7988 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7990 PR rtl-optimization/85645
7991 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
7992 in the REG_CFA_REGISTER note for LR, don't leave it empty.
7994 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7996 PR rtl-optimization/85645
7997 * shrink-wrap.c (spread_components): Return a boolean saying if
7998 anything was changed.
7999 (try_shrink_wrapping_separate): Iterate spread_components until
8000 nothing changes anymore.
8002 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8004 PR rtl-optimization/85645
8005 * regrename.c (build_def_use): Also kill the chains that include the
8006 destination of a REG_CFA_REGISTER note.
8008 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8010 PR rtl-optimization/85645
8011 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8012 insn that has a REG_CFA_REGISTER note.
8014 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
8016 * cfgexpand.c (expand_clobber): New function.
8017 (expand_gimple_stmt_1): Use it.
8018 * tree-vect-stmts.c (vect_clobber_variable): New function,
8020 (vectorizable_simd_clone_call): ...here.
8021 (vectorizable_store): Emit a clobber either side of an
8022 IFN_STORE_LANES sequence.
8023 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8025 2018-05-09 Tom de Vries <tom@codesourcery.com>
8028 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8029 (define_insn "trap_if_false"): Add exit after trap.
8031 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
8033 PR rtl-optimization/85638
8034 * bb-reorder.c: Include common/common-target.h.
8035 (create_forwarder_block): New function extracted from...
8036 (fix_up_crossing_landing_pad): ...here. Rename into...
8037 (dw2_fix_up_crossing_landing_pad): ...this.
8038 (sjlj_fix_up_crossing_landing_pad): New function.
8039 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8040 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8041 from both partitions and exit the loop after one iteration.
8043 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8046 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8048 (Basic PowerPC Built-in Functions): The new name of the
8049 subsection previously known as "PowerPC Built-in Functions".
8050 (Basic PowerPC Built-in Functions Available on all Configurations):
8052 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8054 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8056 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8058 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8061 2018-05-08 Jim Wilson <jimw@sifive.com>
8063 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8064 (LD_EMUL_SUFFIX): New.
8065 (LINK_SPEC): Use it.
8067 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8069 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8071 (Basic PowerPC Built-in Functions): The new name of the
8072 subsection previously known as "PowerPC Built-in Functions".
8073 (Basic PowerPC Built-in Functions Available on all Configurations):
8075 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8077 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8079 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8081 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8084 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8087 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8088 after cmpelim optimization.
8090 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
8092 * config.gcc: Support "goldmont".
8093 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8094 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8096 * config/i386/i386.c (m_GOLDMONT): Define.
8097 (processor_target_table): Add "goldmont".
8098 (PTA_GOLDMONT): Define.
8099 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8100 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8101 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8102 (fold_builtin_cpu): Add "goldmont".
8103 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8104 (ix86_option_override_internal): Add "goldmont".
8105 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8106 (processor_type): Add PROCESSOR_GOLDMONT.
8107 * config/i386/i386.md: Add CPU "glm".
8108 * config/i386/glm.md: New file.
8109 * config/i386/x86-tune.def: Add m_GOLDMONT.
8110 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8112 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8115 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8117 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8118 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
8119 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
8122 * config/i386/i386.c (ix86_fold_builtin): Handle
8123 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8126 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8127 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8129 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
8132 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8133 (check_arch): Likewise.
8134 (check_fpu): Return the result rather than printing it.
8135 (end arch): Fix operator precedence.
8136 (end cpu): Likewise.
8137 (END): Print the result from check_fpu.
8139 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8140 Alan Hayward <alan.hayward@arm.com>
8141 David Sherwood <david.sherwood@arm.com>
8143 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8144 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8145 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8146 (*fcmuo<mode>_and): New patterns.
8148 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8150 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8151 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8152 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8153 (cmp_op, sve_imm_con): New code attributes.
8154 (SVE_COND_INT_CMP, imm_con): Delete.
8155 (cmp_op): Remove above unspecs from int attribute.
8156 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8158 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
8159 comparison-specific unspecs.
8160 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8161 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8162 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8163 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8164 (*vec_fcm<cmp_op><mode>): Rename to...
8165 (*fcm<cmp_op><mode>): ...this and adjust likewise.
8166 (*vec_fcmuo<mode>): Rename to...
8167 (*fcmuo<mode>): ...this and adjust likewise.
8168 (*pred_fcm<cmp_op><mode>): New pattern.
8169 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8170 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8172 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8174 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8175 (aarch64_emit_sve_predicated_cond): New function.
8176 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8177 (aarch64_emit_unspec_cond_or): Replace with...
8178 (aarch64_emit_sve_or_conds): ...this new function. Use
8179 aarch64_emit_sve_ptrue_op for the individual comparisons and
8180 aarch64_emit_binop to OR them together.
8181 (aarch64_emit_inverted_unspec_cond): Replace with...
8182 (aarch64_emit_sve_inverted_cond): ...this new function. Use
8183 aarch64_emit_sve_ptrue_op for the comparison and
8184 aarch64_emit_unop to invert the result.
8185 (aarch64_expand_sve_vec_cmp_float): Update after the above
8186 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
8188 2018-05-07 Nathan Sidwell <nathan@acm.org>
8190 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8191 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8192 (Backwards Compatibility): Likewise.
8194 2018-05-07 Luis Machado <luis.machado@linaro.org>
8198 2018-05-07 Luis Machado <luis.machado@linaro.org>
8200 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8201 <prefetch_dynamic_strides>: New const bool field.
8202 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8203 prefetch_dynamic_strides.
8204 (exynosm1_prefetch_tune): Likewise.
8205 (thunderxt88_prefetch_tune): Likewise.
8206 (thunderx_prefetch_tune): Likewise.
8207 (thunderx2t99_prefetch_tune): Likewise.
8208 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8210 (aarch64_override_options_internal): Update to set
8211 PARAM_PREFETCH_DYNAMIC_STRIDES.
8212 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8213 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8214 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8215 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8216 prefetch-dynamic-strides setting.
8218 2018-05-07 Luis Machado <luis.machado@linaro.org>
8220 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8221 <minimum_stride>: New const int field.
8222 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8223 minimum_stride field.
8224 (exynosm1_prefetch_tune): Likewise.
8225 (thunderxt88_prefetch_tune): Likewise.
8226 (thunderx_prefetch_tune): Likewise.
8227 (thunderx2t99_prefetch_tune): Likewise.
8228 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8229 (aarch64_override_options_internal): Update to set
8230 PARAM_PREFETCH_MINIMUM_STRIDE.
8231 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8232 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8233 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8234 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8235 stride is constant and is below the minimum stride threshold.
8237 2018-05-07 Luis Machado <luis.machado@linaro.org>
8239 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8242 2018-05-07 Luis Machado <luis.machado@linaro.org>
8244 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8245 <prefetch_dynamic_strides>: New const bool field.
8246 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8247 prefetch_dynamic_strides.
8248 (exynosm1_prefetch_tune): Likewise.
8249 (thunderxt88_prefetch_tune): Likewise.
8250 (thunderx_prefetch_tune): Likewise.
8251 (thunderx2t99_prefetch_tune): Likewise.
8252 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8254 (aarch64_override_options_internal): Update to set
8255 PARAM_PREFETCH_DYNAMIC_STRIDES.
8256 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8257 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8258 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8259 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8260 prefetch-dynamic-strides setting.
8262 2018-05-07 Luis Machado <luis.machado@linaro.org>
8264 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8265 <minimum_stride>: New const int field.
8266 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8267 minimum_stride field.
8268 (exynosm1_prefetch_tune): Likewise.
8269 (thunderxt88_prefetch_tune): Likewise.
8270 (thunderx_prefetch_tune): Likewise.
8271 (thunderx2t99_prefetch_tune): Likewise.
8272 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8273 (aarch64_override_options_internal): Update to set
8274 PARAM_PREFETCH_MINIMUM_STRIDE.
8275 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8276 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8277 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8278 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8279 stride is constant and is below the minimum stride threshold.
8281 2018-05-06 Jakub Jelinek <jakub@redhat.com>
8284 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8285 the type is addressable. Don't force op into register if it has
8288 2018-05-05 Roland McGrath <mcgrathr@google.com>
8291 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8292 any section for which we don't know a specific type it should have,
8293 regardless of name. Previously this was done only for the exact
8294 names ".init_array", ".fini_array", and ".preinit_array".
8295 (default_elf_asm_named_section): Add comment about
8296 relationship with default_section_type_flags and SECTION_NOTYPE.
8297 (get_section): Don't consider it a type conflict if one side has
8298 SECTION_NOTYPE and the other doesn't, as long as neither has the
8299 SECTION_BSS et al used in the default_section_type_flags logic.
8301 2018-05-05 Tom de Vries <tom@codesourcery.com>
8304 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8305 (workaround_barsyncs): New function.
8306 (nvptx_reorg): Use workaround_barsyncs.
8307 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8308 (define_expand "nvptx_membar_cta"): New define_expand.
8309 (define_insn "*nvptx_membar_cta"): New insn.
8311 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
8313 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8314 To improve optimization opportunities.
8315 * builtin-types.def: The new needed builtin types for the above.
8317 2018-05-04 Richard Biener <rguenther@suse.de>
8319 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8320 * gimple-ssa-store-merging.c
8321 (imm_store_chain_info::output_merged_store): Remove redundant create,
8322 release split_store vector contents on failure.
8323 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8324 scalar stmt vector on cache hit.
8326 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
8328 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8330 * config.gcc (powerpc-xilinx-eabi*): Remove.
8331 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8333 (fusion_addis_mem_combo_load): Ditto.
8334 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8336 (rs6000_cpu_cpp_builtins): Ditto.
8337 * config/rs6000/rs6000-linux.c
8338 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8339 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8340 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8342 (rs6000_setup_reg_addr_masks): Ditto.
8343 (rs6000_init_hard_regno_mode_ok): Ditto.
8344 (rs6000_option_override_internal): Ditto.
8345 (legitimate_lo_sum_address_p): Ditto.
8346 (rs6000_legitimize_address): Ditto.
8347 (rs6000_legitimize_reload_address): Ditto.
8348 (rs6000_legitimate_address_p): Ditto.
8349 (abi_v4_pass_in_fpr): Ditto.
8350 (setup_incoming_varargs): Ditto.
8351 (rs6000_gimplify_va_arg): Ditto.
8352 (rs6000_split_multireg_move): Ditto.
8353 (rs6000_savres_strategy): Ditto.
8354 (rs6000_emit_prologue_components): Ditto.
8355 (rs6000_emit_epilogue_components): Ditto.
8356 (rs6000_emit_prologue): Ditto.
8357 (rs6000_emit_epilogue): Ditto.
8358 (rs6000_elf_file_end): Ditto.
8359 (rs6000_function_value): Ditto.
8360 (rs6000_libcall_value): Ditto.
8361 * config/rs6000/rs6000.h: Ditto.
8362 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8363 (TARGET_MINMAX): ... this. New.
8364 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8365 * config/rs6000/rs6000.md: Remove Xilinx FP support.
8366 (*movsi_internal1_single): Delete.
8367 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8368 mfpu=, mxilinx-fpu): Delete.
8369 * config/rs6000/singlefp.h: Delete.
8370 * config/rs6000/sysv4.h: Remove Xilinx FP support.
8371 * config/rs6000/t-rs6000: Ditto.
8372 * config/rs6000/t-xilinx: Delete.
8373 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
8374 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
8375 (VStype_simple): Delete.
8376 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8377 * config/rs6000/xfpu.h: Delete.
8378 * config/rs6000/xfpu.md: Delete.
8379 * config/rs6000/xilinx.h: Delete.
8380 * config/rs6000/xilinx.opt: Delete.
8381 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8382 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8384 2018-05-04 Tom de Vries <tom@codesourcery.com>
8387 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8390 2018-05-04 Richard Biener <rguenther@suse.de>
8393 * tree-complex.c (update_complex_assignment): We are always in SSA form.
8394 (expand_complex_div_wide): Likewise.
8395 (expand_complex_operations_1): Likewise.
8396 (expand_complex_libcall): Preserve EH info of the original stmt.
8397 (tree_lower_complex): Handle removed blocks.
8398 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8399 on complex multiplication and division libcall builtins.
8401 2018-05-04 Richard Biener <rguenther@suse.de>
8404 * fold-const.c (negate_expr_p): Restrict negation of operand
8405 zero of a division to when we know that can happen without
8407 (fold_negate_expr_1): Likewise.
8409 2018-05-04 Jakub Jelinek <jakub@redhat.com>
8412 * real.h (real_nextafter): Declare.
8413 * real.c (real_nextafter): New function.
8414 * fold-const-call.c (fold_const_nextafter): New function.
8415 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8416 CASE_CFN_NEXTTOWARD.
8417 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8418 even when arg1_mode is different from arg0_mode.
8420 2018-05-03 Nathan Sidwell <nathan@acm.org>
8422 * doc/extend.texi (Deprecated Features): Remove
8424 (Backwards Compatibility): Likewise.
8425 * doc/invoke.texi (C++ Language Options): Likewise.
8426 (C++ Dialect Options): Likewise.
8428 2018-05-03 Jakub Jelinek <jakub@redhat.com>
8431 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8432 _mm512_mask_mullox_epi64): New intrinsics.
8434 2018-05-03 Tom de Vries <tom@codesourcery.com>
8437 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8438 dump files): Add offload-tree.
8440 2018-05-03 Richard Biener <rguenther@suse.de>
8442 PR tree-optimization/85615
8443 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8444 to loops not nested in BBs loop father to avoid creating multi-entry
8447 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8449 PR tree-optimization/70291
8450 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8451 arguments. Change return type to tree. Emit libcall as a new
8452 statement rather than replacing existing one when inplace_p is true.
8453 (expand_complex_multiplication_components): New function.
8454 (expand_complex_multiplication): Expand floating-point complex
8455 multiplication using the above.
8456 (expand_complex_division): Rename inner_type parameter to type.
8457 Update expand_complex_libcall call-site.
8458 (expand_complex_operations_1): Update expand_complex_multiplication
8459 and expand_complex_division call-sites.
8461 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8464 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8465 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8466 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8467 the highest significant bit of the shift count mask is clear. In
8468 check whether and[sq]i3 is needed verify that all significant bits
8469 of the shift count other than the highest are set.
8471 2018-05-02 Tom de Vries <tom@codesourcery.com>
8474 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8475 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8476 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8477 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8478 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8479 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8480 __builtin_goacc_parlevel_size.
8482 2018-05-02 Richard Biener <rguenther@suse.de>
8484 PR tree-optimization/85597
8485 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8486 do not use split vect_get_vec_defs call but call vect_get_slp_defs
8489 2018-05-02 Tom de Vries <tom@codesourcery.com>
8492 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8493 dump files): Add ltrans-tree.
8495 2018-05-02 Tom de Vries <tom@codesourcery.com>
8498 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8499 dump files): Add wpa-ipa.
8501 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
8503 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
8504 powerpc*-*-linux*paired* target.
8505 * config/rs6000/750cl.h: Delete.
8506 * config/rs6000/paired.h: Delete.
8507 * config/rs6000/paired.md: Delete.
8508 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8510 * config/rs6000/rs6000-builtin.def: Remove paired float support.
8511 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8512 comment. Remove paired float support.
8513 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8514 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8516 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8517 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8519 * config/rs6000/rs6000.c: Remove paired float support.
8520 (paired_expand_vector_init, paired_expand_vector_move,
8521 paired_emit_vector_compare, paired_emit_vector_cond_expr,
8522 (paired_expand_lv_builtin, paired_expand_stv_builtin,
8523 paired_expand_builtin, paired_expand_predicate_builtin,
8524 paired_init_builtins): Delete.
8525 * config/rs6000/rs6000.h: Remove paired float support.
8526 * config/rs6000/rs6000.md: Remove paired float support.
8527 (move_from_CR_ov_bit): Delete.
8528 * config/rs6000/rs6000.opt (mpaired): Delete.
8529 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8530 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8532 2018-05-02 Richard Biener <rguenther@suse.de>
8535 * gimplify.c (gimplify_save_expr): When in SSA form allow
8536 SAVE_EXPRs to compute to SSA vars.
8538 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8541 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8542 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8543 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8544 clobber operands[2], instead use a new pseudo. Formatting fixes.
8546 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
8548 PR tree-optimization/85586
8549 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8550 exit early for statements in the same group if the accesses are
8553 2018-05-02 Tom de Vries <tom@codesourcery.com>
8556 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8559 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
8561 PR tree-optimization/85143
8562 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8564 2018-05-01 Tom de Vries <tom@codesourcery.com>
8567 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8568 not found" error message.
8570 2018-05-01 Tom de Vries <tom@codesourcery.com>
8573 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8574 * vec.c (test_ordered_remove_if): New function.
8575 (vec_c_tests): Call test_ordered_remove_if.
8576 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8577 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8578 * tree-vect-patterns.c (vect_pattern_recog_1): Use
8579 VEC_ORDERED_REMOVE_IF.
8581 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8583 PR tree-optimization/82665
8584 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8585 pointer subtraction where arguments come from a memchr call.
8587 2018-05-01 Jakub Jelinek <jakub@redhat.com>
8589 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8590 --push-state --as-needed and --pop-state instead of --as-needed and
8591 --no-as-needed if ld supports it.
8592 * configure: Regenerated.
8595 * doc/install.texi2html: Replace _002d with - and _002a with * in
8596 generated html files using sed.
8598 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8601 * gcc-rich-location.c (blank_line_before_p): New function.
8602 (use_new_line): New function.
8603 (gcc_rich_location::add_fixit_insert_formatted): New function.
8604 * gcc-rich-location.h
8605 (gcc_rich_location::add_fixit_insert_formatted): New function.
8607 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8609 * selftest.c (assert_streq): Rename "expected" and "actual" to
8610 "val1" and "val2". Extend NULL-handling to cover both inputs
8611 symmetrically, while still requiring both to be non-NULL for a pass.
8612 * selftest.h (assert_streq): Rename "expected" and "actual" to
8614 (ASSERT_EQ): Likewise.
8615 (ASSERT_EQ_AT): Likewise.
8616 (ASSERT_KNOWN_EQ): Likewise.
8617 (ASSERT_KNOWN_EQ_AT): Likewise.
8618 (ASSERT_NE): Likewise.
8619 (ASSERT_MAYBE_NE): Likewise.
8620 (ASSERT_MAYBE_NE_AT): Likewise.
8621 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
8622 the assertion to pass.
8623 (ASSERT_STREQ_AT): Likewise.
8625 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8627 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8628 interaction with -pie.
8630 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8632 * selftest.h: Fix alphabetization of per-source-file selftest
8635 2018-04-30 Jason Merrill <jason@redhat.com>
8637 PR c++/61982 - dead stores to destroyed objects.
8638 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8641 2018-04-30 Jason Merrill <jason@redhat.com>
8643 * tree.c (build_clobber): New.
8644 * tree.h: Declare it.
8645 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8647 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8649 * diagnostic-show-locus.c (layout::layout): Update for
8650 location_get_source_line returning a char_span.
8651 (struct char_span): Move to input.h.
8652 (struct correction): Update for fields in char_span becoming
8654 (struct source_line): Update for location_get_source_line
8655 returning a char_span.
8656 (layout::print_line): Likewise.
8657 * edit-context.c (edited_file::print_content): Likewise.
8658 (edited_file::print_diff_hunk): Likewise.
8659 (edited_file::print_run_of_changed_lines): Likewise.
8660 (edited_file::get_num_lines): Likewise.
8661 (edited_line::edited_line): Likewise.
8662 * final.c (asm_show_source): Likewise.
8663 * input.c (location_get_source_line): Convert return type
8664 from const char * to char_span, losing the final "line_len"
8666 (dump_location_info): Update for the above.
8667 (get_substring_ranges_for_loc): Likewise. Use a char_span
8668 when handling the literal within the line.
8669 (test_reading_source_line): Update for location_get_source_line
8670 returning a char_span.
8671 * input.h (class char_span): Move here from
8672 diagnostic-show-locus.c, converting from a struct to a class.
8673 Make data members private.
8674 (char_span::operator bool): New.
8675 (char_span::length): New.
8676 (char_span::get_buffer): New.
8677 (char_span::operator[]): New.
8678 (char_span::subspan): Make const.
8679 (char_span::xstrdup): New.
8680 (location_get_source_line): Convert return type from const char *
8681 to char_span, losing the final "line_size" param.
8683 2018-04-30 Jan Hubicka <jh@suse.cz>
8685 * lto-wrapper.c (ltrans_priorities): New static var.
8686 (cmp_priority): New.
8687 (run_gcc): Read priorities and if doing parallel build order
8688 the Makefile by them.
8690 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8692 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8694 2018-04-30 Richard Biener <rguenther@suse.de>
8696 * tree-cfg.c (verify_address): Remove base argument, add
8697 flag whether to check TREE_ADDRESSABLE and do that.
8698 (verify_expr): Remove.
8699 (verify_types_in_gimple_reference): Add pieces from verify_expr.
8700 (verify_gimple_assign_single): Likewise.
8701 (verify_gimple_switch): Likewise.
8702 (verify_expr_location_1): Dereference tp once. Add (disabled)
8703 piece from verify_expr.
8704 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8706 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8708 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8710 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8712 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8713 (small_data_pattern): Likewise.
8714 (arc_rewrite_small_data): Likewise.
8715 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8716 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8717 (get_symbol_alignment): New function.
8718 (legitimate_small_data_address_p): Likewise.
8719 (legitimate_scaled_address): Update, call
8720 legitimate_small_data_address_p.
8721 (output_sdata): New static variable.
8722 (arc_print_operand): Update how we handle small data operands.
8723 (arc_print_operand_address): Likewise.
8724 (arc_legitimate_address_p): Update, use
8725 legitimate_small_data_address_p.
8726 (arc_rewrite_small_data_p): Remove.
8727 (arc_rewrite_small_data_1): Likewise.
8728 (arc_rewrite_small_data): Likewise.
8729 (small_data_pattern): Likewise.
8730 (compact_sda_memory_operand): Update to use
8731 legitimate_small_data_address_p and get_symbol_alignment.
8732 (prepare_move_operands): Don't rewite sdata pattern.
8733 (prepare_extend_operands): Remove.
8734 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8736 (zero_extendqisi2): Likewise.
8737 (zero_extendhisi2): Likewise.
8738 (extendqihi2): Likewise.
8739 (extendqisi2): Likewise.
8740 (extendhisi2): Likewise.
8744 * config/arc/constraints.md (Usd): Change it to memory constraint.
8746 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8748 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8749 as source of std instructions.
8750 * config/arc/arc.md (movsi_insn): Update pattern predicate to
8751 allow 6-bit constants as source for store instructions.
8752 (movdi_insn): Update instruction pattern to allow 6-bit constants
8753 as source for store instructions.
8755 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8757 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8759 2018-04-30 Nathan Sidwell <nathan@acm.org>
8760 Sandra Loosemore <sandra@codesourcery.com>
8762 * dumpfile.c (dump_open): Allow '-' for stdout.
8763 * doc/invoke.texi (Developer Options): Document dump filename
8764 determination early. Document stdin/stdout selection.
8766 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
8768 Microblaze Target: PIC data text relative
8770 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8771 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8773 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
8774 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8775 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8776 New addressing mode for data-text relative position indepenedent code.
8777 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8778 'ADDRESS_SYMBOLIC_TXT_REL'.
8779 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8780 (microblaze_legitimate_pic_operand): Exclude function calls from
8781 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8782 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8784 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8785 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8786 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8787 for 'address + offset'.
8788 (microblaze_expand_prologue): Add new function prologue call for
8790 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8791 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8792 table in case of TARGET_PIC_DATA_TEXT_REL.
8793 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8794 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8795 Add new macros 'UNSPEC_TEXT',
8796 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8797 + exclude function calls from 'UNSPEC_PLT' in case of data text
8799 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8800 new target hook for generating address diff vector tables in case of
8802 * doc/tm.texi : Regenerate.
8803 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8804 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8805 of addr diff vector generation.
8806 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8807 target hook definition.
8808 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
8809 Add default function for generate_pic_addr_diff_vec -> flag_pic.
8810 * doc/invoke.texi (Add new pic option): Add new microblaze pic
8811 option for data text relative.
8813 2018-04-30 Richard Biener <rguenther@suse.de>
8815 * tree-chrec.h (evolution_function_is_constant_p): Remove
8817 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
8819 2018-04-30 Richard Biener <rguenther@suse.de>
8822 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
8824 2018-04-30 Richard Biener <rguenther@suse.de>
8826 PR tree-optimization/28364
8827 PR tree-optimization/85275
8828 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
8829 copying first exit test.
8831 2018-04-28 Mark Wielaard <mark@klomp.org>
8833 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
8835 (dwarf_AT): Handle DW_AT_addr_base.
8836 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
8838 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
8841 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
8842 (*ashl<dwi>3_doubleword_mask_1): Ditto.
8843 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
8844 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
8846 2018-04-28 Richard Biener <rguenther@suse.de>
8848 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
8849 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
8850 to reflect use. Only add interesting stmts.
8852 2018-04-27 Martin Jambor <mjambor@suse.cz>
8855 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
8856 the jump function allows for passing through aggregate values.
8858 2018-04-27 David Malcolm <dmalcolm@redhat.com>
8860 * input.h (in_system_header_at): Convert from macro to inline
8862 (from_macro_expansion_at): Likewise.
8863 (from_macro_definition_at): Likewise.
8865 2018-04-27 Jeff Law <law@redhat.com>
8867 * config.gcc: Mark tile* targets as deprecated/obsolete.
8869 2018-04-27 Richard Biener <rguenther@suse.de>
8871 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
8874 2018-04-27 Richard Biener <rguenther@suse.de>
8876 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
8878 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
8880 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
8881 with Yd constraint. Set "preferred_for_speed" attribute from
8882 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
8884 (*movdi_internal): Ditto.
8885 (movti_interunit splitters): Remove
8886 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
8887 (movdi_interunit splitters): Ditto.
8888 * config/i386/constraints.md (Ye): Remove.
8889 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
8891 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8894 * config/aarch64/constraints.md (Usg): Limit to 31.
8897 2018-04-27 Jakub Jelinek <jakub@redhat.com>
8899 PR tree-optimization/85529
8900 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
8901 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
8902 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
8903 zero extension or masking of the MSB bit.
8904 (optimize_range_tests): Add FIRST_BB argument, pass it through
8905 to optimize_range_tests_var_bound.
8906 (maybe_optimize_range_tests, reassociate_bb): Adjust
8907 optimize_range_tests callers.
8909 2018-04-26 Richard Biener <rguenther@suse.de>
8910 Jakub Jelinek <jakub@redhat.com>
8912 * cgraph.h (symbol_table): Just declare debug method here.
8913 * symtab.c (symbol_table::debug): Define.
8915 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
8917 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
8919 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
8921 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
8922 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
8923 (*movdi_internal): Substitute Yi and Yj constraint with x
8924 and Ym and Yn constraint with y constraint. Update "isa"
8925 attribute and set "preferred_for_speed" attribute from
8926 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
8927 (*movsi_internal): Ditto.
8928 (*movdf_internal): Ditto.
8929 (*movsf_internal): Ditto.
8930 (*zero_extendsidi2): Ditto.
8931 * config/i386/sse.md (vec_set<mode>_0): Ditto.
8932 (sse2_loadld): Ditto.
8933 (*vec_extract<ssevecmodelower>_0): Ditto.
8934 (*vec_extractv4si_0_zext_sse4): Ditto.
8935 (vec_concatv2di): Ditto.
8936 (*vec_dup<mode>): Ditto.
8937 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
8938 * config/i386/constraints.md (Yi): Remove.
8943 2018-04-26 Nathan Sidwell <nathan@acm.org>
8945 * dumpfile.c (dump_open): New.
8946 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
8947 (dump_finish): Detect stdio/stderr by value not name.
8949 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
8951 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
8953 2018-04-26 Tom de Vries <tom@codesourcery.com>
8956 * config/nvptx/nvptx.c (verify_neutering_jumps)
8957 (verify_neutering_labels): New function
8958 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
8960 2018-04-26 Tom de Vries <tom@codesourcery.com>
8963 * config/nvptx/nvptx.c (needs_neutering_p): New function.
8964 (nvptx_single): Use needs_neutering_p to skip over insns that do not
8967 2018-04-26 Richard Biener <rguenther@suse.de>
8968 Tom de Vries <tom@codesourcery.com>
8971 * lto-streamer-out.c (output_function): Fixup loops if required to match
8972 discovery done in the reader.
8974 2018-04-26 Richard Biener <rguenther@suse.de>
8976 PR tree-optimization/85116
8977 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
8978 have a loop exit from the single latch predecessor. Remove
8979 case of header with just condition.
8980 (ch_base::copy_headers): Exclude infinite loops from any
8982 (pass_ch::execute): Record exits.
8984 2018-04-26 Richard Biener <rguenther@suse.de>
8986 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
8987 prologue cost vector and pass it to vect_get_load_cost.
8988 (vect_get_peeling_costs_all_drs): Likewise.
8989 (vect_peeling_hash_get_lowest_cost): Likewise.
8990 (vect_enhance_data_refs_alignment): Likewise.
8992 2018-04-26 Richard Biener <rguenther@suse.de>
8995 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
8996 checking of integer<->pointer conversions.
8997 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
8998 sign-/zero-extending pointer types.
8999 (expand_omp_for_static_chunk): Likewise.
9001 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
9002 Jean Lee <xiaoyur347@gmail.com>
9004 * config/mips/mips.c (mips_asan_shadow_offset): New function.
9005 (TARGET_ASAN_SHADOW_OFFSET): Define.
9006 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9007 true for -fsanitize=address.
9009 2018-04-25 Mark Wielaard <mark@klomp.org>
9011 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9014 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9016 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9017 than "alu", remove explicit "memory" and "imm_disp" attributes.
9018 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9021 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9022 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9023 gen_lowpart_no_emit.
9025 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
9028 * config/i386/i386.c (ix86_expand_builtin): Change memory
9029 operand to XI, extend p0 to Pmode.
9030 * config/i386/i386.md: Change unspec volatile and operand
9031 1 mode to XI, change operand 0 mode to P.
9033 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9035 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9036 GET_MODE_MASK before any checking.
9037 (nds32_can_use_bset_p): Likewise.
9038 (nds32_can_use_btgl_p): Likewise.
9040 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9042 * config/nds32/nds32-doubleword.md: New define_split pattern for
9043 illegal register number.
9045 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9047 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9049 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9051 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9053 2018-04-25 Richard Biener <rguenther@suse.de>
9055 * lto-streamer.h (LTO_major_version): Bump to 8.
9057 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9059 * BASE-VER: Set to 9.0.0.
9061 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
9063 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9064 in __abskf2 and __powikf2.
9066 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9069 * config/aarch64/constraints.md (Usg, Usj): New constraints.
9070 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9071 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9072 Use the above on operand 2. Reindent.
9073 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9075 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9078 * common/config/i386/i386-common.c (ix86_handle_option): Don't
9080 * config/i386/i386.opt (mcet): Removed.
9081 * doc/install.texi: Remove -mcet documentation.
9082 * doc/invoke.texi: Likewise.
9084 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9087 * doc/install.texi: Remove -mcet from bootstrap-cet.
9089 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9092 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9093 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9097 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9098 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9099 containing a CONST_VECTOR.
9101 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
9103 * doc/install.texi: Update newlib dependency for nvptx.
9105 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9108 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9109 instead of INTVAL when shifting x left.
9111 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
9113 PR tree-optimization/85478
9114 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9115 vect_grouped_store_supported for single element vectors.
9117 2018-04-24 Richard Biener <rguenther@suse.de>
9120 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9121 load cost increase to the case of non-constant step.
9123 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9126 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9127 destination if any_malformed_asm.
9129 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
9132 * expr.c (store_field): In the bitfield case, if the value comes from
9133 a function call and is returned in registers by means of a PARALLEL,
9134 do not change the mode of the temporary unless BLKmode and VOIDmode.
9136 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
9138 PR rtl-optimization/85423
9139 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9140 dependencies to debug insns when the previous insn is non-debug.
9142 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9144 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9145 enums into a single definition.
9146 (fls): Fix predicates and printing.
9149 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9151 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9152 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9153 and short u6 immediate.
9154 (check_if_valid_sleep_operand): Remove.
9155 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9157 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9159 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9160 flag_always_save_lp condition.
9161 * config/nds32/nds32.opt (malways-save-lp): New option.
9163 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9165 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9166 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9167 * config/nds32/nds32.h
9168 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9169 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9171 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9173 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9174 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9176 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9177 Chung-Ju Wu <jasonwucj@gmail.com>
9179 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9181 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9182 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9184 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9186 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9188 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9190 * config/nds32/nds32-protos.h (nds32_data_alignment,
9191 nds32_local_alignment): Declare.
9192 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9193 nds32_local_alignment): New functions.
9194 (TARGET_CONSTANT_ALIGNMENT): Define.
9195 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9197 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9199 * config/nds32/nds32.c
9200 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9201 (TARGET_MODES_TIEABLE_P): Likewise.
9203 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9205 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9208 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
9209 Chung-Ju Wu <jasonwucj@gmail.com>
9211 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9212 for unaligned access.
9213 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9215 * config/nds32/nds32-intrinsic.md: Likewise.
9216 * config/nds32/nds32_intrinsic.h: Likewise.
9217 * config/nds32/nds32.h (nds32_builtins): Likewise.
9218 * config/nds32/nds32.opt (munaligned-access): New option.
9219 * config/nds32/nds32.c (nds32_asm_file_start): Display
9220 flag_unaligned_access status.
9222 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9224 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9225 -mno-relax is present.
9226 * config/riscv/linux.h (LINK_SPEC): Ditto.
9228 2018-04-20 Martin Sebor <msebor@redhat.com>
9231 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9233 (gimple_fold_builtin_stxcpy_chk): Same.
9234 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9236 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
9239 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9240 __powikf2 when long double is IEEE 128-bit.
9242 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9244 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9245 step to make sure stack always aligned.
9247 2018-04-20 Carl Love <cel@us.ibm.com>
9250 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9251 size check for arg0.
9253 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
9254 Tom de Vries <tom@codesourcery.com>
9257 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9258 Emit insns for calls too.
9259 (nvptx_find_par): Always look for worker-level predecessor insn.
9260 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
9262 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9263 (nvptx_process_pars): Propagate frames for calls.
9265 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
9268 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9270 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9271 (ix86_handle_option): Don't handle OPT_mibt.
9272 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9274 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9276 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9277 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9278 (ix86_target_macros): Define __CET__ with flag_cf_protection
9279 for -fcf-protection.
9280 * config/i386/i386.c (isa2_opts): Remove -mibt.
9281 * config/i386/i386.h (TARGET_IBT): Removed.
9282 (TARGET_IBT_P): Likewise.
9283 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9284 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9285 * config/i386/i386.opt (mcet): Update help message.
9288 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
9289 -mcet as an alias for -mshstk.
9291 2018-04-20 Richard Biener <rguenther@suse.de>
9294 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9295 complexity by forcing a single use of the multiply operand.
9297 2018-04-20 Martin Jambor <mjambor@suse.cz>
9300 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9301 recursion dependency to only apply to non-clones.
9303 2018-04-20 Martin Jambor <mjambor@suse.cz>
9306 * ipa-cp.c (create_specialized_node): Check that clones of
9307 self-recursive edges exist during IPA-CP.
9309 2018-04-19 Toon Moene <toon@moene.org>
9311 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9314 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9316 PR tree-optimization/85467
9317 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9318 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
9319 VECTOR_CST element to type.
9321 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9324 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9325 * config/i386/i386.md (builtin_setjmp_setup): Removed.
9326 (builtin_longjmp): Likewise.
9327 (save_stack_nonlocal): New pattern.
9328 (restore_stack_nonlocal): Likewise.
9330 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9333 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9334 Replace ASM_OUTPUT_LABEL with fprintf.
9336 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9339 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9340 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9341 * config/i386/i386-c.c (ix86_target_macros_internal): Also
9342 define __IBT__ and __SHSTK__ for -fcf-protection.
9343 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9345 (ix86_trampoline_init): Likewise.
9346 (x86_output_mi_thunk): Likewise.
9347 (ix86_notrack_prefixed_insn_p): Likewise.
9348 (ix86_option_override_internal): Don't disallow -fcf-protection.
9349 * config/i386/i386.md (rdssp<mode>): Also enable for
9351 (incssp<mode>): Likewise.
9352 (nop_endbr): Likewise.
9353 * config/i386/i386.opt (mcet): Change help message to built-in
9357 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9358 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
9359 enable CET built-in functions.
9361 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
9363 * common/config/i386/i386-common.c
9364 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9365 OPTION_MASK_ISA_MOVDIRI_UNSET,
9366 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9367 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9368 * config.gcc (movdirintrin.h): New header.
9369 * config/i386/cpuid.h (bit_MOVDIRI,
9370 bit_MOVDIR64B): New bits.
9371 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9373 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9374 (VOID, PVOID, PCVOID)): New function types.
9375 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9376 __builtin_ia32_directstoreu_u64,
9377 __builtin_ia32_movdir64b): New builtins.
9378 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9379 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9381 (ix86_valid_target_attribute_inner_p): Ditto.
9382 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9383 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9384 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9385 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9386 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9387 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9388 (movdiri<mode>, movdir64b_<mode>): New.
9389 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9390 * config/i386/immintrin.h: Include movdirintrin.h.
9391 * config/i386/movdirintrin.h: New file.
9392 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9394 2018-04-19 Richard Biener <rguenther@suse.de>
9397 * cfg.c (clear_bb_flags): When loop state says we have
9398 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9400 2018-04-19 Richard Biener <rguenther@suse.de>
9402 PR tree-optimization/84737
9403 * tree-vect-data-refs.c (vect_copy_ref_info): New function
9404 copying restrict info.
9405 (vect_setup_realignment): Use it.
9406 * tree-vectorizer.h (vect_copy_ref_info): Declare.
9407 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9408 the first DR to all generated stores.
9409 (vectorizable_load): Likewise for loads.
9411 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9413 PR tree-optimization/85446
9414 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9415 the integral and pointer types to have the same precision.
9417 * doc/install.texi: Document --disable-cet being the default and
9420 2018-04-18 Martin Liska <mliska@suse.cz>
9422 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9425 2018-04-18 Martin Liska <mliska@suse.cz>
9428 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
9431 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9432 arguments if they are comparable.
9434 2018-04-18 Martin Liska <mliska@suse.cz>
9437 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
9440 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9443 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
9446 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9447 ENDBR after calling __morestack.
9449 2018-04-18 David Malcolm <dmalcolm@redhat.com>
9452 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9453 by using gcc_base_ver to generate a gcc_driver_version, and use
9454 it when generating GCC_DRIVER_NAME.
9455 * configure: Regenerate.
9457 2018-04-18 Jakub Jelinek <jakub@redhat.com>
9460 * config.gcc: Obsolete powerpc*-*-*spe*.
9462 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9465 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9466 (stabstr_D): Change type of unum from unsigned int to
9467 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
9470 2018-04-17 Jim Wilson <jimw@sifive.com>
9473 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9474 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9475 Set arg_pointer_offset after using pretend_args_size.
9477 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9479 PR rtl-optimization/85431
9480 * dse.c (record_store): Ignore zero width stores.
9483 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
9484 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9485 __builtin_stack_restore rather than after it.
9486 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9487 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9488 argument instead of virtual_dynamic_stack_rtx.
9490 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
9492 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9494 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9495 Add note to error message to explain internal mapping of overloaded
9496 built-in function name to non-overloaded built-in function name.
9497 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9500 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
9503 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9504 where the inputs overlap with the output.
9506 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9508 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9509 (=v, v) alternative and explicit "memory" attribute.
9510 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
9511 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9513 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9514 "sselog1" type instead of "sselog".
9515 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9516 "sselog". Remove explicit "memory" attribute.
9517 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9518 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9520 (vec_extract_hi_v32hi): Merge all alternatives into one, use
9521 "sselog1" type instead of "sselog". Remove explicit "memory"
9523 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9524 use "sselog1" type instead of "sselog". Remove explicit "memory"
9526 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9527 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9529 (vec_extract_hi_v64qi): Merge all alternatives into one, use
9530 "sselog1" type instead of "sselog". Remove explicit "memory"
9532 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9533 use "sselog1" type instead of "sselog". Remove explicit "memory"
9537 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9540 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9543 2018-04-17 Martin Jambor <mjambor@suse.cz>
9546 * ipa-cp.c (create_specialized_node): Call
9547 expand_all_artificial_thunks if necessary.
9549 2018-04-17 Martin Liska <mliska@suse.cz>
9552 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9553 in message, remote space in between '_G' and '('.
9555 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9558 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9559 avx512f_vmcmp<mode>3<round_saeonly_name>,
9560 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9561 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9562 avx512f_rndscale<mode><round_saeonly_name>,
9563 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9564 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9565 Use %<iptr>2 instead of %2 for -masm=intel.
9566 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9567 avx512f_vcvttss2usi<round_saeonly_name>,
9568 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9570 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9571 avx512f_vcvttsd2usi<round_saeonly_name>,
9572 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9573 Use %q1 instead of %1 for -masm=intel.
9574 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9575 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9576 of %3 for -masm=intel.
9577 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9579 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9581 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9583 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9584 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9586 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9588 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9589 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9590 %g1 and one with %0 and %1.
9591 (avx512er_vmrcp28<mode><round_saeonly_name>,
9592 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9594 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9595 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9596 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9597 of %0 and %{%4%} for -masm=intel.
9598 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9599 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9600 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9601 order of %0 and %{%5%}%{z%} for -masm=intel.
9603 2018-04-17 Jan Hubicka <jh@suse.cz>
9606 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9608 2018-04-17 Martin Liska <mliska@suse.cz>
9611 * multiple_target.c (create_dispatcher_calls): Set apostrophes
9612 for target_clone error message. Make default implementation
9613 clone to be a local declaration.
9614 (separate_attrs): Add new argument and check for an empty
9616 (expand_target_clones): Handle it.
9617 (ipa_target_clone): Make redirection just for target_clones
9620 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
9621 Tom de Vries <tom@codesourcery.com>
9624 * omp-expand.c (expand_oacc_for): Add dummy false branch for
9625 tiled basic blocks without omp continue statements.
9627 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
9630 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9631 vec_extract expression as having side effects to make sure it gets
9634 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
9637 * config/i386/i386.c (get_builtin_code_for_version): Check
9640 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
9643 * gcc/config.gcc: Support "skylake".
9644 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
9646 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
9647 (processor_target_table): Add "skylake".
9648 (ix86_option_override_internal): Add "skylake".
9649 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9650 PROCESSOR_CANNONLAKE.
9651 (get_builtin_code_for_version): Fix priority for
9652 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9653 PROCESSOR_SKYLAKE-AVX512.
9654 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9655 (processor_type): Add PROCESSOR_SKYLAKE.
9657 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
9658 Jason Merrill <jason@redhat.com>
9661 * convert.c (convert_to_integer_1): Use direct recursion for
9662 enumeral types and types with a precision less than the number
9663 of bits in their mode.
9665 2018-04-16 Julia Koval <julia.koval@intel.com>
9668 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9669 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9671 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
9674 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9675 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9676 and -mno-direct-move.
9678 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
9681 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9682 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9683 Ensure negative shifts result in {0}.
9685 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
9687 PR rtl-optimization/79916
9688 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9689 regs (if any) to define how to gnerate SD moves when LRA is in
9692 2018-04-13 Jakub Jelinek <jakub@redhat.com>
9694 PR rtl-optimization/85393
9695 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9696 * except.c (expand_dw2_landing_pad_for_region): Make static.
9697 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9698 a label and unconditional jump to old_bb, rather than
9699 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9702 PR rtl-optimization/85376
9703 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9704 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9705 instead of a specific value.
9707 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9708 Bin Cheng <bin.cheng@arm.com>
9710 PR tree-optimization/82965
9711 PR tree-optimization/83991
9712 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9713 by_profile_only parameter.
9714 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9715 information if the loop was predicted to iterate too many times.
9716 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9718 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9721 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9724 2018-04-13 Martin Liska <mliska@suse.cz>
9725 Jakub Jelinek <jakub@redhat.com>
9728 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9729 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9730 * builtins.c (expand_builtin_memory_copy_args): Use
9731 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9732 handle dest_addr == pc_rtx.
9734 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
9737 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9738 asked to not generate direct moves.
9739 (fix_trunc<mode>si2_stfiwx): Similar.
9740 (fix_trunc<mode>si2_internal): Similar.
9742 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9745 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9746 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9747 lookup if dest in some wider mode is known to be const0_rtx and
9748 if so, record permanent equivalence for it to be ZERO_EXTEND of
9749 the narrower mode destination.
9751 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9753 * lto-streamer-out.c (output_function): Revert 259346.
9754 * omp-expand.c (expand_oacc_for): Likewise.
9756 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
9758 PR rtl-optimization/85354
9759 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9760 * sel-sched.c (sel_global_init): ... here.
9762 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
9765 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9766 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9767 mode for PE-COFF targets.
9768 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9769 (i386_pe_asm_lto_end): Likewise.
9770 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9771 (TARGET_ASM_LTO_END): Likewise.
9772 * config/i386/winnt.c (saved_debug_info_level): New static variable.
9773 (i386_pe_asm_lto_start): New function.
9774 (i386_pe_asm_lto_end): Likewise.
9776 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9777 Richard Biener <rguenther@suse.de>
9780 * lto-streamer-out.c (output_function): Fix CFG loop state before
9782 * omp-expand.c (expand_oacc_for): Handle calls to internal
9783 functions like regular functions.
9785 2018-04-12 Richard Biener <rguenther@suse.de>
9788 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9789 for the early LTO debug to properly generate references to it
9790 during DIE emission. Do not re-use that for the skeleton for
9792 (dwarf2out_early_finish): Likewise.
9794 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9797 * config/i386/sse.md
9798 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9799 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9800 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9801 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9802 and output is a reg, avoid creating invalid lowpart subreg, but
9803 instead split into a 512-bit move. Don't split if not AVX512VL,
9804 input is xmm16+ reg and output is a mem.
9805 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9806 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9807 xmm16+ reg and output is a mem.
9809 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9811 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
9812 also for flag_dwarf2_cfi_asm.
9814 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9816 PR rtl-optimization/85342
9817 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
9818 a bool scalar var inside of the loop instead. Don't try to update
9819 recog_data.operand after failed apply_change_group.
9821 2018-04-12 Tom de Vries <tom@codesourcery.com>
9824 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
9825 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
9826 array with flexible array member as array without given dimension.
9827 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
9828 argument for undefined param to true.
9830 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
9833 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9834 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
9835 from PowerPC section.
9836 * config/rs6000/sysv4.opt (mcall-): Improve help text.
9837 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
9838 help text that is too long.
9839 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
9840 help text that is too long.
9841 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
9842 help text that is too long.
9844 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
9846 * config/alpha/alpha.md (stack_probe_internal): Rename
9847 from "probe_stack". Update all callers.
9849 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9851 PR rtl-optimization/84566
9852 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
9853 sched_macro_fuse_insns.
9855 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9858 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
9859 (compute_block_dependences): ... from here.
9861 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9863 PR tree-optimization/85331
9864 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
9865 from int to HOST_WIDE_INT.
9867 2018-04-11 Martin Jambor <mjambor@suse.cz>
9870 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
9871 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
9872 not the same as the source val.
9873 (cgraph_edge_brings_value_p): New parameter.
9874 (gather_edges_for_value): Pass destination value to
9875 cgraph_edge_brings_value_p.
9876 (perhaps_add_new_callers): Likewise.
9877 (get_info_about_necessary_edges): Likewise and exclude values brought
9878 only by self-recursive edges.
9879 (create_specialized_node): Redirect only clones of self-calling edges.
9880 (+self_recursive_pass_through_p): New function.
9881 (find_more_scalar_values_for_callers_subset): Use it.
9882 (find_aggregate_values_for_callers_subset): Likewise.
9883 (known_aggs_to_agg_replacement_list): Removed.
9884 (decide_whether_version_node): Re-calculate known constants for all
9885 remaining context clones.
9887 2018-04-11 Richard Biener <rguenther@suse.de>
9890 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
9891 from early DWARF output.
9892 (dwarf2out_early_finish): Output line info unconditionally into
9893 early DWARF and add reference to it.
9895 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9898 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
9899 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
9900 other than V2DFmode using iptr mode attribute.
9901 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
9903 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9905 PR rtl-optimization/84659
9906 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
9908 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9911 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
9913 (output_loc_list): Pass address of a dummy size variable even in the
9914 locview handling loop.
9915 (index_location_lists): Add comment on why skip_loc_list_entry can't
9918 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
9921 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
9924 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
9927 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9928 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
9929 and -mstring-compare-inline-limit.
9931 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9934 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
9935 for stack clash protection in a register whenever we need it to be in
9938 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9940 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
9941 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
9943 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9946 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
9948 (mlong-double-): Ditto.
9949 * config/rs6000/sysv4.opt (msdata=): Ditto.
9950 (mtls-size=): Ditto.
9952 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
9954 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9955 erroneous entries for
9956 "vector int vec_ldl (int, long int *)", and
9957 "vector unsigned int vec_ldl (int, unsigned long int *)".
9958 Add comments and entries for
9959 "vector bool char vec_ldl (int, bool char *)",
9960 "vector bool short vec_ldl (int, bool short *)",
9961 "vector bool int vec_ldl (int, bool int *)",
9962 "vector bool long long vec_ldl (int, bool long long *)",
9963 "vector pixel vec_ldl (int, pixel *)",
9964 "vector long long vec_ldl (int, long long *)",
9965 "vector unsigned long long vec_ldl (int, unsigned long long *)".
9966 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
9967 type tree bool_long_long_type_node and correct definition of
9968 bool_V2DI_type_node to make reference to this new type tree.
9969 (rs6000_mangle_type): Replace erroneous reference to
9970 bool_long_type_node with bool_long_long_type_node.
9971 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
9972 comments to emphasize sign distinctions for char and int types and
9973 replace RS6000_BTI_bool_long constant with
9974 RS6000_BTI_bool_long_long constant. Also add comment to restrict
9975 use of RS6000_BTI_pixel.
9976 (bool_long_type_node): Remove this macro definition.
9977 (bool_long_long_type_node): New macro definition
9979 2018-04-10 Jakub Jelinek <jakub@redhat.com>
9981 PR rtl-optimization/85300
9982 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
9983 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
9984 simplify_unary_operation fails.
9986 2018-04-10 Martin Liska <mliska@suse.cz>
9988 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
9989 cgraph_edge and ipa_ref.
9991 2018-04-10 Jakub Jelinek <jakub@redhat.com>
9995 * config/i386/sse.md
9996 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
9997 computation of the VEC_MERGE selector from mask.
9998 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
9999 Fix decoding of the VEC_MERGE selector into mask.
10001 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10003 PR tree-optimization/85286
10004 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10006 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10008 * final.c (final_1): Set insn_last_address as well as
10009 insn_current_address.
10011 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10014 * explow.c (emit_stack_probe): Call validize_mem on memory location
10015 before passing it to gen_probe_stack. Create address operand and
10016 legitimize it for the probe_stack_address case.
10018 2018-04-09 Jan Hubicka <jh@suse.cz>
10021 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10022 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10023 * tree.c (free_lang_data_in_type): Fix handling of binfos;
10025 (free_lang_data): Rebuild type inheritance graph.
10027 2018-04-09 Martin Sebor <msebor@redhat.com>
10029 * invoke.texi (-finline-small-functions): Mention other optimization
10031 (-findirect-inlining, -fpartial-inlining): Same.
10032 (-finline-functions-called-once): Same.
10033 (-freorder-blocks-and-partition): Same.
10035 2018-04-09 Jan Hubicka <jh@suse.cz>
10038 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10039 jumps; choose last target that matches the criteria (i.e.
10040 no partition changes for non-crossing jumps).
10041 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10042 support for redirecting crossing jumps to non-crossing.
10044 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
10046 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10047 also for naked functions.
10049 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
10051 * config/arc/arc.md (add_shift): New pattern.
10052 (add_shift2): Likewise.
10053 (sub_shift): Likewise.
10054 (sub_shift_cmp0_noout): Likewise.
10055 (compare_si_ashiftsi): Likewise.
10056 (xbfu_cmp0_noout): New combine pattern.
10057 (xbfu_cmp0"): Likewise.
10058 (movsi_set_cc_insn): Place the predicable variant first.
10059 (commutative_binary_cmp0_noout): Remove clobber.
10060 (commutative_binary_cmp0): New pattern.
10061 (noncommutative_binary_cmp0): Likewise.
10062 (noncommutative_binary_cmp0_noout): Likewise.
10063 (noncommutative_binary_comparison_result_used): Removed.
10064 (rsub_cmp0): New pattern.
10065 (rsub_cmp0_noout): Likewise.
10066 (extzvsi): Changed, keep only meaningful variants.
10067 (SQH, SEZ): New iterators.
10068 (SQH_postfix): New mode attribute.
10069 (SEZ_prefix): New code attribute.
10070 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10071 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10072 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10073 of numerical value.
10074 (noncommutative_operator): Check the availability of barrel
10077 2018-04-09 Richard Biener <rguenther@suse.de>
10079 PR tree-optimization/85284
10080 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10081 Only use the niter constraining form of simple_iv when the exit
10082 is always executed.
10084 2018-04-09 Tom de Vries <tom@codesourcery.com>
10087 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10088 (define_expand "*memory_barrier"): New define_expand.
10089 (define_insn "memory_barrier"): New insn.
10091 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10093 PR rtl-optimization/80463
10094 PR rtl-optimization/83972
10095 PR rtl-optimization/83480
10097 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10098 correct producer for the insn.
10099 (tidy_control_flow): Fixup seqnos in case of debug insns.
10101 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10103 PR rtl-optimization/83913
10105 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10106 different sched-times when merging exprs.
10108 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10110 PR rtl-optimization/83962
10112 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10113 tidy_fallthru_edge and tidy_control_flow.
10115 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10117 PR rtl-optimization/83530
10119 * sel-sched.c (force_next_insn): New global variable.
10120 (remove_insn_for_debug): When force_next_insn is true, also leave only
10121 next insn in the ready list.
10122 (sel_sched_region): When the region wasn't scheduled, make another pass
10123 over it with force_next_insn set to 1.
10125 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10127 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10129 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10130 for interrupt control.
10131 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10132 functions for interrupt control.
10133 * config/nds32/nds32-intrinsic.md: Likewise.
10134 * config/nds32/nds32_intrinsic.h: Likewise.
10135 * config/nds32/nds32.h (nds32_builtins): Likewise.
10137 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10139 * config/nds32/nds32.c (nds32_init_machine_status,
10140 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10141 strict_aligned_p field.
10142 (nds32_expand_to_rtl_hook): New function.
10143 (TARGET_EXPAND_TO_RTL_HOOK): Define.
10144 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10146 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10147 Chung-Ju Wu <jasonwucj@gmail.com>
10149 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10150 * config/nds32/nds32-n7.md: New file.
10151 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10152 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10154 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10155 * config/nds32/nds32.md (pipeline_model): Add n7.
10156 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10157 * config/nds32/pipelines.md: Include n7 settings.
10159 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10160 Chung-Ju Wu <jasonwucj@gmail.com>
10162 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10163 * config/nds32/nds32-e8.md: New file.
10164 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10165 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10167 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10168 * config/nds32/nds32.md (pipeline_model): Add e8.
10169 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10170 * config/nds32/pipelines.md: Include e8 settings.
10172 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10173 Chung-Ju Wu <jasonwucj@gmail.com>
10175 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10176 * config/nds32/nds32-n8.md: New file.
10177 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10178 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10180 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10181 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10182 * config/nds32/nds32.md (pipeline_model): Add n8.
10183 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10184 * config/nds32/pipelines.md: Include n8 settings.
10186 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10187 Chung-Ju Wu <jasonwucj@gmail.com>
10189 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10190 * config/nds32/nds32-n9-2r1w.md: New file.
10191 * config/nds32/nds32-n9-3r2w.md: New file.
10192 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10193 nds32_register_ports): New or modify for cpu n9.
10194 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10196 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10197 * config/nds32/nds32-utils.c: New file.
10198 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10199 TARGET_MUL_SLOW): Define.
10200 * config/nds32/nds32.md (pipeline_model): New attribute.
10201 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10202 New options that support cpu n9.
10203 * config/nds32/pipelines.md: Include n9 settings.
10204 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10206 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10208 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10209 information if necessary.
10210 (output_cond_branch_compare_zero): Likewise.
10211 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10212 (nds32_target_alignment): Refine for alignment.
10213 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10214 (FUNCTION_BOUNDARY): Modify.
10215 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10217 * config/nds32/nds32.opt (malways-align, malign-functions): New.
10219 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10221 * config/nds32/constants.md (unspec_volatile_element): Add values for
10222 TLB operation and data prefetch.
10223 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10224 functions for TLB operation and data prefetch.
10225 * config/nds32/nds32-intrinsic.md: Likewise.
10226 * config/nds32/nds32_intrinsic.h: Likewise.
10227 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10228 (nds32_print_operand): Likewise.
10229 * config/nds32/nds32.h (nds32_builtins): Likewise.
10231 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
10232 Andrew Pinski <pinsika@gcc.gnu.org>
10234 PR middle-end/82976
10235 * match.pd: Use constant_boolean_node of correct type instead of
10236 boolean_true_node or boolean_false_node for simplifying
10237 pointer comparisons to zero.
10239 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10241 PR tree-optimization/80021
10242 * tree.c (verify_type_variant): Make error call in verify_variant_match
10243 translatable and remove final full stop.
10245 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10247 * config/nds32/constants.md (unspec_volatile_element): Add
10248 UNSPEC_VOLATILE_EH_RETURN.
10249 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10250 nds32_output_stack_pop): Support dwarf exception handling process.
10251 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10252 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10253 exception handling process.
10254 (nds32_compute_stack_frame): Likewise.
10255 (nds32_return_addr_rtx): Likewise.
10256 (nds32_initial_elimination_offset): Likewise.
10257 (nds32_expand_prologue): Likewise.
10258 (nds32_expand_epilogue): Likewise.
10259 (nds32_dynamic_chain_address): New function.
10260 * config/nds32/nds32.h (machine_function): Add fields for dwarf
10261 exception handling.
10262 (DYNAMIC_CHAIN_ADDRESS): Define.
10263 (EH_RETURN_DATA_REGNO): Define.
10264 (EH_RETURN_STACKADJ_RTX): Define.
10265 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10266 patterns for dwarf exception handling.
10268 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10270 * config/nds32/nds32.h: Clean up obsolete macros.
10272 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10274 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10275 Add enum values for particular instructions.
10276 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10277 particular intrinsic functions.
10278 * config/nds32/nds32-intrinsic.md: Likewise.
10279 * config/nds32/nds32_intrinsic.h: Likewise.
10280 * config/nds32/nds32.h (nds32_builtins): Likewise.
10281 * config/nds32/nds32.md (type): Add pbsad and pbsada.
10282 (btst, ave): New patterns for particular instructions.
10284 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10286 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10287 Add enum values for atomic load/store and memory sync.
10288 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10290 * config/nds32/nds32-intrinsic.md: Likewise.
10291 * config/nds32/nds32_intrinsic.h: Likewise.
10292 * config/nds32/nds32.h (nds32_builtins): Likewise.
10294 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10296 PR tree-optimization/85257
10297 * fold-const.c (native_encode_vector): If not all elts could fit
10298 and off is -1, return 0 rather than offset.
10299 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10300 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10301 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
10302 adjust buffer in native_interpret_expr call.
10304 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10306 * config/nds32/constants.md (unspec_volatile_element): Add cache
10307 control enum values.
10308 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10309 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10310 * config/nds32/nds32.c (nds32_cctl_names): New.
10311 (nds32_print_operand): Handle cache control register names.
10312 * config/nds32/nds32.h (nds32_builtins): New enum values.
10313 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10315 * config/nds32/nds32.md (type): Add mmu.
10316 * config/nds32/pipelines.md (simple_insn): Add mmu.
10318 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10320 * config/nds32/nds32.md (type): Remove call.
10321 * config/nds32/pipelines.md (simple_insn): Likewise.
10323 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10325 * config/nds32/constants.md (unspec_volatile_element): Add
10326 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10327 UNSPEC_VOLATILE_FMFCFG.
10328 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10329 description for fmfcfg and fmfcsr.
10330 (bdesc_1arg): Add fmtcsr.
10331 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10332 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10333 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10334 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10335 unspec_fmfcfg): New patterns.
10336 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10337 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10338 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10339 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10340 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10341 __nds32__fmfcfg): Define.
10343 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10345 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10346 intrinsic register names.
10347 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10348 intrinsic register enum values and macros.
10350 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10352 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10353 for load/store addressing form.
10354 (nds32_print_operand_address): Likewise.
10356 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
10359 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10360 based on LABEL_REF. Remove useless assertion.
10361 (pic_address_needs_scratch): Fix formatting.
10362 (sparc_legitimize_pic_address): Minor tweaks.
10363 (sparc_delegitimize_address): Adjust assertion accordingly.
10364 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10365 into symbolic_operand.
10366 (movsi_high_pic_label_ref): Likewise.
10367 (movsi_lo_sum_pic_label_ref): Likewise.
10368 (movdi_pic_label_ref): Likewise.
10369 (movdi_high_pic_label_ref): Likewise.
10370 (movdi_lo_sum_pic_label_ref): Likewise.
10372 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
10374 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10375 custom LIB_SPEC setup.
10377 2018-04-06 Ruslan Bukin <br@bsdpad.com>
10378 Kito Cheng <kito.cheng@gmail.com>
10380 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10381 * config/riscv/freebsd.h: New.
10383 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10385 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10386 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10389 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10390 Kito Cheng <kito.cheng@gmail.com>
10392 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10393 nds32_output_call, nds32_symbol_binds_local_p): New functions.
10394 * config/nds32/nds32-protos.h (nds32_output_call,
10395 nds32_output_return): Declare.
10396 * config/nds32/nds32.md: Refine all the call and return patterns.
10398 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10401 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10402 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10404 PR rtl-optimization/84872
10405 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10406 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10407 EDGE_CROSSING edge.
10409 2018-04-06 Tamar Christina <tamar.christina@arm.com>
10411 * expr.c (copy_blkmode_to_reg): Revert 254862.
10412 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10414 2018-04-06 Richard Biener <rguenther@suse.de>
10416 PR middle-end/85244
10417 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10418 after seeing a component reference with an adjacent field. Treat
10419 refs to arrays at struct end of external decls similar to
10420 refs to unconstrained commons.
10422 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10425 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10426 look through SAVE_EXPRs with non-side-effects argument. Adjust
10428 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10431 2018-04-06 Richard Biener <rguenther@suse.de>
10433 PR middle-end/85180
10434 * alias.c (find_base_term): New wrapper around find_base_term
10435 unwinding CSELIB_VAL_PTR changes.
10436 (find_base_term): Do not restore CSELIB_VAL_PTR during the
10439 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10441 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10443 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10444 constant definitions.
10445 ("nop"): lr 0,0 -> nopr r0
10446 ("nop_lr0", "nop_lr1"): New insn definitions.
10448 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10450 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10451 NDS32_V3PUSH_AVAILABLE_P macro.
10453 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
10454 Chung-Ju Wu <jasonwucj@gmail.com>
10456 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10457 (nds32*-*-*): Add float and fpu_config into supported_defaults.
10458 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10459 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10460 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10461 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10462 * config/nds32/constraints.md: New constraints and checking for hard
10463 float configuration.
10464 * config/nds32/iterators.md: New mode iterator and attribute for hard
10465 float configuration.
10466 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10468 * config/nds32/nds32-fpu.md: New file.
10469 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10470 deal with hard float code generation.
10471 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10473 (abi_type, float_reg_number): New enum type.
10474 * config/nds32/nds32-predicates.c: New predicates for hard float.
10475 * config/nds32/nds32-protos.h: Declare functions for hard float.
10476 * config/nds32/nds32.c: Implementation for hard float configuration.
10477 * config/nds32/nds32.h: Definitions for hard float configuration.
10478 * config/nds32/nds32.md: Include hard float machine description and
10479 modify patterns for hard float configuration.
10480 * config/nds32/nds32.opt: New options for hard float configuration.
10481 * config/nds32/predicates.md: New predicates for hard float
10484 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10486 * common/config/nds32/nds32-common.c
10487 (nds32_option_optimization_table): Enable -mreleax-hint by default.
10489 2018-04-05 Jakub Jelinek <jakub@redhat.com>
10491 PR middle-end/85195
10492 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10493 CONSTRUCTOR_ELT (ctor, ...)->value.
10495 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
10498 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10500 2018-04-05 Tom de Vries <tom@codesourcery.com>
10503 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10506 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10507 Kito Cheng <kito.cheng@gmail.com>
10509 * config/nds32/constraints.md (U33): Fine-tune checking condition.
10510 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10511 * config/nds32/nds32.h (nds32_16bit_address_type): Add
10512 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10514 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10515 Kito Cheng <kito.cheng@gmail.com>
10517 * config/nds32/constraints.md (Ufe): New memory constraint.
10518 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10519 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10520 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10522 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10523 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10525 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10527 * config/nds32/nds32.md: Use optimize_size in the condition for
10528 alu-shift instructions.
10530 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10532 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10534 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10536 * config/nds32/nds32.md (negsi2): Refine pattern.
10538 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10539 Chung-Ju Wu <jasonwucj@gmail.com>
10541 * config/nds32/iterators.md (shift_rotate): New code iterator.
10542 (shift): New code attribute.
10543 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10544 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10545 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10546 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10547 bit-wise operations.
10548 (andsi3, *andsi3): Ditto.
10549 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10550 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10551 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10552 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10553 nds32_ior_operand, nds32_xor_operand): New predicates.
10555 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10557 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10558 (addsi3, subsi3): ... this.
10560 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10562 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10564 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10566 * config/nds32/nds32.md: Adjust indention.
10568 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10570 * config/nds32/nds32.md (feature): New attribute.
10572 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10574 * config/nds32/nds32.md (subtype): New attribute.
10576 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
10579 * config/arm/arm-builtins.c (arm_expand_builtin): Change
10580 expansion to perform a bitwise AND of the argument followed by a
10581 boolean negation of the result.
10583 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
10585 PR rtl-optimization/84878
10586 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10587 the basic block. Assert the use reference is not artificial and that
10588 it has an associated insn.
10590 2018-04-04 Michael Matz <matz@suse.de>
10592 * builtins.c (compute_objsize): Pass correct operand
10593 to array_at_struct_end_p.
10595 2018-04-04 Richard Biener <rguenther@suse.de>
10598 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10599 from contexts for DINFO_LEVEL_TERSE and below.
10601 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10603 * config/nds32/nds32-doubleword.md (move_<mode>): Require
10604 resiter_operand condition.
10605 * config/nds32/nds32.md (*move<mode>): Ditto.
10607 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10608 Monk Chiang <sh.chiang04@gmail.com>
10610 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10612 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10614 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10616 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10617 Kito Cheng <kito.cheng@gmail.com>
10619 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10620 nds32_cond_code_str, output_cond_branch,
10621 output_cond_branch_compare_zero, nds32_expand_cbranch,
10622 nds32_expand_cstore, nds32_expand_movcc,
10623 nds32_output_cbranchsi4_equality_zero,
10624 nds32_output_cbranchsi4_equality_reg,
10625 nds32_output_cbranchsi4_equality_reg_or_const_int,
10626 nds32_output_cbranchsi4_greater_less_zero: New functions.
10627 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10628 nds32_expand_cstore, nds32_expand_movcc,
10629 nds32_output_cbranchsi4_equality_zero,
10630 nds32_output_cbranchsi4_equality_reg,
10631 nds32_output_cbranchsi4_equality_reg_or_const_int,
10632 nds32_output_cbranchsi4_greater_less_zero): Declare.
10633 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10634 nds32_rimm11s_operand): New predicates.
10635 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10636 * config/nds32/nds32.md: Rewrite all the branch and conditional move
10639 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10641 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10642 * config/nds32/nds32.md: Ditto.
10643 * config/nds32/pipelines.md: Ditto.
10645 2018-04-04 Richard Biener <rguenther@suse.de>
10647 PR tree-optimization/85168
10648 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10649 propagating abnormals.
10651 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10653 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10655 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10656 Kito Cheng <kito.cheng@gmail.com>
10658 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10659 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10660 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10661 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10662 * config/nds32/nds32.md (sibcall_internal): New.
10663 (sibcall_register): Remove.
10664 (sibcall_immediate): Remove.
10665 (sibcall_value_internal): New.
10666 (sibcall_value_register): Remove.
10667 (sibcall_value_immediate): Remove.
10668 * config/nds32/predicates.md (nds32_general_register_operand): New.
10669 (nds32_call_address_operand): New.
10671 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10673 PR rtl-optimization/85167
10674 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10675 bb_defs if *split_p, instead preinitialize it to NULL.
10677 PR tree-optimization/85156
10678 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10679 evaluating the argument multiple times.
10681 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
10683 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10685 (_mm_cvtpd_ps): Likewise.
10686 (_mm_cvttpd_epi32): Likewise.
10687 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10688 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10689 vector, pixel, and bool following altivec.h include.
10691 2018-04-03 Martin Sebor <msebor@redhat.com>
10693 * doc/extend.texi (Common Function Attributes): Clarify.
10694 (const attribute): Likewise.
10695 (pure attribute): Likewise.
10697 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10700 * config/i386/i386.c (ix86_expand_vector_set): Use
10701 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
10703 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
10705 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10706 instructions when changing rounding bits to preserve precision bits
10707 in the x87 control word.
10709 2018-04-03 Martin Liska <mliska@suse.cz>
10711 PR tree-optimization/82491
10712 * rtl.h (strip_offset_and_add): Replace += suboffset with
10713 poly_uint64 () + suboffset.
10715 2018-03-29 Martin Liska <mliska@suse.cz>
10716 Martin Jambor <mjambor@suse.cz>
10719 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10720 param_type is not an integral or pointer type.
10722 2018-04-03 Richard Biener <rguenther@suse.de>
10724 * sese.h (recompute_all_dominators): Remove.
10726 2018-04-02 Martin Sebor <msebor@redhat.com>
10728 * doc/invoke.texi (-Wrestrict): Fix typos.
10730 2018-04-02 Jim Wilson <jimw@sifive.com>
10732 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10733 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10734 (<optab>di3, <optab>si3_extend): Likewise.
10735 (<optab>si3_mask, <optab>si3_mask_1): New.
10736 (<optab>di3_mask, <optab>di3_mask_1): New.
10737 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10738 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10739 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10741 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
10743 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10746 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
10748 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10749 (nds32_canonicalize_comparison): New function.
10751 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10752 Kito Cheng <kito.cheng@gmail.com>
10753 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10755 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10756 * config/nds32/constants.md (unspec_volatile_element): Add
10757 UNSPEC_VOLATILE_RELAX_GROUP.
10758 * config/nds32/nds32-relax-opt.c: New file.
10759 * config/nds32/nds32-predicates.c
10760 (nds32_symbol_load_store_p): New function.
10761 * config/nds32/nds32-protos.h
10762 (nds32_symbol_load_store_p): Declare function.
10763 (make_pass_nds32_relax_opt): Declare new rtl pass function.
10764 * config/nds32/nds32.c
10765 (nds32_register_pass): New function to register pass.
10766 (nds32_register_passes): New function to register passes.
10767 * config/nds32/nds32.md (relax_group): New pattern.
10768 * config/nds32/nds32.opt (mrelax-hint): New option.
10769 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10771 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
10773 * config/nds32/t-nds32: Modify files dependency.
10775 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10777 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10778 (PROFILE_HOOK): Define its implementation.
10780 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10782 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10783 type and 32-bit size.
10785 2018-04-01 Jakub Jelinek <jakub@redhat.com>
10787 PR middle-end/85090
10788 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10789 (V_128_256): New mode iterator.
10790 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10791 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10792 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10794 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10795 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10797 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
10800 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10801 NaN inputs correctly.
10803 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
10806 * config/rs6000/vsx.md (??r): New mode attribute.
10807 (*vsx_mov<mode>_64bit): Use it.
10808 (*vsx_mov<mode>_32bit): Likewise.
10810 2018-03-30 Martin Sebor <msebor@redhat.com>
10812 PR tree-optimization/84818
10813 * builtins.c (check_access): Use warning_n.
10815 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10818 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
10820 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
10823 2018-03-30 Julia Koval <julia.koval@intel.com>
10826 * x86-tune.def (movx, partial_reg_dependency): Enable for
10829 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
10831 PR inline-asm/84985
10832 * lra-constraints.c (process_alt_operands): Move setting
10833 this_alternative_matches below.
10835 2018-03-29 Martin Liska <mliska@suse.cz>
10838 * doc/invoke.texi: Document how LTO works with debug info.
10839 Describe auto-load support of binutils. Mention 'x86-64'
10840 as valid option value of -march option.
10842 2018-03-29 Jakub Jelinek <jakub@redhat.com>
10844 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
10847 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
10848 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
10849 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
10852 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10855 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
10856 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
10857 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
10858 for RS6000_BTM_POWERPC64.
10859 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
10860 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
10861 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
10864 (DIVDEU): Likewise.
10866 2018-03-28 Carl Love <cel@us.ibm.com>
10869 2017-09-27 Carl Love <cel@us.ibm.com>
10871 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10872 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10873 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10876 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10878 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
10879 instead of __vector bool.
10880 (_mm_max_pu8): Likewise.
10881 (_mm_min_pi16): Likewise.
10883 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10886 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
10887 (DIVWEUO): Likewise.
10888 (DIVDEO): Likewise.
10889 (DIVDEUO): Likewise.
10890 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
10891 DIVWEUO and DIVDEUO.
10892 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
10893 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
10894 (div_extend): Likewise.
10895 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
10897 (__builtin_divweuo): Likewise.
10898 (__builtin_divdeo): Likewise.
10899 (__builtin_divdeuo): Likewise.
10901 2018-03-28 Jakub Jelinek <jakub@redhat.com>
10904 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
10905 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
10907 PR tree-optimization/82004
10908 * gimple-match-head.c (optimize_pow_to_exp): New function.
10909 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
10910 Don't fold to exp if optimize_pow_to_exp is false.
10912 2018-03-28 Martin Liska <mliska@suse.cz>
10915 * calls.c (initialize_argument_information): Fix trailing space.
10916 * common.opt: Fix typo and provide better explanation for
10917 -fsanitize-coverage option.
10918 * config/i386/i386.opt: Fix typo.
10920 2018-03-28 Jakub Jelinek <jakub@redhat.com>
10921 Martin Liska <mliska@suse.cz>
10924 * gimplify.c (asan_poison_variable): Don't do the check for
10925 gimplify_omp_ctxp here.
10926 (gimplify_decl_expr): Do it here.
10927 (gimplify_target_expr): Likewise.
10929 2018-03-28 Martin Liska <mliska@suse.cz>
10932 * config/i386/i386.c (ix86_function_arg_advance): Do not call
10933 chkp_type_bounds_count if MPX is not enabled.
10935 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
10937 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
10939 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
10942 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
10943 function to create the function decl for complex long double
10944 multiply and divide for -mabi=ieeelongdouble.
10945 (init_float128_ieee): Call it.
10947 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
10950 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
10951 -fcf-protection=branch -mibt.
10952 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
10954 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10957 * config/arm/arm.c (arm_valid_symbolic_address): Handle
10958 arm_word_relocations.
10960 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
10963 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
10964 extern array declarations.
10966 2018-03-27 Richard Biener <rguenther@suse.de>
10968 PR middle-end/84067
10969 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
10970 explicit single_use checks.
10972 2018-03-27 Richard Biener <rguenther@suse.de>
10974 PR tree-optimization/85082
10975 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
10978 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10980 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
10981 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
10982 Turn on fasynchronous-unwind-tables and funwind-tables.
10984 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
10987 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
10988 (*bmi_blsr_<mode>_ccz): Ditto.
10990 2018-03-26 Tom de Vries <tom@codesourcery.com>
10992 PR tree-optimization/85063
10993 * omp-general.c (offloading_function_p): New function. Factor out
10995 * omp-offload.c (pass_omp_target_link::gate): ... here.
10996 * omp-general.h (offloading_function_p): Declare.
10997 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
10998 with attribute omp declare target for offloading functions.
11000 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
11002 PR tree-optimization/84005
11003 * tree-data-ref.h (get_base_for_alignment): Declare.
11004 * tree-data-ref.c (get_base_for_alignment_1): New function.
11005 (get_base_for_alignment): Likewise.
11006 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11007 get_base_for_alignment to find a suitable base object, instead
11008 of always using drb->base_address.
11010 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11012 PR inline-asm/85022
11013 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11014 known size by default.
11016 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
11018 PR inline-asm/85030
11019 * lra-constraints.c (process_alt_operands): Don't match BLKmode
11020 and non BLKmode operands.
11022 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11025 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11026 Clean up attributes.
11028 2018-03-23 Richard Biener <rguenther@suse.de>
11031 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11032 we are going to emit early debug for LTO.
11034 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11036 PR inline-asm/85034
11037 * function.c (match_asm_constraints_1): Don't optimize if input
11038 doesn't satisfy general_operand predicate for output's mode.
11040 PR inline-asm/85022
11041 * alias.c (write_dependence_p): Don't require for x_canonicalized
11042 non-VOIDmode if x has VOIDmode.
11045 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11046 just don't try to optimize it rather than assert it never happens.
11048 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11050 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11051 macro expansions for definition of ST_INTERNAL_<mode> and
11052 LD_INTERNAL_<mode> builtins.
11053 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11055 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11057 (altivec_expand_st_builtin): Likewise.
11058 (altivec_expand_builtin): Remove calls to deleted functions.
11059 (rs6000_address_for_altivec): Delete this function.
11060 * config/rs6000/vector.md: Remove expands for
11061 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11063 2018-03-22 Sudakshina Das <sudi.das@arm.com>
11066 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11067 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11068 re-computing once computed.
11069 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11070 (arm_init_machine_status): Initialize
11071 machine->static_chain_stack_bytes.
11073 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11076 * doc/extend.texi: Add four new prototypes for vec_ld.
11077 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11078 definitions for more logical presentation.
11079 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11080 entries for V1TI variants of __builtin_altivec_ld builtin.
11081 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11082 handling of V1TI variant of LVX icode pattern.
11083 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11084 (rs6000_gimple_fold_builtin): Likewise.
11085 (altivec_init_builtins): Add code to define
11086 __builtin_altivec_lvx_v1ti function.
11088 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11090 PR inline-asm/84941
11091 * function.c (match_asm_constraints_1): Don't do the optimization
11092 if input isn't a REG, SUBREG, MEM or constant.
11094 2018-03-22 Tom de Vries <tom@codesourcery.com>
11096 PR tree-optimization/84956
11097 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11098 bb_has_abnormal_pred.
11100 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11103 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11104 DECL_INITIAL (decl) to decl at the end.
11105 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11106 adjust the comment.
11108 2018-03-21 Joseph Myers <joseph@codesourcery.com>
11110 * doc/extend.texi (__builtin_tgmath): Document when complex
11111 integer types are treated as _Complex _Float64.
11113 2018-03-21 Tom de Vries <tom@codesourcery.com>
11115 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11117 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11119 PR tree-optimization/84960
11120 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11121 if it is ENTRY block, move them into single succ of ENTRY in that case.
11123 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
11125 PR tree-optimization/84811
11126 * poly-int.h (poly_span_traits): Remove the T3 parameter and
11127 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11128 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11129 (known_subrange_p): Update accordingly. Cast each value involved
11130 in the size comparison, rather than casting the result of the
11133 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11135 PR tree-optimization/84982
11136 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11137 by flipping the least significant bit rather than all bits from
11138 bitpos to bitpos + bitsize - 1.
11140 2018-03-21 Nathan Sidwell <nathan@acm.org>
11142 * doc/extend.texi (Deprecated Features): Remove mention of
11143 long-deleted deprecations.
11145 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11148 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11149 * configure: Regenerate.
11151 2018-03-21 Tom de Vries <tom@codesourcery.com>
11153 PR tree-optimization/83126
11154 * tree-parloops.c (num_phis): New function.
11155 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11157 2018-03-21 Nathan Sidwell <nathan@acm.org>
11159 * doc/extend.texi (Deprecated Features): Update deprecated flags,
11160 mention anon-struct/union members and trailing attributes.
11162 2018-03-21 Bin Cheng <bin.cheng@arm.com>
11164 PR tree-optimization/84969
11165 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11166 builtin memset partitions if they set different rhs values.
11168 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11170 PR rtl-optimization/84989
11171 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11172 VEC_DUPLICATE with scalar result mode.
11174 2018-03-21 Martin Liska <mliska@suse.cz>
11177 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11178 not intended return statement.
11180 2018-03-21 Martin Liska <mliska@suse.cz>
11183 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11184 (chkp_find_bound_slots_1): Limit number of iterations.
11186 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
11189 * Minor grammar fixes for x86 options.
11191 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11194 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11195 holding REG_CFA_RESTORE notes, instead turn them into a USE.
11197 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
11200 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11201 (altivec_lvx_<mode>_1op): Likewise.
11202 (altivec_stvx_<mode>_2op): Likewise.
11203 (altivec_stvx_<mode>_1op): Likewise.
11204 (altivec_lvx_<VM2:mode>): New define_expand.
11205 (altivec_stvx_<VM2:mode>): Likewise.
11206 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11207 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11208 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11209 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11210 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11211 (rs6000_gen_lvx): Likewise.
11212 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11213 (altivec_expand_stv_builtin): Likewise.
11214 (altivec_expand_builtin): Likewise.
11215 * config/rs6000/vector.md: Likewise.
11217 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11220 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11223 2018-03-20 Richard Biener <rguenther@suse.de>
11226 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11227 sign-conversions as zero, fall back to standard scalar_stmt
11230 2018-03-20 Martin Liska <mliska@suse.cz>
11233 * predict.c (rebuild_frequencies): Handle case when we have
11234 PROFILE_ABSENT, but flag_guess_branch_prob is false.
11236 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11239 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11240 flag_section_anchors.
11241 * varasm.c (use_blocks_for_decl_p): Remove hack for
11242 dw2_force_const_mem.
11245 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11247 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
11248 be created, use lowpart_subreg of operands[0] rather than operands[0]
11250 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11251 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11252 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11253 and n constraint instead of aarch64_shift_imm_di and Usd.
11254 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11255 (*aarch64_<optab>_reg_minus<mode>3): ... this.
11257 2018-03-20 Sudakshina Das <sudi.das@arm.com>
11260 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11261 to favor GPR over NEON registers.
11262 (<shift>di3_neon): Likewise.
11264 2018-03-20 Tom de Vries <tom@codesourcery.com>
11267 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11268 (nvptx_process_pars): Emit bar.sync asap and alap.
11270 2018-03-20 Tom de Vries <tom@codesourcery.com>
11273 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11274 seen_label if seen_label is already set.
11276 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11279 * config/i386/i386.c (fold_builtin_cpu): For features above 31
11280 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11281 Use 1U instead of 1. Formatting fixes.
11284 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11285 instead of TREE_TYPE (s1) for the return value.
11287 2018-03-19 Jakub Jelinek <jakub@redhat.com>
11289 PR tree-optimization/84946
11290 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11291 bitsize + bitsize in poly_uint64 rather than poly_int64.
11294 * dwarf2asm.c: Include fold-const.c.
11295 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11296 of decl rather than decl itself.
11298 PR rtl-optimization/84643
11299 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11301 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
11304 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11305 calling assemble_variable.
11307 2018-03-19 Sudakshina Das <sudi.das@arm.com>
11310 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11311 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11313 2018-03-19 Jim Wilson <jimw@sifive.com>
11316 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11317 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11318 (riscv_first_stack_step): Likewise.
11319 (riscv_option_override): Use STACK_BOUNDARY instead of
11320 MIN_STACK_BOUNDARY.
11321 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11322 MIN_STACK_BOUNDARY.
11323 (BIGGEST_ALIGNMENT): Set to 128.
11324 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11325 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11328 2018-03-19 Richard Biener <rguenther@suse.de>
11330 PR tree-optimization/84933
11331 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11332 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11334 2018-03-19 Richard Biener <rguenther@suse.de>
11336 PR tree-optimization/84859
11337 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11338 (cond_if_else_store_replacement): Perform sinking operation on
11339 single-store BBs regardless of MAX_STORES_TO_SINK setting.
11340 Generalize what a BB with a single eligible store is.
11342 2018-03-19 Richard Biener <rguenther@suse.de>
11344 PR tree-optimization/84929
11345 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11346 chrec_is_positive against non-chrec arg.
11348 2018-03-19 Tamar Christina <tamar.christina@arm.com>
11351 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11353 2018-03-18 Martin Liska <mliska@suse.cz>
11355 PR rtl-optimization/84635
11356 * regrename.c (build_def_use): Use matches_mode only when
11359 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
11361 PR tree-optimization/84913
11362 * tree-vect-loop.c (vectorizable_reduction): Don't try to
11363 vectorize chains of COND_EXPRs.
11365 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11367 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11369 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11371 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11373 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11375 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11377 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11378 Kito Cheng <kito.cheng@gmail.com>
11380 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11381 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11382 (nds32_adjust_reg_alloc_order): New function.
11383 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11385 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
11387 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11388 nds32_print_operand, nds32_print_operand_address): Use
11389 HOST_WIDE_INT_PRINT_DEC instead.
11391 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11393 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11395 2018-03-17 Jakub Jelinek <jakub@redhat.com>
11398 * config/i386/i386.c (initial_ix86_tune_features,
11399 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11400 unsigned long long.
11401 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11402 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11403 rather than 1u << ix86_tune. Formatting fix.
11404 (ix86_option_override_internal): Change ix86_arch_mask from
11405 unsigned int to unsigned HOST_WIDE_INT, initialize to
11406 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11407 (ix86_function_specific_restore): Likewise.
11409 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11412 * postreload.c (reload_combine_recognize_pattern): Perform
11413 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11414 truncate_int_for_mode the result for the destination's mode.
11417 * hsa-gen.c (mem_type_for_type): Fix comment typo.
11418 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11420 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11423 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
11426 * lra-assigns.c (lra_split_hard_reg_for): Don't use
11427 regno_allocno_class_array and sorted_pseudos.
11428 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11429 insns where regno is used.
11431 2018-03-16 Martin Liska <mliska@suse.cz>
11434 * multiple_target.c (create_dispatcher_calls): Redirect
11435 reference in the symbol table.
11437 2018-03-16 Martin Liska <mliska@suse.cz>
11440 * multiple_target.c (create_dispatcher_calls): Redirect also
11443 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11447 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11448 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11449 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11451 2018-03-16 Julia Koval <julia.koval@intel.com>
11453 * doc/invoke.texi (Skylake Server): Add CLWB.
11454 Cannonlake): Remove CLWB.
11456 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11458 PR tree-optimization/84841
11459 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11461 (FLOAT_ONE_CONST_TYPE): Define.
11462 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11463 (sort_by_operand_rank): Put entries with higher constant_type last
11464 rather than first to match comments.
11466 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
11468 * config/nios2/nios2.md (movsi_internal): Fix thinko in
11471 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11474 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11475 check and use address of target always.
11477 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
11480 * config/i386/i386.c (indirect_thunk_needed): Update comments.
11481 (indirect_thunk_bnd_needed): Likewise.
11482 (indirect_thunks_used): Likewise.
11483 (indirect_thunks_bnd_used): Likewise.
11484 (indirect_return_needed): New.
11485 (indirect_return_bnd_needed): Likewise.
11486 (output_indirect_thunk_function): Add a bool argument for
11488 (output_indirect_thunk_function): Don't generate alias for
11489 function return thunk.
11490 (ix86_code_end): Call output_indirect_thunk_function to generate
11491 function return thunks.
11492 (ix86_output_function_return): Set indirect_return_bnd_needed
11493 and indirect_return_needed instead of indirect_thunk_bnd_needed
11494 and indirect_thunk_needed.
11496 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
11498 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11499 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11500 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11502 2018-03-15 David Malcolm <dmalcolm@redhat.com>
11503 Paul Hua <paul.hua.gm@gmail.com>
11506 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11508 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
11510 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11511 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11512 resp. SFmode cases.
11514 2018-03-15 Tamar Christina <tamar.christina@arm.com>
11517 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11518 instead of GET_MODE_SIZE when comparing Units.
11520 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11523 * varasm.c (hash_section): Return an unchangeble hash value
11524 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11525 Return !aarch64_can_use_per_function_literal_pools_p ().
11527 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11530 * optabs.c (emit_conditional_move): Pass address of cmode's copy
11531 rather than address of cmode as last argument to prepare_cmp_insn.
11533 2018-03-15 Julia Koval <julia.koval@intel.com>
11535 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11536 F_AVX512VNNI, F_AVX512BITALG): New.
11538 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
11541 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
11542 insn for floating-point loads and stores.
11544 2018-03-14 Carl Love <cel@us.ibm.com>
11546 * config/rs6000/rs6000-c.c: Add macro definitions for
11547 ALTIVEC_BUILTIN_VEC_PERMXOR.
11548 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11549 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11550 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11551 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11553 * config/doc/extend.texi: Add prototypes for vec_permxor.
11555 2018-03-14 David Malcolm <dmalcolm@redhat.com>
11558 * diagnostic-show-locus.c (class layout_point): Convert m_line
11559 from int to linenum_type.
11560 (line_span::comparator): Use linenum "compare" function when
11561 comparing line numbers.
11562 (test_line_span): New function.
11563 (layout_range::contains_point): Convert param "row" from int to
11565 (layout_range::intersects_line_p): Likewise.
11566 (layout::will_show_line_p): Likewise.
11567 (layout::print_source_line): Likewise.
11568 (layout::should_print_annotation_line_p): Likewise.
11569 (layout::print_annotation_line): Likewise.
11570 (layout::print_leading_fixits): Likewise.
11571 (layout::annotation_line_showed_range_p): Likewise.
11572 (struct line_corrections): Likewise for field m_row.
11573 (line_corrections::line_corrections): Likewise for param "row".
11574 (layout::print_trailing_fixits): Likewise.
11575 (layout::get_state_at_point): Likewise.
11576 (layout::get_x_bound_for_row): Likewise.
11577 (layout::print_line): Likewise.
11578 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11579 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11580 * input.c (selftest::test_linenum_comparisons): New function.
11581 (selftest::input_c_tests): Call it.
11582 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11583 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11584 * selftest.h (ASSERT_GT): New macro.
11585 (ASSERT_GT_AT): New macro.
11586 (ASSERT_LT): New macro.
11587 (ASSERT_LT_AT): New macro.
11589 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
11591 PR rtl-optimization/84780
11592 * combine.c (distribute_links): Don't make a link based on pc_rtx.
11594 2018-03-14 Martin Liska <mliska@suse.cz>
11596 * tree.c (record_node_allocation_statistics): Use
11597 get_stats_node_kind.
11598 (get_stats_node_kind): New function extracted from
11599 record_node_allocation_statistics.
11600 (free_node): Use get_stats_node_kind.
11602 2018-03-14 Richard Biener <rguenther@suse.de>
11604 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11605 that the value-set of ANTIC_IN doesn't grow.
11608 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11610 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11611 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11613 2018-03-14 Julia Koval <julia.koval@intel.com>
11615 * config.gcc (icelake-client, icelake-server): New.
11617 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11618 (initial_ix86_arch_features): Ditto.
11619 (PTA_SKYLAKE): Add SGX.
11620 (PTA_ICELAKE): Remove.
11621 (PTA_ICELAKE_CLIENT): New.
11622 (PTA_ICELAKE_SERVER): New.
11623 (ix86_option_override_internal): Split up icelake on icelake client and
11625 (get_builtin_code_for_version): Ditto.
11626 (fold_builtin_cpu): Ditto.
11627 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11628 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11629 * config/i386/i386.h (processor_type): Ditto.
11630 * doc/invoke.texi: Ditto.
11632 2018-03-14 Jakub Jelinek <jakub@redhat.com>
11635 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11636 INTEGER_CST offset, add it together with bitpos / 8 and
11637 sign extend based on POINTER_SIZE.
11641 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
11644 * config/i386/constraints.md (Yc): New register constraint.
11645 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11646 Use Yc constraint for alternative 2 of operand 0. Remove
11647 preferred_for_speed attribute.
11649 2018-03-14 Richard Biener <rguenther@suse.de>
11651 PR tree-optimization/84830
11652 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11653 with the old one to avoid oscillations.
11655 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
11658 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11660 (assign_by_spills): Return a flag of reload assignment failure.
11661 Do not process the reload assignment failures. Do not spill other
11662 reload pseudos if they has the same reg class. Update n if
11664 (lra_assign): Add a return arg. Set up from the result of
11665 assign_by_spills call.
11666 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11667 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11668 usage_insns if it is not NULL.
11669 (spill_hard_reg_in_range): New function.
11670 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11671 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11672 function prototypes.
11673 (lra_assign): Change prototype.
11674 * lra.c (lra): Add code to deal with fails by splitting hard reg
11677 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
11679 * config/riscv/riscv.opt (mrelax): New option.
11680 * config/riscv/riscv.c (riscv_file_start): Emit ".option
11681 "norelax" when riscv_mrelax is disabled.
11682 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11684 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11687 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11688 reassociation for int modes.
11690 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11692 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11693 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11695 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11696 * config/aarch64/aarch64-sve.md
11697 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11698 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11699 (*extend<mode><Vwide>2): Rename to...
11700 (aarch64_sve_extend<mode><Vwide>2): ...this.
11701 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11702 renaming the old pattern to...
11703 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
11705 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11706 define_expand, renaming the old pattern to...
11707 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11708 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11709 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11710 account when deciding which SVE instruction the optab should use.
11711 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11713 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11715 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11716 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11717 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11718 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11719 (tlsdesc_small_<mode>): Turn a define_expand and use
11720 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
11721 (tlsdesc_small_advsimd_<mode>): ...this.
11722 (tlsdesc_small_sve_<mode>): New pattern.
11724 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11726 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11727 (UNSPEC_UMUL_HIGHPART): New constants.
11728 (MUL_HIGHPART): New int iteraor.
11729 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11730 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11732 (*<su>mul<mode>3_highpart): New define_insn.
11734 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11737 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11740 2018-03-13 Martin Liska <mliska@suse.cz>
11743 * (sem_item_optimizer::sem_item_optimizer): Initialize new
11745 (sem_item_optimizer::~sem_item_optimizer): Release it.
11746 (sem_item_optimizer::merge_classes): Register variable aliases.
11747 (sem_item_optimizer::fixup_pt_set): New function.
11748 (sem_item_optimizer::fixup_points_to_sets): Likewise.
11749 * ipa-icf.h: Declare new variables and functions.
11751 2018-03-13 Jakub Jelinek <jakub@redhat.com>
11753 PR middle-end/84834
11754 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11755 integer_pow2p@2 and test integer_pow2p in condition.
11756 (A < 0 ? C : 0): Similarly for @1.
11758 PR middle-end/84831
11759 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11760 characters starting at p contain '\0' character, don't look beyond
11764 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11765 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11768 * reg-stack.c (change_stack): Change update_end var from int to
11769 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11770 also call set_block_for_insn on the newly added insns and rescan.
11773 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11774 on the last operand.
11777 * tree.c (stabilize_reference_1): Return save_expr (e) for
11778 STATEMENT_LIST even if it doesn't have side-effects.
11780 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
11782 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11784 2018-03-12 Renlin Li <renlin.li@arm.com>
11786 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11787 aarch64_output_scalar_simd_mov_immediate.
11789 2018-03-12 Martin Sebor <msebor@redhat.com>
11791 PR tree-optimization/83456
11792 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11793 for perfectly overlapping calls to memcpy.
11794 (gimple_fold_builtin_memory_chk): Same.
11795 (gimple_fold_builtin_strcpy): Handle no-warning.
11796 (gimple_fold_builtin_stxcpy_chk): Same.
11797 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11799 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11801 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11802 parameter. Use it for SFmode.
11803 (rs6000_function_arg_advance_1): Adjust.
11804 (rs6000_function_arg): Adjust.
11805 (rs6000_gimplify_va_arg): Pass false for that new parameter.
11807 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11809 PR rtl-optimization/84169
11810 PR rtl-optimization/84780
11811 * combine.c (can_combine_p): Check for a 2-insn combination whether
11812 the destination register is used between the two insns, too.
11814 2018-03-12 Richard Biener <rguenther@suse.de>
11816 PR tree-optimization/84803
11817 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
11818 for refs DR analysis didn't process.
11820 2018-03-12 Richard Biener <rguenther@suse.de>
11822 PR tree-optimization/84777
11823 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
11824 force-vectorize loops ignore whether we are optimizing for size.
11826 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
11828 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
11829 (TARGET_MD_ASM_ADJUST): Define.
11831 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
11832 Kito Cheng <kito.cheng@gmail.com>
11833 Chung-Ju Wu <jasonwucj@gmail.com>
11835 * config/nds32/nds32.c (nds32_compute_stack_frame,
11836 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
11837 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
11838 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
11839 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
11840 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
11841 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
11842 * config/nds32/nds32.md (prologue, epilogue): Use macro
11843 NDS32_V3PUSH_AVAILABLE_P to do checking.
11845 2018-03-11 Jakub Jelinek <jakub@redhat.com>
11848 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
11849 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
11850 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
11851 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
11852 addition of most attributes on !orig_type_die or the attribute not
11853 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
11855 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11856 Chung-Ju Wu <jasonwucj@gmail.com>
11858 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
11859 __NDS32_VH__ macro.
11860 * config/nds32/nds32.opt (mvh): New option.
11862 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11863 Chung-Ju Wu <jasonwucj@gmail.com>
11865 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
11867 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
11868 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
11871 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11872 Chung-Ju Wu <jasonwucj@gmail.com>
11874 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
11876 * config/nds32/nds32-multiple.md (strlensi): New pattern.
11877 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
11879 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
11880 Kito Cheng <kito.cheng@gmail.com>
11881 Chung-Ju Wu <jasonwucj@gmail.com>
11883 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
11884 UNSPEC_FFMISM and UNSPEC_FLMISM.
11885 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
11886 for ffb, ffmism and flmism.
11887 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
11888 (unspec_ffmism): Ditto.
11889 (unspec_flmism): Ditto.
11890 (nds32_expand_builtin_impl): Check if string extension is available.
11891 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
11892 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
11894 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
11897 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
11900 * lra-assigns.c (assign_by_spills): Return a flag of reload
11901 assignment failure. Do not process the reload assignment
11902 failures. Do not spill other reload pseudos if they has the same
11904 (lra_assign): Add a return arg. Set up from the result of
11905 assign_by_spills call.
11906 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11907 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11908 usage_insns if it is not NULL.
11909 (spill_hard_reg_in_range): New function.
11910 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11911 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11912 function prototypes.
11913 (lra_assign): Change prototype.
11914 * lra.c (lra): Add code to deal with fails by splitting hard reg
11917 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
11920 * config/i386/i386.opt: Replace Enforcment with Enforcement.
11922 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
11925 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
11926 (dw_val_node): Add val_symbolic_view.
11927 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
11928 (symview_upper_bound): New.
11929 (new_line_info_table): Initialize symviews_since_reset.
11930 (dwarf2out_source_line): Count symviews_since_reset and set
11931 symview_upper_bound.
11932 (dw_val_equal_p): Handle symview.
11933 (add_AT_symview): New.
11934 (print_dw_val): Handle symview.
11935 (attr_checksum, attr_checksum_ordered): Likewise.
11936 (same_dw_val_p, size_of_die): Likewise.
11937 (value_format, output_die): Likewise.
11938 (add_high_low_attributes): Use add_AT_symview for entry_view.
11939 (dwarf2out_finish): Reset symview_upper_bound, clear
11942 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
11945 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
11946 Add strict argument and use it.
11947 (rs6000_split_multireg_move): Update for new strict argument.
11948 (mem_operand_gpr): Disallow all non-offsettable addresses.
11949 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
11951 2018-03-09 Jakub Jelinek <jakub@redhat.com>
11954 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
11955 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
11956 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
11959 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
11960 decl, use remap_type if we want to use the type.
11962 2018-03-09 Martin Sebor <msebor@redhat.com>
11964 PR tree-optimization/84526
11965 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11967 (builtin_access::generic_overlap): Be prepared to handle non-array
11970 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
11972 PR rtl-optimization/84682
11973 * lra-constraints.c (process_address_1): Check is_address flag
11974 for address constraints.
11975 (process_alt_operands): Likewise.
11976 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
11977 preprocess_constraints.
11978 * recog.h (preprocess_constraints): Add oploc parameter.
11980 * recog.c (preprocess_constraints): Test address_operand for
11981 CT_ADDRESS constraints.
11983 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
11986 * lra-assigns.c (assign_by_spills): Return a flag of reload
11987 assignment failure. Do not process the reload assignment
11988 failures. Do not spill other reload pseudos if they has the same
11990 (lra_assign): Add a return arg. Set up from the result of
11991 assign_by_spills call.
11992 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11993 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11994 usage_insns if it is not NULL.
11995 (spill_hard_reg_in_range): New function.
11996 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11997 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11998 function prototypes.
11999 (lra_assign): Change prototype.
12000 * lra.c (lra): Add code to deal with fails by splitting hard reg
12003 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12006 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12007 Accept complain bool parameter. Only emit errors if it is true.
12008 (arm_parse_cpu_option_name): Likewise.
12009 (arm_target_thumb_only): Adjust callers of the above.
12010 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12011 prototype to take a default true bool parameter.
12012 (arm_parse_arch_option_name): Likewise.
12014 2018-03-09 David Malcolm <dmalcolm@redhat.com>
12015 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12019 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12020 * configure: Regenerate.
12021 * configure.ac ("linker --version-script option"): New.
12022 ("linker soname option"): New.
12024 2018-03-09 Richard Biener <rguenther@suse.de>
12026 PR tree-optimization/84775
12027 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12028 immediate uses of predicate stmts and mark them modified.
12031 PR tree-optimization/84178
12032 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12034 (version_loop_for_if_conversion): Delay update_ssa call.
12035 (tree_if_conversion): Delay update_ssa until after predicate
12038 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
12041 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12042 when the function accesses prior frames.
12044 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12047 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12048 gen_llsym, otherwise call maybe_gen_llsym.
12050 PR inline-asm/84742
12051 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12052 has ',' character inside of it.
12054 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12057 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12058 as clobbering CC_REGNUM.
12060 2018-03-08 Richard Biener <rguenther@suse.de>
12062 PR middle-end/84552
12063 * tree-scalar-evolution.c: Include tree-into-ssa.h.
12064 (follow_copies_to_constant): Do not follow SSA names registered
12067 2018-03-08 Richard Biener <rguenther@suse.de>
12069 PR tree-optimization/84178
12070 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12072 (version_loop_for_if_conversion): Delay update_ssa call.
12073 (tree_if_conversion): Delay update_ssa until after predicate
12076 2018-03-08 David Malcolm <dmalcolm@redhat.com>
12078 PR tree-optimization/84178
12079 * tree-if-conv.c (release_bb_predicate): Remove the
12080 the assertion that the stmts have NULL use_ops.
12081 Discard the statements, asserting that they haven't
12082 yet been added to a BB.
12084 2018-03-08 Richard Biener <rguenther@suse.de>
12086 PR tree-optimization/84746
12087 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12088 (phi_translate): Pass in destination ANTIC_OUT set.
12089 (phi_translate_1): Likewise. For a simplified result lookup
12090 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12091 (phi_translate_set): Adjust.
12092 (do_pre_regular_insertion): Likewise.
12093 (do_pre_partial_partial_insertion): Likewise.
12095 2018-03-08 Martin Liska <mliska@suse.cz>
12097 PR gcov-profile/84735
12098 * doc/gcov.texi: Document usage of profile files.
12099 * gcov-io.h: Document changes in the format.
12101 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
12105 * dwarf2out.c (struct dw_line_info_table): Update comments for
12107 (FORCE_RESET_NEXT_VIEW): New.
12108 (FORCE_RESETTING_VIEW_P): New.
12109 (RESETTING_VIEW_P): Check for -1 too.
12110 (ZERO_VIEW_P): Likewise.
12111 (new_line_info_table): Force-reset next view.
12112 (dwarf2out_begin_function): Likewise.
12113 (dwarf2out_source_line): Simplify zero_view_p initialization.
12114 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12115 view directly. Omit view when omitting .loc at line 0.
12117 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12119 PR tree-optimization/84740
12120 * tree-switch-conversion.c (process_switch): Call build_constructors
12121 only if info.phi_count is non-zero.
12123 PR tree-optimization/84739
12124 * tree-tailcall.c (find_tail_calls): Check call arguments against
12125 DECL_ARGUMENTS (current_function_decl) rather than
12126 DECL_ARGUMENTS (func) when checking for tail recursion.
12128 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12130 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12131 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12132 Volker Reichelt's entry and add entries for people that perform
12133 GCC fuzzy testing and report numerous bugs.
12135 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
12138 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12139 readonly data in sdata, if that is disabled.
12140 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12141 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12142 -mreadonly-in-sdata option.
12144 2018-03-07 Martin Sebor <msebor@redhat.com>
12146 PR tree-optimization/84468
12147 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12148 basic block when looking for nul assignment.
12150 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
12153 * except.h (output_function_exception_table): Adjust prototype.
12154 * except.c (output_function_exception_table): Remove FNNAME parameter
12155 and add SECTION parameter. Ouput one part of the table at a time.
12156 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12157 the first part of the exception table and emit unwind directives.
12158 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12159 (i386_pe_seh_cold_init): Likewise.
12160 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12161 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12162 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12163 (ix86_output_call_insn): Emit a nop in one more case for SEH.
12164 * config/i386/winnt.c: Include except.h.
12165 (struct seh_frame_state): Add reg_offset, after_prologue and
12166 in_cold_section fields.
12167 (i386_pe_seh_end_prologue): Set seh->after_prologue.
12168 (i386_pe_seh_cold_init): New function.
12169 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12170 to seh->in_cold_section.
12171 (seh_emit_push): Record the offset of the push.
12172 (seh_emit_save): Record the offet of the save.
12173 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12174 Test seh->after_prologue to disregard the epilogue.
12175 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12176 (i386_pe_end_cold_function): New function.
12178 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12181 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12182 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12185 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12187 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12188 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12190 PR middle-end/84723
12191 * multiple_target.c: Include tree-inline.h and intl.h.
12192 (expand_target_clones): Diagnose and fail if node->definition and
12193 !tree_versionable_function_p (node->decl).
12195 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
12197 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12199 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12200 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12201 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12203 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12206 * combine.c (try_combine): Use reg_or_subregno instead of handling
12207 just paradoxical SUBREGs and REGs.
12209 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
12211 * config/arc/arc.c (arc_finalize_pic): Remove function.
12212 (arc_must_save_register): We use single base PIC register, remove
12213 checks to save/restore the PIC register.
12214 (arc_expand_prologue): Likewise.
12215 * config/arc/arc-protos.h (arc_set_default_type_attributes):
12217 (arc_verify_short): Likewise.
12218 (arc_attr_type): Likewise.
12219 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12220 (walk_stores): Likewise.
12221 (arc_address_cost): Make it static.
12222 (arc_verify_short): Likewise.
12223 (branch_dest): Likewise.
12224 (arc_attr_type): Likewise.
12225 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12226 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12227 (arc_final_prescan_insn): Remove inserting the nops due to
12228 hardware hazards. It is done in reorg step.
12229 (insn_length_variant_t): Remove.
12230 (insn_length_parameters_t): Likewise.
12231 (arc_insn_length_parameters): Likewise.
12232 (arc_get_insn_variants): Likewise.
12233 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12235 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12237 PR inline-asm/84683
12238 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12241 PR tree-optimization/84687
12242 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12244 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12246 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12248 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12249 Rename to ppc_speculation_barrier.
12250 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12251 __builtin_ppc_speculation_barrier.
12253 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12256 * combine.c (combine_simplify_rtx): Don't try to simplify if
12257 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12260 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
12262 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12263 to 32 bytes when compiling for POWER9.
12265 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12268 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12269 regparm >= 3 with no arg reg available also for calls with
12270 flag_force_indirect_call. Pass decl to ix86_function_regparm.
12273 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12275 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
12277 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
12280 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12282 2018-03-05 Richard Biener <rguenther@suse.de>
12284 PR tree-optimization/84486
12285 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12286 When inserting a __builtin_assume_aligned call set the LHS
12287 SSA name alignment info accordingly.
12289 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
12291 PR tree-optimization/84114
12292 * config/aarch64/aarch64.c (aarch64_reassociation_width)
12293 Avoid reassociation of FLOAT_MODE addition.
12295 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
12297 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12298 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12299 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12300 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12301 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12302 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12303 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12305 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12306 __builtin_ia32_wbinvd): New builtins.
12307 (SPECIAL_ARGS2): New.
12308 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12309 (SPECIAL_ARGS2): New.
12310 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12311 (ix86_valid_target_attribute_inner_p): Ditto.
12312 (ix86_init_mmx_sse_builtins): Add special_args2.
12313 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12314 TARGET_WBNOINVD_P): New.
12315 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12316 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12317 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12318 * config/i386/immintrin.h (_wbinvd): New intrinsic.
12319 * config/i386/pconfigintrin.h: New file.
12320 * config/i386/wbnoinvdintrin.h: Ditto.
12321 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12323 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12325 2018-03-05 Richard Biener <rguenther@suse.de>
12327 PR tree-optimization/84670
12328 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12330 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12331 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12332 (compute_antic_aux): Only assert the number of values in ANTIC_IN
12333 doesn't grow if all successors (recursively) were visited at least
12336 2018-03-05 Richard Biener <rguenther@suse.de>
12338 PR tree-optimization/84650
12339 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12340 if executed in the loop pipeline.
12342 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
12344 * doc/configfiles.texi (Configuration Files): Move info about
12345 conditionalizing $target-protos.h to...
12346 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
12347 differs from $target-protos.h.
12349 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
12350 Chung-Ju Wu <jasonwucj@gmail.com>
12352 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12353 * config/nds32/nds32-multiple.md (setmemsi): Define.
12354 * config/nds32/nds32-memory-manipulation.c
12355 (nds32_gen_dup_4_byte_to_word_value): New.
12356 (emit_setmem_word_loop): New.
12357 (emit_setmem_byte_loop): New.
12358 (nds32_expand_setmem_loop): New.
12359 (nds32_expand_setmem_loop_v3m): New.
12360 (nds32_expand_setmem_unroll): New.
12361 (nds32_expand_setmem): New.
12363 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12364 Chung-Ju Wu <jasonwucj@gmail.com>
12366 * config/nds32/nds32-memory-manipulation.c
12367 (nds32_emit_load_store): New.
12368 (nds32_emit_post_inc_load_store): New.
12369 (nds32_emit_mem_move): New.
12370 (nds32_emit_mem_move_block): New.
12371 (nds32_expand_movmemsi_loop_unknown_size): New.
12372 (nds32_expand_movmemsi_loop_known_size): New.
12373 (nds32_expand_movmemsi_loop): New.
12374 (nds32_expand_movmemsi_unroll): New.
12375 (nds32_expand_movmemqi): Rename ...
12376 (nds32_expand_movmemsi): ... to this.
12377 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12378 (movmemsi): ... to this.
12379 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12380 (nds32_expand_movmemsi): ... to this.
12382 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12383 Monk Chiang <sh.chiang04@gmail.com>
12384 Chung-Ju Wu <jasonwucj@gmail.com>
12386 * config/nds32/nds32-protos.h
12387 (nds32_expand_load_multiple): New arguments.
12388 (nds32_expand_store_multiple): Ditto.
12389 (nds32_valid_multiple_load_store): Rename ...
12390 (nds32_valid_multiple_load_store_p): ... to this.
12391 * config/nds32/nds32-memory-manipulation.c
12392 (nds32_expand_load_multiple): Refine implementation.
12393 (nds32_expand_store_multiple): Ditto.
12394 * config/nds32/nds32-multiple.md
12395 (load_multiple): Update nds32_expand_load_multiple interface.
12396 (store_multiple): Update nds32_expand_store_multiple interface.
12397 * config/nds32/nds32-predicates.c
12398 (nds32_valid_multiple_load_store): Rename ...
12399 (nds32_valid_multiple_load_store_p): ... to this and refine
12401 * config/nds32/predicates.md
12402 (nds32_load_multiple_and_update_address_operation): New predicate.
12403 (nds32_store_multiple_and_update_address_operation): New predicate.
12405 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12406 Chung-Ju Wu <jasonwucj@gmail.com>
12408 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12409 (combo): New attribute.
12410 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12412 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
12414 * config/nds32/nds32.opt: Change -mcmodel= default value.
12416 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
12417 Monk Chiang <sh.chiang04@gmail.com>
12418 Chung-Ju Wu <jasonwucj@gmail.com>
12420 * config/nds32/constants.md (unspec_element): New enum.
12421 * config/nds32/constraints.md (Umw): New constraint.
12422 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12423 * config/nds32/nds32-intrinsic.md: Likewise.
12424 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12425 (nds32_valid_smw_lwm_base_p): New.
12426 (nds32_output_smw_single_word): New.
12427 (nds32_output_lmw_single_word): New.
12428 (nds32_expand_unaligned_load): New.
12429 (nds32_expand_unaligned_store): New.
12430 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12431 (nds32_output_smw_single_word): Declare.
12432 (nds32_output_lmw_single_word): Declare.
12433 (nds32_expand_unaligned_load): Declare.
12434 (nds32_expand_unaligned_store): Declare.
12435 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12436 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12437 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12438 NDS32_BUILTIN_UASTORE_DW.
12439 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12442 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
12443 Kito Cheng <kito.cheng@gmail.com>
12444 Chung-Ju Wu <jasonwucj@gmail.com>
12446 * config/nds32/nds32-intrinsic.c
12447 (nds32_expand_builtin_null_ftype_reg): Delete.
12448 (nds32_expand_builtin_reg_ftype_imm): Ditto.
12449 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12450 (nds32_read_argument): New.
12451 (nds32_legitimize_target): Ditto.
12452 (nds32_legitimize_argument): Ditto.
12453 (nds32_check_constant_argument): Ditto.
12454 (nds32_expand_unop_builtin): Ditto.
12455 (nds32_expand_unopimm_builtin): Ditto.
12456 (nds32_expand_binop_builtin): Ditto.
12457 (nds32_builtin_decl_impl): Ditto.
12458 (builtin_description): Ditto.
12459 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12460 (nds32_init_builtins_impl): Ditto.
12461 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12462 (nds32_builtin_decl): New.
12463 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12464 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12466 2018-03-02 Jeff Law <law@redhat.com>
12468 * reorg.c (stop_search_p): Handle DEBUG_INSN.
12469 (redundant_insn, fill_simple_delay_slots): Likewise.
12470 (fill_slots_from_thread): Likewise.
12471 * resource.c (mark_referenced_resources): Likewise.
12472 (mark_set_resources, find_dead_or_set_registers): Likewise.
12474 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12476 * substring-locations.h (format_warning_va): Formatting fix for
12477 ATTRIBUTE_GCC_DIAG.
12478 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12480 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12481 * substring-locations.c: Include intl.h.
12482 (format_warning_va): Turned into small wrapper around
12483 format_warning_n_va, renamed to ...
12484 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12485 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12487 (format_warning_at_substring_n): New function.
12488 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12489 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
12490 format_warning_at_substring with just a shorter name instead of
12491 const function pointer.
12492 (fmtwarn_n): New function.
12493 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12494 appropriate, get rid of all the fmtstr temporaries, move conditionals
12495 with G_() wrapped string literals directly into fmtwarn arguments,
12496 cast dir.len to (int), formatting fixes.
12498 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
12500 * doc/invoke.texi: Remove "Cilk Plus" references.
12502 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12503 Richard Biener <rguenther@suse.de>
12506 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12507 for error or warning attributes if CALL_FROM_THUNK_P is set.
12510 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12513 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12514 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12517 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12518 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12520 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12521 instead of -1U in last predictors element's probability member.
12523 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12526 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12527 arguments if they are comparable.
12529 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12531 PR tree-optimization/84634
12532 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12533 masks and masked_loop_p with a single loop_masks, making sure it's
12534 null for bb vectorization.
12536 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12538 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12539 (vect_analyze_data_ref_access): Use loop->safe_len rather than
12540 loop->force_vectorize to check whether there is no alias.
12542 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12545 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12547 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12549 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12550 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12551 instead of a loop around prev_real_insn.
12552 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12555 PR inline-asm/84625
12556 * config/i386/i386.c (ix86_print_operand): Use conditional
12557 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12560 2018-03-02 Richard Biener <rguenther@suse.de>
12562 PR tree-optimization/84427
12563 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12564 (bitmap_set_subtract_values): Rewrite to handle multiple
12567 (prune_clobbered_mems): Likewise.
12568 (phi_translate): Take edge instead of pred/phiblock.
12569 (phi_translate_1): Likewise.
12570 (phi_translate_set): Likewise. Insert all translated
12571 exprs for a value into the set, keeping possibly multiple
12572 expressions per value.
12573 (compute_antic_aux): Adjust for phi_translate changes.
12574 When intersecting union the expressions and prune those
12575 not in the final value set, keeping possibly multiple
12576 expressions per value. Do not use value-insertion
12577 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12578 all expressions. Add verification that the value-sets
12579 only shrink during iteration.
12580 (compute_partial_antic_aux): Adjust for the phi_translate changes.
12581 (do_pre_regular_insertion): Likewise.
12582 (do_pre_partial_partial_insertion): Likewise.
12584 2018-03-02 Richard Biener <rguenther@suse.de>
12587 * config/darwin.c (saved_debug_info_level): New static global.
12588 (darwin_asm_lto_start): Disable debug info generation for LTO out.
12589 (darwin_asm_lto_end): Restore debug info generation settings.
12591 2018-03-01 Martin Liska <mliska@suse.cz>
12594 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12595 volatile arguments.
12597 2018-03-01 Richard Biener <rguenther@suse.de>
12600 * dwarf2out.c (gen_variable_die): Properly handle late VLA
12601 type annotation with LTO when debug was disabled at compile-time.
12603 2018-03-01 Matthew Fortune <mfortune@gmail.com>
12605 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12607 (mips_final_postscan_insn): Likewise.
12609 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
12611 PR rtl-optimization/84528
12612 * alias.c (init_alias_target): Add commentary.
12613 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12614 a unique base value if the frame pointer is not eliminated
12615 to the stack pointer.
12617 2018-03-01 Tom de Vries <tom@codesourcery.com>
12619 PR rtl-optimization/83327
12620 * lra-int.h (hard_regs_spilled_into): Declare.
12621 * lra.c (hard_regs_spilled_into): Define.
12622 (init_reg_info): Init hard_regs_spilled_into.
12623 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12624 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12625 (process_bb_lives): Handle hard_regs_spilled_into.
12626 (lra_create_live_ranges_1): Before doing liveness propagation, clear
12627 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12629 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
12631 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12632 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12633 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12634 * config/rs6000/aix72.h: New file.
12636 2018-02-28 Jakub Jelinek <jakub@redhat.com>
12638 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12639 instead of warning_at with conditional singular and plural messages
12643 * stor-layout.c (update_alignment_for_field): For
12644 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12645 && !DECL_PACKED (field), do the alignment update, just use
12646 only desired_align instead of MAX (type_align, desired_align)
12648 (place_field): Don't do known_align < desired_align handling
12649 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12650 is non-NULL, instead do it after rli->prev_field handling and
12651 only if not within a bitfield word. For DECL_PACKED (field)
12652 use type_align of BITS_PER_UNIT.
12654 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
12656 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12657 superfluous parentheses and trailing spaces.
12659 2018-02-28 Richard Biener <rguenther@suse.de>
12661 PR tree-optimization/84584
12662 * graphite-scop-detection.c (scop_detection::add_scop): Discard
12663 SCoPs with fake exit edge.
12665 2018-02-28 Martin Liska <mliska@suse.cz>
12668 * timevar.c (timer::print): Fix format to properly print 100%
12671 2018-02-28 Richard Biener <rguenther@suse.de>
12673 PR middle-end/84607
12674 * genmatch.c (capture_info::walk_match): Do not mark
12675 captured expressions without operands as expr_p given
12676 they act more like predicates and should be subject to
12677 "lost tail" side-effect preserving.
12679 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
12681 PR rtl-optimization/81611
12682 * auto-inc-dec.c (attempt_change): Move dead note from
12683 mem_insn if it's the next use of regno
12684 (find_address): Take address use of reg holding
12685 non-incremented value. Add parm to limit search to the named
12687 (merge_in_block): Attempt to use a mem insn that is the next
12688 use of the original regno.
12690 2018-02-27 Martin Sebor <msebor@redhat.com>
12693 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
12694 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
12696 2018-02-27 Martin Sebor <msebor@redhat.com>
12698 PR translation/84207
12699 * diagnostic-core.h (warning_n, error_n, inform_n): Change
12700 n argument to unsigned HOST_WIDE_INT.
12701 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12702 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
12703 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12704 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12706 2018-02-27 Richard Biener <rguenther@suse.de>
12708 PR tree-optimization/84512
12709 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12710 Do not use the estimate returned from record_stmt_cost for
12711 the scalar iteration cost but sum properly using add_stmt_cost.
12713 2018-02-27 Richard Biener <rguenther@suse.de>
12715 PR tree-optimization/84466
12716 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12717 Adjust last change to less strictly validate use operands.
12719 2018-02-27 Martin Liska <mliska@suse.cz>
12721 PR gcov-profile/84548
12722 * gcov.c (process_file): Allow partial overlap and consider it
12723 also as group functions.
12724 (output_lines): Properly calculate range of lines for a group.
12726 2018-02-27 Martin Liska <mliska@suse.cz>
12728 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12729 'ggc' suffixes. Change first column width.
12730 (timer::print): Fix formatting of the column.
12732 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
12734 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12735 preserve inline entry blocks for the sake of debug inline
12736 entry point markers alone.
12737 (remove_unused_locals): Suggest in comments a better place to
12738 force the preservation of inline entry blocks that are
12739 otherwise unused, but do not preserve them.
12741 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12743 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12745 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12748 * config/i386/constraints.md (Bs): Replace
12749 ix86_indirect_branch_register with
12750 TARGET_INDIRECT_BRANCH_REGISTER.
12752 * config/i386/i386.md (indirect_jump): Likewise.
12753 (tablejump): Likewise.
12754 (*sibcall_memory): Likewise.
12755 (*sibcall_value_memory): Likewise.
12756 Peepholes of indirect call and jump via memory: Likewise.
12757 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12758 (*sibcall_value_GOT_32): Likewise.
12759 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12760 (GOT_memory_operand): Likewise.
12761 (call_insn_operand): Likewise.
12762 (sibcall_insn_operand): Likewise.
12763 (GOT32_symbol_operand): Likewise.
12764 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12766 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12768 PR rtl-optimization/83496
12769 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12770 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
12771 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12772 redundant insn, if any.
12773 (relax_delay_slots): Likewise.
12774 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12776 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
12778 PR tree-optimization/83965
12779 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12780 that grouped statements are part of a reduction chain. Return
12781 true if the statement is not marked as a reduction itself but
12782 is part of a group.
12783 (vect_recog_dot_prod_pattern): Don't check whether the statement
12784 is part of a group here.
12785 (vect_recog_sad_pattern): Likewise.
12786 (vect_recog_widen_sum_pattern): Likewise.
12788 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12791 * final.c (rest_of_clean_state): Also look for calls inside sequences.
12793 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12796 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12798 (ix86_output_indirect_function_return): New prototype.
12799 (ix86_split_simple_return_pop_internal): Likewise.
12800 * config/i386/i386.c (indirect_return_via_cx): New.
12801 (indirect_return_via_cx_bnd): Likewise.
12802 (indirect_thunk_name): Handle return va CX_REG.
12803 (output_indirect_thunk_function): Create alias for
12804 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12805 (ix86_output_indirect_jmp): Remove the bool argument.
12806 (ix86_output_indirect_function_return): New function.
12807 (ix86_split_simple_return_pop_internal): Likewise.
12808 * config/i386/i386.md (*indirect_jump): Don't pass false
12809 to ix86_output_indirect_jmp.
12810 (*tablejump_1): Likewise.
12811 (simple_return_pop_internal): Change it to define_insn_and_split.
12812 Call ix86_split_simple_return_pop_internal to split it for
12813 -mfunction-return=.
12814 (simple_return_indirect_internal): Call
12815 ix86_output_indirect_function_return instead of
12816 ix86_output_indirect_jmp.
12818 2018-02-26 Jakub Jelinek <jakub@redhat.com>
12821 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
12822 memset and value initialization afterwards.
12824 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
12826 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
12828 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12831 * common/config/aarch64/aarch64-common.c
12832 (aarch_option_optimization_table[]): Switch
12833 off fomit-frame-pointer
12835 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12836 Chung-Ju Wu <jasonwucj@gmail.com>
12838 * config/nds32/nds32-multiple.md (load_multiple): Disallow
12840 (store_multiple): Ditto.
12842 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12844 * config.gcc: Add --with-cpu support for nds32 target.
12845 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
12846 * config/nds32/nds32.opt: Add -mcpu= option.
12848 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
12850 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
12851 isel=yes): Warn for these deprecated options.
12853 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
12855 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
12856 ISA_2_5_MASKS_EMBEDDED.
12858 2018-02-23 Jakub Jelinek <jakub@redhat.com>
12860 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
12861 p->max as pointers rather than using iterative_hash_expr.
12863 2018-02-23 Carl Love <cel@us.ibm.com>
12865 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
12866 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
12868 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
12869 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
12870 P8V_BUILTIN_VEC_VUNSIGNED2.
12872 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
12875 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
12876 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
12878 * lra-constraints.c (curr_insn_transform): Set up
12879 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
12881 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
12882 * lra-eliminations.c (spill_pseudos): Ditto.
12883 (process_insn_for_elimination): Ditto.
12884 * lra-lives.c (reg_early_clobber_p): Use the new macros.
12885 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
12886 LRA_NON_CLOBBERED_ALT.
12888 2018-02-22 Martin Sebor <msebor@redhat.com>
12890 PR tree-optimization/84480
12891 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
12892 to maybe_diag_stxncpy_trunc. Call it.
12893 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
12894 from gimple_fold_builtin_strcpy. Print inlining stack.
12895 (handle_builtin_stxncpy): Print inlining stack.
12896 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
12898 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
12901 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
12902 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
12903 and -fcheck-pointer-bounds are used together.
12904 (indirect_thunk_prefix): New enum.
12905 (indirect_thunk_need_prefix): New function.
12906 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
12907 "_nt" instead of "_bnd" for NOTRACK prefix.
12908 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
12909 (output_indirect_thunk_function): Likewise.
12911 (ix86_code_end): Update output_indirect_thunk_function calls.
12912 (ix86_output_indirect_branch_via_reg): Replace
12913 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
12914 (ix86_output_indirect_branch_via_push): Likewise.
12915 (ix86_output_function_return): Likewise.
12916 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
12917 incompatible with -fcf-protection=branch and
12918 -fcheck-pointer-bounds.
12920 2018-02-22 Steve Ellcey <sellcey@cavium.com>
12923 * config/aarch64/aarch64.c (aarch64_print_address_internal):
12924 Change gcc_assert call to output_operand_lossage.
12926 2018-02-22 Steve Ellcey <sellcey@cavium.com>
12928 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
12930 2018-02-22 DJ Delorie <dj@redhat.com>
12931 Sebastian Perta <sebastian.perta@renesas.com>
12932 Oleg Endo <olegendo@gcc.gnu.org>
12934 * config/rx/rx.c (rx_rtx_costs): New function.
12935 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
12937 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
12939 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
12941 2018-02-22 Martin Liska <mliska@suse.cz>
12944 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
12945 Add "native" as a possible value.
12947 2018-02-22 Martin Liska <mliska@suse.cz>
12950 * config/i386/i386.c (ix86_option_override_internal):
12951 Add "native" as a possible value for -march and -mtune.
12953 2018-02-22 Jakub Jelinek <jakub@redhat.com>
12956 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
12957 to all type variants.
12959 PR tree-optimization/84503
12960 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
12961 width as info->bitpos + info->bitsize - start.
12962 (merged_store_group::merge_overlapping): Simplify width computation.
12963 (check_no_overlap): New function.
12964 (imm_store_chain_info::try_coalesce_bswap): Compute expected
12965 start + width and last_order of the group, fail if check_no_overlap
12967 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
12968 to group if check_no_overlap fails.
12970 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
12972 * config/rs6000/altivec.md: Delete contraint arguments to
12973 define_expand, define_split, and define_peephole2, and in
12974 define_insn_and_split if always unused.
12975 * config/rs6000/darwin.md: Ditto.
12976 * config/rs6000/dfp.md: Ditto.
12977 * config/rs6000/rs6000.md: Ditto.
12978 * config/rs6000/sync.md: Ditto.
12979 * config/rs6000/vector.md: Ditto.
12980 * config/rs6000/vsx.md: Ditto.
12982 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
12984 * config/rs6000/altivec.md: Write output control strings as braced
12985 blocks instead of double-quoted strings.
12986 * config/rs6000/darwin.md: Ditto.
12987 * config/rs6000/rs6000.md: Ditto.
12988 * config/rs6000/vector.md: Ditto.
12989 * config/rs6000/vsx.md: Ditto.
12991 2018-02-21 Jason Merrill <jason@redhat.com>
12993 PR c++/84314 - ICE with templates and fastcall attribute.
12994 * attribs.c (build_type_attribute_qual_variant): Remove assert.
12996 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
12998 * ipa-cp.c (determine_versionability): Fix comment typos.
13000 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13003 * ipa-cp.c (determine_versionability): Do not version functions caling
13006 2018-02-21 Martin Liska <mliska@suse.cz>
13009 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13010 Add "native" as a possible value.
13011 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
13012 the macro when native cpu detection is available.
13014 2018-02-21 Martin Liska <mliska@suse.cz>
13017 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13018 Add "native" as a possible value.
13019 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13020 when native cpu detection is available.
13022 2018-02-21 Jakub Jelinek <jakub@redhat.com>
13023 Martin Sebor <msebor@redhat.com>
13025 PR tree-optimization/84478
13026 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13028 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13029 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13030 support which is conservatively correct, for 2 only stay conservative
13031 for maxlen. Formatting and comment capitalization fixes. Add STRICT
13032 argument to the 2 argument get_range_strlen, adjust 6 arg
13033 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13035 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13036 (gimple_fold_builtin_strlen): Pass true as last argument to
13039 2018-02-20 Martin Sebor <msebor@redhat.com>
13041 PR middle-end/84095
13042 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13043 (builtin_memref::set_base_and_offset): Same. Handle inner references.
13044 (builtin_memref::builtin_memref): Factor out parts into
13045 set_base_and_offset and call it.
13047 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13049 PR middle-end/84406
13050 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13051 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13052 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
13053 search at the associated MODE_INT.
13055 2018-02-20 Jeff Law <law@redhat.com>
13057 PR middle-end/82123
13058 PR tree-optimization/81592
13059 PR middle-end/79257
13060 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13061 for range data rather than using global data.
13062 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13063 range data rather than using global data.
13064 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13065 pass it to children as needed.
13066 (struct directive::fmtresult): Similarly.
13067 (struct directive::set_width): Similarly.
13068 (struct directive::set_precision): Similarly.
13069 (format_integer, format_directive, parse_directive): Similarly.
13070 (format_none): Accept unnamed vr_values parameter.
13071 (format_percent, format_floating, format_character): Similarly.
13072 (format_string, format_plain): Similarly.
13073 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13074 the EVRP range analyzer for range data rather than using global data.
13075 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13076 gimple-ssa-evrp-analyze.h
13077 (class sprintf_dom_walker): Add after_dom_children member function.
13078 Add evrp_range_analyzer member.
13079 (sprintf_dom_walker::before_dom_children): Call into the EVRP
13080 range analyzer as needed.
13081 (sprintf_dom_walker::after_dom_children): New member function.
13082 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13084 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13085 (evrp_range_analyzer::pop_to_marker): Likewise.
13087 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13089 PR tree-optimization/84419
13090 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13091 with the required type if its current type is compatible but
13094 2018-02-20 Jakub Jelinek <jakub@redhat.com>
13096 PR middle-end/82004
13097 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13098 after vectorization.
13100 2018-02-20 Martin Liska <mliska@suse.cz>
13103 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13104 possible values if we don't have a hint.
13106 2018-02-20 Martin Liska <mliska@suse.cz>
13110 * final.c (shorten_branches): Build align_tab array with one
13112 * opts.c (finish_options): Add alignment option limit check.
13113 (MAX_CODE_ALIGN): Likewise.
13114 (MAX_CODE_ALIGN_VALUE): Likewise.
13115 * doc/invoke.texi: Document maximum allowed option value for
13116 all -falign-* options.
13118 2018-02-19 Jakub Jelinek <jakub@redhat.com>
13121 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13122 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13123 * var-tracking.c (emit_note_insn_var_location): Remove all references
13124 to NOTE_INSN_CALL_ARG_LOCATION.
13125 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13126 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13127 Use copy_rtx_if_shared.
13128 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13129 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13130 (dwarf2out_var_location): Remove handling of
13131 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13133 * final.c (final_scan_insn): Remove all references to
13134 NOTE_INSN_CALL_ARG_LOCATION.
13135 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
13136 before dumping final insns.
13137 * except.c (emit_note_eh_region_end): Remove all references to
13138 NOTE_INSN_CALL_ARG_LOCATION.
13139 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13140 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13141 * config/arc/arc.c (hwloop_optimize): Likewise.
13142 * config/arm/arm.c (create_fix_barrier): Likewise.
13143 * config/s390/s390.c (s390_chunkify_start): Likewise.
13144 * config/sh/sh.c (find_barrier): Likewise.
13145 * config/i386/i386.c (rest_of_insert_endbranch,
13146 ix86_seh_fixup_eh_fallthru): Likewise.
13147 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13148 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13149 * config/frv/frv.c (frv_function_prologue): Likewise.
13150 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
13152 (note_outside_basic_block_p): Remove all references to
13153 NOTE_INSN_CALL_ARG_LOCATION.
13154 * gengtype.c (adjust_field_rtx_def): Likewise.
13155 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13157 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13158 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13161 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13164 PR tree-optimization/84452
13165 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13166 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13169 2018-02-19 Martin Liska <mliska@suse.cz>
13172 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13174 2018-02-19 Martin Liska <mliska@suse.cz>
13175 Richard Sandiford <richard.sandiford@linaro.org>
13177 PR tree-optimization/82491
13178 * gimple-fold.c (get_base_constructor): Make earlier bail out
13181 2018-02-19 Carl Love <cel@us.ibm.com>
13183 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13184 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13186 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13187 P8V_BUILTIN_VEC_NEG.
13189 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
13191 * config/rl78/rl78.md (movdf): New define expand.
13193 2018-02-19 Martin Liska <mliska@suse.cz>
13196 * doc/invoke.texi: Fix typo.
13197 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13199 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
13201 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13202 handle rs6000_single_float and rs6000_double_float specially for
13205 2018-02-16 Jeff Law <law@redhat.com>
13207 * config/rx/rx.c (add_pop_cfi_notes): New function.;
13208 (pop_regs): Use it.
13210 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13213 * ipa-inline.c (inline_small_functions): Fix a typo.
13215 2018-02-16 Nathan Sidwell <nathan@acm.org>
13217 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13219 2018-02-16 Carl Love <cel@us.ibm.com>
13221 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13222 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13223 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13224 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13225 expansion to P8V_BUILTIN_VEC_FLOAT2.
13227 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
13229 PR rtl-optimization/70023
13230 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13231 src_regno into account.
13233 2018-02-16 Carl Love <cel@us.ibm.com>
13235 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13236 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13237 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13238 * config/rs6000/rs6000.c: Remove case statements for
13239 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13240 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13241 and P9V_BUILTIN_VEC_VINSERT4B.
13242 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13243 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13244 * config/rs6000/vsx.md:
13245 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13248 2018-02-16 Carl Love <cel@us.ibm.com>
13250 * config/rs6000/altivec.h: Add builtin names vec_extract4b
13252 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13254 * config/rs6000/rs6000-c.c: Add the definitions for
13255 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13256 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13257 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13258 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
13259 definition for insert4b and define insn *insert3b_internal.
13260 * doc/extend.texi: Add documentation for vec_extract4b.
13262 2018-02-16 Nathan Sidwell <nathan@acm.org>
13264 * doc/extend.texi (Backwards Compatibility): Mention friend
13265 injection. Note for-scope is deprecated.
13266 * doc/invoke.texi (-ffriend-injection): Deprecate.
13268 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
13270 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13271 that moved to I2, also allow destinations that are a paradoxical
13272 subreg (instead of a normal reg).
13274 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
13277 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13280 2018-02-16 Richard Biener <rguenther@suse.de>
13282 PR tree-optimization/84037
13283 PR tree-optimization/84016
13285 * config/i386/i386.c (ix86_builtin_vectorization_cost):
13286 Adjust vec_construct for the fact we need additional higher latency
13287 128bit inserts for AVX256 and AVX512 vector builds.
13288 (ix86_add_stmt_cost): Scale vector construction cost for
13291 2018-02-16 Richard Biener <rguenther@suse.de>
13293 PR tree-optimization/84417
13294 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13295 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13296 (non_rewritable_lvalue_p): Likewise, use poly-ints.
13298 2018-02-16 Martin Liska <mliska@suse.cz>
13301 * internal-fn.def (ASAN_CHECK): Set proper flags.
13302 (ASAN_MARK): Likewise.
13304 2018-02-16 Julia Koval <julia.koval@intel.com>
13306 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13307 from PTA_CANNONLAKE.
13309 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13312 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13313 Use ++iter rather than iter++ for std::list iterators.
13314 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
13315 defer deleting them until all nodes in the forest are processed. Do
13316 free even leaf nodes. Change to_process into auto_vec.
13319 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13320 * vec.h (vec_default_construct): Use memset instead of placement new
13321 if BROKEN_VALUE_INITIALIZATION is defined.
13322 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13323 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13326 PR rtl-optimization/83723
13327 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13328 * lra.c (lra_substitute_pseudo): Likewise. If true, use
13329 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
13331 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13333 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13335 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
13337 PR rtl-optimization/81443
13338 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13339 from inner REGs to paradoxical SUBREGs.
13341 2018-02-16 Richard Biener <rguenther@suse.de>
13343 PR tree-optimization/84399
13344 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13345 For operands we can analyze at their definition make sure we can
13346 analyze them at each use as well.
13348 2018-02-16 Richard Biener <rguenther@suse.de>
13350 PR tree-optimization/84190
13351 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13352 volatile accesses if the decl isn't volatile.
13354 2018-02-15 Jason Merrill <jason@redhat.com>
13356 PR c++/84314 - ICE with templates and fastcall attribute.
13357 * attribs.c (build_type_attribute_qual_variant): Don't clobber
13358 TYPE_CANONICAL on an existing type.
13360 2018-02-15 Jakub Jelinek <jakub@redhat.com>
13362 PR tree-optimization/84383
13363 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13364 dstoff nor call operand_equal_p if dstbase is NULL.
13366 PR tree-optimization/84334
13367 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13368 also a CONSTANT_CLASS_P, punt.
13370 2018-02-14 Jim Wilson <jimw@sifive.com>
13372 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13373 first SMALL_OPERAND check. New local min_second_step. Move assert
13374 to where locals are set. Add TARGET_RVC support.
13375 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13377 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
13379 * doc/invoke.texi: Correct -Wformat-overflow code sample.
13381 2018-02-14 Martin Sebor <msebor@redhat.com>
13383 PR tree-optimization/83698
13384 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13385 arrays constrain the offset range to their bounds.
13386 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13387 (builtin_access::overlap): Avoid setting the size of overlap if it's
13389 (maybe_diag_overlap): Also consider arrays when deciding what values
13390 of offsets to include in diagnostics.
13392 2018-02-14 Martin Sebor <msebor@redhat.com>
13395 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13396 that correspond to the kind of a declaration.
13398 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
13401 * config/pa/pa.md: Load address of PIC label using the linkage table
13402 if the label is nonlocal.
13404 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
13406 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13407 warning message if user requests -maltivec=be.
13408 * doc/invoke.texi: Document deprecation of -maltivec=be.
13410 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
13413 * config/rs6000/rs6000-c.c: Update definitions for
13414 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13415 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13417 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13420 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13421 add _get_ssp intrinsics. Remove argument from
13422 __builtin_ia32_rdssp[d|q].
13423 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13424 * config/i386/i386-builtin.def: Remove argument from
13425 __builtin_ia32_rdssp[d|q].
13426 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13427 ix86_expand_special_args_builtin for _rdssp[d|q].
13428 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13429 Clear register before usage.
13430 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13431 Add documentation for new _get_ssp and _inc_ssp intrinsics.
13433 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
13435 PR tree-optimization/84357
13436 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13437 operand 1 of an ARRAY_REF too.
13439 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
13442 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13443 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13445 (set_of_reg): New struct.
13446 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13447 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13448 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13450 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13451 Split into bitclr, bitset, bitinvert patterns if appropriate.
13452 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13453 use rx_fuse_in_memory_bitop.
13454 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13455 to named insn, correct maximum insn length.
13457 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
13460 * machmode.def: Define a complex mode for PARTIAL_INT.
13461 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13463 * doc/rtl.texi: Document CSPImode.
13464 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13466 (msp430_hard_regno_nregs_with_padding): Likewise.
13468 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
13471 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13473 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
13475 PR rtl-optimization/84169
13476 * combine.c (try_combine): New variable split_i2i3. Set it to true if
13477 we generated a parallel as new i3 and we split that to new i2 and i3
13478 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
13479 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
13480 those to i2, not i1. Partially rewrite this scan code.
13482 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13485 * stor-layout.c (place_field): For variable length fields, adjust
13486 offset_align afterwards not just based on the field's alignment,
13487 but also on the size.
13489 PR middle-end/84309
13490 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13491 of exps and logs in the use_exp2 case.
13493 2018-02-13 Jeff Law <law@redhat.com>
13495 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13496 entry for "vector".
13498 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13501 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
13505 * common.opt (gas-loc-support, gas-locview-support): New.
13506 (ginline-points, ginternal-reset-location-views): New.
13507 * doc/invoke.texi: Document them. Use @itemx where intended.
13508 (gvariable-location-views): Adjust.
13509 * target.def (reset_location_view): New.
13510 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13511 (TARGET_RESET_LOCATION_VIEW): New.
13512 * doc/tm.texi: Rebuilt.
13513 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13514 (dwarf2out_default_as_locview_support): New.
13515 (output_asm_line_debug_info): Use option variables.
13516 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13517 (output_loc_list): Likewise.
13518 (add_high_low_attributes): Check option variables.
13519 Don't output entry view attribute in strict mode.
13520 (gen_inlined_subroutine_die): Check option variables.
13521 (dwarf2out_inline_entry): Likewise.
13522 (init_sections_and_labels): Likewise.
13523 (dwarf2out_early_finish): Likewise.
13524 (maybe_reset_location_view): New, from...
13525 (dwarf2out_var_location): ... here. Call it.
13526 * debug.h (dwarf2out_default_as_loc_support): Declare.
13527 (dwarf2out_default_as_locview_support): Declare.
13528 * hooks.c (hook_int_rtx_insn_0): New.
13529 * hooks.h (hook_int_rtx_insn_0): Declare.
13530 * toplev.c (process_options): Take -gas-loc-support and
13531 -gas-locview-support from dwarf2out. Enable
13532 -gvariable-location-views by default only with locview
13533 assembler support. Enable -ginternal-reset-location-views by
13534 default only if the target defines the corresponding hook.
13535 Enable -ginline-points by default if location views are
13536 enabled; force it disabled if statement frontiers are
13538 * tree-inline.c (expand_call_inline): Check option variables.
13539 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13541 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
13543 PR tree-optimization/84321
13544 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13545 handling. Also check whether the anti-range contains any values
13546 that satisfy the mask; switch to a VR_RANGE if not.
13548 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
13551 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13553 2018-02-13 Martin Jambor <mjambor@suse.cz>
13556 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13557 of call statements, also set location of a load to a temporary.
13559 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
13561 * config/rl78/rl78.c (add_vector_labels): New function.
13562 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13563 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13564 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13565 which checks that no arguments are passed.
13566 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13567 * doc/extend.texi: Documentation for the new attribute.
13569 2018-02-13 Andreas Schwab <schwab@suse.de>
13571 * config/riscv/linux.h (CPP_SPEC): Define.
13573 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13576 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13577 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13578 OPTION_MASK_ISA_AES as first argument to def_builtin_const
13579 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13580 instead of OPTION_MASK_ISA_PCLMUL as first argument to
13581 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13582 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13583 temporarily for AES and PCLMUL builtins.
13585 PR tree-optimization/84339
13586 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13587 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13590 PR middle-end/84309
13591 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13592 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13593 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13595 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13597 * omp-simd-clone.h: New file.
13598 * omp-simd-clone.c: Include omp-simd-clone.h.
13599 (expand_simd_clones): No longer static.
13600 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13601 cgraph.h and omp-simd-clone.h.
13602 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13603 (vect_recog_widen_shift_pattern): Formatting fix.
13604 (vect_pattern_recog_1): Don't check optab for calls.
13607 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13608 operands[2] into a REG before using gen_lowpart on it.
13610 2018-02-12 Jeff Law <law@redhat.com>
13613 * config/sh/sh.c (find_barrier): Consider a sibling call
13616 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13617 successfully back substituting a reg.
13619 2018-02-12 Richard Biener <rguenther@suse.de>
13621 PR tree-optimization/84037
13622 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13623 parameter, move visited init to caller.
13624 (vect_slp_analyze_operations): Separate cost from validity
13625 check, initialize visited once for all instances.
13626 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13628 * tree-vect-stmts.c (vect_model_simple_cost): Make early
13630 (vect_model_promotion_demotion_cost): Likewise.
13631 (vectorizable_bswap): Guard cost modeling with !slp_node
13632 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13634 (vectorizable_call): Likewise.
13635 (vectorizable_conversion): Likewise.
13636 (vectorizable_assignment): Likewise.
13637 (vectorizable_shift): Likewise.
13638 (vectorizable_operation): Likewise.
13639 (vectorizable_store): Likewise.
13640 (vectorizable_load): Likewise.
13641 (vectorizable_condition): Likewise.
13642 (vectorizable_comparison): Likewise.
13644 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
13647 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13648 (ASAN_MARK): Fix fnspec to account for return value, change pointer
13649 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13651 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13653 PR middle-end/83665
13654 * params.def (inline-min-speedup): Increase from 8 to 15.
13655 (max-inline-insns-auto): Decrease from 40 to 30.
13656 * ipa-split.c (consider_split): Add some buffer for function to
13657 be considered inlining candidate.
13658 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13661 2018-02-12 Richard Biener <rguenther@suse.de>
13663 PR tree-optimization/84037
13664 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13665 matched stmts if we cannot swap the non-matched ones.
13667 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13669 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13670 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13671 _mm_maskz_scalef_round_ss): New intrinsics.
13672 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13673 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13674 __builtin_ia32_scalefss_round): Remove.
13675 (__builtin_ia32_scalefsd_mask_round,
13676 __builtin_ia32_scalefss_mask_round): New intrinsics.
13677 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13678 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13679 ((match_operand:VF_128 2 "<round_nimm_predicate>"
13680 "<round_constraint>")): Changed to ...
13681 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13682 "<round_scalar_constraint>")): ... this.
13683 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13684 %0, %1, %2<round_op3>}"): Changed to ...
13685 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13686 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13687 %2<round_scalar_mask_op3>}"): ... this.
13688 * config/i386/subst.md (round_scalar_nimm_predicate): New.
13690 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13692 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13693 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13694 (_mm_maskz_sqrt_round_ss): New intrinsics.
13695 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13696 (__builtin_ia32_sqrtsd_mask_round)
13697 (__builtin_ia32_sqrtss_mask_round): New builtins.
13698 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13699 (__builtin_ia32_sqrtss_round): Remove.
13700 (__builtin_ia32_sqrtsd_mask_round)
13701 (__builtin_ia32_sqrtss_mask_round): New builtins.
13702 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13703 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13704 ((match_operand:VF_128 1 "vector_operand"
13705 "xBm,<round_constraint>")): Changed to ...
13706 ((match_operand:VF_128 1 "vector_operand"
13707 "xBm,<round_scalar_constraint>")): ... this.
13708 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13709 %0, %2, %<iptr>1<round_op3>}): Changed to ...
13710 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13711 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13712 %<iptr>1<round_scalar_mask_op3>}): ... this.
13713 ((set_attr "prefix" "<round_prefix>")): Changed to ...
13714 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13716 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
13719 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13720 Cast vec_cmpeq result to correct type.
13721 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13722 Cast vec_cmpgt result to correct type.
13724 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
13726 * final.c (final_scan_insn_1): Renamed from...
13727 (final_scan_insn): ... this. New wrapper, to recover
13728 seen from the outermost call in recursive ones.
13729 * config/sparc/sparc.c (output_return): Drop seen from call.
13730 (output_sibcall): Likewise.
13731 * config/visium/visium.c (output_branch): Likewise.
13733 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
13735 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13738 2018-02-10 Alan Modra <amodra@gmail.com>
13741 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13742 Specify LR as an input.
13744 2018-02-10 Jakub Jelinek <jakub@redhat.com>
13747 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13748 remove_member_access_dummy_vars): New functions.
13749 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13750 lower_omp_1, execute_lower_omp): Use them.
13752 PR rtl-optimization/84308
13753 * shrink-wrap.c (spread_components): Release todo vector.
13755 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
13757 PR rtl-optimization/57193
13758 * ira-color.c (struct allocno_color_data): Add member
13759 conflict_allocno_hard_prefs.
13760 (update_conflict_allocno_hard_prefs): New.
13761 (bucket_allocno_compare_func): Add a preference based on
13762 conflict_allocno_hard_prefs.
13763 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13764 (color_allocnos): Remove a dead code. Initiate
13765 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
13767 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13770 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13771 constraint from =wa to wa. Avoid a subreg on the output operand,
13772 instead use a pseudo and subreg it in a move.
13773 (p9_xxbrd_<mode>): Changed to ...
13774 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13775 (p9_xxbrd_v2df): New expander.
13776 (p9_xxbrw_<mode>): Changed to ...
13777 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13778 (p9_xxbrw_v4sf): New expander.
13780 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13782 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13784 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
13787 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13788 multiply in 32-bit mode.
13789 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13790 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13793 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13795 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13796 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13797 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13798 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13800 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
13803 * dwarf2out.c (is_trivial_indirect_ref): New function.
13804 (dwarf2out_late_global_decl): Do not generate a location
13805 attribute for variables that have a non-trivial DECL_VALUE_EXPR
13806 and that are not defined in the current unit.
13808 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13810 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
13811 instead of a libcall for UNORDERED.
13813 2018-02-09 Tamar Christina <tamar.christina@arm.com>
13816 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
13817 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
13819 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13822 * config/s390/s390.c (s390_set_current_function): Invoke
13823 s390_indirect_branch_settings also if fndecl didn't change.
13825 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13827 * config/rs6000/rs6000.md (blockage): Set length to zero.
13829 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13831 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
13833 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13836 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
13837 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
13841 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
13842 PARALLEL incoming that failed vt_get_decl_and_offset check.
13844 PR middle-end/84237
13845 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
13846 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
13848 (get_variable_section): For decls in named .bss* sections pass true as
13849 second argument to bss_initializer_p.
13851 2018-02-09 Marek Polacek <polacek@redhat.com>
13852 Jakub Jelinek <jakub@redhat.com>
13855 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
13856 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
13857 Sync some changes from cxx_fold_indirect_ref.
13859 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13861 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
13863 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
13864 (BLOCK_INLINE_ENTRY_LABEL): New.
13865 (dwarf2out_var_location): Disregard inline entry markers.
13866 (inline_entry_data): New struct.
13867 (inline_entry_data_hasher): New hashtable type.
13868 (inline_entry_data_hasher::hash): New.
13869 (inline_entry_data_hasher::equal): New.
13870 (inline_entry_data_table): New variable.
13871 (add_high_low_attributes): Add DW_AT_entry_pc and
13872 DW_AT_GNU_entry_view attributes if a pending entry is found
13873 in inline_entry_data_table. Add old entry_pc attribute only
13874 if debug nonbinding markers are disabled.
13875 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
13876 markers are enabled.
13877 (block_within_block_p, dwarf2out_inline_entry): New.
13878 (dwarf2out_finish): Check that no entries remained in
13879 inline_entry_data_table.
13880 * final.c (reemit_insn_block_notes): Handle inline entry notes.
13881 (final_scan_insn, notice_source_line): Likewise.
13882 (rest_of_clean_state): Skip inline entry markers.
13883 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
13885 * gimple.c (gimple_build_debug_inline_entry): New.
13886 * gimple.h (enum gimple_debug_subcode): Add
13887 GIMPLE_DEBUG_INLINE_ENTRY.
13888 (gimple_build_debug_inline_entry): Declare.
13889 (gimple_debug_inline_entry_p): New.
13890 (gimple_debug_nonbind_marker_p): Adjust.
13891 * insn-notes.def (INLINE_ENTRY): New.
13892 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
13893 inline entry marker notes.
13894 (print_insn): Likewise.
13895 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
13896 (INSN_DEBUG_MARKER_KIND): Likewise.
13897 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
13898 * tree-inline.c (expand_call_inline): Build and insert
13899 debug_inline_entry stmt.
13900 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
13901 inline entry blocks early, if nonbind markers are enabled.
13902 (dump_scope_block): Dump fragment info.
13903 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
13904 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
13905 (gimple_build_debug_inline_entry): New.
13906 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
13907 Enable/disable inline entry points too.
13908 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
13909 (DEBUG_INSN): Describe inline entry markers.
13911 * common.opt (gvariable-location-views): New.
13912 (gvariable-location-views=incompat5): New.
13913 * config.in: Rebuilt.
13914 * configure: Rebuilt.
13915 * configure.ac: Test assembler for view support.
13916 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
13917 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
13918 * dwarf2out.c (var_loc_view): New typedef.
13919 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
13920 (dwarf2out_locviews_in_attribute): New.
13921 (dwarf2out_locviews_in_loclist): New.
13922 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
13923 (enum dw_line_info_opcode): Add LI_adv_address.
13924 (struct dw_line_info_table): Add view.
13925 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
13926 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
13927 (zero_view_p): New variable.
13928 (ZERO_VIEW_P): New macro.
13929 (output_asm_line_debug_info): New.
13930 (struct var_loc_node): Add view.
13931 (add_AT_view_list, AT_loc_list): New.
13932 (add_var_loc_to_decl): Add view param. Test it against last.
13933 (new_loc_list): Add view params. Record them.
13934 (AT_loc_list_ptr): Handle loc and view lists.
13935 (view_list_to_loc_list_val_node): New.
13936 (print_dw_val): Handle dw_val_class_view_list.
13937 (size_of_die): Likewise.
13938 (value_format): Likewise.
13939 (loc_list_has_views): New.
13940 (gen_llsym): Set vl_symbol too.
13941 (maybe_gen_llsym, skip_loc_list_entry): New.
13942 (dwarf2out_maybe_output_loclist_view_pair): New.
13943 (output_loc_list): Output view list or entries too.
13944 (output_view_list_offset): New.
13945 (output_die): Handle dw_val_class_view_list.
13946 (output_dwarf_version): New.
13947 (output_compilation_unit_header): Use it.
13948 (output_skeleton_debug_sections): Likewise.
13949 (output_rnglists, output_line_info): Likewise.
13950 (output_pubnames, output_aranges): Update version comments.
13951 (output_one_line_info_table): Output view numbers in asm comments.
13952 (dw_loc_list): Determine current endview, pass it to new_loc_list.
13953 Call maybe_gen_llsym.
13954 (loc_list_from_tree_1): Adjust.
13955 (add_AT_location_description): Create view list attribute if
13956 needed, check it's absent otherwise.
13957 (convert_cfa_to_fb_loc_list): Adjust.
13958 (maybe_emit_file): Call output_asm_line_debug_info for test.
13959 (dwarf2out_var_location): Reset views as needed. Precompute
13960 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
13961 attribute. Set view.
13962 (new_line_info_table): Reset next view.
13963 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
13964 (dwarf2out_source_line): Likewise. Output view resets and labels to
13965 the assembler, or select appropriate line info opcodes.
13966 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
13967 (optimize_string_length): Catch it. Adjust.
13968 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
13969 dw_val_class_view_list, and remove it if no longer needed.
13970 (hash_loc_list): Hash view numbers.
13971 (loc_list_hasher::equal): Compare them.
13972 (optimize_location_lists): Check whether a view list symbol is
13973 needed, and whether the locview attribute is present, and
13974 whether they match. Remove the locview attribute if no longer
13976 (index_location_lists): Call skip_loc_list_entry for test.
13977 (dwarf2out_finish): Call output_asm_line_debug_info for test.
13978 Use output_dwarf_version.
13979 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
13980 (struct dw_val_node): Add val_view_list.
13981 * final.c (SEEN_NEXT_VIEW): New.
13982 (set_next_view_needed): New.
13983 (clear_next_view_needed): New.
13984 (maybe_output_next_view): New.
13985 (final_start_function): Rename to...
13986 (final_start_function_1): ... this. Take pointer to FIRST,
13987 add SEEN parameter. Emit param bindings in the initial view.
13988 (final_start_function): Reintroduce SEEN-less interface.
13989 (final): Rename to...
13990 (final_1): ... this. Take SEEN parameter. Output final pending
13991 next view at the end.
13992 (final): Reintroduce seen-less interface.
13993 (final_scan_insn): Output pending next view before switching
13994 sections or ending a block. Mark the next view as needed when
13995 outputting variable locations. Notify debug backend of section
13996 changes, and of location view changes.
13997 (rest_of_handle_final): Adjust.
13998 * toplev.c (process_options): Autodetect value for debug variable
13999 location views option. Warn on incompat5 without -gdwarf-5.
14000 * doc/invoke.texi (gvariable-location-views): New.
14001 (gvariable-location-views=incompat5): New.
14002 (gno-variable-location-views): New.
14004 2018-02-08 David Malcolm <dmalcolm@redhat.com>
14006 PR tree-optimization/84136
14007 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14008 that the result of find_edge is non-NULL.
14010 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14013 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14014 storing integer register in SImode. Fix cost of 256 and 512
14015 byte aligned SSE register store.
14017 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14019 * config/i386/i386.c (ix86_multiplication_cost): Fix
14020 multiplication cost for TARGET_AVX512DQ.
14022 2018-02-08 Marek Polacek <polacek@redhat.com>
14024 PR tree-optimization/84238
14025 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14028 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14030 PR tree-optimization/84265
14031 * tree-vect-stmts.c (vectorizable_store): Don't treat
14032 VMAT_CONTIGUOUS accesses as grouped.
14033 (vectorizable_load): Likewise.
14035 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14037 PR tree-optimization/81635
14038 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14039 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14040 (test_round_for_mask): New functions.
14041 (wide_int_cc_tests): Call test_round_for_mask.
14042 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14043 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14044 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14045 range returned by get_range_info.
14047 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14050 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14051 * symtab.c: Include builtins.h
14052 (symtab_node::output_to_lto_symbol_table_p): Move here
14053 from lto-streamer-out.c:output_symbol_p.
14054 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14055 (output_symbol_p): Move all logic to symtab.c
14056 (produce_symtab): Update.
14058 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14060 * config/s390/s390-opts.h (enum indirect_branch): Define.
14061 * config/s390/s390-protos.h (s390_return_addr_from_memory)
14062 (s390_indirect_branch_via_thunk)
14063 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14064 (enum s390_indirect_branch_type): Define.
14065 * config/s390/s390.c (struct s390_frame_layout, struct
14066 machine_function): Remove.
14067 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14068 (indirect_branch_table_label_no, indirect_branch_table_name):
14070 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14071 (enum s390_indirect_branch_option): Define.
14072 (s390_return_addr_from_memory): New function.
14073 (s390_handle_string_attribute): New function.
14074 (s390_attribute_table): Add new attribute handler.
14075 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14076 (s390_indirect_branch_via_thunk): New function.
14077 (s390_indirect_branch_via_inline_thunk): New function.
14078 (s390_function_ok_for_sibcall): When jumping via thunk disallow
14079 sibling call optimization for non z10 compiles.
14080 (s390_emit_call): Force indirect branch target to be a single
14081 register. Add r1 clobber for non-z10 compiles.
14082 (s390_emit_epilogue): Emit return jump via return_use expander.
14083 (s390_reorg): Handle JUMP_INSNs as execute targets.
14084 (s390_option_override_internal): Perform validity checks for the
14085 new command line options.
14086 (s390_indirect_branch_attrvalue): New function.
14087 (s390_indirect_branch_settings): New function.
14088 (s390_set_current_function): Invoke s390_indirect_branch_settings.
14089 (s390_output_indirect_thunk_function): New function.
14090 (s390_code_end): Implement target hook.
14091 (s390_case_values_threshold): Implement target hook.
14092 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14094 * config/s390/s390.h (struct s390_frame_layout)
14095 (struct machine_function): Move here from s390.c.
14096 (TARGET_INDIRECT_BRANCH_NOBP_RET)
14097 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14098 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14099 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14100 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14101 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14102 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14103 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14104 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14105 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14106 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14107 (mnemonic attribute): Add values which aren't recognized
14109 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14110 pattern for branch conversion. Fix mnemonic attribute.
14111 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14112 indirect branch via thunk if requested.
14113 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14114 ("*indirect_jump"): Disable for branch conversion using out of
14116 ("indirect_jump_via_thunk<mode>_z10")
14117 ("indirect_jump_via_thunk<mode>")
14118 ("indirect_jump_via_inlinethunk<mode>_z10")
14119 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14120 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14121 ("casesi_jump_via_inlinethunk<mode>_z10")
14122 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14123 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14124 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14125 ("*indirect2_jump"): Disable for branch conversion.
14126 ("casesi_jump"): Turn into expander and expand patterns for branch
14128 ("return_use"): New expander.
14129 ("*return"): Emit return via thunk and rename it to ...
14130 ("*return<mode>"): ... this one.
14131 * config/s390/s390.opt: Add new options and and enum for the
14134 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14136 * lra-constraints.c (match_reload): Unconditionally use
14137 gen_lowpart_SUBREG, rather than selecting between that
14138 and equivalent gen_rtx_SUBREG code.
14140 2018-02-08 Richard Biener <rguenther@suse.de>
14142 PR tree-optimization/84233
14143 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14144 changed flag instead of boguously re-using phi_inserted.
14146 2018-02-08 Martin Jambor <mjambor@suse.cz>
14148 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14149 static local variables.
14151 2018-02-08 Richard Biener <rguenther@suse.de>
14153 PR tree-optimization/84278
14154 * tree-vect-stmts.c (vectorizable_store): When looking for
14155 smaller vector types to perform grouped strided loads/stores
14156 make sure the mode is supported by the target.
14157 (vectorizable_load): Likewise.
14159 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14161 * config/aarch64/aarch64.c (aarch64_components_for_bb):
14162 Increase LDP/STP opportunities by adding adjacent callee-saves.
14164 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14166 PR rtl-optimization/84068
14167 PR rtl-optimization/83459
14168 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14170 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
14172 PR tree-optimization/84224
14173 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14174 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14175 non-zero arguments.
14177 2018-02-07 Iain Sandoe <iain@codesourcery.com>
14180 * config/rs6000/altivec.md (*restore_world): Remove LR use.
14181 * config/rs6000/predicates.md (restore_world_operation): Adjust op
14182 count, remove one USE.
14184 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
14186 * doc/install.texi (Configuration): Document the
14187 --with-long-double-format={ibm,ieee} PowerPC configuration
14191 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14192 Convert from define_expand to be define_insn_and_split. Rework
14193 float/double/_Float128 conversions to QI/HI/SImode to work with
14194 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
14195 conversions to QI/HImode types did a store and then a load to
14196 truncate the value. For conversions to VSX registers, don't split
14197 the insn, instead emit the code directly. Use the code iterator
14198 any_fix to combine signed and unsigned conversions.
14199 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14200 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14201 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14202 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14203 (fix_<mode>di2_hw): Likewise.
14204 (fixuns_<mode>di2_hw): Likewise.
14205 (fix_<mode>si2_hw): Likewise.
14206 (fixuns_<mode>si2_hw): Likewise.
14207 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14208 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14209 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14210 fix<uns>_trunc<SFDF:mode>si2_p8.
14211 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14212 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14213 (fix<uns>_<mode>_mem): Likewise.
14214 (fctiw<u>z_<mode>_mem): Likewise.
14215 (fix<uns>_<mode>_mem): Likewise.
14216 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14217 the register allocator from doing a direct move to the GPRs to do
14218 a store, and instead use the ISA 3.0 store byte/half-word from
14219 vector register instruction. For IEEE 128-bit floating point,
14220 also optimize stores of 32-bit ints.
14221 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14223 2018-02-07 Alan Hayward <alan.hayward@arm.com>
14225 * genextract.c (push_pathstr_operand): New function to support
14227 (walk_rtx): Call push_pathstr_operand.
14228 (print_path): Support [a-zA-Z].
14230 2018-02-07 Richard Biener <rguenther@suse.de>
14232 PR tree-optimization/84037
14233 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14234 (cse_and_gimplify_to_preheader): Declare.
14235 (vect_get_place_in_interleaving_chain): Likewise.
14236 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14238 (_loop_vec_info::~_loop_vec_info): Delete it.
14239 (cse_and_gimplify_to_preheader): New function.
14240 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14241 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14242 (vectorizable_load): Likewise. For grouped stores always base
14243 the IV on the first element.
14244 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14245 condition before gimplifying.
14247 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14249 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14250 *DIV_EXPR and *MOD_EXPR.
14252 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
14255 * config/i386/i386.c (ix86_option_override_internal): Mask out
14256 the CF_SET bit when checking -fcf-protection.
14258 2018-02-07 Tom de Vries <tom@codesourcery.com>
14261 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14264 2018-02-07 Richard Biener <rguenther@suse.de>
14266 PR tree-optimization/84204
14267 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14270 PR tree-optimization/84205
14271 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14272 special-case isl_ast_op_zdiv_r.
14274 PR tree-optimization/84223
14275 * graphite-scop-detection.c (gather_bbs::before_dom_children):
14276 Only add conditions from within the region.
14277 (gather_bbs::after_dom_children): Adjust.
14279 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
14282 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14283 * config/avr/avr.md: Only post-reload split REG-REG moves if
14284 either register is GENERAL_REG_P.
14286 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14288 PR tree-optimization/84235
14289 * tree-ssa-scopedtables.c
14290 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14291 if the subtraction is performed in floating point type where NaNs are
14292 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14293 build 1. Formatting fix.
14295 2018-02-06 Jakub Jelinek <jakub@redhat.com>
14298 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14299 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14300 and skip it regardless of bb boundaries. Use CALL_P macro,
14301 don't test INSN_P (insn) together with CALL_P or JUMP_P check
14302 unnecessarily, formatting fix.
14304 2018-02-06 Michael Collison <michael.collison@arm.com>
14306 * config/arm/thumb2.md:
14307 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14308 (*thumb_mov_notscc): Ditto.
14310 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
14313 * config/rs6000/rs6000.md (su code attribute): Use "u" for
14314 unsigned_fix, not "s".
14316 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14318 * configure.ac (gcc_fn_eh_frame_ro): New function.
14319 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14320 correct .eh_frame permissions.
14321 * configure: Regenerate.
14323 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
14325 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14326 irrelevant options.
14328 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14330 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14331 Display warning message for -mno-speculate-indirect-jumps.
14333 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
14335 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14337 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14339 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
14341 PR tree-optimization/84225
14342 * tree-eh.c (find_trapping_overflow): Only call
14343 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14345 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14348 * config/i386/i386.c: Reimplement the check of possible options
14349 -mibt/-mshstk conbination. Change error messages.
14350 * doc/invoke.texi: Fix a typo: remove extra '='.
14352 2018-02-06 Marek Polacek <polacek@redhat.com>
14354 PR tree-optimization/84228
14355 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14357 2018-02-06 Tamar Christina <tamar.christina@arm.com>
14360 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14361 emitted arch directives.
14362 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14363 __ARM_FEATURE_COPROC before changing architectures.
14365 2018-02-06 Richard Biener <rguenther@suse.de>
14367 * config/i386/i386.c (print_reg): Fix typo.
14368 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14370 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
14372 * configure: Regenerate.
14374 2018-02-05 Martin Sebor <msebor@redhat.com>
14376 PR tree-optimization/83369
14377 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14380 2018-02-05 Martin Liska <mliska@suse.cz>
14382 * doc/invoke.texi: Cherry-pick upstream r323995.
14384 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
14386 * ira.c (ira_init_register_move_cost): Adjust comment.
14388 2018-02-05 Martin Liska <mliska@suse.cz>
14390 PR gcov-profile/84137
14391 * doc/gcov.texi: Fix typo in documentation.
14393 2018-02-05 Martin Liska <mliska@suse.cz>
14395 PR gcov-profile/83879
14396 * doc/gcov.texi: Document necessity of --dynamic-list-data when
14397 using dlopen functionality.
14399 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
14401 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14402 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14403 _mm_maskz_range_ss, _mm_mask_range_round_ss,
14404 _mm_maskz_range_round_ss): New intrinsics.
14405 (__builtin_ia32_rangesd128_round)
14406 (__builtin_ia32_rangess128_round): Remove.
14407 (__builtin_ia32_rangesd128_mask_round,
14408 __builtin_ia32_rangess128_mask_round): New builtins.
14409 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14410 __builtin_ia32_rangess128_round): Remove.
14411 (__builtin_ia32_rangesd128_mask_round,
14412 __builtin_ia32_rangess128_mask_round): New builtins.
14413 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14414 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14415 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14416 "<round_saeonly_constraint>")): Changed to ...
14417 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14418 "<round_saeonly_scalar_constraint>")): ... this.
14419 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14420 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14421 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14422 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14423 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14425 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
14427 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14429 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14430 Remove all values except native, 8540 and 8548.
14432 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
14434 * config/i386/i386.c (ix86_output_function_return): Pass
14435 INVALID_REGNUM, instead of -1, as invalid register number to
14436 indirect_thunk_name and output_indirect_thunk.
14438 2018-02-02 Julia Koval <julia.koval@intel.com>
14440 * config.gcc: Add -march=icelake.
14441 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14442 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14443 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14444 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14445 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14446 (processor_target_table): Add icelake.
14447 (ix86_option_override_internal): Handle new PTAs.
14448 (get_builtin_code_for_version): Handle icelake.
14449 (M_INTEL_COREI7_ICELAKE): New.
14450 (fold_builtin_cpu): Handle icelake.
14451 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14452 * doc/invoke.texi: Add -march=icelake.
14454 2018-02-02 Julia Koval <julia.koval@intel.com>
14456 * config/i386/i386.c (ix86_option_override_internal): Change flags type
14457 to wide_int_bitmask.
14458 * wide-int-bitmask.h: New.
14460 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14463 * config/i386/i386.md: Replace Pmode with word_mode in
14464 builtin_setjmp_setup and builtin_longjmp to support x32.
14466 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
14470 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14472 (rs6000_supported_cpu_names): New static variable.
14473 (linux_cpu_translation_table): Likewise.
14474 (elf_platform) <cpu>: Define new static variable and use it.
14475 Translate kernel AT_PLATFORM name to canonical name if needed.
14476 Error if platform name is unknown.
14478 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
14481 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14483 2018-02-01 Jeff Law <law@redhat.com>
14486 * config/i386/i386.c (release_scratch_register_on_entry): Add new
14487 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
14488 the scratch if RELEASE_VIA_POP is false.
14489 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14490 If we have to save a temporary register, decrement SIZE appropriately.
14491 Pass new arguments to release_scratch_register_on_entry.
14492 (ix86_adjust_stack_and_probe): Likewise.
14493 (ix86_emit_probe_stack_range): Pass new arguments to
14494 release_scratch_register_on_entry.
14496 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
14498 PR rtl-optimization/84157
14499 * combine.c (change_zero_ext): Use REG_P predicate in
14500 front of HARD_REGISTER_P predicate.
14502 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
14504 * config/avr/avr.c (avr_option_override): Move disabling of
14505 -fdelete-null-pointer-checks to...
14506 * common/config/avr/avr-common.c (avr_option_optimization_table):
14509 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14511 PR tree-optimization/81635
14512 * tree-data-ref.c (split_constant_offset_1): For types that
14513 wrap on overflow, try to use range info to prove that wrapping
14516 2018-02-01 Renlin Li <renlin.li@arm.com>
14519 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14520 TAILCALL_ADDR_REGS.
14521 (aarch64_register_move_cost): Likewise.
14522 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14523 TAILCALL_ADDR_REGS.
14524 (REG_CLASS_NAMES): Likewise.
14525 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14526 TAILCALL_ADDR_REGS. Remove IP registers.
14527 * config/aarch64/aarch64.md (Ucs): Update register constraint.
14529 2018-02-01 Richard Biener <rguenther@suse.de>
14531 * domwalk.h (dom_walker::dom_walker): Add additional constructor
14532 for specifying RPO order and allow NULL for that.
14533 * domwalk.c (dom_walker::dom_walker): Likewise.
14534 (dom_walker::walk): Handle NULL RPO order.
14535 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14537 (rewrite_update_dom_walker): Likewise.
14538 (mark_def_dom_walker): Likewise.
14540 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14542 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14543 (aarch64_maybe_expand_sve_subreg_move): Declare.
14544 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14545 * config/aarch64/predicates.md (aarch64_any_register_operand): New
14547 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14548 that are semantically a reverse operation.
14549 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14550 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14551 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14553 (aarch64_can_change_mode_class): For big-endian, forbid changes
14554 between two SVE modes if they have different element sizes.
14556 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14558 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14559 the TImode handling for big-endian targets.
14561 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14563 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14564 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
14566 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14567 Remove BSWAP handing for big-endian targets and use the form of
14568 LD1RQ appropariate for the mode.
14570 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14572 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14573 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14574 duplicated element.
14576 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14579 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14580 check for operands that need to go through aarch64_sve_reload_be.
14582 2018-02-01 Jakub Jelinek <jakub@redhat.com>
14584 PR tree-optimization/81661
14585 PR tree-optimization/84117
14586 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14587 * tree-eh.c: Include gimplify.h.
14588 (find_trapping_overflow, replace_trapping_overflow,
14589 rewrite_to_non_trapping_overflow): New functions.
14590 * tree-vect-loop.c: Include tree-eh.h.
14591 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14592 * tree-data-ref.c: Include tree-eh.h.
14593 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14595 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
14597 PR rtl-optimization/84123
14598 * combine.c (change_zero_ext): Check if hard register satisfies
14599 can_change_dest_mode before calling gen_lowpart_SUBREG.
14601 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
14604 * ira.c (ira_init_register_move_cost): Remove assert.
14606 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14608 PR rtl-optimization/84071
14609 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14610 * doc/tm.texi: Regenerate.
14612 2018-01-31 Richard Biener <rguenther@suse.de>
14614 PR tree-optimization/84132
14615 * tree-data-ref.c (analyze_miv_subscript): Properly
14616 check whether evolution_function_is_affine_multivariate_p
14617 before calling gcd_of_steps_may_divide_p.
14619 2018-01-31 Julia Koval <julia.koval@intel.com>
14622 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14623 * config/i386/i386.md (rdpid_rex64) New.
14624 (rdpid): Make 32bit only.
14626 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
14629 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14630 an IDENTIFIER_NODE for FUNCTION_TYPE's.
14632 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14635 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14637 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14639 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14641 PR rtl-optimization/84071
14642 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14643 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14645 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14647 * config/arc/arc.c (arc_handle_aux_attribute): New function.
14648 (arc_attribute_table): Add 'aux' attribute.
14649 (arc_in_small_data_p): Consider aux like variables.
14650 (arc_is_aux_reg_p): New function.
14651 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14652 (arc_get_aux_arg): New function.
14653 (prepare_move_operands): Handle aux-register access.
14654 (arc_handle_aux_attribute): New function.
14655 * doc/extend.texi (ARC Variable attributes): Add subsection.
14657 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14659 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14660 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14661 (arc_attribute_table): Add 'uncached' attribute.
14662 (arc_print_operand): Print '.di' flag for uncached memory
14664 (arc_in_small_data_p): Do not consider for small data the uncached
14666 (arc_is_uncached_mem_p): New function.
14667 * config/arc/predicates.md (compact_store_memory_operand): Check
14668 for uncached memory accesses.
14669 (nonvol_nonimm_operand): Likewise.
14670 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
14672 2018-01-31 Jakub Jelinek <jakub@redhat.com>
14675 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14676 falign-loops=): Add Optimization flag.
14678 2018-01-30 Jeff Law <law@redhat.com>
14681 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14682 INT_REGISTERS_SAVED. Check it prior to calling
14683 get_scratch_register_on_entry.
14684 (ix86_adjust_stack_and_probe): Similarly.
14685 (ix86_emit_probe_stack_range): Similarly.
14686 (ix86_expand_prologue): Corresponding changes.
14688 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14691 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14692 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14694 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
14697 * lra-constraints.c (curr_insn_transform): Process AND in the
14700 2018-01-30 Jakub Jelinek <jakub@redhat.com>
14702 PR rtl-optimization/83986
14703 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14704 dependence against last_pending_memory_flush in addition to
14705 pending_jump_insns.
14707 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
14709 PR tree-optimization/81611
14710 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14713 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14716 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14719 2018-01-30 Richard Biener <rguenther@suse.de>
14720 Jakub Jelinek <jakub@redhat.com>
14722 PR tree-optimization/84111
14723 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14724 inner loops added during recursion, as they don't have up-to-date
14727 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14730 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14731 (can_inline_edge_by_limits_p): ... here.
14732 (can_early_inline_edge_p, check_callers,
14733 update_caller_keys, update_callee_keys, recursive_inlining,
14734 add_new_edges_to_heap, speculation_useful_p,
14735 inline_small_functions,
14736 inline_small_functions, flatten_function,
14737 inline_to_all_callers_1): Update.
14739 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14741 * profile-count.c (profile_count::combine_with_ipa_count): Handle
14744 2018-01-30 Richard Biener <rguenther@suse.de>
14746 PR tree-optimization/83008
14747 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14748 invariant and constant vector uses in stmts when they need
14749 more than one stmt.
14751 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14754 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14755 * configure: Regenerate.
14757 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14759 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14761 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14762 Use gen_rtx_REG rather than gen_lowpart.
14764 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14766 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14767 rather than 0 when creating partial subregs.
14769 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14771 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14774 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
14777 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14778 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14779 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14780 flags. This restores the settings used before the 2017-07-24.
14781 Turning off pre increment/decrement/modify allows IVOPTS to
14782 optimize DF/SF loops where the index is an int.
14784 2018-01-29 Richard Biener <rguenther@suse.de>
14785 Kelvin Nilsen <kelvin@gcc.gnu.org>
14788 * tree-vect-stmts.c (vectorizable_call): Don't call
14789 targetm.vectorize_builtin_md_vectorized_function if callee is
14792 2018-01-22 Carl Love <cel@us.ibm.com>
14794 * doc/extend.tex: Fix typo in second arg in
14795 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14797 2018-01-29 Richard Biener <rguenther@suse.de>
14799 PR tree-optimization/84086
14800 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14801 (flush_ssaname_freelist): When SSA names were released reset
14802 the SCEV hash table.
14804 2018-01-29 Richard Biener <rguenther@suse.de>
14806 PR tree-optimization/84057
14807 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
14808 removed paths when removing edges.
14810 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
14812 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
14813 -mfunction-return=@var{choice}.
14815 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
14817 PR diagnostic/84034
14818 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
14819 Handle CR like TAB.
14820 (layout::print_source_line): Likewise.
14821 (test_get_line_width_without_trailing_whitespace): Add test cases.
14823 2018-01-27 Jakub Jelinek <jakub@redhat.com>
14825 PR middle-end/84040
14826 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
14829 2018-01-26 Jim Wilson <jimw@sifive.com>
14831 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
14833 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
14836 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14838 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
14839 and CMP + SUB-immediate -> SUBS.
14841 2018-01-26 Martin Sebor <msebor@redhat.com>
14843 PR tree-optimization/83896
14844 * tree-ssa-strlen.c (get_string_len): Rename...
14845 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
14846 Avoid assuming length is constant.
14847 (handle_char_store): Use HOST_WIDE_INT for string length.
14849 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
14852 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
14853 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
14855 2018-01-26 Richard Biener <rguenther@suse.de>
14857 PR rtl-optimization/84003
14858 * dse.c (record_store): Only record redundant stores when
14859 the earlier store aliases at least all accesses the later one does.
14861 2018-01-26 Jakub Jelinek <jakub@redhat.com>
14863 PR rtl-optimization/83985
14864 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
14865 REG_CFA_RESTORE insns.
14866 (delete_unmarked_insns): Don't ignore separate shrink wrapping
14867 REG_CFA_RESTORE insns here.
14870 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
14871 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
14873 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14875 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
14876 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
14877 (arc_init): Likewise.
14878 (arc_override_options): Likewise.
14879 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
14881 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
14883 * config/arc/arc.h (TARGET_DBNZ): Define.
14884 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
14885 properly set the tune attribute.
14886 (dbnz): Use TARGET_DBNZ guard.
14887 * config/arc/arc.opt (mtune): Add core3 option.
14889 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14891 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
14892 recognize new pic like addresses.
14893 (arc_delegitimize_address): Clean up.
14895 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14897 * config/arc/arc-arches.def: Option mrf16 valid for all
14899 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
14900 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
14901 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
14902 * config/arc/arc-tables.opt: Regenerate.
14903 * config/arc/arc.c (arc_conditional_register_usage): Handle
14904 reduced register file case.
14905 (arc_file_start): Set must have build attributes.
14906 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
14907 mrf16 option value.
14908 * config/arc/arc.opt (mrf16): Add new option.
14909 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
14910 * config/arc/genmultilib.awk: Handle new mrf16 option.
14911 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
14912 * config/arc/t-multilib: Regenerate.
14913 * doc/invoke.texi (ARC Options): Document mrf16 option.
14915 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14917 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
14918 * config/arc/arc.c (arc_handle_secure_attribute): New function.
14919 (arc_attribute_table): Add 'secure_call' attribute.
14920 (arc_print_operand): Print secure call operand.
14921 (arc_function_ok_for_sibcall): Don't optimize tail calls when
14923 (arc_is_secure_call_p): New function. * config/arc/arc.md
14924 (call_i): Add support for sjli instruction.
14925 (call_value_i): Likewise.
14926 * config/arc/constraints.md (Csc): New constraint.
14928 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14929 John Eric Martin <John.Martin@emmicro-us.com>
14931 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
14932 * config/arc/arc.c (_arc_jli_section): New struct.
14933 (arc_jli_section): New type.
14934 (rc_jli_sections): New static variable.
14935 (arc_handle_jli_attribute): New function.
14936 (arc_attribute_table): Add jli_always and jli_fixed attribute.
14937 (arc_file_end): New function.
14938 (TARGET_ASM_FILE_END): Define.
14939 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
14940 (arc_add_jli_section): New function.
14941 (jli_call_scan): Likewise.
14942 (arc_reorg): Call jli_call_scan.
14943 (arc_output_addsi): Remove 'S' from printing asm operand.
14944 (arc_is_jli_call_p): New function.
14945 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
14947 (movhi_insn): Likewise.
14948 (movsi_insn): Likewise.
14949 (movsi_set_cc_insn): Likewise.
14950 (loadqi_update): Likewise.
14951 (load_zeroextendqisi_update): Likewise.
14952 (load_signextendqisi_update): Likewise.
14953 (loadhi_update): Likewise.
14954 (load_zeroextendhisi_update): Likewise.
14955 (load_signextendhisi_update): Likewise.
14956 (loadsi_update): Likewise.
14957 (loadsf_update): Likewise.
14958 (movsicc_insn): Likewise.
14959 (bset_insn): Likewise.
14960 (bxor_insn): Likewise.
14961 (bclr_insn): Likewise.
14962 (bmsk_insn): Likewise.
14963 (bicsi3_insn): Likewise.
14964 (cmpsi_cc_c_insn): Likewise.
14965 (movsi_ne): Likewise.
14966 (movsi_cond_exec): Likewise.
14967 (clrsbsi2): Likewise.
14968 (norm_f): Likewise.
14978 (call_i): Remove 'S' asm letter, add jli instruction.
14979 (call_value_i): Likewise.
14980 * config/arc/arc.op (mjli-always): New option.
14981 * config/arc/constraints.md (Cji): New constraint.
14982 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
14984 (subsf3_fpx): Likewise.
14985 (mulsf3_fpx): Likewise.
14986 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
14988 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
14989 function attrbutes.
14990 * doc/invoke.texi (ARC): Document mjli-always option.
14992 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
14994 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
14995 avoid addition with 0 and use incw and decw where possible.
14997 2018-01-26 Richard Biener <rguenther@suse.de>
14999 PR tree-optimization/81082
15000 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15001 association if it requires casting to unsigned.
15002 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15003 from fold_plusminus_mult_expr to catch important cases late when
15004 range info is available.
15006 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15008 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15009 * configure.ac (hidden_linkonce): New test.
15010 * configure: Regenerate.
15011 * config.in: Regenerate.
15013 2018-01-26 Julia Koval <julia.koval@intel.com>
15015 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15016 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15017 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15018 _mm_mask_bitshuffle_epi64_mask): Fix type.
15019 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15020 USI_FTYPE_V4DI_V4DI_USI): Remove.
15021 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15022 __builtin_ia32_vpshufbitqmb256_mask,
15023 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15024 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15025 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15027 2018-01-26 Alan Modra <amodra@gmail.com>
15030 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15031 UNSPEC_VBPERMQ. Sort other unspecs.
15033 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
15035 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15037 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
15039 PR middle-end/83055
15040 * predict.c (drop_profile): Do not push/pop cfun; update also
15042 (handle_missing_profiles): Fix logic looking for zero profiles.
15044 2018-01-25 Jakub Jelinek <jakub@redhat.com>
15046 PR middle-end/83977
15047 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15048 on functions with #pragma omp declare simd or functions with simd
15050 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15051 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15052 Remove trailing \n from warning_at calls.
15054 2018-01-25 Tom de Vries <tom@codesourcery.com>
15057 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15058 for neutered workers.
15060 2018-01-24 Joseph Myers <joseph@codesourcery.com>
15063 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15064 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15066 2018-01-24 Jeff Law <law@redhat.com>
15069 * i386.c (get_probe_interval): Move to earlier point.
15070 (ix86_compute_frame_layout): If -fstack-clash-protection and
15071 the frame is larger than the probe interval, then use pushes
15072 to save registers rather than reg->mem moves.
15073 (ix86_expand_prologue): Remove conditional for int_registers_saved
15076 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
15079 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15080 min/max for never referenced object.
15082 2018-01-24 Jakub Jelinek <jakub@redhat.com>
15084 PR middle-end/83977
15085 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15087 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15088 attributes from DECL_ATTRIBUTES (decl) without affecting
15089 DECL_ATTRIBUTES (current_function_decl).
15090 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15091 functions with non-NULL DECL_ABSTRACT_ORIGIN.
15093 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
15095 PR tree-optimization/83979
15096 * fold-const.c (fold_comparison): Use constant_boolean_node
15097 instead of boolean_{true,false}_node.
15099 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
15101 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15104 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15106 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15107 Simplify the clause that sets the length attribute.
15108 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15109 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15110 clause that sets the length attribute.
15111 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15113 2018-01-24 Tom de Vries <tom@codesourcery.com>
15116 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15117 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15118 Add strict parameter.
15119 (prevent_branch_around_nothing): Insert dummy insn between branch to
15120 label and label with no ptx insn inbetween.
15121 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15123 2018-01-24 Tom de Vries <tom@codesourcery.com>
15126 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15127 for neutered threads in warp.
15128 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15130 2018-01-24 Richard Biener <rguenther@suse.de>
15132 PR tree-optimization/83176
15133 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15136 2018-01-24 Richard Biener <rguenther@suse.de>
15138 PR tree-optimization/82819
15139 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15140 code generating pluses that are no-ops in the target precision.
15142 2018-01-24 Richard Biener <rguenther@suse.de>
15144 PR middle-end/84000
15145 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15147 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15149 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15150 to merge probabilities.
15151 * predict.c (probably_never_executed): Also mark as cold functions
15152 with global 0 profile and guessed local profile.
15153 * profile-count.c (profile_probability::combine_with_count): New
15155 * profile-count.h (profile_probability::operator*,
15156 profile_probability::operator*=, profile_probability::operator/,
15157 profile_probability::operator/=): Reduce precision to adjusted
15158 and set value to guessed on contradictory divisions.
15159 (profile_probability::combine_with_freq): Remove.
15160 (profile_probability::combine_wiht_count): Declare.
15161 (profile_count::force_nonzero):: Set to adjusted.
15162 (profile_count::probability_in):: Set quality to adjusted.
15163 * tree-ssa-tail-merge.c (replace_block_by): Use
15164 combine_with_count.
15166 2018-01-23 Andrew Waterman <andrew@sifive.com>
15167 Jim Wilson <jimw@sifive.com>
15169 * config/riscv/riscv.c (riscv_stack_boundary): New.
15170 (riscv_option_override): Set riscv_stack_boundary. Handle
15171 riscv_preferred_stack_boundary_arg.
15172 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15173 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15174 (STACK_BOUNDARY): Set to riscv_stack_boundary.
15175 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15176 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15177 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15179 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
15182 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15183 of struct ix86_frame.
15184 (ix86_expand_epilogue): Likewise. Add a local variable for
15185 the reg_save_offset field in struct ix86_frame.
15187 2018-01-23 Bin Cheng <bin.cheng@arm.com>
15189 PR tree-optimization/82604
15190 * tree-loop-distribution.c (enum partition_kind): New enum item
15191 PKIND_PARTIAL_MEMSET.
15192 (partition_builtin_p): Support above new enum item.
15193 (generate_code_for_partition): Ditto.
15194 (compute_access_range): Differentiate cases that equality can be
15195 proven at all loops, the innermost loops or no loops.
15196 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15197 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
15198 (finalize_partitions, distribute_loop): Don't fuse partition of
15199 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15200 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15201 parloop is enabled.
15203 2018-01-23 Martin Liska <mliska@suse.cz>
15205 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15206 order to ignore the predictor.
15207 (PRED_POLYMORPHIC_CALL): Likewise.
15208 (PRED_RECURSIVE_CALL): Likewise.
15210 2018-01-23 Martin Liska <mliska@suse.cz>
15212 * tree-profile.c (tree_profiling): Print function header to
15213 aware reader which function we are working on.
15214 * value-prof.c (gimple_find_values_to_profile): Do not print
15215 not interesting value histograms.
15217 2018-01-23 Martin Liska <mliska@suse.cz>
15219 * profile-count.h (enum profile_quality): Add
15220 profile_uninitialized as the first value. Do not number values
15221 as they are zero based.
15222 (profile_count::verify): Update sanity check.
15223 (profile_probability::verify): Likewise.
15225 2018-01-23 Nathan Sidwell <nathan@acm.org>
15227 * doc/invoke.texi (ffor-scope): Deprecate.
15229 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15231 PR tree-optimization/83510
15232 * domwalk.c (set_all_edges_as_executable): New function.
15233 (dom_walker::dom_walker): Convert bool param
15234 "skip_unreachable_blocks" to enum reachability. Move setup of
15235 edge flags to set_all_edges_as_executable and only do it when
15236 reachability is REACHABLE_BLOCKS.
15237 * domwalk.h (enum dom_walker::reachability): New enum.
15238 (dom_walker::dom_walker): Convert bool param
15239 "skip_unreachable_blocks" to enum reachability.
15240 (set_all_edges_as_executable): New decl.
15241 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
15242 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15244 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15245 but converting true to REACHABLE_BLOCKS.
15246 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15248 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15249 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15250 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15252 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15253 if check_all_array_refs will be called.
15255 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15257 * tree.c (selftest::test_location_wrappers): Add more test
15260 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15262 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15263 (selftest::test_bit_in_range): Likewise.
15265 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15268 * doc/sourcebuild.texi (vect_float): Say that the selector
15269 only describes the situation when -funsafe-math-optimizations is on.
15270 (vect_float_strict): Document.
15272 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15274 PR tree-optimization/83965
15275 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15276 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15277 instead of checking only for a reduction.
15278 (vect_recog_widen_sum_pattern): Likewise.
15280 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15282 * predict.c (probably_never_executed): Only use precise profile info.
15283 (compute_function_frequency): Skip after inlining hack since we now
15284 have quality checking.
15286 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15288 * profile-count.h (profile_probability::very_unlikely,
15289 profile_probability::unlikely, profile_probability::even): Set
15290 precision to guessed.
15292 2018-01-23 Richard Biener <rguenther@suse.de>
15294 PR tree-optimization/83963
15295 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15296 Properly terminate dominator walk when crossing the exit edge not
15297 when visiting its source block.
15299 2018-01-23 Jakub Jelinek <jakub@redhat.com>
15302 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15303 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15305 2018-01-22 Jakub Jelinek <jakub@redhat.com>
15307 PR tree-optimization/83957
15308 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
15309 semicolon after for body surrounded by braces.
15311 PR tree-optimization/83081
15312 * profile-count.h (profile_probability::split): New method.
15313 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15314 Use profile_probability::split.
15315 (do_compare_rtx_and_jump): Fix adjustment of probabilities
15316 when splitting a single conditional jump into 2.
15318 2018-01-22 David Malcolm <dmalcolm@redhat.com>
15320 PR tree-optimization/69452
15321 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15324 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15326 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15327 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15328 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15330 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15332 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15334 * config/rl78/rl78.md (movdi): New define_expand.
15335 * config/rl78/rl78.c (rl78_split_movdi): New function.
15337 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
15340 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15342 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15343 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15344 128-bit to produce an UNSPEC move to get the double word with the
15345 signbit and then a shift directly to do signbit.
15346 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15347 implementation with a new version that just does either a direct
15348 move or a regular move. Move memory interface to separate insns.
15349 Move insns so they are next to the expander.
15350 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15351 with signbit move. Split big and little endian case.
15352 (signbit<mode>2_dm_mem_le): Likewise.
15353 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15354 (signbit<mode>2_dm2): Likewise.
15356 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15358 * config/rl78/rl78.md (anddi3): New define_expand.
15360 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15362 * config/rl78/rl78.md (umindi3): New define_expand.
15364 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15366 * config/rl78/rl78.md (smindi3): New define_expand.
15368 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15370 * config/rl78/rl78.md (smaxdi3): New define_expand.
15372 2018-01-22 Carl Love <cel@us.ibm.com>
15374 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15375 LVX_V1TI): Add macro expansion.
15376 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15377 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15378 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15379 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15380 Change check to determine if the instruction is a byte reversing
15381 entry. Fix typo in comment.
15382 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15383 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15384 Add def_builtin calls for new builtins.
15385 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15386 Add define_insn expansion.
15388 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15390 * config/rl78/rl78.md (umaxdi3): New define_expand.
15392 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15394 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15395 for non-QImode registers.
15397 2018-01-22 Richard Biener <rguenther@suse.de>
15399 PR tree-optimization/83963
15400 * graphite-scop-detection.c (scop_detection::get_sese): Delay
15401 including the loop exit block.
15402 (scop_detection::merge_sese): Likewise.
15403 (scop_detection::add_scop): Do it here instead.
15405 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15407 * doc/sourcebuild.texi (arm_softfloat): Document.
15409 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
15412 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15413 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15414 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15416 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15417 David Edelsohn <dje.gcc@gmail.com>
15420 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15421 Change "crset eq" to "crset 2".
15422 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15423 (*call_indirect_aix<mode>_nospec): Likewise.
15424 (*call_value_indirect_aix<mode>_nospec): Likewise.
15425 (*call_indirect_elfv2<mode>_nospec): Likewise.
15426 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15427 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15428 change assembly output from . to $.
15429 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15430 (indirect_jump<mode>_nospec): Change assembly output from . to $.
15431 (*tablejump<mode>_internal1_nospec): Likewise.
15433 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
15436 * config/sh/sh_optimize_sett_clrt.cc:
15437 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15439 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
15441 PR tree-optimization/83940
15442 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15443 offset_dt to vect_constant_def rather than vect_unknown_def_type.
15444 (vect_check_load_store_mask): Add a mask_dt_out parameter and
15445 use it to pass back the definition type.
15446 (vect_check_store_rhs): Likewise rhs_dt_out.
15447 (vect_build_gather_load_calls): Add a mask_dt argument and use
15448 it instead of a call to vect_is_simple_use.
15449 (vectorizable_store): Update calls to vect_check_load_store_mask
15450 and vect_check_store_rhs. Use the dt returned by the latter instead
15451 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
15452 instead of calls to vect_is_simple_use. Pass the scalar rather
15453 than the vector operand to vect_is_simple_use when handling
15454 second and subsequent copies of an rhs value.
15455 (vectorizable_load): Update calls to vect_check_load_store_mask
15456 and vect_build_gather_load_calls. Use the cached mask_dt and
15457 gs_info.offset_dt instead of calls to vect_is_simple_use.
15459 2018-01-20 Jakub Jelinek <jakub@redhat.com>
15461 PR middle-end/83945
15462 * tree-emutls.c: Include gimplify.h.
15463 (lower_emutls_2): New function.
15464 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15465 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15466 it before further processing.
15469 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15470 UINTVAL (trueop1) instead of INTVAL (op1).
15472 2018-01-19 Jakub Jelinek <jakub@redhat.com>
15476 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15477 INCOMING_FRAME_SP_OFFSET if not defined.
15478 (scan_trace): Add ENTRY argument. If true and
15479 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15480 emit a note to adjust the CFA offset.
15481 (create_cfi_notes): Adjust scan_trace callers.
15482 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15483 INCOMING_FRAME_SP_OFFSET in the CIE.
15484 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15485 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15487 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15488 * doc/tm.texi: Regenerated.
15490 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15492 PR rtl-optimization/83147
15493 * lra-constraints.c (remove_inheritance_pseudos): Use
15494 lra_substitute_pseudo_within_insn.
15496 2018-01-19 Tom de Vries <tom@codesourcery.com>
15497 Cesar Philippidis <cesar@codesourcery.com>
15500 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15502 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
15505 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15506 spaces for function labels.
15508 2018-01-19 Martin Liska <mliska@suse.cz>
15510 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15511 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15512 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15513 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15514 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15515 (PRED_CONST_RETURN): Change from 69 to 65.
15516 (PRED_NULL_RETURN): Change from 91 to 71.
15517 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15518 (PRED_LOOP_GUARD): Change from 66 to 73.
15520 2018-01-19 Martin Liska <mliska@suse.cz>
15522 * predict.c (predict_insn_def): Add new assert.
15523 (struct branch_predictor): Change type to signed integer.
15524 (test_prediction_value_range): Amend test to cover
15525 PROB_UNINITIALIZED.
15526 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15527 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15528 (PRED_LOOP_ITERATIONS_MAX): Likewise.
15529 (PRED_LOOP_IV_COMPARE): Likewise.
15530 * predict.h (PROB_UNINITIALIZED): Define new constant.
15532 2018-01-19 Martin Liska <mliska@suse.cz>
15534 * predict.c (dump_prediction): Add new format for
15535 analyze_brprob.py script which is enabled with -details
15537 * profile-count.h (precise_p): New function.
15539 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15541 PR tree-optimization/83922
15542 * tree-vect-loop.c (vect_verify_full_masking): Return false if
15543 there are no statements that need masking.
15544 (vect_active_double_reduction_p): New function.
15545 (vect_analyze_loop_operations): Use it when handling phis that
15546 are not in the loop header.
15548 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15550 PR tree-optimization/83914
15551 * tree-vect-loop.c (vectorizable_induction): Don't convert
15552 init_expr or apply the peeling adjustment for inductions
15553 that are nested within the vectorized loop.
15555 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15557 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15560 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15564 * function.h (gimplify_parameters): Add gimple_seq * argument.
15565 * function.c: Include gimple.h and options.h.
15566 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15567 for the added local temporaries if needed.
15568 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15569 if there are any parameter cleanups, wrap whole body into a
15570 try/finally with the cleanups.
15572 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
15575 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15576 Use GET_MODE_CLASS for scalar floating point.
15578 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15582 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15583 Fix call of call_cgraph_insertion_hooks.
15585 2018-01-18 Martin Sebor <msebor@redhat.com>
15587 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15589 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15592 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15595 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
15598 * common.opt: (-ffile-prefix-map): New option.
15599 * opts.c (common_handle_option): Defer it.
15600 * opts-global.c (handle_common_deferred_options): Handle it.
15601 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15602 * file-prefix-map.h: New file.
15603 (remap_debug_filename, add_debug_prefix_map): ...here.
15604 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15605 * final.c (debug_prefix_map, add_debug_prefix_map
15606 remap_debug_filename): Move to...
15607 * file-prefix-map.c: New file.
15608 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15609 generalize, get rid of alloca(), use strrchr() instead of strchr().
15610 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15611 Implement in terms of add_prefix_map().
15612 (remap_macro_filename, remap_debug_filename): Implement in term of
15614 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15615 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15616 * dbxout.c: Include file-prefix-map.h.
15617 * varasm.c: Likewise.
15618 * vmsdbgout.c: Likewise.
15619 * xcoffout.c: Likewise.
15620 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15621 * doc/cppopts.texi (-fmacro-prefix-map): Document.
15622 * doc/invoke.texi (-ffile-prefix-map): Document.
15623 (-fdebug-prefix-map): Update description.
15625 2018-01-18 Martin Liska <mliska@suse.cz>
15627 * config/i386/i386.c (indirect_thunk_name): Document that also
15629 (output_indirect_thunk): Document why both instructions
15630 (pause and lfence) are generated.
15632 2018-01-18 Richard Biener <rguenther@suse.de>
15634 PR tree-optimization/83887
15635 * graphite-scop-detection.c
15636 (scop_detection::get_nearest_dom_with_single_entry): Remove.
15637 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15638 (scop_detection::merge_sese): Re-implement with a flood-fill
15639 algorithm that properly finds a SESE region if it exists.
15641 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15644 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15645 pointer_diff optimizations use view_convert instead of convert.
15647 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15649 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15650 Generate different code for -mno-speculate-indirect-jumps.
15651 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15652 (*call_indirect_aix<mode>): Disable for
15653 -mno-speculate-indirect-jumps.
15654 (*call_indirect_aix<mode>_nospec): New define_insn.
15655 (*call_value_indirect_aix<mode>): Disable for
15656 -mno-speculate-indirect-jumps.
15657 (*call_value_indirect_aix<mode>_nospec): New define_insn.
15658 (*sibcall_nonlocal_sysv<mode>): Generate different code for
15659 -mno-speculate-indirect-jumps.
15660 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15662 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15664 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15665 long double type, set the flags for noting the default long double
15666 type, even if we don't pass or return a long double type.
15668 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
15671 * ipa-inline.c (flatten_function): Do not overwrite final inlining
15674 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
15676 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15677 support for merge[hl].
15678 (fold_mergehl_helper): New helper function.
15679 (tree-vector-builder.h): New #include for tree_vector_builder usage.
15680 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15681 (altivec_vmrglw_direct): Add xxmrglw insn.
15683 2018-01-17 Andrew Waterman <andrew@sifive.com>
15685 * config/riscv/riscv.c (riscv_conditional_register_usage): If
15686 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15688 2018-01-17 David Malcolm <dmalcolm@redhat.com>
15691 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15692 call the lto_location_cache before reading the
15693 DECL_SOURCE_LOCATION of the types.
15695 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
15696 Richard Sandiford <richard.sandiford@linaro.org>
15698 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15699 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15700 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15701 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15702 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15704 * config/aarch64/constraints.md (aarch64_movti_operand):
15706 * config/aarch64/predicates.md (Uti): Add new constraint.
15708 2018-01-17 Carl Love <cel@us.ibm.com>
15710 * config/rs6000/vsx.md (define_expand xl_len_r,
15711 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15712 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15714 (define_expand, define_insn): Move the shift left from the
15715 define_insn to the define_expand for lxvl and stxvl instructions.
15716 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15717 and XL_LEN_R definitions to PURE.
15719 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
15721 * config/i386/i386.c (indirect_thunk_name): Declare regno
15722 as unsigned int. Compare regno with INVALID_REGNUM.
15723 (output_indirect_thunk): Ditto.
15724 (output_indirect_thunk_function): Ditto.
15725 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
15726 in the call to output_indirect_thunk_function.
15728 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
15730 PR middle-end/83884
15731 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15732 rather than the size of inner_type to determine the stack slot size
15733 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15735 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
15738 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15741 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
15743 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15744 endian Linux systems to optionally enable multilibs for selecting
15745 the long double type if the user configured an explicit type.
15746 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15747 have no long double multilibs if not defined.
15748 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15749 warn if the user used -mabi={ieee,ibm}longdouble and we built
15750 multilibs for long double.
15751 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15752 appropriate multilib option.
15753 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15755 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15756 for building long double multilibs.
15757 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15759 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
15761 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15764 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15766 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15769 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15772 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15775 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15777 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15778 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15780 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
15782 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15783 different rtl trees depending on TARGET_64BIT.
15784 (rs6000_gen_lvx): Likewise.
15786 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15788 * config/visium/visium.md (nop): Tweak comment.
15789 (hazard_nop): Likewise.
15791 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15793 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15794 -mspeculate-indirect-jumps.
15795 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15796 for -mno-speculate-indirect-jumps.
15797 (*call_indirect_elfv2<mode>_nospec): New define_insn.
15798 (*call_value_indirect_elfv2<mode>): Disable for
15799 -mno-speculate-indirect-jumps.
15800 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15801 (indirect_jump): Emit different RTL for
15802 -mno-speculate-indirect-jumps.
15803 (*indirect_jump<mode>): Disable for
15804 -mno-speculate-indirect-jumps.
15805 (*indirect_jump<mode>_nospec): New define_insn.
15806 (tablejump): Emit different RTL for
15807 -mno-speculate-indirect-jumps.
15808 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
15809 (tablejumpsi_nospec): New define_expand.
15810 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
15811 (tablejumpdi_nospec): New define_expand.
15812 (*tablejump<mode>_internal1): Disable for
15813 -mno-speculate-indirect-jumps.
15814 (*tablejump<mode>_internal1_nospec): New define_insn.
15815 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
15818 2018-01-16 Artyom Skrobov tyomitch@gmail.com
15820 * caller-save.c (insert_save): Drop unnecessary parameter. All
15823 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15824 Richard Biener <rguenth@suse.de>
15827 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
15828 return early, inline manually is_gimple_sizepos. Make sure if we
15829 call gimplify_expr we don't end up with a gimple constant.
15830 * tree.c (variably_modified_type_p): Don't return true for
15831 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
15832 * gimplify.h (is_gimple_sizepos): Remove.
15834 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15836 PR tree-optimization/83857
15837 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
15838 vectorizable_live_operation for pure SLP statements.
15839 (vectorizable_live_operation): Handle PHIs.
15841 2018-01-16 Richard Biener <rguenther@suse.de>
15843 PR tree-optimization/83867
15844 * tree-vect-stmts.c (vect_transform_stmt): Precompute
15845 nested_in_vect_loop_p since the scalar stmt may get invalidated.
15847 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15850 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
15851 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
15852 If off is not INTEGER_CST, issue a may not be aligned warning
15853 rather than isn't aligned. Use isn%'t rather than isn't.
15854 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
15856 <case MULT_EXPR>: Improve the case when bottom and one of the
15857 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
15858 operand, in that case check if the other operand is multiple of
15859 bottom divided by the INTEGER_CST operand.
15861 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15864 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
15865 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
15866 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
15867 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
15868 * config/pa/pa.c (pa_function_arg_advance): Likewise.
15869 (pa_function_arg, pa_arg_partial_bytes): Likewise.
15870 (pa_function_arg_size): New function.
15872 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15874 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
15875 in a separate statement.
15877 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15879 PR tree-optimization/83847
15880 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
15881 group gathers and scatters.
15883 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15885 PR rtl-optimization/86620
15886 * params.def (max-sched-ready-insns): Bump minimum value to 1.
15888 PR rtl-optimization/83213
15889 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
15890 to last if both are JUMP_INSNs.
15892 PR tree-optimization/83843
15893 * gimple-ssa-store-merging.c
15894 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
15895 store_immediate_info for bswap/nop orig_stores.
15897 2018-01-15 Andrew Waterman <andrew@sifive.com>
15899 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
15901 <UDIV>: Increase cost if !TARGET_DIV.
15903 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
15905 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
15906 (define_attr "cr_logical_3op"): New.
15907 (cceq_ior_compare): Adjust.
15908 (cceq_ior_compare_complement): Adjust.
15909 (*cceq_rev_compare): Adjust.
15910 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
15911 (is_cracked_insn): Adjust.
15912 (insn_must_be_first_in_group): Adjust.
15913 * config/rs6000/40x.md: Adjust.
15914 * config/rs6000/440.md: Adjust.
15915 * config/rs6000/476.md: Adjust.
15916 * config/rs6000/601.md: Adjust.
15917 * config/rs6000/603.md: Adjust.
15918 * config/rs6000/6xx.md: Adjust.
15919 * config/rs6000/7450.md: Adjust.
15920 * config/rs6000/7xx.md: Adjust.
15921 * config/rs6000/8540.md: Adjust.
15922 * config/rs6000/cell.md: Adjust.
15923 * config/rs6000/e300c2c3.md: Adjust.
15924 * config/rs6000/e500mc.md: Adjust.
15925 * config/rs6000/e500mc64.md: Adjust.
15926 * config/rs6000/e5500.md: Adjust.
15927 * config/rs6000/e6500.md: Adjust.
15928 * config/rs6000/mpc.md: Adjust.
15929 * config/rs6000/power4.md: Adjust.
15930 * config/rs6000/power5.md: Adjust.
15931 * config/rs6000/power6.md: Adjust.
15932 * config/rs6000/power7.md: Adjust.
15933 * config/rs6000/power8.md: Adjust.
15934 * config/rs6000/power9.md: Adjust.
15935 * config/rs6000/rs64.md: Adjust.
15936 * config/rs6000/titan.md: Adjust.
15938 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15940 * config/i386/predicates.md (indirect_branch_operand): Rewrite
15941 ix86_indirect_branch_register logic.
15943 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15945 * config/i386/constraints.md (Bs): Update
15946 ix86_indirect_branch_register check. Don't check
15947 ix86_indirect_branch_register with GOT_memory_operand.
15949 * config/i386/predicates.md (GOT_memory_operand): Don't check
15950 ix86_indirect_branch_register here.
15951 (GOT32_symbol_operand): Likewise.
15953 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15955 * config/i386/predicates.md (constant_call_address_operand):
15956 Rewrite ix86_indirect_branch_register logic.
15957 (sibcall_insn_operand): Likewise.
15959 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15961 * config/i386/constraints.md (Bs): Replace
15962 ix86_indirect_branch_thunk_register with
15963 ix86_indirect_branch_register.
15965 * config/i386/i386.md (indirect_jump): Likewise.
15966 (tablejump): Likewise.
15967 (*sibcall_memory): Likewise.
15968 (*sibcall_value_memory): Likewise.
15969 Peepholes of indirect call and jump via memory: Likewise.
15970 * config/i386/i386.opt: Likewise.
15971 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15972 (GOT_memory_operand): Likewise.
15973 (call_insn_operand): Likewise.
15974 (sibcall_insn_operand): Likewise.
15975 (GOT32_symbol_operand): Likewise.
15977 2018-01-15 Jakub Jelinek <jakub@redhat.com>
15979 PR middle-end/83837
15980 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
15981 type rather than type addr's type points to.
15982 (expand_omp_atomic_mutex): Likewise.
15983 (expand_omp_atomic): Likewise.
15985 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15988 * config/i386/i386.c (output_indirect_thunk_function): Use
15989 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
15990 for __x86_return_thunk.
15992 2018-01-15 Richard Biener <rguenther@suse.de>
15994 PR middle-end/83850
15995 * expmed.c (extract_bit_field_1): Fix typo.
15997 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16000 * config/arm/iterators.md (VF): New mode iterator.
16001 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16002 Remove integer-related logic from pattern.
16003 (neon_vabd<mode>_3): Likewise.
16005 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16007 PR middle-end/82694
16008 * common.opt (fstrict-overflow): No longer an alias.
16009 (fwrapv-pointer): New option.
16010 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16011 also for pointer types based on flag_wrapv_pointer.
16012 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16013 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16014 opts->x_flag_wrapv got set.
16015 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16016 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16017 POINTER_TYPE_OVERFLOW_UNDEFINED.
16018 * match.pd: Likewise in address comparison pattern.
16019 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16021 2018-01-15 Richard Biener <rguenther@suse.de>
16024 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16025 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
16026 Reset type names to their identifier if their TYPE_DECL doesn't
16027 have linkage (and thus is used for ODR and devirt).
16028 (save_debug_info_for_decl): Remove.
16029 (save_debug_info_for_type): Likewise.
16030 (add_tree_to_fld_list): Adjust.
16031 * tree-pretty-print.c (dump_generic_node): Make dumping of
16032 type names more robust.
16034 2018-01-15 Richard Biener <rguenther@suse.de>
16036 * BASE-VER: Bump to 8.0.1.
16038 2018-01-14 Martin Sebor <msebor@redhat.com>
16041 * builtins.c (check_access): Avoid warning when the no-warning bit
16044 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
16046 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16047 * ira-color (allocno_hard_regs_compare): Likewise.
16049 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
16052 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16053 Use .pushsection/.popsection.
16055 2018-01-14 Martin Sebor <msebor@redhat.com>
16058 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16060 2018-01-14 Jakub Jelinek <jakub@redhat.com>
16062 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16063 entry from extra_headers.
16064 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16065 extra_headers, make the list bitwise identical to the i?86-*-* one.
16067 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16069 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16070 -mcmodel=large with -mindirect-branch=thunk,
16071 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16072 -mfunction-return=thunk-extern.
16073 * doc/invoke.texi: Document -mcmodel=large is incompatible with
16074 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16075 -mfunction-return=thunk and -mfunction-return=thunk-extern.
16077 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16079 * config/i386/i386.c (print_reg): Print the name of the full
16080 integer register without '%'.
16081 (ix86_print_operand): Handle 'V'.
16082 * doc/extend.texi: Document 'V' modifier.
16084 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16086 * config/i386/constraints.md (Bs): Disallow memory operand for
16087 -mindirect-branch-register.
16089 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16090 (GOT_memory_operand): Likewise.
16091 (call_insn_operand): Likewise.
16092 (sibcall_insn_operand): Likewise.
16093 (GOT32_symbol_operand): Likewise.
16094 * config/i386/i386.md (indirect_jump): Call convert_memory_address
16095 for -mindirect-branch-register.
16096 (tablejump): Likewise.
16097 (*sibcall_memory): Likewise.
16098 (*sibcall_value_memory): Likewise.
16099 Disallow peepholes of indirect call and jump via memory for
16100 -mindirect-branch-register.
16101 (*call_pop): Replace m with Bw.
16102 (*call_value_pop): Likewise.
16103 (*sibcall_pop_memory): Replace m with Bs.
16104 * config/i386/i386.opt (mindirect-branch-register): New option.
16105 * doc/invoke.texi: Document -mindirect-branch-register option.
16107 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16109 * config/i386/i386-protos.h (ix86_output_function_return): New.
16110 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16111 set function_return_type.
16112 (indirect_thunk_name): Add ret_p to indicate thunk for function
16114 (output_indirect_thunk_function): Pass false to
16115 indirect_thunk_name.
16116 (ix86_output_indirect_branch_via_reg): Likewise.
16117 (ix86_output_indirect_branch_via_push): Likewise.
16118 (output_indirect_thunk_function): Create alias for function
16119 return thunk if regno < 0.
16120 (ix86_output_function_return): New function.
16121 (ix86_handle_fndecl_attribute): Handle function_return.
16122 (ix86_attribute_table): Add function_return.
16123 * config/i386/i386.h (machine_function): Add
16124 function_return_type.
16125 * config/i386/i386.md (simple_return_internal): Use
16126 ix86_output_function_return.
16127 (simple_return_internal_long): Likewise.
16128 * config/i386/i386.opt (mfunction-return=): New option.
16129 (indirect_branch): Mention -mfunction-return=.
16130 * doc/extend.texi: Document function_return function attribute.
16131 * doc/invoke.texi: Document -mfunction-return= option.
16133 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16135 * config/i386/i386-opts.h (indirect_branch): New.
16136 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16137 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16138 with local indirect jump when converting indirect call and jump.
16139 (ix86_set_indirect_branch_type): New.
16140 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16141 (indirectlabelno): New.
16142 (indirect_thunk_needed): Likewise.
16143 (indirect_thunk_bnd_needed): Likewise.
16144 (indirect_thunks_used): Likewise.
16145 (indirect_thunks_bnd_used): Likewise.
16146 (INDIRECT_LABEL): Likewise.
16147 (indirect_thunk_name): Likewise.
16148 (output_indirect_thunk): Likewise.
16149 (output_indirect_thunk_function): Likewise.
16150 (ix86_output_indirect_branch_via_reg): Likewise.
16151 (ix86_output_indirect_branch_via_push): Likewise.
16152 (ix86_output_indirect_branch): Likewise.
16153 (ix86_output_indirect_jmp): Likewise.
16154 (ix86_code_end): Call output_indirect_thunk_function if needed.
16155 (ix86_output_call_insn): Call ix86_output_indirect_branch if
16157 (ix86_handle_fndecl_attribute): Handle indirect_branch.
16158 (ix86_attribute_table): Add indirect_branch.
16159 * config/i386/i386.h (machine_function): Add indirect_branch_type
16160 and has_local_indirect_jump.
16161 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16163 (tablejump): Likewise.
16164 (*indirect_jump): Use ix86_output_indirect_jmp.
16165 (*tablejump_1): Likewise.
16166 (simple_return_indirect_internal): Likewise.
16167 * config/i386/i386.opt (mindirect-branch=): New option.
16168 (indirect_branch): New.
16171 (thunk-inline): Likewise.
16172 (thunk-extern): Likewise.
16173 * doc/extend.texi: Document indirect_branch function attribute.
16174 * doc/invoke.texi: Document -mindirect-branch= option.
16176 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
16179 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16181 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
16183 * ipa-inline.c (want_inline_small_function_p): Return false if
16184 inlining has already failed with CIF_FINAL_ERROR.
16185 (update_caller_keys): Call want_inline_small_function_p before
16187 (update_callee_keys): Likewise.
16189 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
16191 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16193 (rs6000_quadword_masked_address_p): Likewise.
16194 (quad_aligned_load_p): Likewise.
16195 (quad_aligned_store_p): Likewise.
16196 (const_load_sequence_p): Add comment to describe the outer-most loop.
16197 (mimic_memory_attributes_and_flags): New function.
16198 (rs6000_gen_stvx): Likewise.
16199 (replace_swapped_aligned_store): Likewise.
16200 (rs6000_gen_lvx): Likewise.
16201 (replace_swapped_aligned_load): Likewise.
16202 (replace_swapped_load_constant): Capitalize argument name in
16203 comment describing this function.
16204 (rs6000_analyze_swaps): Add a third pass to search for vector loads
16205 and stores that access quad-word aligned addresses and replace
16206 with stvx or lvx instructions when appropriate.
16207 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16208 New function prototype.
16209 (rs6000_quadword_masked_address_p): Likewise.
16210 (rs6000_gen_lvx): Likewise.
16211 (rs6000_gen_stvx): Likewise.
16212 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16213 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16214 when memory address is aligned.
16215 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16216 this split to select lvx instruction when memory address is aligned.
16217 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16218 instruction when memory address is aligned.
16219 (*vsx_le_perm_load_v16qi): Likewise.
16220 (four unnamed splitters): Modify to select the stvx instruction
16221 when memory is aligned.
16223 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
16225 * predict.c (determine_unlikely_bbs): Handle correctly BBs
16226 which appears in the queue multiple times.
16228 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16229 Alan Hayward <alan.hayward@arm.com>
16230 David Sherwood <david.sherwood@arm.com>
16232 * tree-vectorizer.h (vec_lower_bound): New structure.
16233 (_loop_vec_info): Add check_nonzero and lower_bounds.
16234 (LOOP_VINFO_CHECK_NONZERO): New macro.
16235 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16236 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16237 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16238 fields. Make seg_len the distance travelled, not including the
16240 (dr_direction_indicator): Declare.
16241 (dr_zero_step_indicator): Likewise.
16242 (dr_known_forward_stride_p): Likewise.
16243 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16245 (runtime_alias_check_p): Allow runtime alias checks with
16247 (operator ==): Compare access_size and align.
16248 (prune_runtime_alias_test_list): Rework for new distinction between
16249 the access_size and seg_len.
16250 (create_intersect_range_checks_index): Likewise. Cope with polynomial
16252 (get_segment_min_max): New function.
16253 (create_intersect_range_checks): Use it.
16254 (dr_step_indicator): New function.
16255 (dr_direction_indicator): Likewise.
16256 (dr_zero_step_indicator): Likewise.
16257 (dr_known_forward_stride_p): Likewise.
16258 * tree-loop-distribution.c (data_ref_segment_size): Return
16259 DR_STEP * (niters - 1).
16260 (compute_alias_check_pairs): Update call to the dr_with_seg_len
16262 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16263 (vect_preserves_scalar_order_p): New function, split out from...
16264 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
16265 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16266 (vect_vfa_access_size): New function.
16267 (vect_vfa_align): Likewise.
16268 (vect_compile_time_alias): Take access_size_a and access_b arguments.
16269 (dump_lower_bound): New function.
16270 (vect_check_lower_bound): Likewise.
16271 (vect_small_gap_p): Likewise.
16272 (vectorizable_with_step_bound_p): Likewise.
16273 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16274 depencies if the vectorization factor is 1. Convert the checks
16275 for nonzero steps into checks on the bounds of DR_STEP. Try using
16276 a bunds check for variable steps if the minimum required step is
16277 relatively small. Update calls to the dr_with_seg_len
16278 constructor and to vect_compile_time_alias.
16279 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16281 (vect_loop_versioning): Call it.
16282 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16284 (vect_estimate_min_profitable_iters): Account for any bounds checks.
16286 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16287 Alan Hayward <alan.hayward@arm.com>
16288 David Sherwood <david.sherwood@arm.com>
16290 * doc/sourcebuild.texi (vect_scatter_store): Document.
16291 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16293 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16295 * genopinit.c (main): Add supports_vec_scatter_store and
16296 supports_vec_scatter_store_cached to target_optabs.
16297 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16298 IFN_MASK_SCATTER_STORE.
16299 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16301 * internal-fn.h (internal_store_fn_p): Declare.
16302 (internal_fn_stored_value_index): Likewise.
16303 * internal-fn.c (scatter_store_direct): New macro.
16304 (expand_scatter_store_optab_fn): New function.
16305 (direct_scatter_store_optab_supported_p): New macro.
16306 (internal_store_fn_p): New function.
16307 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16308 IFN_MASK_SCATTER_STORE.
16309 (internal_fn_mask_index): Likewise.
16310 (internal_fn_stored_value_index): New function.
16311 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16312 for scatter stores.
16313 * optabs-query.h (supports_vec_scatter_store_p): Declare.
16314 * optabs-query.c (supports_vec_scatter_store_p): New function.
16315 * tree-vectorizer.h (vect_get_store_rhs): Declare.
16316 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16317 true for scatter stores.
16318 (vect_gather_scatter_fn_p): Handle scatter stores too.
16319 (vect_check_gather_scatter): Consider using scatter stores if
16320 supports_vec_scatter_store_p.
16321 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16322 scatter stores too.
16323 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16324 internal_fn_stored_value_index.
16325 (check_load_store_masking): Handle scatter stores too.
16326 (vect_get_store_rhs): Make public.
16327 (vectorizable_call): Use internal_store_fn_p.
16328 (vectorizable_store): Handle scatter store internal functions.
16329 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16330 when deciding whether the end of the group has been reached.
16331 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16332 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16333 (mask_scatter_store<mode>): New insns.
16335 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16336 Alan Hayward <alan.hayward@arm.com>
16337 David Sherwood <david.sherwood@arm.com>
16339 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16340 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16341 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16343 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16344 Use vect_truncate_gather_scatter_offset if we can't treat the
16345 operation as a normal gather load or scatter store.
16346 (get_group_load_store_type): Take the gather_scatter_info
16347 as argument. Try using a gather load or scatter store for
16348 single-element groups.
16349 (get_load_store_type): Update calls to get_group_load_store_type
16350 and vect_use_strided_gather_scatters_p.
16352 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16353 Alan Hayward <alan.hayward@arm.com>
16354 David Sherwood <david.sherwood@arm.com>
16356 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16357 optional tree argument.
16358 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16360 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16361 but continue to use the current value as a fallback.
16362 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16363 to compare the updates.
16364 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16365 (get_load_store_type): Use it when handling a strided access.
16366 (vect_get_strided_load_store_ops): New function.
16367 (vect_get_data_ptr_increment): Likewise.
16368 (vectorizable_load): Handle strided gather loads. Always pass
16369 a step to vect_create_data_ref_ptr and bump_vector_ptr.
16371 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16372 Alan Hayward <alan.hayward@arm.com>
16373 David Sherwood <david.sherwood@arm.com>
16375 * doc/md.texi (gather_load@var{m}): Document.
16376 (mask_gather_load@var{m}): Likewise.
16377 * genopinit.c (main): Add supports_vec_gather_load and
16378 supports_vec_gather_load_cached to target_optabs.
16379 * optabs-tree.c (init_tree_optimization_optabs): Use
16380 ggc_cleared_alloc to allocate target_optabs.
16381 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16382 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16384 * internal-fn.h (internal_load_fn_p): Declare.
16385 (internal_gather_scatter_fn_p): Likewise.
16386 (internal_fn_mask_index): Likewise.
16387 (internal_gather_scatter_fn_supported_p): Likewise.
16388 * internal-fn.c (gather_load_direct): New macro.
16389 (expand_gather_load_optab_fn): New function.
16390 (direct_gather_load_optab_supported_p): New macro.
16391 (direct_internal_fn_optab): New function.
16392 (internal_load_fn_p): Likewise.
16393 (internal_gather_scatter_fn_p): Likewise.
16394 (internal_fn_mask_index): Likewise.
16395 (internal_gather_scatter_fn_supported_p): Likewise.
16396 * optabs-query.c (supports_at_least_one_mode_p): New function.
16397 (supports_vec_gather_load_p): Likewise.
16398 * optabs-query.h (supports_vec_gather_load_p): Declare.
16399 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16400 and memory_type field.
16401 (NUM_PATTERNS): Bump to 15.
16402 * tree-vect-data-refs.c: Include internal-fn.h.
16403 (vect_gather_scatter_fn_p): New function.
16404 (vect_describe_gather_scatter_call): Likewise.
16405 (vect_check_gather_scatter): Try using internal functions for
16406 gather loads. Recognize existing calls to a gather load function.
16407 (vect_analyze_data_refs): Consider using gather loads if
16408 supports_vec_gather_load_p.
16409 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16410 (vect_get_gather_scatter_offset_type): Likewise.
16411 (vect_convert_mask_for_vectype): Likewise.
16412 (vect_add_conversion_to_patterm): Likewise.
16413 (vect_try_gather_scatter_pattern): Likewise.
16414 (vect_recog_gather_scatter_pattern): New pattern recognizer.
16415 (vect_vect_recog_func_ptrs): Add it.
16416 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16417 internal_fn_mask_index and internal_gather_scatter_fn_p.
16418 (check_load_store_masking): Take the gather_scatter_info as an
16419 argument and handle gather loads.
16420 (vect_get_gather_scatter_ops): New function.
16421 (vectorizable_call): Check internal_load_fn_p.
16422 (vectorizable_load): Likewise. Handle gather load internal
16424 (vectorizable_store): Update call to check_load_store_masking.
16425 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16426 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16427 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16428 (aarch64_gather_scale_operand_d): New predicates.
16429 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16430 (mask_gather_load<mode>): New insns.
16432 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16433 Alan Hayward <alan.hayward@arm.com>
16434 David Sherwood <david.sherwood@arm.com>
16436 * optabs.def (fold_left_plus_optab): New optab.
16437 * doc/md.texi (fold_left_plus_@var{m}): Document.
16438 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16439 * internal-fn.c (fold_left_direct): Define.
16440 (expand_fold_left_optab_fn): Likewise.
16441 (direct_fold_left_optab_supported_p): Likewise.
16442 * fold-const-call.c (fold_const_fold_left): New function.
16443 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16444 * tree-parloops.c (valid_reduction_p): New function.
16445 (gather_scalar_reductions): Use it.
16446 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16447 (vect_finish_replace_stmt): Declare.
16448 * tree-vect-loop.c (fold_left_reduction_fn): New function.
16449 (needs_fold_left_reduction_p): New function, split out from...
16450 (vect_is_simple_reduction): ...here. Accept reductions that
16451 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16452 (vect_force_simple_reduction): Also store the reduction type in
16453 the assignment's STMT_VINFO_REDUC_TYPE.
16454 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16455 (merge_with_identity): New function.
16456 (vect_expand_fold_left): Likewise.
16457 (vectorize_fold_left_reduction): Likewise.
16458 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
16459 scalar phi in place for it. Check for target support and reject
16460 cases that would reassociate the operation. Defer the transform
16461 phase to vectorize_fold_left_reduction.
16462 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16463 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16464 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16466 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16468 * tree-if-conv.c (predicate_mem_writes): Remove redundant
16469 call to ifc_temp_var.
16471 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16472 Alan Hayward <alan.hayward@arm.com>
16473 David Sherwood <david.sherwood@arm.com>
16475 * target.def (legitimize_address_displacement): Take the original
16476 offset as a poly_int.
16477 * targhooks.h (default_legitimize_address_displacement): Update
16479 * targhooks.c (default_legitimize_address_displacement): Likewise.
16480 * doc/tm.texi: Regenerate.
16481 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16482 as an argument, moving assert of ad->disp == ad->disp_term to...
16483 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
16484 Try calling targetm.legitimize_address_displacement before expanding
16485 the address rather than afterwards, and adjust for the new interface.
16486 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16487 Match the new hook interface. Handle SVE addresses.
16488 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16489 new hook interface.
16491 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16493 * Makefile.in (OBJS): Add early-remat.o.
16494 * target.def (select_early_remat_modes): New hook.
16495 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16496 * doc/tm.texi: Regenerate.
16497 * targhooks.h (default_select_early_remat_modes): Declare.
16498 * targhooks.c (default_select_early_remat_modes): New function.
16499 * timevar.def (TV_EARLY_REMAT): New timevar.
16500 * passes.def (pass_early_remat): New pass.
16501 * tree-pass.h (make_pass_early_remat): Declare.
16502 * early-remat.c: New file.
16503 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16505 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16507 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16508 Alan Hayward <alan.hayward@arm.com>
16509 David Sherwood <david.sherwood@arm.com>
16511 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16512 vfm1 with a bound_epilog parameter.
16513 (vect_do_peeling): Update calls accordingly, and move the prologue
16514 call earlier in the function. Treat the base bound_epilog as 0 for
16515 fully-masked loops and retain vf - 1 for other loops. Add 1 to
16516 this base when peeling for gaps.
16517 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16518 with fully-masked loops.
16519 (vect_estimate_min_profitable_iters): Handle the single peeled
16520 iteration in that case.
16522 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16523 Alan Hayward <alan.hayward@arm.com>
16524 David Sherwood <david.sherwood@arm.com>
16526 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16527 single-element interleaving even if the size is not a power of 2.
16528 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16529 accesses for single-element interleaving if the group size is
16532 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16533 Alan Hayward <alan.hayward@arm.com>
16534 David Sherwood <david.sherwood@arm.com>
16536 * doc/md.texi (fold_extract_last_@var{m}): Document.
16537 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16538 * optabs.def (fold_extract_last_optab): New optab.
16539 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16540 * internal-fn.c (fold_extract_direct): New macro.
16541 (expand_fold_extract_optab_fn): Likewise.
16542 (direct_fold_extract_optab_supported_p): Likewise.
16543 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16544 * tree-vect-loop.c (vect_model_reduction_cost): Handle
16545 EXTRACT_LAST_REDUCTION.
16546 (get_initial_def_for_reduction): Do not create an initial vector
16547 for EXTRACT_LAST_REDUCTION reductions.
16548 (vectorizable_reduction): Leave the scalar phi in place for
16549 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
16550 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
16551 epilogue code for EXTRACT_LAST_REDUCTION and defer the
16552 transform phase to vectorizable_condition.
16553 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16555 (vect_finish_stmt_generation): ...here.
16556 (vect_finish_replace_stmt): New function.
16557 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16558 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16560 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
16562 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16563 Alan Hayward <alan.hayward@arm.com>
16564 David Sherwood <david.sherwood@arm.com>
16566 * doc/md.texi (extract_last_@var{m}): Document.
16567 * optabs.def (extract_last_optab): New optab.
16568 * internal-fn.def (EXTRACT_LAST): New internal function.
16569 * internal-fn.c (cond_unary_direct): New macro.
16570 (expand_cond_unary_optab_fn): Likewise.
16571 (direct_cond_unary_optab_supported_p): Likewise.
16572 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16573 loops using EXTRACT_LAST.
16574 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16575 (extract_last_<mode>): ...this optab.
16576 (vec_extract<mode><Vel>): Update accordingly.
16578 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16579 Alan Hayward <alan.hayward@arm.com>
16580 David Sherwood <david.sherwood@arm.com>
16582 * target.def (empty_mask_is_expensive): New hook.
16583 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16584 * doc/tm.texi: Regenerate.
16585 * targhooks.h (default_empty_mask_is_expensive): Declare.
16586 * targhooks.c (default_empty_mask_is_expensive): New function.
16587 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16588 if the target says that empty masks are expensive.
16589 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16591 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16593 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16594 Alan Hayward <alan.hayward@arm.com>
16595 David Sherwood <david.sherwood@arm.com>
16597 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16598 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16599 (vect_use_loop_mask_for_alignment_p): New function.
16600 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16601 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16602 niters_skip argument. Make sure that the first niters_skip elements
16603 of the first iteration are inactive.
16604 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16605 Update call to vect_set_loop_masks_directly.
16606 (get_misalign_in_elems): New function, split out from...
16607 (vect_gen_prolog_loop_niters): ...here.
16608 (vect_update_init_of_dr): Take a code argument that specifies whether
16609 the adjustment should be added or subtracted.
16610 (vect_update_init_of_drs): Likewise.
16611 (vect_prepare_for_masked_peels): New function.
16612 (vect_do_peeling): Skip prologue peeling if we're using a mask
16613 instead. Update call to vect_update_inits_of_drs.
16614 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16616 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16617 alignment. Do not include the number of peeled iterations in
16618 the minimum threshold in that case.
16619 (vectorizable_induction): Adjust the start value down by
16620 LOOP_VINFO_MASK_SKIP_NITERS iterations.
16621 (vect_transform_loop): Call vect_prepare_for_masked_peels.
16622 Take the number of skipped iterations into account when calculating
16624 * tree-vect-stmts.c (vect_gen_while_not): New function.
16626 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16627 Alan Hayward <alan.hayward@arm.com>
16628 David Sherwood <david.sherwood@arm.com>
16630 * doc/sourcebuild.texi (vect_fully_masked): Document.
16631 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16632 default value to 0.
16633 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16635 (vect_analyze_loop_2): ...here. Don't check the vectorization
16636 factor against the number of loop iterations if the loop is
16639 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16640 Alan Hayward <alan.hayward@arm.com>
16641 David Sherwood <david.sherwood@arm.com>
16643 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16644 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16645 (dump_groups): Update accordingly.
16646 (iv_use::mem_type): New member variable.
16647 (address_p): New function.
16648 (record_use): Add a mem_type argument and initialize the new
16650 (record_group_use): Add a mem_type argument. Use address_p.
16651 Remove obsolete null checks of base_object. Update call to record_use.
16652 (find_interesting_uses_op): Update call to record_group_use.
16653 (find_interesting_uses_cond): Likewise.
16654 (find_interesting_uses_address): Likewise.
16655 (get_mem_type_for_internal_fn): New function.
16656 (find_address_like_use): Likewise.
16657 (find_interesting_uses_stmt): Try find_address_like_use before
16658 calling find_interesting_uses_op.
16659 (addr_offset_valid_p): Use the iv mem_type field as the type
16660 of the addressed memory.
16661 (add_autoinc_candidates): Likewise.
16662 (get_address_cost): Likewise.
16663 (split_small_address_groups_p): Use address_p.
16664 (split_address_groups): Likewise.
16665 (add_iv_candidate_for_use): Likewise.
16666 (autoinc_possible_for_pair): Likewise.
16667 (rewrite_groups): Likewise.
16668 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16669 (determine_group_iv_cost): Update after split of USE_ADDRESS.
16670 (get_alias_ptr_type_for_ptr_address): New function.
16671 (rewrite_use_address): Rewrite address uses in calls that were
16672 identified by find_address_like_use.
16674 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16675 Alan Hayward <alan.hayward@arm.com>
16676 David Sherwood <david.sherwood@arm.com>
16678 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16680 * gimple-expr.h (is_gimple_addressable: Likewise.
16681 * gimple-expr.c (is_gimple_address): Likewise.
16682 * internal-fn.c (expand_call_mem_ref): New function.
16683 (expand_mask_load_optab_fn): Use it.
16684 (expand_mask_store_optab_fn): Likewise.
16686 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16687 Alan Hayward <alan.hayward@arm.com>
16688 David Sherwood <david.sherwood@arm.com>
16690 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16691 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16692 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16693 (cond_umax@var{mode}): Document.
16694 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16695 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16696 (cond_umin_optab, cond_umax_optab): New optabs.
16697 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16698 (COND_IOR, COND_XOR): New internal functions.
16699 * internal-fn.h (get_conditional_internal_fn): Declare.
16700 * internal-fn.c (cond_binary_direct): New macro.
16701 (expand_cond_binary_optab_fn): Likewise.
16702 (direct_cond_binary_optab_supported_p): Likewise.
16703 (get_conditional_internal_fn): New function.
16704 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16705 Cope with reduction statements that are vectorized as calls rather
16707 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16708 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16709 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16710 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16711 (UNSPEC_COND_EOR): New unspecs.
16712 (optab): Add mappings for them.
16713 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16714 (sve_int_op, sve_fp_op): New int attributes.
16716 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16717 Alan Hayward <alan.hayward@arm.com>
16718 David Sherwood <david.sherwood@arm.com>
16720 * optabs.def (while_ult_optab): New optab.
16721 * doc/md.texi (while_ult@var{m}@var{n}): Document.
16722 * internal-fn.def (WHILE_ULT): New internal function.
16723 * internal-fn.h (direct_internal_fn_supported_p): New override
16724 that takes two types as argument.
16725 * internal-fn.c (while_direct): New macro.
16726 (expand_while_optab_fn): New function.
16727 (convert_optab_supported_p): Likewise.
16728 (direct_while_optab_supported_p): New macro.
16729 * wide-int.h (wi::udiv_ceil): New function.
16730 * tree-vectorizer.h (rgroup_masks): New structure.
16731 (vec_loop_masks): New typedef.
16732 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16733 and fully_masked_p.
16734 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16735 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16736 (vect_max_vf): New function.
16737 (slpeel_make_loop_iterate_ntimes): Delete.
16738 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16739 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16740 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16741 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16742 internal-fn.h, stor-layout.h and optabs-query.h.
16743 (vect_set_loop_mask): New function.
16744 (add_preheader_seq): Likewise.
16745 (add_header_seq): Likewise.
16746 (interleave_supported_p): Likewise.
16747 (vect_maybe_permute_loop_masks): Likewise.
16748 (vect_set_loop_masks_directly): Likewise.
16749 (vect_set_loop_condition_masked): Likewise.
16750 (vect_set_loop_condition_unmasked): New function, split out from
16751 slpeel_make_loop_iterate_ntimes.
16752 (slpeel_make_loop_iterate_ntimes): Rename to..
16753 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
16754 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16755 (vect_do_peeling): Update call accordingly.
16756 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16758 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16759 mask_compare_type, can_fully_mask_p and fully_masked_p.
16760 (release_vec_loop_masks): New function.
16761 (_loop_vec_info): Use it to free the loop masks.
16762 (can_produce_all_loop_masks_p): New function.
16763 (vect_get_max_nscalars_per_iter): Likewise.
16764 (vect_verify_full_masking): Likewise.
16765 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16766 retries, and free the mask rgroups before retrying. Check loop-wide
16767 reasons for disallowing fully-masked loops. Make the final decision
16768 about whether use a fully-masked loop or not.
16769 (vect_estimate_min_profitable_iters): Do not assume that peeling
16770 for the number of iterations will be needed for fully-masked loops.
16771 (vectorizable_reduction): Disable fully-masked loops.
16772 (vectorizable_live_operation): Likewise.
16773 (vect_halve_mask_nunits): New function.
16774 (vect_double_mask_nunits): Likewise.
16775 (vect_record_loop_mask): Likewise.
16776 (vect_get_loop_mask): Likewise.
16777 (vect_transform_loop): Handle the case in which the final loop
16778 iteration might handle a partial vector. Call vect_set_loop_condition
16779 instead of slpeel_make_loop_iterate_ntimes.
16780 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16781 (check_load_store_masking): New function.
16782 (prepare_load_store_mask): Likewise.
16783 (vectorizable_store): Handle fully-masked loops.
16784 (vectorizable_load): Likewise.
16785 (supportable_widening_operation): Use vect_halve_mask_nunits for
16787 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16788 (vect_gen_while): New function.
16789 * config/aarch64/aarch64.md (umax<mode>3): New expander.
16790 (aarch64_uqdec<mode>): New insn.
16792 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16793 Alan Hayward <alan.hayward@arm.com>
16794 David Sherwood <david.sherwood@arm.com>
16796 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16797 (reduc_xor_scal_optab): New optabs.
16798 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16799 (reduc_xor_scal_@var{m}): Document.
16800 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16801 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16802 internal functions.
16803 * fold-const-call.c (fold_const_call): Handle them.
16804 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16805 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16806 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16807 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
16808 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
16809 (UNSPEC_XORV): New unspecs.
16810 (optab): Add entries for them.
16811 (BITWISEV): New int iterator.
16812 (bit_reduc_op): New int attributes.
16814 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16815 Alan Hayward <alan.hayward@arm.com>
16816 David Sherwood <david.sherwood@arm.com>
16818 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
16819 * internal-fn.def (VEC_SHL_INSERT): New internal function.
16820 * optabs.def (vec_shl_insert_optab): New optab.
16821 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
16822 (duplicate_and_interleave): Likewise.
16823 * tree-vect-loop.c: Include internal-fn.h.
16824 (neutral_op_for_slp_reduction): New function, split out from
16825 get_initial_defs_for_reduction.
16826 (get_initial_def_for_reduction): Handle option 2 for variable-length
16827 vectors by loading the neutral value into a vector and then shifting
16828 the initial value into element 0.
16829 (get_initial_defs_for_reduction): Replace the code argument with
16830 the neutral value calculated by neutral_op_for_slp_reduction.
16831 Use gimple_build_vector for constant-length vectors.
16832 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
16833 but the first group_size elements have a neutral value.
16834 Use duplicate_and_interleave otherwise.
16835 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
16836 Update call to get_initial_defs_for_reduction. Handle SLP
16837 reductions for variable-length vectors by creating one vector
16838 result for each scalar result, with the elements associated
16839 with other scalar results stubbed out with the neutral value.
16840 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
16841 Require IFN_VEC_SHL_INSERT for double reductions on
16842 variable-length vectors, or SLP reductions that have
16843 a neutral value. Require can_duplicate_and_interleave_p
16844 support for variable-length unchained SLP reductions if there
16845 is no neutral value, such as for MIN/MAX reductions. Also require
16846 the number of vector elements to be a multiple of the number of
16847 SLP statements when doing variable-length unchained SLP reductions.
16848 Update call to vect_create_epilog_for_reduction.
16849 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
16850 and remove initial values.
16851 (duplicate_and_interleave): Make public.
16852 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
16853 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
16855 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16856 Alan Hayward <alan.hayward@arm.com>
16857 David Sherwood <david.sherwood@arm.com>
16859 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
16860 (can_duplicate_and_interleave_p): New function.
16861 (vect_get_and_check_slp_defs): Take the vector of statements
16862 rather than just the current one. Remove excess parentheses.
16863 Restriction rejectinon of vect_constant_def and vect_external_def
16864 for variable-length vectors to boolean types, or types for which
16865 can_duplicate_and_interleave_p is false.
16866 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
16867 (duplicate_and_interleave): New function.
16868 (vect_get_constant_vectors): Use gimple_build_vector for
16869 constant-length vectors and suitable variable-length constant
16870 vectors. Use duplicate_and_interleave for other variable-length
16871 vectors. Don't defer the update when inserting new statements.
16873 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16874 Alan Hayward <alan.hayward@arm.com>
16875 David Sherwood <david.sherwood@arm.com>
16877 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
16878 min_profitable_iters doesn't go negative.
16880 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16881 Alan Hayward <alan.hayward@arm.com>
16882 David Sherwood <david.sherwood@arm.com>
16884 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
16885 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
16886 * optabs.def (vec_mask_load_lanes_optab): New optab.
16887 (vec_mask_store_lanes_optab): Likewise.
16888 * internal-fn.def (MASK_LOAD_LANES): New internal function.
16889 (MASK_STORE_LANES): Likewise.
16890 * internal-fn.c (mask_load_lanes_direct): New macro.
16891 (mask_store_lanes_direct): Likewise.
16892 (expand_mask_load_optab_fn): Handle masked operations.
16893 (expand_mask_load_lanes_optab_fn): New macro.
16894 (expand_mask_store_optab_fn): Handle masked operations.
16895 (expand_mask_store_lanes_optab_fn): New macro.
16896 (direct_mask_load_lanes_optab_supported_p): Likewise.
16897 (direct_mask_store_lanes_optab_supported_p): Likewise.
16898 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
16900 (vect_load_lanes_supported): Likewise.
16901 * tree-vect-data-refs.c (strip_conversion): New function.
16902 (can_group_stmts_p): Likewise.
16903 (vect_analyze_data_ref_accesses): Use it instead of checking
16904 for a pair of assignments.
16905 (vect_store_lanes_supported): Take a masked_p parameter.
16906 (vect_load_lanes_supported): Likewise.
16907 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
16908 vect_store_lanes_supported and vect_load_lanes_supported.
16909 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
16910 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
16911 parameter. Don't allow gaps for masked accesses.
16912 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
16913 and vect_load_lanes_supported.
16914 (get_load_store_type): Take a masked_p parameter and update
16915 call to get_group_load_store_type.
16916 (vectorizable_store): Update call to get_load_store_type.
16917 Handle IFN_MASK_STORE_LANES.
16918 (vectorizable_load): Update call to get_load_store_type.
16919 Handle IFN_MASK_LOAD_LANES.
16921 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16922 Alan Hayward <alan.hayward@arm.com>
16923 David Sherwood <david.sherwood@arm.com>
16925 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
16927 * config/aarch64/aarch64-protos.h
16928 (aarch64_sve_struct_memory_operand_p): Declare.
16929 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
16930 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
16931 (VPRED, vpred): Handle SVE structure modes.
16932 * config/aarch64/constraints.md (Utx): New constraint.
16933 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
16934 (aarch64_sve_struct_nonimmediate_operand): New predicates.
16935 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
16936 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
16937 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
16938 structure modes. Split into pieces after RA.
16939 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
16940 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
16942 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
16943 SVE structure modes.
16944 (aarch64_classify_address): Likewise.
16945 (sizetochar): Move earlier in file.
16946 (aarch64_print_operand): Handle SVE register lists.
16947 (aarch64_array_mode): New function.
16948 (aarch64_sve_struct_memory_operand_p): Likewise.
16949 (TARGET_ARRAY_MODE): Redefine.
16951 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16952 Alan Hayward <alan.hayward@arm.com>
16953 David Sherwood <david.sherwood@arm.com>
16955 * target.def (array_mode): New target hook.
16956 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
16957 * doc/tm.texi: Regenerate.
16958 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
16959 * hooks.c (hook_optmode_mode_uhwi_none): New function.
16960 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
16961 targetm.array_mode.
16962 * stor-layout.c (mode_for_array): Likewise. Support polynomial
16965 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16966 Alan Hayward <alan.hayward@arm.com>
16967 David Sherwood <david.sherwood@arm.com>
16969 * fold-const.c (fold_binary_loc): Check the argument types
16970 rather than the result type when testing for a vector operation.
16972 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16974 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
16975 * doc/tm.texi: Regenerate.
16977 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16978 Alan Hayward <alan.hayward@arm.com>
16979 David Sherwood <david.sherwood@arm.com>
16981 * doc/invoke.texi (-msve-vector-bits=): Document new option.
16982 (sve): Document new AArch64 extension.
16983 * doc/md.texi (w): Extend the description of the AArch64
16984 constraint to include SVE vectors.
16985 (Upl, Upa): Document new AArch64 predicate constraints.
16986 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
16988 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
16989 (msve-vector-bits=): New option.
16990 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
16991 SVE when these are disabled.
16992 (sve): New extension.
16993 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
16994 modes. Adjust their number of units based on aarch64_sve_vg.
16995 (MAX_BITSIZE_MODE_ANY_MODE): Define.
16996 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
16997 aarch64_addr_query_type.
16998 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
16999 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17000 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17001 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17002 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17003 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17004 (aarch64_simd_imm_zero_p): Delete.
17005 (aarch64_check_zero_based_sve_index_immediate): Declare.
17006 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17007 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17008 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17009 (aarch64_sve_float_mul_immediate_p): Likewise.
17010 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17011 rather than an rtx.
17012 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17013 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17014 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17015 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17016 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17017 (aarch64_regmode_natural_size): Likewise.
17018 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17019 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17021 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17022 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17023 for VG and the SVE predicate registers.
17024 (V_ALIASES): Add a "z"-prefixed alias.
17025 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17026 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17027 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17028 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17029 (REG_CLASS_NAMES): Add entries for them.
17030 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
17031 and the predicate registers.
17032 (aarch64_sve_vg): Declare.
17033 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17034 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17035 (REGMODE_NATURAL_SIZE): Define.
17036 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17038 * config/aarch64/aarch64.c: Include cfgrtl.h.
17039 (simd_immediate_info): Add a constructor for series vectors,
17040 and an associated step field.
17041 (aarch64_sve_vg): New variable.
17042 (aarch64_dbx_register_number): Handle VG and the predicate registers.
17043 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17044 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17045 (VEC_ANY_DATA, VEC_STRUCT): New constants.
17046 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17047 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17048 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17049 (aarch64_get_mask_mode): New functions.
17050 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17051 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17052 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
17053 predicate modes and predicate registers. Explicitly restrict
17054 GPRs to modes of 16 bytes or smaller. Only allow FP registers
17055 to store a vector mode if it is recognized by
17056 aarch64_classify_vector_mode.
17057 (aarch64_regmode_natural_size): New function.
17058 (aarch64_hard_regno_caller_save_mode): Return the original mode
17060 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17061 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17062 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17063 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17065 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
17066 does not overlap dest if the function is frame-related. Handle
17068 (aarch64_split_add_offset): New function.
17069 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17070 them aarch64_add_offset.
17071 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17072 and update call to aarch64_sub_sp.
17073 (aarch64_add_cfa_expression): New function.
17074 (aarch64_expand_prologue): Pass extra temporary registers to the
17075 functions above. Handle the case in which we need to emit new
17076 DW_CFA_expressions for registers that were originally saved
17077 relative to the stack pointer, but now have to be expressed
17078 relative to the frame pointer.
17079 (aarch64_output_mi_thunk): Pass extra temporary registers to the
17081 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
17082 IP0 and IP1 values for SVE frames.
17083 (aarch64_expand_vec_series): New function.
17084 (aarch64_expand_sve_widened_duplicate): Likewise.
17085 (aarch64_expand_sve_const_vector): Likewise.
17086 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17087 Handle SVE constants. Use emit_move_insn to move a force_const_mem
17088 into the register, rather than emitting a SET directly.
17089 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17090 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17091 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17092 (offset_9bit_signed_scaled_p): New functions.
17093 (aarch64_replicate_bitmask_imm): New function.
17094 (aarch64_bitmask_imm): Use it.
17095 (aarch64_cannot_force_const_mem): Reject expressions involving
17096 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
17097 (aarch64_classify_index): Handle SVE indices, by requiring
17098 a plain register index with a scale that matches the element size.
17099 (aarch64_classify_address): Handle SVE addresses. Assert that
17100 the mode of the address is VOIDmode or an integer mode.
17101 Update call to aarch64_classify_symbol.
17102 (aarch64_classify_symbolic_expression): Update call to
17103 aarch64_classify_symbol.
17104 (aarch64_const_vec_all_in_range_p): New function.
17105 (aarch64_print_vector_float_operand): Likewise.
17106 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
17107 "vN" for FP registers with SVE modes. Handle (const ...) vectors
17108 and the FP immediates 1.0 and 0.5.
17109 (aarch64_print_address_internal): Handle SVE addresses.
17110 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17111 (aarch64_regno_regclass): Handle predicate registers.
17112 (aarch64_secondary_reload): Handle big-endian reloads of SVE
17114 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17115 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17116 (aarch64_convert_sve_vector_bits): New function.
17117 (aarch64_override_options): Use it to handle -msve-vector-bits=.
17118 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17119 rather than an rtx.
17120 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17121 Handle SVE vector and predicate modes. Accept VL-based constants
17122 that need only one temporary register, and VL offsets that require
17123 no temporary registers.
17124 (aarch64_conditional_register_usage): Mark the predicate registers
17125 as fixed if SVE isn't available.
17126 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17127 Return true for SVE vector and predicate modes.
17128 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17129 rather than an unsigned int. Handle SVE modes.
17130 (aarch64_preferred_simd_mode): Update call accordingly. Handle
17132 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17134 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17135 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17136 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17137 (aarch64_sve_float_mul_immediate_p): New functions.
17138 (aarch64_sve_valid_immediate): New function.
17139 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17140 Explicitly reject structure modes. Check for INDEX constants.
17141 Handle PTRUE and PFALSE constants.
17142 (aarch64_check_zero_based_sve_index_immediate): New function.
17143 (aarch64_simd_imm_zero_p): Delete.
17144 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17145 vector modes. Accept constants in the range of CNT[BHWD].
17146 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17147 ask for an Advanced SIMD mode.
17148 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17149 (aarch64_simd_vector_alignment): Handle SVE predicates.
17150 (aarch64_vectorize_preferred_vector_alignment): New function.
17151 (aarch64_simd_vector_alignment_reachable): Use it instead of
17153 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17154 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17156 (MAX_VECT_LEN): Delete.
17157 (expand_vec_perm_d): Add a vec_flags field.
17158 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17159 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17160 (aarch64_evpc_ext): Don't apply a big-endian lane correction
17162 (aarch64_evpc_rev): Rename to...
17163 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
17164 (aarch64_evpc_rev_global): New function.
17165 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17166 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17168 (aarch64_evpc_sve_tbl): New function.
17169 (aarch64_expand_vec_perm_const_1): Update after rename of
17170 aarch64_evpc_rev. Handle SVE permutes too, trying
17171 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17172 than aarch64_evpc_tbl.
17173 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17174 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17175 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17176 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17177 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17178 (aarch64_expand_sve_vcond): New functions.
17179 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17180 of aarch64_vector_mode_p.
17181 (aarch64_dwarf_poly_indeterminate_value): New function.
17182 (aarch64_compute_pressure_classes): Likewise.
17183 (aarch64_can_change_mode_class): Likewise.
17184 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17185 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17186 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17187 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17188 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17189 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17190 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17191 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17193 (Dn, Dl, Dr): Accept const as well as const_vector.
17194 (Dz): Likewise. Compare against CONST0_RTX.
17195 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17196 of "vector" where appropriate.
17197 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17198 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17199 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17200 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17201 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17202 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17203 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17204 (v_int_equiv): Extend to SVE modes.
17205 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17207 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17208 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17209 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17210 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17211 (SVE_COND_FP_CMP): New int iterators.
17212 (perm_hilo): Handle the new unpack unspecs.
17213 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17215 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17216 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17217 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17218 (aarch64_equality_operator, aarch64_constant_vector_operand)
17219 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17220 (aarch64_sve_nonimmediate_operand): Likewise.
17221 (aarch64_sve_general_operand): Likewise.
17222 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17223 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17224 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17225 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17226 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17227 (aarch64_sve_float_arith_immediate): Likewise.
17228 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17229 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17230 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17231 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17232 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17233 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17234 (aarch64_sve_float_arith_operand): Likewise.
17235 (aarch64_sve_float_arith_with_sub_operand): Likewise.
17236 (aarch64_sve_float_mul_operand): Likewise.
17237 (aarch64_sve_vec_perm_operand): Likewise.
17238 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17239 (aarch64_mov_operand): Accept const_poly_int and const_vector.
17240 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17241 as well as const_vector.
17242 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17243 in file. Use CONST0_RTX and CONSTM1_RTX.
17244 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
17245 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17246 Use aarch64_simd_imm_zero.
17247 * config/aarch64/aarch64-sve.md: New file.
17248 * config/aarch64/aarch64.md: Include it.
17249 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17250 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17251 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17252 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17253 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17254 (sve): New attribute.
17255 (enabled): Disable instructions with the sve attribute unless
17257 (movqi, movhi): Pass CONST_POLY_INT operaneds through
17258 aarch64_expand_mov_immediate.
17259 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17260 CNT[BHSD] immediates.
17261 (movti): Split CONST_POLY_INT moves into two halves.
17262 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17263 Split additions that need a temporary here if the destination
17264 is the stack pointer.
17265 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17266 (*add<mode>3_poly_1): New instruction.
17267 (set_clobber_cc): New expander.
17269 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17271 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17272 parameter and use it instead of GET_MODE_SIZE (innermode). Use
17273 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17274 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17275 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
17276 Change innermode from fixed_mode_size to machine_mode.
17277 (simplify_subreg): Update call accordingly. Handle a constant-sized
17278 subreg of a variable-length CONST_VECTOR.
17280 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17281 Alan Hayward <alan.hayward@arm.com>
17282 David Sherwood <david.sherwood@arm.com>
17284 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17285 (add_offset_to_base): New function, split out from...
17286 (create_mem_ref): ...here. When handling a scale other than 1,
17287 check first whether the address is valid without the offset.
17288 Add it into the base if so, leaving the index and scale as-is.
17290 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17293 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17294 fold_for_warn before checking if arg2 is INTEGER_CST.
17296 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
17298 * config/rs6000/predicates.md (load_multiple_operation): Delete.
17299 (store_multiple_operation): Delete.
17300 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17301 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17302 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17303 guarded by TARGET_STRING.
17304 (rs6000_output_load_multiple): Delete.
17305 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17306 OPTION_MASK_STRING / TARGET_STRING handling.
17307 (print_operand) <'N', 'O'>: Add comment that these are unused now.
17308 (const rs6000_opt_masks) <"string">: Change mask to 0.
17309 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17310 (MASK_STRING): Delete.
17311 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17313 (load_multiple): Delete.
17320 (store_multiple): Delete.
17327 (movmemsi_8reg): Delete.
17328 (corresponding unnamed define_insn): Delete.
17329 (movmemsi_6reg): Delete.
17330 (corresponding unnamed define_insn): Delete.
17331 (movmemsi_4reg): Delete.
17332 (corresponding unnamed define_insn): Delete.
17333 (movmemsi_2reg): Delete.
17334 (corresponding unnamed define_insn): Delete.
17335 (movmemsi_1reg): Delete.
17336 (corresponding unnamed define_insn): Delete.
17337 * config/rs6000/rs6000.opt (mno-string): New.
17338 (mstring): Replace by deprecation warning stub.
17339 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17341 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17343 * regrename.c (regrename_do_replace): If replacing the same
17344 reg multiple times, try to reuse last created gen_raw_REG.
17347 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17348 main to workaround a bug in GDB.
17350 2018-01-12 Tom de Vries <tom@codesourcery.com>
17353 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17355 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
17357 PR rtl-optimization/80481
17358 * ira-color.c (get_cap_member): New function.
17359 (allocnos_conflict_by_live_ranges_p): Use it.
17360 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17361 (setup_slot_coalesced_allocno_live_ranges): Ditto.
17363 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
17366 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17367 (*saddl_se_1): Ditto.
17368 (*ssubsi_1): Ditto.
17369 (*ssubl_se_1): Ditto.
17371 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17373 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17374 rather than wi::to_widest for DR_INITs.
17375 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17376 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17377 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17379 (vect_analyze_group_access_1): Note that here.
17381 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17383 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17384 polynomial type sizes.
17386 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17388 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17389 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17390 (gimple_add_tmp_var): Likewise.
17392 2018-01-12 Martin Liska <mliska@suse.cz>
17394 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17395 (gimple_alloc_sizes): Likewise.
17396 (dump_gimple_statistics): Use PRIu64 in printf format.
17397 * gimple.h: Change uint64_t to int.
17399 2018-01-12 Martin Liska <mliska@suse.cz>
17401 * tree-core.h: Use uint64_t instead of int.
17402 * tree.c (tree_node_counts): Likewise.
17403 (tree_node_sizes): Likewise.
17404 (dump_tree_statistics): Use PRIu64 in printf format.
17406 2018-01-12 Martin Liska <mliska@suse.cz>
17408 * Makefile.in: As qsort_chk is implemented in vec.c, add
17409 vec.o to linkage of gencfn-macros.
17410 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17411 passing the info to record_node_allocation_statistics.
17412 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17414 * ggc-common.c (struct ggc_usage): Add operator== and use
17415 it in operator< and compare function.
17416 * mem-stats.h (struct mem_usage): Likewise.
17417 * vec.c (struct vec_usage): Remove operator< and compare
17418 function. Can be simply inherited.
17420 2018-01-12 Martin Jambor <mjambor@suse.cz>
17423 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17424 * tree-ssa-math-opts.c: Include domwalk.h.
17425 (convert_mult_to_fma_1): New function.
17426 (fma_transformation_info): New type.
17427 (fma_deferring_state): Likewise.
17428 (cancel_fma_deferring): New function.
17429 (result_of_phi): Likewise.
17430 (last_fma_candidate_feeds_initial_phi): Likewise.
17431 (convert_mult_to_fma): Added deferring logic, split actual
17432 transformation to convert_mult_to_fma_1.
17433 (math_opts_dom_walker): New type.
17434 (math_opts_dom_walker::after_dom_children): New method, body moved
17435 here from pass_optimize_widening_mul::execute, added deferring logic
17437 (pass_optimize_widening_mul::execute): Moved most of code to
17438 math_opts_dom_walker::after_dom_children.
17439 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17440 * config/i386/i386.c (ix86_option_override_internal): Added
17441 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17443 2018-01-12 Richard Biener <rguenther@suse.de>
17446 * dwarf2out.c (gen_variable_die): Do not reset old_die for
17447 inline instance vars.
17449 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
17452 * config/rx/rx.c (rx_is_restricted_memory_address):
17453 Handle SUBREG case.
17455 2018-01-12 Richard Biener <rguenther@suse.de>
17457 PR tree-optimization/80846
17458 * target.def (split_reduction): New target hook.
17459 * targhooks.c (default_split_reduction): New function.
17460 * targhooks.h (default_split_reduction): Declare.
17461 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17462 target requests first reduce vectors by combining low and high
17464 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17465 (get_vectype_for_scalar_type_and_size): Export.
17466 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17467 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17468 * doc/tm.texi: Regenerate.
17469 * config/i386/i386.c (ix86_split_reduction): Implement
17470 TARGET_VECTORIZE_SPLIT_REDUCTION.
17472 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17475 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17476 in PIC mode except for TARGET_VXWORKS_RTP.
17477 * config/sparc/sparc.c: Include cfgrtl.h.
17478 (TARGET_INIT_PIC_REG): Define.
17479 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17480 (sparc_pic_register_p): New predicate.
17481 (sparc_legitimate_address_p): Use it.
17482 (sparc_legitimize_pic_address): Likewise.
17483 (sparc_delegitimize_address): Likewise.
17484 (sparc_mode_dependent_address_p): Likewise.
17485 (gen_load_pcrel_sym): Remove 4th parameter.
17486 (load_got_register): Adjust call to above. Remove obsolete stuff.
17487 (sparc_expand_prologue): Do not call load_got_register here.
17488 (sparc_flat_expand_prologue): Likewise.
17489 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17490 (sparc_use_pseudo_pic_reg): New function.
17491 (sparc_init_pic_reg): Likewise.
17492 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17493 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17495 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
17497 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17498 Add item for branch_cost.
17500 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17502 PR rtl-optimization/83565
17503 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17504 not extend the result to a larger mode for rotate operations.
17505 (num_sign_bit_copies1): Likewise.
17507 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17510 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17512 Use values-Xc.o for -pedantic.
17513 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17515 2018-01-12 Martin Liska <mliska@suse.cz>
17518 * ipa-devirt.c (final_warning_record::grow_type_warnings):
17520 (possible_polymorphic_call_targets): Use it.
17521 (ipa_devirt): Likewise.
17523 2018-01-12 Martin Liska <mliska@suse.cz>
17525 * profile-count.h (enum profile_quality): Use 0 as invalid
17526 enum value of profile_quality.
17528 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
17530 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17531 -mext-string options.
17533 2018-01-12 Richard Biener <rguenther@suse.de>
17535 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17536 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17537 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17539 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17541 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17543 * configure.ac (--with-long-double-format): Add support for the
17544 configuration option to change the default long double format on
17546 * config.gcc (powerpc*-linux*-*): Likewise.
17547 * configure: Regenerate.
17548 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17549 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17550 used without modification.
17552 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17554 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17555 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17556 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17557 MISC_BUILTIN_SPEC_BARRIER.
17558 (rs6000_init_builtins): Likewise.
17559 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17561 (speculation_barrier): New define_insn.
17562 * doc/extend.texi: Document __builtin_speculation_barrier.
17564 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17567 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17568 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17569 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17571 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
17572 integral modes instead of "ss" and "sd".
17573 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17574 vectors with 32-bit and 64-bit elements.
17575 (vecdupssescalarmodesuffix): New mode attribute.
17576 (vec_dup<mode>): Use it.
17578 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
17581 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17582 frame if argument is passed on stack.
17584 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17587 * ree.c (combine_reaching_defs): Optimize also
17588 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17589 reg2=any_extend(exp); reg1=reg2;, formatting fix.
17591 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17593 PR middle-end/83189
17594 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17596 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17598 PR middle-end/83718
17599 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17600 after they are computed.
17602 2018-01-11 Bin Cheng <bin.cheng@arm.com>
17604 PR tree-optimization/83695
17605 * gimple-loop-linterchange.cc
17606 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17607 reset cached scev information after interchange.
17608 (pass_linterchange::execute): Remove call to scev_reset_htab.
17610 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17612 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17613 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17614 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17615 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17616 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17617 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17618 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17619 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17620 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17621 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17622 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17623 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17624 (V_lane_reg): Likewise.
17625 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17627 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17628 (vfmal_lane_low<mode>_intrinsic,
17629 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17630 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17631 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17632 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17633 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17634 vfmsl_lane_high<mode>_intrinsic): New define_insns.
17636 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17638 * config/arm/arm-cpus.in (fp16fml): New feature.
17639 (ALL_SIMD): Add fp16fml.
17640 (armv8.2-a): Add fp16fml as an option.
17641 (armv8.3-a): Likewise.
17642 (armv8.4-a): Add fp16fml as part of fp16.
17643 * config/arm/arm.h (TARGET_FP16FML): Define.
17644 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17646 * config/arm/arm-modes.def (V2HF): Define.
17647 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17648 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17649 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17650 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17651 vfmsl_low, vfmsl_high): New set of builtins.
17652 * config/arm/iterators.md (PLUSMINUS): New code iterator.
17653 (vfml_op): New code attribute.
17654 (VFMLHALVES): New int iterator.
17655 (VFML, VFMLSEL): New mode attributes.
17656 (V_reg): Define mapping for V2HF.
17657 (V_hi, V_lo): New mode attributes.
17658 (VF_constraint): Likewise.
17659 (vfml_half, vfml_half_selector): New int attributes.
17660 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17662 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17663 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17665 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17666 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17667 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17668 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
17670 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17671 Document new effective target and option set.
17673 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17675 * config/arm/arm-cpus.in (armv8_4): New feature.
17676 (ARMv8_4a): New fgroup.
17677 (armv8.4-a): New arch.
17678 * config/arm/arm-tables.opt: Regenerate.
17679 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17680 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17681 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17682 Add matching rules for -march=armv8.4-a and extensions.
17683 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17685 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
17688 * config/rx/rx.md (BW): New mode attribute.
17689 (sync_lock_test_and_setsi): Add mode suffix to insn output.
17691 2018-01-11 Richard Biener <rguenther@suse.de>
17693 PR tree-optimization/83435
17694 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17695 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17696 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17698 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17699 Alan Hayward <alan.hayward@arm.com>
17700 David Sherwood <david.sherwood@arm.com>
17702 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17704 (aarch64_classify_address): Initialize it. Track polynomial offsets.
17705 (aarch64_print_address_internal): Use it to check for a zero offset.
17707 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17708 Alan Hayward <alan.hayward@arm.com>
17709 David Sherwood <david.sherwood@arm.com>
17711 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17712 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17713 Return a poly_int64 rather than a HOST_WIDE_INT.
17714 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17715 rather than a HOST_WIDE_INT.
17716 * config/aarch64/aarch64.h (aarch64_frame): Protect with
17717 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
17718 hard_fp_offset, frame_size, initial_adjust, callee_offset and
17719 final_offset from HOST_WIDE_INT to poly_int64.
17720 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17721 to_constant when getting the number of units in an Advanced SIMD
17723 (aarch64_builtin_vectorized_function): Check for a constant number
17725 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17727 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17728 attribute instead of GET_MODE_NUNITS.
17729 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17730 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17731 GET_MODE_SIZE for fixed-size registers.
17732 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17733 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17734 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17735 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17736 (aarch64_print_operand, aarch64_print_address_internal)
17737 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17738 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17739 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17740 Handle polynomial GET_MODE_SIZE.
17741 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
17742 wider than SImode without modification.
17743 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17744 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17745 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17746 passing and returning SVE modes.
17747 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17748 rather than GEN_INT.
17749 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17750 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17751 (aarch64_allocate_and_probe_stack_space): Likewise.
17752 (aarch64_layout_frame): Cope with polynomial offsets.
17753 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17754 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
17755 polynomial offsets.
17756 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17757 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17758 poly_int64 rather than a HOST_WIDE_INT.
17759 (aarch64_get_separate_components, aarch64_process_components)
17760 (aarch64_expand_prologue, aarch64_expand_epilogue)
17761 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17762 (aarch64_anchor_offset): New function, split out from...
17763 (aarch64_legitimize_address): ...here.
17764 (aarch64_builtin_vectorization_cost): Handle polynomial
17765 TYPE_VECTOR_SUBPARTS.
17766 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17768 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17769 number of elements from the PARALLEL rather than the mode.
17770 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17771 rather than GET_MODE_BITSIZE.
17772 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17773 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17774 (aarch64_expand_vec_perm_const_1): Handle polynomial
17775 d->perm.length () and d->perm elements.
17776 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
17777 Apply to_constant to d->perm elements.
17778 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17779 polynomial CONST_VECTOR_NUNITS.
17780 (aarch64_move_pointer): Take amount as a poly_int64 rather
17782 (aarch64_progress_pointer): Avoid temporary variable.
17783 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17784 the mode attribute instead of GET_MODE.
17786 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17787 Alan Hayward <alan.hayward@arm.com>
17788 David Sherwood <david.sherwood@arm.com>
17790 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17791 x exists before using it.
17792 (aarch64_add_constant_internal): Rename to...
17793 (aarch64_add_offset_1): ...this. Replace regnum with separate
17794 src and dest rtxes. Handle the case in which they're different,
17795 including when the offset is zero. Replace scratchreg with an rtx.
17796 Use 2 additions if there is no spare register into which we can
17797 move a 16-bit constant.
17798 (aarch64_add_constant): Delete.
17799 (aarch64_add_offset): Replace reg with separate src and dest
17800 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
17801 Use aarch64_add_offset_1.
17802 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17803 an rtx rather than an int. Take the delta as a poly_int64
17804 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
17805 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17806 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17807 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
17808 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
17809 and aarch64_add_sp.
17810 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
17811 aarch64_add_constant.
17813 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17815 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17816 Use scalar_float_mode.
17818 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17820 * config/aarch64/aarch64-simd.md
17821 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
17822 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
17823 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
17824 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
17825 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
17826 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
17827 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
17828 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
17829 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
17830 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
17832 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17835 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
17836 targ_options->x_arm_arch_string is non NULL.
17838 2018-01-11 Tamar Christina <tamar.christina@arm.com>
17840 * config/aarch64/aarch64.h
17841 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
17843 2018-01-11 Sudakshina Das <sudi.das@arm.com>
17846 * expmed.c (emit_store_flag_force): Swap if const op0
17847 and change VOIDmode to mode of op0.
17849 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17851 PR rtl-optimization/83761
17852 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
17853 than bytes to mode_for_size.
17855 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17857 PR middle-end/83189
17858 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
17859 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
17862 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17864 PR middle-end/83575
17865 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
17866 when in layout mode.
17867 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
17868 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
17871 2018-01-10 Michael Collison <michael.collison@arm.com>
17873 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
17874 * config/aarch64/aarch64-option-extension.def: Add
17875 AARCH64_OPT_EXTENSION of 'fp16fml'.
17876 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17877 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
17878 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
17879 * config/aarch64/constraints.md (Ui7): New constraint.
17880 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
17881 (VFMLA_SEL_W): Ditto.
17884 (VFMLA16_LOW): New int iterator.
17885 (VFMLA16_HIGH): Ditto.
17886 (UNSPEC_FMLAL): New unspec.
17887 (UNSPEC_FMLSL): Ditto.
17888 (UNSPEC_FMLAL2): Ditto.
17889 (UNSPEC_FMLSL2): Ditto.
17890 (f16mac): New code attribute.
17891 * config/aarch64/aarch64-simd-builtins.def
17892 (aarch64_fmlal_lowv2sf): Ditto.
17893 (aarch64_fmlsl_lowv2sf): Ditto.
17894 (aarch64_fmlalq_lowv4sf): Ditto.
17895 (aarch64_fmlslq_lowv4sf): Ditto.
17896 (aarch64_fmlal_highv2sf): Ditto.
17897 (aarch64_fmlsl_highv2sf): Ditto.
17898 (aarch64_fmlalq_highv4sf): Ditto.
17899 (aarch64_fmlslq_highv4sf): Ditto.
17900 (aarch64_fmlal_lane_lowv2sf): Ditto.
17901 (aarch64_fmlsl_lane_lowv2sf): Ditto.
17902 (aarch64_fmlal_laneq_lowv2sf): Ditto.
17903 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
17904 (aarch64_fmlalq_lane_lowv4sf): Ditto.
17905 (aarch64_fmlsl_lane_lowv4sf): Ditto.
17906 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
17907 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
17908 (aarch64_fmlal_lane_highv2sf): Ditto.
17909 (aarch64_fmlsl_lane_highv2sf): Ditto.
17910 (aarch64_fmlal_laneq_highv2sf): Ditto.
17911 (aarch64_fmlsl_laneq_highv2sf): Ditto.
17912 (aarch64_fmlalq_lane_highv4sf): Ditto.
17913 (aarch64_fmlsl_lane_highv4sf): Ditto.
17914 (aarch64_fmlalq_laneq_highv4sf): Ditto.
17915 (aarch64_fmlsl_laneq_highv4sf): Ditto.
17916 * config/aarch64/aarch64-simd.md:
17917 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
17918 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17919 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
17920 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17921 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
17922 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
17923 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
17924 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
17925 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
17926 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
17927 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
17928 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
17929 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
17930 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
17931 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
17932 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
17933 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
17934 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
17935 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
17936 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
17937 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
17938 (vfmlsl_low_u32): Ditto.
17939 (vfmlalq_low_u32): Ditto.
17940 (vfmlslq_low_u32): Ditto.
17941 (vfmlal_high_u32): Ditto.
17942 (vfmlsl_high_u32): Ditto.
17943 (vfmlalq_high_u32): Ditto.
17944 (vfmlslq_high_u32): Ditto.
17945 (vfmlal_lane_low_u32): Ditto.
17946 (vfmlsl_lane_low_u32): Ditto.
17947 (vfmlal_laneq_low_u32): Ditto.
17948 (vfmlsl_laneq_low_u32): Ditto.
17949 (vfmlalq_lane_low_u32): Ditto.
17950 (vfmlslq_lane_low_u32): Ditto.
17951 (vfmlalq_laneq_low_u32): Ditto.
17952 (vfmlslq_laneq_low_u32): Ditto.
17953 (vfmlal_lane_high_u32): Ditto.
17954 (vfmlsl_lane_high_u32): Ditto.
17955 (vfmlal_laneq_high_u32): Ditto.
17956 (vfmlsl_laneq_high_u32): Ditto.
17957 (vfmlalq_lane_high_u32): Ditto.
17958 (vfmlslq_lane_high_u32): Ditto.
17959 (vfmlalq_laneq_high_u32): Ditto.
17960 (vfmlslq_laneq_high_u32): Ditto.
17961 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
17962 (AARCH64_FL_FOR_ARCH8_4): New.
17963 (AARCH64_ISA_F16FML): New ISA flag.
17964 (TARGET_F16FML): New feature flag for fp16fml.
17965 (doc/invoke.texi): Document new fp16fml option.
17967 2018-01-10 Michael Collison <michael.collison@arm.com>
17969 * config/aarch64/aarch64-builtins.c:
17970 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
17971 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17972 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
17973 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
17974 (AARCH64_ISA_SHA3): New ISA flag.
17975 (TARGET_SHA3): New feature flag for sha3.
17976 * config/aarch64/iterators.md (sha512_op): New int attribute.
17977 (CRYPTO_SHA512): New int iterator.
17978 (UNSPEC_SHA512H): New unspec.
17979 (UNSPEC_SHA512H2): Ditto.
17980 (UNSPEC_SHA512SU0): Ditto.
17981 (UNSPEC_SHA512SU1): Ditto.
17982 * config/aarch64/aarch64-simd-builtins.def
17983 (aarch64_crypto_sha512hqv2di): New builtin.
17984 (aarch64_crypto_sha512h2qv2di): Ditto.
17985 (aarch64_crypto_sha512su0qv2di): Ditto.
17986 (aarch64_crypto_sha512su1qv2di): Ditto.
17987 (aarch64_eor3qv8hi): Ditto.
17988 (aarch64_rax1qv2di): Ditto.
17989 (aarch64_xarqv2di): Ditto.
17990 (aarch64_bcaxqv8hi): Ditto.
17991 * config/aarch64/aarch64-simd.md:
17992 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
17993 (aarch64_crypto_sha512su0qv2di): Ditto.
17994 (aarch64_crypto_sha512su1qv2di): Ditto.
17995 (aarch64_eor3qv8hi): Ditto.
17996 (aarch64_rax1qv2di): Ditto.
17997 (aarch64_xarqv2di): Ditto.
17998 (aarch64_bcaxqv8hi): Ditto.
17999 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18000 (vsha512h2q_u64): Ditto.
18001 (vsha512su0q_u64): Ditto.
18002 (vsha512su1q_u64): Ditto.
18003 (veor3q_u16): Ditto.
18004 (vrax1q_u64): Ditto.
18005 (vxarq_u64): Ditto.
18006 (vbcaxq_u16): Ditto.
18007 * config/arm/types.md (crypto_sha512): New type attribute.
18008 (crypto_sha3): Ditto.
18009 (doc/invoke.texi): Document new sha3 option.
18011 2018-01-10 Michael Collison <michael.collison@arm.com>
18013 * config/aarch64/aarch64-builtins.c:
18014 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18015 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18016 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18017 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18018 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18019 (AARCH64_ISA_SM4): New ISA flag.
18020 (TARGET_SM4): New feature flag for sm4.
18021 * config/aarch64/aarch64-simd-builtins.def
18022 (aarch64_sm3ss1qv4si): Ditto.
18023 (aarch64_sm3tt1aq4si): Ditto.
18024 (aarch64_sm3tt1bq4si): Ditto.
18025 (aarch64_sm3tt2aq4si): Ditto.
18026 (aarch64_sm3tt2bq4si): Ditto.
18027 (aarch64_sm3partw1qv4si): Ditto.
18028 (aarch64_sm3partw2qv4si): Ditto.
18029 (aarch64_sm4eqv4si): Ditto.
18030 (aarch64_sm4ekeyqv4si): Ditto.
18031 * config/aarch64/aarch64-simd.md:
18032 (aarch64_sm3ss1qv4si): Ditto.
18033 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18034 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18035 (aarch64_sm4eqv4si): Ditto.
18036 (aarch64_sm4ekeyqv4si): Ditto.
18037 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18038 (sm3part_op): Ditto.
18039 (CRYPTO_SM3TT): Ditto.
18040 (CRYPTO_SM3PART): Ditto.
18041 (UNSPEC_SM3SS1): New unspec.
18042 (UNSPEC_SM3TT1A): Ditto.
18043 (UNSPEC_SM3TT1B): Ditto.
18044 (UNSPEC_SM3TT2A): Ditto.
18045 (UNSPEC_SM3TT2B): Ditto.
18046 (UNSPEC_SM3PARTW1): Ditto.
18047 (UNSPEC_SM3PARTW2): Ditto.
18048 (UNSPEC_SM4E): Ditto.
18049 (UNSPEC_SM4EKEY): Ditto.
18050 * config/aarch64/constraints.md (Ui2): New constraint.
18051 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18052 * config/arm/types.md (crypto_sm3): New type attribute.
18053 (crypto_sm4): Ditto.
18054 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18055 (vsm3tt1aq_u32): Ditto.
18056 (vsm3tt1bq_u32): Ditto.
18057 (vsm3tt2aq_u32): Ditto.
18058 (vsm3tt2bq_u32): Ditto.
18059 (vsm3partw1q_u32): Ditto.
18060 (vsm3partw2q_u32): Ditto.
18061 (vsm4eq_u32): Ditto.
18062 (vsm4ekeyq_u32): Ditto.
18063 (doc/invoke.texi): Document new sm4 option.
18065 2018-01-10 Michael Collison <michael.collison@arm.com>
18067 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18068 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18069 (AARCH64_FL_FOR_ARCH8_4): New.
18070 (AARCH64_FL_V8_4): New flag.
18071 (doc/invoke.texi): Document new armv8.4-a option.
18073 2018-01-10 Michael Collison <michael.collison@arm.com>
18075 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18076 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18077 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18078 * config/aarch64/aarch64-option-extension.def: Add
18079 AARCH64_OPT_EXTENSION of 'sha2'.
18080 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18081 (crypto): Disable sha2 and aes if crypto disabled.
18082 (crypto): Enable aes and sha2 if enabled.
18083 (simd): Disable sha2 and aes if simd disabled.
18084 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18086 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18087 (TARGET_SHA2): New feature flag for sha2.
18088 (TARGET_AES): New feature flag for aes.
18089 * config/aarch64/aarch64-simd.md:
18090 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18091 conditional on TARGET_AES.
18092 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18093 (aarch64_crypto_sha1hsi): Make pattern conditional
18095 (aarch64_crypto_sha1hv4si): Ditto.
18096 (aarch64_be_crypto_sha1hv4si): Ditto.
18097 (aarch64_crypto_sha1su1v4si): Ditto.
18098 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18099 (aarch64_crypto_sha1su0v4si): Ditto.
18100 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18101 (aarch64_crypto_sha256su0v4si): Ditto.
18102 (aarch64_crypto_sha256su1v4si): Ditto.
18103 (doc/invoke.texi): Document new aes and sha2 options.
18105 2018-01-10 Martin Sebor <msebor@redhat.com>
18107 PR tree-optimization/83781
18108 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18111 2018-01-11 Martin Sebor <msebor@gmail.com>
18112 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18114 PR tree-optimization/83501
18115 PR tree-optimization/81703
18117 * tree-ssa-strlen.c (get_string_cst): Rename...
18118 (get_string_len): ...to this. Handle global constants.
18119 (handle_char_store): Adjust.
18121 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
18122 Jim Wilson <jimw@sifive.com>
18124 * config/riscv/riscv-protos.h (riscv_output_return): New.
18125 * config/riscv/riscv.c (struct machine_function): New naked_p field.
18126 (riscv_attribute_table, riscv_output_return),
18127 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18128 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18129 (riscv_compute_frame_info): Only compute frame->mask if not a naked
18131 (riscv_expand_prologue): Add early return for naked function.
18132 (riscv_expand_epilogue): Likewise.
18133 (riscv_function_ok_for_sibcall): Return false for naked function.
18134 (riscv_set_current_function): New.
18135 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18136 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18137 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18138 * doc/extend.texi (RISC-V Function Attributes): New.
18140 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18142 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18143 check for 128-bit long double before checking TCmode.
18144 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18145 128-bit long doubles before checking TFmode or TCmode.
18146 (FLOAT128_IBM_P): Likewise.
18148 2018-01-10 Martin Sebor <msebor@redhat.com>
18150 PR tree-optimization/83671
18151 * builtins.c (c_strlen): Unconditionally return zero for the empty
18153 Use -Warray-bounds for warnings.
18154 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18155 for non-constant array indices with COMPONENT_REF, arrays of
18156 arrays, and pointers to arrays.
18157 (gimple_fold_builtin_strlen): Determine and set length range for
18158 non-constant character arrays.
18160 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
18162 PR middle-end/81897
18163 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18166 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
18168 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18170 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18173 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18174 VECTOR_MEM_ALTIVEC_OR_VSX_P.
18175 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18176 indexed_or_indirect_operand predicate.
18177 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18178 (*vsx_le_perm_load_v8hi): Likewise.
18179 (*vsx_le_perm_load_v16qi): Likewise.
18180 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18181 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18182 (*vsx_le_perm_store_v8hi): Likewise.
18183 (*vsx_le_perm_store_v16qi): Likewise.
18184 (eight unnamed splitters): Likewise.
18186 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18188 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18189 * config/rs6000/emmintrin.h: Likewise.
18190 * config/rs6000/mmintrin.h: Likewise.
18191 * config/rs6000/xmmintrin.h: Likewise.
18193 2018-01-10 David Malcolm <dmalcolm@redhat.com>
18196 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18198 * tree.c (tree_nop_conversion): Return true for location wrapper
18200 (maybe_wrap_with_location): New function.
18201 (selftest::check_strip_nops): New function.
18202 (selftest::test_location_wrappers): New function.
18203 (selftest::tree_c_tests): Call it.
18204 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18205 (maybe_wrap_with_location): New decl.
18206 (EXPR_LOCATION_WRAPPER_P): New macro.
18207 (location_wrapper_p): New inline function.
18208 (tree_strip_any_location_wrapper): New inline function.
18210 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
18213 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18214 stack_realign_offset for the largest alignment of stack slot
18216 (ix86_find_max_used_stack_alignment): New function.
18217 (ix86_finalize_stack_frame_flags): Use it. Set
18218 max_used_stack_alignment if we don't realign stack.
18219 * config/i386/i386.h (machine_function): Add
18220 max_used_stack_alignment.
18222 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
18224 * config/arm/arm.opt (-mbranch-cost): New option.
18225 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18228 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
18231 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18232 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18234 2018-01-10 Richard Biener <rguenther@suse.de>
18237 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18238 early out so it also covers the case where we have a non-NULL
18241 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18243 PR tree-optimization/83753
18244 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18245 for non-strided grouped accesses if the number of elements is 1.
18247 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18250 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18251 * i386.h (TARGET_USE_GATHER): Define.
18252 * x86-tune.def (X86_TUNE_USE_GATHER): New.
18254 2018-01-10 Martin Liska <mliska@suse.cz>
18257 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18258 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18260 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18261 CLEANUP_NO_PARTITIONING is not set.
18263 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18265 * doc/rtl.texi: Remove documentation of (const ...) wrappers
18266 for vectors, as a partial revert of r254296.
18267 * rtl.h (const_vec_p): Delete.
18268 (const_vec_duplicate_p): Don't test for vector CONSTs.
18269 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18270 * expmed.c (make_tree): Likewise.
18273 * common.md (E, F): Use CONSTANT_P instead of checking for
18275 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18276 checking for CONST_VECTOR.
18278 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18280 PR middle-end/83575
18281 * predict.c (force_edge_cold): Handle in more sane way edges
18282 with no prediction.
18284 2018-01-09 Carl Love <cel@us.ibm.com>
18286 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18288 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18289 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18290 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18291 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
18292 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18293 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
18294 * config/rs6000/rs6000-protos.h: Add extern defition for
18295 rs6000_generate_float2_double_code.
18296 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18298 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18299 (float2_v2df): Add define_expand.
18301 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
18304 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18305 op_mode in the force_to_mode call.
18307 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18309 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18310 instead of checking each element individually.
18311 (aarch64_evpc_uzp): Likewise.
18312 (aarch64_evpc_zip): Likewise.
18313 (aarch64_evpc_ext): Likewise.
18314 (aarch64_evpc_rev): Likewise.
18315 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18316 instead of checking each element individually. Return true without
18318 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18319 whether all selected elements come from the same input, instead of
18320 checking each element individually. Remove calls to gen_rtx_REG,
18321 start_sequence and end_sequence and instead assert that no rtl is
18324 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18326 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18327 order of HIGH and CONST checks.
18329 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18331 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18332 if the destination isn't an SSA_NAME.
18334 2018-01-09 Richard Biener <rguenther@suse.de>
18336 PR tree-optimization/83668
18337 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18339 (canonicalize_loop_form): ... here, renamed from ...
18340 (canonicalize_loop_closed_ssa_form): ... this and amended to
18341 swap successor edges for loop exit blocks to make us use
18342 the RPO order we need for initial schedule generation.
18344 2018-01-09 Joseph Myers <joseph@codesourcery.com>
18346 PR tree-optimization/64811
18347 * match.pd: When optimizing comparisons with Inf, avoid
18348 introducing or losing exceptions from comparisons with NaN.
18350 2018-01-09 Martin Liska <mliska@suse.cz>
18353 * asan.c (shadow_mem_size): Add gcc_assert.
18355 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
18357 Don't save registers in main().
18360 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18361 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18362 * config/avr/avr.c (avr_set_current_function): Don't error if
18363 naked, OS_task or OS_main are specified at the same time.
18364 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18366 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18368 * common/config/avr/avr-common.c (avr_option_optimization_table):
18369 Switch on -mmain-is-OS_task for optimizing compilations.
18371 2018-01-09 Richard Biener <rguenther@suse.de>
18373 PR tree-optimization/83572
18374 * graphite.c: Include cfganal.h.
18375 (graphite_transform_loops): Connect infinite loops to exit
18376 and remove fake edges at the end.
18378 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18380 * ipa-inline.c (edge_badness): Revert accidental checkin.
18382 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18385 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18386 symbols; not inline clones.
18388 2018-01-09 Jakub Jelinek <jakub@redhat.com>
18391 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18392 hard registers. Formatting fixes.
18394 PR preprocessor/83722
18395 * gcc.c (try_generate_repro): Pass
18396 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18397 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18400 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
18401 Kito Cheng <kito.cheng@gmail.com>
18403 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18404 (riscv_leaf_function_p): Delete.
18405 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18407 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18409 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18411 (do_ifelse): New function.
18412 (do_isel): New function.
18413 (do_sub3): New function.
18414 (do_add3): New function.
18415 (do_load_mask_compare): New function.
18416 (do_overlap_load_compare): New function.
18417 (expand_compare_loop): New function.
18418 (expand_block_compare): Call expand_compare_loop() when appropriate.
18419 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18420 option description.
18421 (-mblock-compare-inline-loop-limit): New option.
18423 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18426 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18427 Reverse order of second and third operands in first alternative.
18428 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18429 of first and second elements in UNSPEC_VPERMR vector.
18430 (altivec_expand_vec_perm_le): Likewise.
18432 2018-01-08 Jeff Law <law@redhat.com>
18434 PR rtl-optimizatin/81308
18435 * tree-switch-conversion.c (cfg_altered): New file scoped static.
18436 (process_switch): If group_case_labels makes a change, then set
18438 (pass_convert_switch::execute): If a switch is converted, then
18439 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
18441 PR rtl-optimization/81308
18442 * recog.c (split_all_insns): Conditionally cleanup the CFG after
18445 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
18447 PR target/83663 - Revert r255946
18448 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18449 generation for cases where splatting a value is not useful.
18450 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18451 across a vec_duplicate and a paradoxical subreg forming a vector
18452 mode to a vec_concat.
18454 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18456 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18457 -march=armv8.3-a variants.
18458 * config/arm/t-multilib: Likewise.
18459 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
18461 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18463 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18465 (cceq_ior_compare_complement): Give it a name so I can use it, and
18466 change boolean_or_operator predicate to boolean_operator so it can
18467 be used to generate a crand.
18468 (eqne): New code iterator.
18469 (bd/bd_neg): New code_attrs.
18470 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18471 a single define_insn.
18472 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18473 decrement (bdnzt/bdnzf/bdzt/bdzf).
18474 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18475 with the new names of the branch decrement patterns, and added the
18476 names of the branch decrement conditional patterns.
18478 2018-01-08 Richard Biener <rguenther@suse.de>
18480 PR tree-optimization/83563
18481 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18484 2018-01-08 Richard Biener <rguenther@suse.de>
18486 PR middle-end/83713
18487 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18489 2018-01-08 Richard Biener <rguenther@suse.de>
18491 PR tree-optimization/83685
18492 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18493 references to abnormals.
18495 2018-01-08 Richard Biener <rguenther@suse.de>
18498 * dwarf2out.c (output_indirect_strings): Handle empty
18499 skeleton_debug_str_hash.
18500 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18502 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18504 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18505 (emit_store_direct): Likewise.
18506 (arc_trampoline_adjust_address): Likewise.
18507 (arc_asm_trampoline_template): New function.
18508 (arc_initialize_trampoline): Use asm_trampoline_template.
18509 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18510 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18511 * config/arc/arc.md (flush_icache): Delete pattern.
18513 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18515 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18516 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18519 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18522 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18523 by not USED_FOR_TARGET.
18524 (make_pass_resolve_sw_modes): Likewise.
18526 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18528 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18531 2018-01-08 Richard Biener <rguenther@suse.de>
18533 PR middle-end/83580
18534 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18536 2018-01-08 Richard Biener <rguenther@suse.de>
18538 PR middle-end/83517
18539 * match.pd ((t * 2) / 2) -> t): Add missing :c.
18541 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
18543 PR middle-end/81897
18544 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18545 basic blocks with a small number of successors.
18546 (convert_control_dep_chain_into_preds): Improve handling of
18548 (dump_predicates): Split apart into...
18549 (dump_pred_chain): ...here...
18550 (dump_pred_info): ...and here.
18551 (can_one_predicate_be_invalidated_p): Add debugging printfs.
18552 (can_chain_union_be_invalidated_p): Improve check for invalidation
18554 (uninit_uses_cannot_happen): Avoid unnecessary if
18555 convert_control_dep_chain_into_preds yielded nothing.
18557 2018-01-06 Martin Sebor <msebor@redhat.com>
18559 PR tree-optimization/83640
18560 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18561 subtracting negative offset from size.
18562 (builtin_access::overlap): Adjust offset bounds of the access to fall
18563 within the size of the object if possible.
18565 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
18567 PR rtl-optimization/83699
18568 * expmed.c (extract_bit_field_1): Restrict the vector usage of
18569 extract_bit_field_as_subreg to cases in which the extracted
18570 value is also a vector.
18572 * lra-constraints.c (process_alt_operands): Test for the equivalence
18573 substitutions when detecting a possible reload cycle.
18575 2018-01-06 Jakub Jelinek <jakub@redhat.com>
18578 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18579 by default if flag_selective_schedling{,2}. Formatting fixes.
18581 PR rtl-optimization/83682
18582 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18583 if it has non-VECTOR_MODE element mode.
18584 (vec_duplicate_p): Likewise.
18586 PR middle-end/83694
18587 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18588 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18590 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18593 * config/i386/i386-builtin.def
18594 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18595 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18596 Require also OPTION_MASK_ISA_AVX512F in addition to
18597 OPTION_MASK_ISA_GFNI.
18598 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18599 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18600 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18601 to OPTION_MASK_ISA_GFNI.
18602 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18603 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18604 OPTION_MASK_ISA_AVX512BW.
18605 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18606 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18607 addition to OPTION_MASK_ISA_GFNI.
18608 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18609 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18610 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18611 to OPTION_MASK_ISA_GFNI.
18612 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18613 a requirement for all ISAs rather than any of them with a few
18615 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18617 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18618 bitmasks to be enabled with 3 exceptions, instead of requiring any
18619 enabled ISA with lots of exceptions.
18620 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18621 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18622 Change avx512bw in isa attribute to avx512f.
18623 * config/i386/sgxintrin.h: Add license boilerplate.
18624 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
18625 to __AVX512F__ and __AVX512VL to __AVX512VL__.
18626 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18627 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18629 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18630 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18631 temporarily sse2 rather than sse if not enabled already.
18634 * config/i386/sse.md (VI248_VLBW): Rename to ...
18635 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
18636 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18637 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18638 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18639 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18640 mode iterator instead of VI248_VLBW.
18642 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
18644 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18645 (record_modified): Skip clobbers; add debug output.
18646 (param_change_prob): Use sreal frequencies.
18648 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18650 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18651 punt for user-aligned variables.
18653 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18655 * tree-chrec.c (chrec_contains_symbols): Return true for
18658 2018-01-05 Sudakshina Das <sudi.das@arm.com>
18661 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18662 of (x|y) == x for BICS pattern.
18664 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18666 PR tree-optimization/83605
18667 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18668 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18671 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
18673 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18674 * config/epiphany/rtems.h: New file.
18676 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18677 Uros Bizjak <ubizjak@gmail.com>
18680 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18681 QIreg_operand instead of register_operand predicate.
18682 * config/i386/i386.c (ix86_rop_should_change_byte_p,
18683 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18684 comments instead of -fmitigate[-_]rop.
18686 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18689 * cgraphunit.c (symbol_table::compile): Switch to text_section
18690 before calling assembly_start debug hook.
18691 * run-rtl-passes.c (run_rtl_passes): Likewise.
18694 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18696 * tree-vrp.c (extract_range_from_binary_expr_1): Check
18697 range_int_cst_p rather than !symbolic_range_p before calling
18698 extract_range_from_multiplicative_op_1.
18700 2018-01-04 Jeff Law <law@redhat.com>
18702 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18703 redundant test in assertion.
18705 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18707 * doc/rtl.texi: Document machine_mode wrapper classes.
18709 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18711 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18712 using tree_to_uhwi.
18714 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18716 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18717 the VEC_PERM_EXPR fold to fail.
18719 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18722 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18723 to switched_sections.
18725 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18728 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18729 test for d.testing.
18731 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
18734 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18735 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18737 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18740 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18741 is BLKmode and bitpos not zero or mode change is needed.
18743 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18746 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18749 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
18752 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18753 instead of MULT rtx. Update all corresponding splitters.
18754 (*saddl_se): Ditto.
18755 (*ssub<modesuffix>): Ditto.
18756 (*ssubl_se): Ditto.
18757 (*cmp_sadd_di): Update split patterns.
18758 (*cmp_sadd_si): Ditto.
18759 (*cmp_sadd_sidi): Ditto.
18760 (*cmp_ssub_di): Ditto.
18761 (*cmp_ssub_si): Ditto.
18762 (*cmp_ssub_sidi): Ditto.
18763 * config/alpha/predicates.md (const23_operand): New predicate.
18764 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18765 Look for ASHIFT, not MULT inner operand.
18766 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18768 2018-01-04 Martin Liska <mliska@suse.cz>
18770 PR gcov-profile/83669
18771 * gcov.c (output_intermediate_file): Add version to intermediate
18773 * doc/gcov.texi: Document new field 'version' in intermediate
18774 file format. Fix location of '-k' option of gcov command.
18776 2018-01-04 Martin Liska <mliska@suse.cz>
18779 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18781 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18783 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18785 2018-01-03 Martin Sebor <msebor@redhat.com>
18787 PR tree-optimization/83655
18788 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18789 checking calls with invalid arguments.
18791 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18793 * tree-vect-stmts.c (vect_get_store_rhs): New function.
18794 (vectorizable_mask_load_store): Delete.
18795 (vectorizable_call): Return false for masked loads and stores.
18796 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
18797 instead of gimple_assign_rhs1.
18798 (vectorizable_load): Handle IFN_MASK_LOAD.
18799 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18801 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18803 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18805 (vectorizable_mask_load_store): ...here.
18806 (vectorizable_load): ...and here.
18808 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18810 * tree-vect-stmts.c (vect_build_all_ones_mask)
18811 (vect_build_zero_merge_argument): New functions, split out from...
18812 (vectorizable_load): ...here.
18814 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18816 * tree-vect-stmts.c (vect_check_store_rhs): New function,
18818 (vectorizable_mask_load_store): ...here.
18819 (vectorizable_store): ...and here.
18821 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18823 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
18825 (vectorizable_mask_load_store): ...here.
18827 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18829 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
18830 (vect_model_store_cost): Take a vec_load_store_type instead of a
18832 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
18833 (vect_model_store_cost): Take a vec_load_store_type instead of a
18835 (vectorizable_mask_load_store): Update accordingly.
18836 (vectorizable_store): Likewise.
18837 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
18839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18841 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
18842 IFN_MASK_LOAD calls here rather than...
18843 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
18845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18846 Alan Hayward <alan.hayward@arm.com>
18847 David Sherwood <david.sherwood@arm.com>
18849 * expmed.c (extract_bit_field_1): For vector extracts,
18850 fall back to extract_bit_field_as_subreg if vec_extract
18853 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18854 Alan Hayward <alan.hayward@arm.com>
18855 David Sherwood <david.sherwood@arm.com>
18857 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
18858 they are variable or constant sized.
18859 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
18860 slots for constant-sized data.
18862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18863 Alan Hayward <alan.hayward@arm.com>
18864 David Sherwood <david.sherwood@arm.com>
18866 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
18867 handling COND_EXPRs with boolean comparisons, try to find a better
18868 basis for the mask type than the boolean itself.
18870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18872 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
18873 is calculated and how it can be overridden.
18874 * genmodes.c (max_bitsize_mode_any_mode): New variable.
18875 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
18877 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
18880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18881 Alan Hayward <alan.hayward@arm.com>
18882 David Sherwood <david.sherwood@arm.com>
18884 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
18885 Remove the mode argument.
18886 (aarch64_simd_valid_immediate): Remove the mode and inverse
18888 * config/aarch64/iterators.md (bitsize): New iterator.
18889 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
18890 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
18891 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
18892 aarch64_simd_valid_immediate.
18893 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
18894 (aarch64_reg_or_bic_imm): Likewise.
18895 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
18896 with an insn_type enum and msl with a modifier_type enum.
18897 Replace element_width with a scalar_mode. Change the shift
18898 to unsigned int. Add constructors for scalar_float_mode and
18899 scalar_int_mode elements.
18900 (aarch64_vect_float_const_representable_p): Delete.
18901 (aarch64_can_const_movi_rtx_p)
18902 (aarch64_simd_scalar_immediate_valid_for_move)
18903 (aarch64_simd_make_constant): Update call to
18904 aarch64_simd_valid_immediate.
18905 (aarch64_advsimd_valid_immediate_hs): New function.
18906 (aarch64_advsimd_valid_immediate): Likewise.
18907 (aarch64_simd_valid_immediate): Remove mode and inverse
18908 arguments. Rewrite to use the above. Use const_vec_duplicate_p
18909 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
18910 and aarch64_float_const_representable_p on the result.
18911 (aarch64_output_simd_mov_immediate): Remove mode argument.
18912 Update call to aarch64_simd_valid_immediate and use of
18913 simd_immediate_info.
18914 (aarch64_output_scalar_simd_mov_immediate): Update call
18917 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18918 Alan Hayward <alan.hayward@arm.com>
18919 David Sherwood <david.sherwood@arm.com>
18921 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
18922 (mode_nunits): Likewise CONST_MODE_NUNITS.
18923 * machmode.def (ADJUST_NUNITS): Document.
18924 * genmodes.c (mode_data::need_nunits_adj): New field.
18925 (blank_mode): Update accordingly.
18926 (adj_nunits): New variable.
18927 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
18929 (emit_mode_size_inline): Set need_bytesize_adj for all modes
18930 listed in adj_nunits.
18931 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
18932 listed in adj_nunits. Don't emit case statements for such modes.
18933 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
18934 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
18935 nothing if adj_nunits is nonnull.
18936 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
18937 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
18938 (emit_mode_fbit): Update use of print_maybe_const_decl.
18939 (emit_move_size): Likewise. Treat the array as non-const
18941 (emit_mode_adjustments): Handle adj_nunits.
18943 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18945 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
18946 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
18947 (VECTOR_MODES): Use it.
18948 (make_vector_modes): Take the prefix as an argument.
18950 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18951 Alan Hayward <alan.hayward@arm.com>
18952 David Sherwood <david.sherwood@arm.com>
18954 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
18955 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
18956 for MODE_VECTOR_BOOL.
18957 * machmode.def (VECTOR_BOOL_MODE): Document.
18958 * genmodes.c (VECTOR_BOOL_MODE): New macro.
18959 (make_vector_bool_mode): New function.
18960 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
18962 * lto-streamer-in.c (lto_input_mode_table): Likewise.
18963 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
18965 * stor-layout.c (int_mode_for_mode): Likewise.
18966 * tree.c (build_vector_type_for_mode): Likewise.
18967 * varasm.c (output_constant_pool_2): Likewise.
18968 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
18969 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
18970 for MODE_VECTOR_BOOL.
18971 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
18972 of mode class checks.
18973 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
18974 instead of a list of mode class checks.
18975 (expand_vector_scalar_condition): Likewise.
18976 (type_for_widest_vector_mode): Handle BImode as an inner mode.
18978 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18979 Alan Hayward <alan.hayward@arm.com>
18980 David Sherwood <david.sherwood@arm.com>
18982 * machmode.h (mode_size): Change from unsigned short to
18984 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
18985 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18986 or if measurement_type is not polynomial.
18987 (fixed_size_mode::includes_p): Check for constant-sized modes.
18988 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
18989 return a poly_uint16 rather than an unsigned short.
18990 (emit_mode_size): Change the type of mode_size from unsigned short
18991 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
18992 (emit_mode_adjustments): Cope with polynomial vector sizes.
18993 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18995 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18997 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
18998 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
18999 * caller-save.c (setup_save_areas): Likewise.
19000 (replace_reg_with_saved_mem): Likewise.
19001 * calls.c (emit_library_call_value_1): Likewise.
19002 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19003 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19004 (gen_lowpart_for_combine): Likewise.
19005 * convert.c (convert_to_integer_1): Likewise.
19006 * cse.c (equiv_constant, cse_insn): Likewise.
19007 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19008 (cselib_subst_to_values): Likewise.
19009 * dce.c (word_dce_process_block): Likewise.
19010 * df-problems.c (df_word_lr_mark_ref): Likewise.
19011 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19012 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19013 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19014 (rtl_for_decl_location): Likewise.
19015 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19016 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19017 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19018 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19019 (expand_expr_real_1): Likewise.
19020 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19021 (pad_below): Likewise.
19022 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19023 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19024 * ira.c (get_subreg_tracking_sizes): Likewise.
19025 * ira-build.c (ira_create_allocno_objects): Likewise.
19026 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19027 (ira_sort_regnos_for_alter_reg): Likewise.
19028 * ira-costs.c (record_operand_costs): Likewise.
19029 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19030 (resolve_simple_move): Likewise.
19031 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19032 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19033 (lra_constraints): Likewise.
19034 (CONST_POOL_OK_P): Reject variable-sized modes.
19035 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19036 (add_pseudo_to_slot, lra_spill): Likewise.
19037 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19038 * optabs-query.c (get_best_extraction_insn): Likewise.
19039 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19040 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19041 (expand_mult_highpart, valid_multiword_target_p): Likewise.
19042 * recog.c (offsettable_address_addr_space_p): Likewise.
19043 * regcprop.c (maybe_mode_change): Likewise.
19044 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19045 * regrename.c (build_def_use): Likewise.
19046 * regstat.c (dump_reg_info): Likewise.
19047 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19048 (find_reloads, find_reloads_subreg_address): Likewise.
19049 * reload1.c (eliminate_regs_1): Likewise.
19050 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19051 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19052 (simplify_binary_operation_1, simplify_subreg): Likewise.
19053 * targhooks.c (default_function_arg_padding): Likewise.
19054 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19055 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19056 (verify_gimple_assign_ternary): Likewise.
19057 * tree-inline.c (estimate_move_cost): Likewise.
19058 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19059 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19060 (get_address_cost_ainc): Likewise.
19061 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19062 (vect_supportable_dr_alignment): Likewise.
19063 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19064 (vectorizable_reduction): Likewise.
19065 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19066 (vectorizable_operation, vectorizable_load): Likewise.
19067 * tree.c (build_same_sized_truth_vector_type): Likewise.
19068 * valtrack.c (cleanup_auto_inc_dec): Likewise.
19069 * var-tracking.c (emit_note_insn_var_location): Likewise.
19070 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19071 (ADDR_VEC_ALIGN): Likewise.
19073 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19074 Alan Hayward <alan.hayward@arm.com>
19075 David Sherwood <david.sherwood@arm.com>
19077 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19079 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19080 or if measurement_type is polynomial.
19081 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19082 * combine.c (make_extraction): Likewise.
19083 * dse.c (find_shift_sequence): Likewise.
19084 * dwarf2out.c (mem_loc_descriptor): Likewise.
19085 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19086 (extract_bit_field, extract_low_bits): Likewise.
19087 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19088 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19089 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19090 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19091 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19092 * reload.c (find_reloads): Likewise.
19093 * reload1.c (alter_reg): Likewise.
19094 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19095 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19096 * tree-if-conv.c (predicate_mem_writes): Likewise.
19097 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19098 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19099 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19100 * valtrack.c (dead_debug_insert_temp): Likewise.
19101 * varasm.c (mergeable_constant_section): Likewise.
19102 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19104 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19105 Alan Hayward <alan.hayward@arm.com>
19106 David Sherwood <david.sherwood@arm.com>
19108 * expr.c (expand_assignment): Cope with polynomial mode sizes
19109 when assigning to a CONCAT.
19111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19112 Alan Hayward <alan.hayward@arm.com>
19113 David Sherwood <david.sherwood@arm.com>
19115 * machmode.h (mode_precision): Change from unsigned short to
19117 (mode_to_precision): Return a poly_uint16 rather than an unsigned
19119 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19120 or if measurement_type is not polynomial.
19121 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
19122 in which the mode is already known to be a scalar_int_mode.
19123 * genmodes.c (emit_mode_precision): Change the type of mode_precision
19124 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
19126 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19127 for GET_MODE_PRECISION.
19128 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19129 for GET_MODE_PRECISION.
19130 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19132 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19133 (expand_field_assignment, make_extraction): Likewise.
19134 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19135 (get_last_value): Likewise.
19136 * convert.c (convert_to_integer_1): Likewise.
19137 * cse.c (cse_insn): Likewise.
19138 * expr.c (expand_expr_real_1): Likewise.
19139 * lra-constraints.c (simplify_operand_subreg): Likewise.
19140 * optabs-query.c (can_atomic_load_p): Likewise.
19141 * optabs.c (expand_atomic_load): Likewise.
19142 (expand_atomic_store): Likewise.
19143 * ree.c (combine_reaching_defs): Likewise.
19144 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19145 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19146 * tree.h (type_has_mode_precision_p): Likewise.
19147 * ubsan.c (instrument_si_overflow): Likewise.
19149 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19150 Alan Hayward <alan.hayward@arm.com>
19151 David Sherwood <david.sherwood@arm.com>
19153 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19154 polynomial numbers of units.
19155 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19156 (valid_vector_subparts_p): New function.
19157 (build_vector_type): Remove temporary shim and take the number
19158 of units as a poly_uint64 rather than an int.
19159 (build_opaque_vector_type): Take the number of units as a
19160 poly_uint64 rather than an int.
19161 * tree.c (build_vector_from_ctor): Handle polynomial
19162 TYPE_VECTOR_SUBPARTS.
19163 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19164 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19165 (build_vector_from_val): If the number of units is variable,
19166 use build_vec_duplicate_cst for constant operands and
19167 VEC_DUPLICATE_EXPR otherwise.
19168 (make_vector_type): Remove temporary is_constant ().
19169 (build_vector_type, build_opaque_vector_type): Take the number of
19170 units as a poly_uint64 rather than an int.
19171 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19173 * cfgexpand.c (expand_debug_expr): Likewise.
19174 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19175 (store_constructor, expand_expr_real_1): Likewise.
19176 (const_scalar_mask_from_tree): Likewise.
19177 * fold-const-call.c (fold_const_reduction): Likewise.
19178 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19179 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19180 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19181 (fold_relational_const): Likewise.
19182 (native_interpret_vector): Likewise. Change the size from an
19183 int to an unsigned int.
19184 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19185 TYPE_VECTOR_SUBPARTS.
19186 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19187 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19188 duplicating a non-constant operand into a variable-length vector.
19189 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19190 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19191 * ipa-icf.c (sem_variable::equals): Likewise.
19192 * match.pd: Likewise.
19193 * omp-simd-clone.c (simd_clone_subparts): Likewise.
19194 * print-tree.c (print_node): Likewise.
19195 * stor-layout.c (layout_type): Likewise.
19196 * targhooks.c (default_builtin_vectorization_cost): Likewise.
19197 * tree-cfg.c (verify_gimple_comparison): Likewise.
19198 (verify_gimple_assign_binary): Likewise.
19199 (verify_gimple_assign_ternary): Likewise.
19200 (verify_gimple_assign_single): Likewise.
19201 * tree-pretty-print.c (dump_generic_node): Likewise.
19202 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19203 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19204 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19205 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19206 (vect_shift_permute_load_chain): Likewise.
19207 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19208 (expand_vector_condition, optimize_vector_constructor): Likewise.
19209 (lower_vec_perm, get_compute_type): Likewise.
19210 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19211 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19212 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19213 (vect_recog_mask_conversion_pattern): Likewise.
19214 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19215 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19216 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19217 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19218 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19219 (vectorizable_shift, vectorizable_operation, vectorizable_store)
19220 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19221 (supportable_widening_operation): Likewise.
19222 (supportable_narrowing_operation): Likewise.
19223 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19225 * varasm.c (output_constant): Likewise.
19227 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19228 Alan Hayward <alan.hayward@arm.com>
19229 David Sherwood <david.sherwood@arm.com>
19231 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19232 so that both the length == 3 and length != 3 cases set up their
19233 own permute vectors. Add comments explaining why we know the
19234 number of elements is constant.
19235 (vect_permute_load_chain): Likewise.
19237 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19238 Alan Hayward <alan.hayward@arm.com>
19239 David Sherwood <david.sherwood@arm.com>
19241 * machmode.h (mode_nunits): Change from unsigned char to
19243 (ONLY_FIXED_SIZE_MODES): New macro.
19244 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19245 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19246 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19248 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19249 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19250 or if measurement_type is not polynomial.
19251 * genmodes.c (ZERO_COEFFS): New macro.
19252 (emit_mode_nunits_inline): Make mode_nunits_inline return a
19254 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19255 Use ZERO_COEFFS when emitting initializers.
19256 * data-streamer.h (bp_pack_poly_value): New function.
19257 (bp_unpack_poly_value): Likewise.
19258 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19259 for GET_MODE_NUNITS.
19260 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19261 for GET_MODE_NUNITS.
19262 * tree.c (make_vector_type): Remove temporary shim and make
19263 the real function take the number of units as a poly_uint64
19264 rather than an int.
19265 (build_vector_type_for_mode): Handle polynomial nunits.
19266 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19267 * emit-rtl.c (const_vec_series_p_1): Likewise.
19268 (gen_rtx_CONST_VECTOR): Likewise.
19269 * fold-const.c (test_vec_duplicate_folding): Likewise.
19270 * genrecog.c (validate_pattern): Likewise.
19271 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19272 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19273 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19274 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19275 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19276 * rtlanal.c (subreg_get_info): Likewise.
19277 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19278 (vect_grouped_load_supported): Likewise.
19279 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19280 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19281 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19282 (simplify_const_unary_operation, simplify_binary_operation_1)
19283 (simplify_const_binary_operation, simplify_ternary_operation)
19284 (test_vector_ops_duplicate, test_vector_ops): Likewise.
19285 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19286 instead of CONST_VECTOR_NUNITS.
19287 * varasm.c (output_constant_pool_2): Likewise.
19288 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19289 explicit-encoded elements in the XVEC for variable-length vectors.
19291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19293 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19295 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19296 Alan Hayward <alan.hayward@arm.com>
19297 David Sherwood <david.sherwood@arm.com>
19299 * coretypes.h (fixed_size_mode): Declare.
19300 (fixed_size_mode_pod): New typedef.
19301 * builtins.h (target_builtins::x_apply_args_mode)
19302 (target_builtins::x_apply_result_mode): Change type to
19303 fixed_size_mode_pod.
19304 * builtins.c (apply_args_size, apply_result_size, result_vector)
19305 (expand_builtin_apply_args_1, expand_builtin_apply)
19306 (expand_builtin_return): Update accordingly.
19308 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19310 * cse.c (hash_rtx_cb): Hash only the encoded elements.
19311 * cselib.c (cselib_hash_rtx): Likewise.
19312 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19313 CONST_VECTOR encoding.
19315 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19316 Jeff Law <law@redhat.com>
19319 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19320 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19321 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19322 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19325 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19326 explicitly probe *sp in a noreturn function if there were any callee
19327 register saves or frame pointer is needed.
19329 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19332 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19333 BLKmode for ternary, binary or unary expressions.
19336 * var-tracking.c (delete_vta_debug_insn): New inline function.
19337 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19338 insns from get_insns () to NULL instead of each bb separately.
19339 Use delete_vta_debug_insn. No longer static.
19340 (vt_debug_insns_local, variable_tracking_main_1): Adjust
19341 delete_vta_debug_insns callers.
19342 * rtl.h (delete_vta_debug_insns): Declare.
19343 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19344 instead of variable_tracking_main.
19346 2018-01-03 Martin Sebor <msebor@redhat.com>
19348 PR tree-optimization/83603
19349 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19350 arguments past the endof the argument list in functions declared
19351 without a prototype.
19352 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19353 Avoid checking when arguments are null.
19355 2018-01-03 Martin Sebor <msebor@redhat.com>
19358 * doc/extend.texi (attribute const): Fix a typo.
19359 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19360 issuing -Wsuggest-attribute for void functions.
19362 2018-01-03 Martin Sebor <msebor@redhat.com>
19364 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19365 offset_int::from instead of wide_int::to_shwi.
19366 (maybe_diag_overlap): Remove assertion.
19367 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19368 * gimple-ssa-sprintf.c (format_directive): Same.
19369 (parse_directive): Same.
19370 (sprintf_dom_walker::compute_format_length): Same.
19371 (try_substitute_return_value): Same.
19373 2018-01-03 Jeff Law <law@redhat.com>
19375 PR middle-end/83654
19376 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19377 non-constant residual for zero at runtime and avoid probing in
19378 that case. Reorganize code for trailing problem to mirror handling
19381 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19383 PR tree-optimization/83501
19384 * tree-ssa-strlen.c (get_string_cst): New.
19385 (handle_char_store): Call get_string_cst.
19387 2018-01-03 Martin Liska <mliska@suse.cz>
19389 PR tree-optimization/83593
19390 * tree-ssa-strlen.c: Include tree-cfg.h.
19391 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19392 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19393 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19395 (strlen_dom_walker::before_dom_children): Call
19396 gimple_purge_dead_eh_edges. Dump tranformation with details
19398 (strlen_dom_walker::before_dom_children): Update call by adding
19399 new argument cleanup_eh.
19400 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19402 2018-01-03 Martin Liska <mliska@suse.cz>
19405 * cif-code.def (VARIADIC_THUNK): New enum value.
19406 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19409 2018-01-03 Jan Beulich <jbeulich@suse.com>
19411 * sse.md (mov<mode>_internal): Tighten condition for when to use
19412 vmovdqu<ssescalarsize> for TI and OI modes.
19414 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19416 Update copyright years.
19418 2018-01-03 Martin Liska <mliska@suse.cz>
19421 * ipa-visibility.c (function_and_variable_visibility): Skip
19422 functions with noipa attribure.
19424 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19426 * gcc.c (process_command): Update copyright notice dates.
19427 * gcov-dump.c (print_version): Ditto.
19428 * gcov.c (print_version): Ditto.
19429 * gcov-tool.c (print_version): Ditto.
19430 * gengtype.c (create_file): Ditto.
19431 * doc/cpp.texi: Bump @copying's copyright year.
19432 * doc/cppinternals.texi: Ditto.
19433 * doc/gcc.texi: Ditto.
19434 * doc/gccint.texi: Ditto.
19435 * doc/gcov.texi: Ditto.
19436 * doc/install.texi: Ditto.
19437 * doc/invoke.texi: Ditto.
19439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19441 * vector-builder.h (vector_builder::m_full_nelts): Change from
19442 unsigned int to poly_uint64.
19443 (vector_builder::full_nelts): Update prototype accordingly.
19444 (vector_builder::new_vector): Likewise.
19445 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19446 (vector_builder::operator ==): Likewise.
19447 (vector_builder::finalize): Likewise.
19448 * int-vector-builder.h (int_vector_builder::int_vector_builder):
19449 Take the number of elements as a poly_uint64 rather than an
19451 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19452 from unsigned int to poly_uint64.
19453 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19454 (vec_perm_indices::new_vector): Likewise.
19455 (vec_perm_indices::length): Likewise.
19456 (vec_perm_indices::nelts_per_input): Likewise.
19457 (vec_perm_indices::input_nelts): Likewise.
19458 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19459 number of elements per input as a poly_uint64 rather than an
19460 unsigned int. Use the original encoding for variable-length
19461 vectors, rather than clamping each individual element.
19462 For the second and subsequent elements in each pattern,
19463 clamp the step and base before clamping their sum.
19464 (vec_perm_indices::series_p): Handle polynomial element counts.
19465 (vec_perm_indices::all_in_range_p): Likewise.
19466 (vec_perm_indices_to_tree): Likewise.
19467 (vec_perm_indices_to_rtx): Likewise.
19468 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19469 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19470 (tree_vector_builder::new_binary_operation): Handle polynomial
19471 element counts. Return false if we need to know the number
19472 of elements at compile time.
19473 * fold-const.c (fold_vec_perm): Punt if the number of elements
19474 isn't known at compile time.
19476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19478 * vec-perm-indices.h (vec_perm_builder): Change element type
19479 from HOST_WIDE_INT to poly_int64.
19480 (vec_perm_indices::element_type): Update accordingly.
19481 (vec_perm_indices::clamp): Handle polynomial element_types.
19482 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19483 (vec_perm_indices::all_in_range_p): Likewise.
19484 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19486 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19487 polynomial vec_perm_indices element types.
19488 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19489 * fold-const.c (fold_vec_perm): Likewise.
19490 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19491 * tree-vect-generic.c (lower_vec_perm): Likewise.
19492 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19493 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19494 element type to HOST_WIDE_INT.
19496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19497 Alan Hayward <alan.hayward@arm.com>
19498 David Sherwood <david.sherwood@arm.com>
19500 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19501 rather than an int. Use plus_constant.
19502 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19503 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19505 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19506 Alan Hayward <alan.hayward@arm.com>
19507 David Sherwood <david.sherwood@arm.com>
19509 * calls.c (emit_call_1, expand_call): Change struct_value_size from
19510 a HOST_WIDE_INT to a poly_int64.
19512 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19513 Alan Hayward <alan.hayward@arm.com>
19514 David Sherwood <david.sherwood@arm.com>
19516 * calls.c (load_register_parameters): Cope with polynomial
19517 mode sizes. Require a constant size for BLKmode parameters
19518 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
19519 forces a parameter to be padded at the lsb end in order to
19520 fill a complete number of words, require the parameter size
19521 to be ordered wrt UNITS_PER_WORD.
19523 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19524 Alan Hayward <alan.hayward@arm.com>
19525 David Sherwood <david.sherwood@arm.com>
19527 * reload1.c (spill_stack_slot_width): Change element type
19528 from unsigned int to poly_uint64_pod.
19529 (alter_reg): Treat mode sizes as polynomial.
19531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19532 Alan Hayward <alan.hayward@arm.com>
19533 David Sherwood <david.sherwood@arm.com>
19535 * reload.c (complex_word_subreg_p): New function.
19536 (reload_inner_reg_of_subreg, push_reload): Use it.
19538 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19539 Alan Hayward <alan.hayward@arm.com>
19540 David Sherwood <david.sherwood@arm.com>
19542 * lra-constraints.c (process_alt_operands): Reject matched
19543 operands whose sizes aren't ordered.
19544 (match_reload): Refer to this check here.
19546 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19547 Alan Hayward <alan.hayward@arm.com>
19548 David Sherwood <david.sherwood@arm.com>
19550 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19551 that the mode size is in the set {1, 2, 4, 8, 16}.
19553 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19554 Alan Hayward <alan.hayward@arm.com>
19555 David Sherwood <david.sherwood@arm.com>
19557 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19558 Use plus_constant instead of gen_rtx_PLUS.
19560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19561 Alan Hayward <alan.hayward@arm.com>
19562 David Sherwood <david.sherwood@arm.com>
19564 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19565 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19566 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19567 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19568 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19569 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19570 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19571 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19572 * config/i386/i386.c (ix86_push_rounding): ...this new function.
19573 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19575 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19576 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19577 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19578 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19579 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19580 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19581 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19582 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19583 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19584 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19586 * expr.c (emit_move_resolve_push): Treat the input and result
19587 of PUSH_ROUNDING as a poly_int64.
19588 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19589 (emit_push_insn): Likewise.
19590 * lra-eliminations.c (mark_not_eliminable): Likewise.
19591 * recog.c (push_operand): Likewise.
19592 * reload1.c (elimination_effects): Likewise.
19593 * rtlanal.c (nonzero_bits1): Likewise.
19594 * calls.c (store_one_arg): Likewise. Require the padding to be
19595 known at compile time.
19597 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19598 Alan Hayward <alan.hayward@arm.com>
19599 David Sherwood <david.sherwood@arm.com>
19601 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19602 Use plus_constant instead of gen_rtx_PLUS.
19604 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19605 Alan Hayward <alan.hayward@arm.com>
19606 David Sherwood <david.sherwood@arm.com>
19608 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19609 rather than an int.
19611 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19612 Alan Hayward <alan.hayward@arm.com>
19613 David Sherwood <david.sherwood@arm.com>
19615 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19616 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19617 via stack temporaries. Treat the mode size as polynomial too.
19619 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19620 Alan Hayward <alan.hayward@arm.com>
19621 David Sherwood <david.sherwood@arm.com>
19623 * expr.c (expand_expr_real_2): When handling conversions involving
19624 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19625 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
19626 as a poly_uint64 too.
19628 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19629 Alan Hayward <alan.hayward@arm.com>
19630 David Sherwood <david.sherwood@arm.com>
19632 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19635 Alan Hayward <alan.hayward@arm.com>
19636 David Sherwood <david.sherwood@arm.com>
19638 * combine.c (can_change_dest_mode): Handle polynomial
19639 REGMODE_NATURAL_SIZE.
19640 * expmed.c (store_bit_field_1): Likewise.
19641 * expr.c (store_constructor): Likewise.
19642 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19643 and polynomial REGMODE_NATURAL_SIZE.
19644 (gen_lowpart_common): Likewise.
19645 * reginfo.c (record_subregs_of_mode): Likewise.
19646 * rtlanal.c (read_modify_subreg_p): Likewise.
19648 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19649 Alan Hayward <alan.hayward@arm.com>
19650 David Sherwood <david.sherwood@arm.com>
19652 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19653 numbers of elements.
19655 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19656 Alan Hayward <alan.hayward@arm.com>
19657 David Sherwood <david.sherwood@arm.com>
19659 * match.pd: Cope with polynomial numbers of vector elements.
19661 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19662 Alan Hayward <alan.hayward@arm.com>
19663 David Sherwood <david.sherwood@arm.com>
19665 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19666 in a POINTER_PLUS_EXPR.
19668 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19669 Alan Hayward <alan.hayward@arm.com>
19670 David Sherwood <david.sherwood@arm.com>
19672 * omp-simd-clone.c (simd_clone_subparts): New function.
19673 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19674 (ipa_simd_modify_function_body): Likewise.
19676 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19677 Alan Hayward <alan.hayward@arm.com>
19678 David Sherwood <david.sherwood@arm.com>
19680 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19681 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19682 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19683 (expand_vector_condition, vector_element): Likewise.
19684 (subparts_gt): New function.
19685 (get_compute_type): Use subparts_gt.
19686 (count_type_subparts): Delete.
19687 (expand_vector_operations_1): Use subparts_gt instead of
19688 count_type_subparts.
19690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19691 Alan Hayward <alan.hayward@arm.com>
19692 David Sherwood <david.sherwood@arm.com>
19694 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19695 (vect_compile_time_alias): ...this new function. Do the calculation
19696 on poly_ints rather than trees.
19697 (vect_prune_runtime_alias_test_list): Update call accordingly.
19699 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19700 Alan Hayward <alan.hayward@arm.com>
19701 David Sherwood <david.sherwood@arm.com>
19703 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19705 (vect_schedule_slp_instance): Likewise.
19707 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19708 Alan Hayward <alan.hayward@arm.com>
19709 David Sherwood <david.sherwood@arm.com>
19711 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19712 constant and extern definitions for variable-length vectors.
19713 (vect_get_constant_vectors): Note that the number of units
19714 is known to be constant.
19716 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19717 Alan Hayward <alan.hayward@arm.com>
19718 David Sherwood <david.sherwood@arm.com>
19720 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19721 of units as polynomial. Choose between WIDE and NARROW based
19724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19725 Alan Hayward <alan.hayward@arm.com>
19726 David Sherwood <david.sherwood@arm.com>
19728 * tree-vect-stmts.c (simd_clone_subparts): New function.
19729 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19731 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19732 Alan Hayward <alan.hayward@arm.com>
19733 David Sherwood <david.sherwood@arm.com>
19735 * tree-vect-stmts.c (vectorizable_call): Treat the number of
19736 vectors as polynomial. Use build_index_vector for
19737 IFN_GOMP_SIMD_LANE.
19739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19740 Alan Hayward <alan.hayward@arm.com>
19741 David Sherwood <david.sherwood@arm.com>
19743 * tree-vect-stmts.c (get_load_store_type): Treat the number of
19744 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19745 for variable-length vectors.
19746 (vectorizable_mask_load_store): Treat the number of units as
19747 polynomial, asserting that it is constant if the condition has
19748 already been enforced.
19749 (vectorizable_store, vectorizable_load): Likewise.
19751 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19752 Alan Hayward <alan.hayward@arm.com>
19753 David Sherwood <david.sherwood@arm.com>
19755 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19756 of units as polynomial. Punt if we can't tell at compile time
19757 which vector contains the final result.
19759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19760 Alan Hayward <alan.hayward@arm.com>
19761 David Sherwood <david.sherwood@arm.com>
19763 * tree-vect-loop.c (vectorizable_induction): Treat the number
19764 of units as polynomial. Punt on SLP inductions. Use an integer
19765 VEC_SERIES_EXPR for variable-length integer reductions. Use a
19766 cast of such a series for variable-length floating-point
19769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19770 Alan Hayward <alan.hayward@arm.com>
19771 David Sherwood <david.sherwood@arm.com>
19773 * tree.h (build_index_vector): Declare.
19774 * tree.c (build_index_vector): New function.
19775 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19776 of units as polynomial, forcibly converting it to a constant if
19777 vectorizable_reduction has already enforced the condition.
19778 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
19779 to create a {1,2,3,...} vector.
19780 (vectorizable_reduction): Treat the number of units as polynomial.
19781 Choose vectype_in based on the largest scalar element size rather
19782 than the smallest number of units. Enforce the restrictions
19785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19786 Alan Hayward <alan.hayward@arm.com>
19787 David Sherwood <david.sherwood@arm.com>
19789 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19790 number of units as polynomial.
19792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19793 Alan Hayward <alan.hayward@arm.com>
19794 David Sherwood <david.sherwood@arm.com>
19796 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19797 * target.def (autovectorize_vector_sizes): Return the vector sizes
19798 by pointer, using vector_sizes rather than a bitmask.
19799 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19800 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19801 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19803 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19804 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19805 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19806 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19807 * omp-general.c (omp_max_vf): Likewise.
19808 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19809 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
19810 * tree-vect-loop.c (vect_analyze_loop): Likewise.
19811 * tree-vect-slp.c (vect_slp_bb): Likewise.
19812 * doc/tm.texi: Regenerate.
19813 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
19815 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
19816 the vector size as a poly_uint64 rather than an unsigned int.
19817 (current_vector_size): Change from an unsigned int to a poly_uint64.
19818 (get_vectype_for_scalar_type): Update accordingly.
19819 * tree.h (build_truth_vector_type): Take the size and number of
19820 units as a poly_uint64 rather than an unsigned int.
19821 (build_vector_type): Add a temporary overload that takes
19822 the number of units as a poly_uint64 rather than an unsigned int.
19823 * tree.c (make_vector_type): Likewise.
19824 (build_truth_vector_type): Take the number of units as a poly_uint64
19825 rather than an unsigned int.
19827 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19828 Alan Hayward <alan.hayward@arm.com>
19829 David Sherwood <david.sherwood@arm.com>
19831 * target.def (get_mask_mode): Take the number of units and length
19832 as poly_uint64s rather than unsigned ints.
19833 * targhooks.h (default_get_mask_mode): Update accordingly.
19834 * targhooks.c (default_get_mask_mode): Likewise.
19835 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
19836 * doc/tm.texi: Regenerate.
19838 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19839 Alan Hayward <alan.hayward@arm.com>
19840 David Sherwood <david.sherwood@arm.com>
19842 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
19843 * omp-general.c (omp_max_vf): Likewise.
19844 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
19845 (expand_omp_simd): Handle polynomial safelen.
19846 * omp-low.c (omplow_simd_context): Add a default constructor.
19847 (omplow_simd_context::max_vf): Change from int to poly_uint64.
19848 (lower_rec_simd_input_clauses): Update accordingly.
19849 (lower_rec_input_clauses): Likewise.
19851 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19852 Alan Hayward <alan.hayward@arm.com>
19853 David Sherwood <david.sherwood@arm.com>
19855 * tree-vectorizer.h (vect_nunits_for_cost): New function.
19856 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
19857 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
19858 (vect_analyze_slp_cost): Likewise.
19859 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
19860 (vect_model_load_cost): Likewise.
19862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19863 Alan Hayward <alan.hayward@arm.com>
19864 David Sherwood <david.sherwood@arm.com>
19866 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
19867 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
19868 from an unsigned int * to a poly_uint64_pod *.
19869 (calculate_unrolling_factor): New function.
19870 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
19872 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19873 Alan Hayward <alan.hayward@arm.com>
19874 David Sherwood <david.sherwood@arm.com>
19876 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
19877 from an unsigned int to a poly_uint64.
19878 (_loop_vec_info::slp_unrolling_factor): Likewise.
19879 (_loop_vec_info::vectorization_factor): Change from an int
19881 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
19882 (vect_get_num_vectors): New function.
19883 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
19884 (vect_get_num_copies): Use vect_get_num_vectors.
19885 (vect_analyze_data_ref_dependences): Change max_vf from an int *
19886 to an unsigned int *.
19887 (vect_analyze_data_refs): Change min_vf from an int * to a
19889 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19890 than an unsigned HOST_WIDE_INT.
19891 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
19892 (vect_analyze_data_ref_dependence): Change max_vf from an int *
19893 to an unsigned int *.
19894 (vect_analyze_data_ref_dependences): Likewise.
19895 (vect_compute_data_ref_alignment): Handle polynomial vf.
19896 (vect_enhance_data_refs_alignment): Likewise.
19897 (vect_prune_runtime_alias_test_list): Likewise.
19898 (vect_shift_permute_load_chain): Likewise.
19899 (vect_supportable_dr_alignment): Likewise.
19900 (dependence_distance_ge_vf): Take the vectorization factor as a
19901 poly_uint64 rather than an unsigned HOST_WIDE_INT.
19902 (vect_analyze_data_refs): Change min_vf from an int * to a
19904 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
19905 vfm1 as a poly_uint64 rather than an int. Make the same change
19906 for the returned bound_scalar.
19907 (vect_gen_vector_loop_niters): Handle polynomial vf.
19908 (vect_do_peeling): Likewise. Update call to
19909 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
19910 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
19912 * tree-vect-loop.c (vect_determine_vectorization_factor)
19913 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
19914 (vect_get_known_peeling_cost): Likewise.
19915 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
19916 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
19917 (vect_transform_loop): Likewise. Use the lowest possible VF when
19918 updating the upper bounds of the loop.
19919 (vect_min_worthwhile_factor): Make static. Return an unsigned int
19920 rather than an int.
19921 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
19922 polynomial unroll factors.
19923 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
19924 (vect_make_slp_decision): Likewise.
19925 (vect_supported_load_permutation_p): Likewise, and polynomial
19927 (vect_analyze_slp_cost): Handle polynomial vf.
19928 (vect_slp_analyze_node_operations): Likewise.
19929 (vect_slp_analyze_bb_1): Likewise.
19930 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19931 than an unsigned HOST_WIDE_INT.
19932 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
19933 (vectorizable_load): Handle polynomial vf.
19934 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
19936 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
19938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19939 Alan Hayward <alan.hayward@arm.com>
19940 David Sherwood <david.sherwood@arm.com>
19942 * match.pd: Handle bit operations involving three constants
19943 and try to fold one pair.
19945 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19947 * tree-vect-loop-manip.c: Include gimple-fold.h.
19948 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
19949 niters_maybe_zero parameters. Handle other cases besides a step of 1.
19950 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
19951 Add a path that uses a step of VF instead of 1, but disable it
19953 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
19954 and niters_no_overflow parameters. Update calls to
19955 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
19956 Create a new SSA name if the latter choses to use a ste other
19957 than zero, and return it via niters_vector_mult_vf_var.
19958 * tree-vect-loop.c (vect_transform_loop): Update calls to
19959 vect_do_peeling, vect_gen_vector_loop_niters and
19960 slpeel_make_loop_iterate_ntimes.
19961 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
19962 (vect_gen_vector_loop_niters): Update declarations after above changes.
19964 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
19966 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
19967 128-bit round to integer instructions.
19968 (ceil<mode>2): Likewise.
19969 (btrunc<mode>2): Likewise.
19970 (round<mode>2): Likewise.
19972 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19974 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
19975 unaligned VSX load/store on P8/P9.
19976 (expand_block_clear): Allow the use of unaligned VSX
19977 load/store on P8/P9.
19979 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19981 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
19983 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
19984 swap associated with both a load and a store.
19986 2018-01-02 Andrew Waterman <andrew@sifive.com>
19988 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
19989 * config/riscv/riscv.md (clear_cache): Use it.
19991 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
19993 * web.c: Remove out-of-date comment.
19995 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19997 * expr.c (fixup_args_size_notes): Check that any existing
19998 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
19999 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20000 (emit_single_push_insn): ...here.
20002 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20004 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20005 (const_vector_encoded_nelts): New function.
20006 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20007 (const_vector_int_elt, const_vector_elt): Declare.
20008 * emit-rtl.c (const_vector_int_elt_1): New function.
20009 (const_vector_elt): Likewise.
20010 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20011 of CONST_VECTOR_ELT.
20013 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20015 * expr.c: Include rtx-vector-builder.h.
20016 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20017 directly on the tree encoding.
20018 (const_vector_from_tree): Likewise.
20019 * optabs.c: Include rtx-vector-builder.h.
20020 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20021 sequence of "u" values.
20022 * vec-perm-indices.c: Include rtx-vector-builder.h.
20023 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20024 directly on the vec_perm_indices encoding.
20026 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20028 * doc/rtl.texi (const_vector): Describe new encoding scheme.
20029 * Makefile.in (OBJS): Add rtx-vector-builder.o.
20030 * rtx-vector-builder.h: New file.
20031 * rtx-vector-builder.c: Likewise.
20032 * rtl.h (rtx_def::u2): Add a const_vector field.
20033 (CONST_VECTOR_NPATTERNS): New macro.
20034 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20035 (CONST_VECTOR_DUPLICATE_P): Likewise.
20036 (CONST_VECTOR_STEPPED_P): Likewise.
20037 (CONST_VECTOR_ENCODED_ELT): Likewise.
20038 (const_vec_duplicate_p): Check for a duplicated vector encoding.
20039 (unwrap_const_vec_duplicate): Likewise.
20040 (const_vec_series_p): Check for a non-duplicated vector encoding.
20041 Say that the function only returns true for integer vectors.
20042 * emit-rtl.c: Include rtx-vector-builder.h.
20043 (gen_const_vec_duplicate_1): Delete.
20044 (gen_const_vector): Call gen_const_vec_duplicate instead of
20045 gen_const_vec_duplicate_1.
20046 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20047 (gen_const_vec_duplicate): Use rtx_vector_builder.
20048 (gen_const_vec_series): Likewise.
20049 (gen_rtx_CONST_VECTOR): Likewise.
20050 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20051 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20052 Build a new vector rather than modifying a CONST_VECTOR in-place.
20053 (handle_special_swappables): Update call accordingly.
20054 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20055 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20056 Build a new vector rather than modifying a CONST_VECTOR in-place.
20057 (handle_special_swappables): Update call accordingly.
20059 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20061 * simplify-rtx.c (simplify_const_binary_operation): Use
20062 CONST_VECTOR_ELT instead of XVECEXP.
20064 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20066 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20067 the selector elements to be different from the data elements
20068 if the selector is a VECTOR_CST.
20069 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20070 ssizetype for the selector.
20072 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20074 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20075 before testing each element individually.
20076 * tree-vect-generic.c (lower_vec_perm): Likewise.
20078 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20080 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20081 * selftest-run-tests.c (selftest::run_tests): Call it.
20082 * vector-builder.h (vector_builder::operator ==): New function.
20083 (vector_builder::operator !=): Likewise.
20084 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20085 (vec_perm_indices::all_from_input_p): New function.
20086 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20087 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20088 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20089 instead of reading the VECTOR_CST directly. Detect whether both
20090 vector inputs are the same before constructing the vec_perm_indices,
20091 and update the number of inputs argument accordingly. Use the
20092 utility functions added above. Only construct sel2 if we need to.
20094 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20096 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20097 the broadcast of the low byte.
20098 (expand_mult_highpart): Use an explicit encoding for the permutes.
20099 * optabs-query.c (can_mult_highpart_p): Likewise.
20100 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20101 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20102 (vectorizable_bswap): Likewise.
20103 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20104 explicit encoding for the power-of-2 permutes.
20105 (vect_permute_store_chain): Likewise.
20106 (vect_grouped_load_supported): Likewise.
20107 (vect_permute_load_chain): Likewise.
20109 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20111 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20112 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20113 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20114 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20115 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20116 (vect_gen_perm_mask_any): Likewise.
20118 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20120 * int-vector-builder.h: New file.
20121 * vec-perm-indices.h: Include int-vector-builder.h.
20122 (vec_perm_indices): Redefine as an int_vector_builder.
20123 (auto_vec_perm_indices): Delete.
20124 (vec_perm_builder): Redefine as a stand-alone class.
20125 (vec_perm_indices::vec_perm_indices): New function.
20126 (vec_perm_indices::clamp): Likewise.
20127 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20128 (vec_perm_indices::new_vector): New function.
20129 (vec_perm_indices::new_expanded_vector): Update for new
20130 vec_perm_indices class.
20131 (vec_perm_indices::rotate_inputs): New function.
20132 (vec_perm_indices::all_in_range_p): Operate directly on the
20133 encoded form, without computing elided elements.
20134 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20135 encoding. Update for new vec_perm_indices class.
20136 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20137 the given vec_perm_builder.
20138 (expand_vec_perm_var): Update vec_perm_builder constructor.
20139 (expand_mult_highpart): Use vec_perm_builder instead of
20140 auto_vec_perm_indices.
20141 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20142 vec_perm_indices instead of auto_vec_perm_indices. Use a single
20143 or double series encoding as appropriate.
20144 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20145 vec_perm_indices instead of auto_vec_perm_indices.
20146 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20147 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20148 (vect_permute_store_chain): Likewise.
20149 (vect_grouped_load_supported): Likewise.
20150 (vect_permute_load_chain): Likewise.
20151 (vect_shift_permute_load_chain): Likewise.
20152 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20153 (vect_transform_slp_perm_load): Likewise.
20154 (vect_schedule_slp_instance): Likewise.
20155 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20156 (vectorizable_mask_load_store): Likewise.
20157 (vectorizable_bswap): Likewise.
20158 (vectorizable_store): Likewise.
20159 (vectorizable_load): Likewise.
20160 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20161 vec_perm_indices instead of auto_vec_perm_indices. Use
20162 tree_to_vec_perm_builder to read the vector from a tree.
20163 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20164 vec_perm_builder instead of a vec_perm_indices.
20165 (have_whole_vector_shift): Use vec_perm_builder and
20166 vec_perm_indices instead of auto_vec_perm_indices. Leave the
20167 truncation to calc_vec_perm_mask_for_shift.
20168 (vect_create_epilog_for_reduction): Likewise.
20169 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20170 from auto_vec_perm_indices to vec_perm_indices.
20171 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20172 instead of changing individual elements.
20173 (aarch64_vectorize_vec_perm_const): Use new_vector to install
20174 the vector in d.perm.
20175 * config/arm/arm.c (expand_vec_perm_d::perm): Change
20176 from auto_vec_perm_indices to vec_perm_indices.
20177 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20178 instead of changing individual elements.
20179 (arm_vectorize_vec_perm_const): Use new_vector to install
20180 the vector in d.perm.
20181 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20182 Update vec_perm_builder constructor.
20183 (rs6000_expand_interleave): Likewise.
20184 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20185 (rs6000_expand_interleave): Likewise.
20187 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20189 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20190 to qimode could truncate the indices.
20191 * optabs.c (expand_vec_perm_var): Likewise.
20193 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20195 * Makefile.in (OBJS): Add vec-perm-indices.o.
20196 * vec-perm-indices.h: New file.
20197 * vec-perm-indices.c: Likewise.
20198 * target.h (vec_perm_indices): Replace with a forward class
20200 (auto_vec_perm_indices): Move to vec-perm-indices.h.
20201 * optabs.h: Include vec-perm-indices.h.
20202 (expand_vec_perm): Delete.
20203 (selector_fits_mode_p, expand_vec_perm_var): Declare.
20204 (expand_vec_perm_const): Declare.
20205 * target.def (vec_perm_const_ok): Replace with...
20206 (vec_perm_const): ...this new hook.
20207 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20208 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20209 * doc/tm.texi: Regenerate.
20210 * optabs.def (vec_perm_const): Delete.
20211 * doc/md.texi (vec_perm_const): Likewise.
20212 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20213 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20214 expand_vec_perm for constant permutation vectors. Assert that
20215 the mode of variable permutation vectors is the integer equivalent
20216 of the mode that is being permuted.
20217 * optabs-query.h (selector_fits_mode_p): Declare.
20218 * optabs-query.c: Include vec-perm-indices.h.
20219 (selector_fits_mode_p): New function.
20220 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20221 is defined, instead of checking whether the vec_perm_const_optab
20222 exists. Use targetm.vectorize.vec_perm_const instead of
20223 targetm.vectorize.vec_perm_const_ok. Check whether the indices
20224 fit in the vector mode before using a variable permute.
20225 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20226 vec_perm_indices instead of an rtx.
20227 (expand_vec_perm): Replace with...
20228 (expand_vec_perm_const): ...this new function. Take the selector
20229 as a vec_perm_indices rather than an rtx. Also take the mode of
20230 the selector. Update call to shift_amt_for_vec_perm_mask.
20231 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20232 Use vec_perm_indices::new_expanded_vector to expand the original
20233 selector into bytes. Check whether the indices fit in the vector
20234 mode before using a variable permute.
20235 (expand_vec_perm_var): Make global.
20236 (expand_mult_highpart): Use expand_vec_perm_const.
20237 * fold-const.c: Includes vec-perm-indices.h.
20238 * tree-ssa-forwprop.c: Likewise.
20239 * tree-vect-data-refs.c: Likewise.
20240 * tree-vect-generic.c: Likewise.
20241 * tree-vect-loop.c: Likewise.
20242 * tree-vect-slp.c: Likewise.
20243 * tree-vect-stmts.c: Likewise.
20244 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20246 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20247 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20248 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20249 (aarch64_vectorize_vec_perm_const): ...this new function.
20250 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20251 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20252 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20253 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20254 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20255 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20256 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20258 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
20259 check for NEON modes.
20260 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20261 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20262 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20263 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20265 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
20266 the old VEC_PERM_CONST conditions.
20267 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20268 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20269 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20270 (ia64_vectorize_vec_perm_const_ok): Merge into...
20271 (ia64_vectorize_vec_perm_const): ...this new function.
20272 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20273 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20274 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20275 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20276 * config/mips/mips.c (mips_expand_vec_perm_const)
20277 (mips_vectorize_vec_perm_const_ok): Merge into...
20278 (mips_vectorize_vec_perm_const): ...this new function.
20279 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20280 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20281 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20282 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20283 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20284 (rs6000_expand_vec_perm_const): Delete.
20285 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20287 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20288 (altivec_expand_vec_perm_const_le): Take each operand individually.
20289 Operate on constant selectors rather than rtxes.
20290 (altivec_expand_vec_perm_const): Likewise. Update call to
20291 altivec_expand_vec_perm_const_le.
20292 (rs6000_expand_vec_perm_const): Delete.
20293 (rs6000_vectorize_vec_perm_const_ok): Delete.
20294 (rs6000_vectorize_vec_perm_const): New function.
20295 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20296 an element count and rtx array.
20297 (rs6000_expand_extract_even): Update call accordingly.
20298 (rs6000_expand_interleave): Likewise.
20299 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20300 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20301 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20302 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20303 (rs6000_expand_vec_perm_const): Delete.
20304 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20305 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20306 (altivec_expand_vec_perm_const_le): Take each operand individually.
20307 Operate on constant selectors rather than rtxes.
20308 (altivec_expand_vec_perm_const): Likewise. Update call to
20309 altivec_expand_vec_perm_const_le.
20310 (rs6000_expand_vec_perm_const): Delete.
20311 (rs6000_vectorize_vec_perm_const_ok): Delete.
20312 (rs6000_vectorize_vec_perm_const): New function. Remove stray
20313 reference to the SPE evmerge intructions.
20314 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20315 an element count and rtx array.
20316 (rs6000_expand_extract_even): Update call accordingly.
20317 (rs6000_expand_interleave): Likewise.
20318 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20319 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20321 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20323 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20325 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20326 vector mode and that that mode matches the mode of the data
20328 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20329 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
20330 directly using expand_vec_perm_1 when forcing selectors into
20332 (expand_vec_perm_var): New function, split out from expand_vec_perm.
20334 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20336 * optabs-query.h (can_vec_perm_p): Delete.
20337 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20338 * optabs-query.c (can_vec_perm_p): Split into...
20339 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20340 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20341 particular selector is valid.
20342 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20343 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20344 (vect_grouped_load_supported): Likewise.
20345 (vect_shift_permute_load_chain): Likewise.
20346 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20347 (vect_transform_slp_perm_load): Likewise.
20348 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20349 (vectorizable_bswap): Likewise.
20350 (vect_gen_perm_mask_checked): Likewise.
20351 * fold-const.c (fold_ternary_loc): Likewise. Don't take
20352 implementations of variable permutation vectors into account
20353 when deciding which selector to use.
20354 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20355 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20356 with a false third argument.
20357 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20358 to test whether the constant selector is valid and can_vec_perm_var_p
20359 to test whether a variable selector is valid.
20361 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20363 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20364 * optabs-query.c (can_vec_perm_p): Likewise.
20365 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20366 instead of vec_perm_indices.
20367 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20368 (vect_gen_perm_mask_checked): Likewise,
20369 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20370 (vect_gen_perm_mask_checked): Likewise,
20372 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20374 * optabs-query.h (qimode_for_vec_perm): Declare.
20375 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20376 (qimode_for_vec_perm): ...this new function.
20377 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20379 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20381 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20382 does not have a conditional at the top.
20384 2018-01-02 Richard Biener <rguenther@suse.de>
20386 * ipa-inline.c (big_speedup_p): Fix expression.
20388 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20391 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20394 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20398 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20399 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20400 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20401 cond_taken_branch_cost 3->4.
20403 2018-01-01 Jakub Jelinek <jakub@redhat.com>
20405 PR tree-optimization/83581
20406 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20407 TODO_cleanup_cfg if any changes have been made.
20409 PR middle-end/83608
20410 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20411 convert_modes if target mode has the right side, but different mode
20414 PR middle-end/83609
20415 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20416 last argument when extracting from CONCAT. If either from_real or
20417 from_imag is NULL, use expansion through memory. If result is not
20418 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20419 the parts directly to inner mode, if even that fails, use expansion
20422 PR middle-end/83623
20423 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20424 check for bswap in mode rather than HImode and use that in expand_unop
20427 Copyright (C) 2018 Free Software Foundation, Inc.
20429 Copying and distribution of this file, with or without modification,
20430 are permitted in any medium without royalty provided the copyright
20431 notice and this notice are preserved.