1 2018-07-19 Martin Sebor <msebor@redhat.com>
3 * align.h (align_flags): Use member initialization.
5 2018-07-19 David Malcolm <dmalcolm@redhat.com>
7 * Makefile.in (OBJS): Add optinfo.o.
8 * coretypes.h (class symtab_node): New forward decl.
9 (struct cgraph_node): New forward decl.
10 (class varpool_node): New forward decl.
11 * dump-context.h: New file.
12 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
14 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
15 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
16 (set_alt_dump_file): Likewise.
17 (dump_context::~dump_context): New dtor.
18 (dump_gimple_stmt): Move implementation to...
19 (dump_context::dump_gimple_stmt): ...this new member function.
20 Add the stmt to any pending optinfo, creating one if need be.
21 (dump_gimple_stmt_loc): Move implementation to...
22 (dump_context::dump_gimple_stmt_loc): ...this new member function.
23 Start a new optinfo and add the stmt to it.
24 (dump_gimple_expr): Move implementation to...
25 (dump_context::dump_gimple_expr): ...this new member function.
26 Add the stmt to any pending optinfo, creating one if need be.
27 (dump_gimple_expr_loc): Move implementation to...
28 (dump_context::dump_gimple_expr_loc): ...this new member function.
29 Start a new optinfo and add the stmt to it.
30 (dump_generic_expr): Move implementation to...
31 (dump_context::dump_generic_expr): ...this new member function.
32 Add the tree to any pending optinfo, creating one if need be.
33 (dump_generic_expr_loc): Move implementation to...
34 (dump_context::dump_generic_expr_loc): ...this new member
35 function. Add the tree to any pending optinfo, creating one if
37 (dump_printf): Move implementation to...
38 (dump_context::dump_printf_va): ...this new member function. Add
39 the text to any pending optinfo, creating one if need be.
40 (dump_printf_loc): Move implementation to...
41 (dump_context::dump_printf_loc_va): ...this new member function.
42 Start a new optinfo and add the stmt to it.
43 (dump_dec): Move implementation to...
44 (dump_context::dump_dec): ...this new member function. Add the
45 value to any pending optinfo, creating one if need be.
46 (dump_context::dump_symtab_node): New member function.
47 (dump_context::get_scope_depth): New member function.
48 (dump_context::begin_scope): New member function.
49 (dump_context::end_scope): New member function.
50 (dump_context::ensure_pending_optinfo): New member function.
51 (dump_context::begin_next_optinfo): New member function.
52 (dump_context::end_any_optinfo): New member function.
53 (dump_context::s_current): New global.
54 (dump_context::s_default): New global.
55 (dump_scope_depth): Delete global.
56 (dumpfile_ensure_any_optinfo_are_flushed): New function.
57 (dump_symtab_node): New function.
58 (get_dump_scope_depth): Reimplement in terms of dump_context.
59 (dump_begin_scope): Likewise.
60 (dump_end_scope): Likewise.
61 (selftest::temp_dump_context::temp_dump_context): New ctor.
62 (selftest::temp_dump_context::~temp_dump_context): New dtor.
63 (selftest::verify_item): New function.
64 (ASSERT_IS_TEXT): New macro.
65 (ASSERT_IS_TREE): New macro.
66 (ASSERT_IS_GIMPLE): New macro.
67 (selftest::test_capture_of_dump_calls): New test.
68 (selftest::dumpfile_c_tests): Call it.
69 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
70 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
71 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
73 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
74 (dump_node, dump_bb): Move these unrelated decls.
75 (class dump_manager): Add leading comment.
76 * optinfo.cc: New file.
77 * optinfo.h: New file.
79 2018-07-19 Michael Collison <michael.collison@arm.com>
80 Richard Henderson <rth@redhat.com>
82 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
83 (subti): Handle op1 zero.
84 (subvti4, usub4ti4): New.
85 (*sub<GPI>3_compare1_imm): New.
86 (sub<GPI>3_carryinCV): New.
87 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
88 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
90 2018-07-19 Michael Collison <michael.collison@arm.com>
91 Richard Henderson <rth@redhat.com>
93 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
94 (addti3): Create simpler code if low part is already known to be 0.
95 (addvti4, uaddvti4): New.
96 (*add<GPI>3_compareC_cconly_imm): New.
97 (*add<GPI>3_compareC_cconly): New.
98 (*add<GPI>3_compareC_imm): New.
99 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
100 handle constants within this pattern..
101 (*add<GPI>3_compareV_cconly_imm): New.
102 (*add<GPI>3_compareV_cconly): New.
103 (*add<GPI>3_compareV_imm): New.
104 (add<GPI>3_compareV): New.
105 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
106 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
107 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
108 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
109 with 'comparison' operator.
110 (*add<GPI>3_compareV_cconly_imm): Ditto.
111 (*add<GPI>3_compareV_cconly): Ditto.
112 (*add<GPI>3_compareV_imm): Ditto.
113 (add<GPI>3_compareV): Ditto.
114 (add<mode>3_carryinC): Ditto.
115 (*add<mode>3_carryinC_zero): Ditto.
116 (*add<mode>3_carryinC): Ditto.
117 (add<mode>3_carryinV): Ditto.
118 (*add<mode>3_carryinV_zero): Ditto.
119 (*add<mode>3_carryinV): Ditto.
121 2018-07-19 Michael Collison <michael.collison@arm.com>
122 Richard Henderson <rth@redhat.com>
124 * config/aarch64/aarch64-modes.def (CC_V): New.
125 * config/aarch64/aarch64-protos.h
126 (aarch64_addti_scratch_regs): Declare
127 (aarch64_subvti_scratch_regs): Declare.
128 (aarch64_expand_subvti): Declare.
129 (aarch64_gen_unlikely_cbranch): Declare
130 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
131 for signed overflow using CC_Vmode.
132 (aarch64_get_condition_code_1): Handle CC_Vmode.
133 (aarch64_gen_unlikely_cbranch): New function.
134 (aarch64_addti_scratch_regs): New function.
135 (aarch64_subvti_scratch_regs): New function.
136 (aarch64_expand_subvti): New function.
138 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
140 * config/aarch64/aarch64-option-extensions.def: New entry for profile
142 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
143 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
146 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
149 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
150 address check not strict.
152 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
154 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
156 (store_pair_lanes<mode>): Likewise.
157 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
158 enum value 'ADDR_QUERY_LDP_STP_N'.
159 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
160 (aarch64_print_address_internal): Add declaration.
161 (aarch64_print_ldpstp_address): Remove.
162 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
163 (aarch64_print_operand): Change printing of 'y'.
164 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
165 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
166 'true' rather than '1'.
167 * gcc/config/aarch64/constraints.md (Uml): Likewise.
168 (Uml): Rename to Umn.
171 2018-07-19 Richard Biener <rguenther@suse.de>
173 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
175 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
176 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
177 (vn_reference_hasher): Likewise.
178 (struct vn_tables_s): Remove obstack and alloc-pool members.
179 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
180 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
181 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
182 (vn_reference_insert_pieces): Likewise.
183 (alloc_vn_nary_op_noinit): Adjust.
184 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
186 (shared_lookup_phiargs): Remove.
187 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
188 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
189 (visit_reference_op_call): Likewise.
190 (copy_nary, copy_phi, copy_reference): Remove.
191 (process_scc): Rewind the obstack when iterating. Do not
192 copy the elements to valid_info but just move them from one
193 hashtable to the other.
194 (allocate_vn_table): Adjust.
195 (free_vn_table): Likewise.
196 (init_scc_vn): Likewise.
197 (free_scc_vn): Likewise.
199 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
202 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
203 indirect_return as function type attribute.
204 (ix86_attribute_table): Change indirect_return to function
206 * doc/extend.texi: Update indirect_return attribute.
208 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
210 * wide-int.h (widest2_int): New.
211 * gimple-fold.c (arith_overflowed_p): Use it.
212 * tree.h (widest2_int_cst): New.
213 * tree-vrp.c (wide_int_binop_overflow): Rename from
215 Rewrite to work on trees.
216 (extract_range_from_multiplicative_op_1): Abstract code to...
217 (wide_int_range_min_max): ...here.
218 (wide_int_range_cross_product): ...and here.
219 (extract_range_from_binary_expr_1): Abstract overflow code to...
220 (wide_int_range_mult_wrapping): ...here.
221 * tree-vrp.h (wide_int_range_cross_product): New.
222 (wide_int_range_mult_wrapping): New.
224 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
225 Julia Koval <julia.koval@intel.com>
227 * config/i386/x86-tune-costs.h (skylake_memcpy,
228 skylake_memset): Replace rep_prefix with unrolling for size 512.
230 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
233 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
236 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
238 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
239 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
240 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
241 previously known as "PowerPC AltiVec Built-in Functions". Move
242 some material to new subsubsections "PowerPC AltiVec Built-in
243 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
245 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
246 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
247 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
248 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
250 2018-07-18 Richard Biener <rguenther@suse.de>
252 PR tree-optimization/86557
253 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
256 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
258 * config/s390/s390.c (s390_function_profiler): Generate CFI.
260 2018-07-17 Jeff Law <law@redhat.com>
262 * config/arm/arm.c (get_label_padding): Update for recent
263 changes to label_to_alignment.
265 PR tree-optimization/86010
266 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
268 * config/mips/mips.c (vr4130_align_insns): Update for recent
269 changes to label_to_alignment.
271 * config/frv/frv.c (frv_label_align): Update for recent changes
272 to label_to_alignment.
274 * config/nios2/nios2.c (nios2_label_align): Update for recent
275 changes which dropped ALIGN_LABELS_LOG.
277 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
279 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
280 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
282 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
284 * config/arc/arc.c (arc_label_align): Use align_labels instead of
285 deprecated align_labels_log.
287 2018-07-17 Richard Biener <rguenther@suse.de>
290 * dwarf2out.c (init_sections_and_labels): Always generate
291 a debug_line_str_section for early LTO debug.
292 (dwarf2out_finish): Reset debug_line_str_hash output early.
293 Bump counter for extra dwarf5 .debug_loc labels to not conflict
295 (dwarf2out_early_finish): Output debug_line_str.
297 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
299 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
300 index register on z196 or later.
302 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
304 * config/s390/s390.c (s390_default_align): Set default function
306 (s390_override_options_after_change): Call s390_default align.
307 (s390_option_override_internal): Call s390_default_align.
308 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
310 2018-07-17 Jakub Jelinek <jakub@redhat.com>
313 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
314 to _looptemp_ clauses, other than the first two.
316 2018-07-17 Martin Liska <mliska@suse.cz>
318 * opts.c: Do not enable OPT_falign_* for -Os.
320 2018-07-17 Martin Liska <mliska@suse.cz>
322 * align.h (MAX_CODE_ALIGN): New.
323 (MAX_CODE_ALIGN_VALUE): New.
324 * common/config/i386/i386-common.c (ix86_handle_option):
325 (MAX_CODE_ALIGN): Moved to align.h.
326 * final.c (MAX_CODE_ALIGN): Likewise.
327 * opts.c (parse_and_check_align_values):
328 (MAX_CODE_ALIGN): Likewise.
329 (MAX_CODE_ALIGN_VALUE): Likewise.
331 2018-07-17 Martin Liska <mliska@suse.cz>
333 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
334 in order to fulfil coding style.
335 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
336 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
337 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
338 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
339 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
340 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
341 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
342 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
343 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
345 2018-07-17 Martin Liska <mliska@suse.cz>
348 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
349 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
350 align_flags of label_to_alignment.
351 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
353 * config/m68k/m68k.c: Do not use removed align_labels_value and
355 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
356 (LOOP_ALIGN): Likewise.
357 (LABEL_ALIGN): Likewise.
358 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
359 Remove not used macro.
360 (rs6000_loop_align): Change return type to align_flags.
361 (rs6000_loop_align_max_skip): Remove.
362 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
363 Change return type to align_flags.
364 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
365 Remove not used macro.
366 (rs6000_loop_align): Change return type to align_flags.
367 (rs6000_loop_align_max_skip): Remove.
368 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
369 * config/rx/rx-protos.h (rx_align_for_label): Make it
371 * config/rx/rx.c (rx_align_for_label): Change return type
373 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
375 into align_flags class.
376 (LABEL_ALIGN): Likewise.
377 (LOOP_ALIGN): Likewise.
378 * config/s390/s390.c (s390_label_align): Use align_flags
380 (s390_asm_output_function_label): Likewise.
381 * config/sh/sh.c (sh_override_options_after_change):
382 Use align_flags class directly without macros.
383 (find_barrier): Likewise.
384 (barrier_align): Likewise.
385 (sh_loop_align): Likewise.
386 * config/spu/spu.c (spu_option_override):
387 Use align_flags_tuple::get_value instead of removed macros.
388 (spu_sched_init): Likewise.
389 * config/spu/spu.h (GTY): Likewise.
390 * config/visium/visium.c (visium_option_override):
391 Set "8" as default secondary alignment.
392 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
393 in order to guarantee secondary alignment of 8.
394 * coretypes.h: Include align.h header file.
395 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
396 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
397 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
398 * doc/tm.texi.in: Likewise.
399 * final.c (struct label_alignment): Remove not used structure.
400 (LABEL_ALIGN): Change type to align_flags.
401 (LOOP_ALIGN): Likewise.
402 (JUMP_ALIGN): Likewise.
403 (default_loop_align_max_skip): Remove.
404 (default_label_align_max_skip): Likewise.
405 (default_jump_align_max_skip): Likewise.
406 (default_label_align_after_barrier_max_skip):
407 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
408 (LABEL_TO_MAX_SKIP): Remove.
409 (label_to_alignment): Return align_flags type instead of integer.
410 (label_to_max_skip): Remove.
411 (align_fuzz): Use align_flags type.
412 (compute_alignments): Use align_flags type and use align_flags::max
413 to combine multiple alignments.
414 (grow_label_align): Grow vec instead of C array.
415 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
416 (shorten_branches): Use align_flags type and use align_flags::max
417 to combine multiple alignments.
418 (final_scan_insn_1): Remove usage of secondary alignment that comes
419 from label alignment, but instead use proper secondary alignment
420 which is computed in grow_label_align.
421 * flags.h (struct align_flags_tuple): Move to align.h.
422 (struct align_flags): Likewise.
423 (state_align_loops): Rename to align_loops.
424 (state_align_jumps): Rename to align_jumps.
425 (state_align_labels): Rename to align_labels.
426 (state_align_functions): Rename to align_functions.
427 (align_loops_log): Remove.
428 (align_jumps_log): Remove.
429 (align_labels_log): Remove.
430 (align_functions_log): Remove.
431 (align_loops_max_skip): Remove.
432 (align_jumps_max_skip): Remove.
433 (align_labels_max_skip): Remove.
434 (align_functions_max_skip): Remove.
435 (align_loops_value): Remove.
436 (align_jumps_value): Remove.
437 (align_labels_value): Remove.
438 (align_functions_value): Remove.
439 * output.h (label_to_alignment): Change return type to align_flags.
440 (label_to_max_skip): Remove.
441 * target.def: Remove loop_align_max_skip, label_align_max_skip,
442 jump_align_max_skip macros.
443 * targhooks.h (default_loop_align_max_skip): Remove.
444 (default_label_align_max_skip): Likewise.
445 (default_jump_align_max_skip): Likewise.
446 (default_label_align_after_barrier_max_skip): Remove.
447 * toplev.c (read_log_maxskip): Use ::normalize function.
448 (parse_N_M): Remove not used argument and also call ::normalize.
449 (parse_alignment_opts): Do not pass unused arguments.
450 * varasm.c (assemble_start_function): Use directly align_functions
451 instead of removed macros.
452 * system.h: Do not poison removed macros.
454 2018-07-17 Jakub Jelinek <jakub@redhat.com>
457 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
458 and cond temporaries don't have reference type if iterator has
459 pointer type. For init use &for_pre_body instead of pre_p if
460 for_pre_body is non-empty.
462 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
464 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
465 double-double modes to SFmode directly directly.
466 (trunc<mode>sf2_fprs): Delete.
468 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
470 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
471 for conversions between IFmode and the decimal floating point modes.
472 (init_float128_ieee): Use the correct names for conversions between
473 KFmode and the decimal floating point modes.
475 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
477 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
478 for the conversions between TDmode and IFmode.
479 (init_float128_ieee): Use more correct names for the conversions
480 between TDmode and KFmode.
482 2018-07-16 Jakub Jelinek <jakub@redhat.com>
484 PR tree-optimization/86526
485 * builtins.c (expand_builtin_memcmp): Formatting fixes.
486 (inline_expand_builtin_string_cmp): Likewise.
487 (inline_string_cmp): Likewise. Use c_readstr instead of
488 builtin_memcpy_read_str. Add unit_mode temporary.
490 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
493 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
494 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
496 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
498 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
499 Alphabetize prototypes of built-in functions, separating out
500 built-in functions that are listed in this section but should be
503 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
506 * expmed.c (emit_store_flag): Do not emit setcc followed by a
507 conditional move when trapping comparison was split to a
508 non-trapping one (and vice versa).
510 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
512 * config/s390/s390.c (s390_function_profiler): Generate nops
513 instead of profiler call sequences.
514 * config/s390/s390.opt: Add the new option.
516 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
518 * config/s390/s390.c (s390_function_profiler): Generate
519 __mcount_loc section.
520 * config/s390/s390.opt: Add the new option.
522 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
524 * common.opt: Add the new warning.
525 * config/s390/s390.c (s390_function_profiler): Emit "brasl
526 %r0,__fentry__" when -mfentry is specified.
527 (s390_option_override_internal): Disallow -mfentry for 31-bit
529 * config/s390/s390.opt: Add the new option.
531 2018-07-16 Richard Biener <rguenther@suse.de>
534 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
535 for function-local FUNCTION_DECL and RESULT_DECL immediately.
537 2018-07-16 Martin Liska <mliska@suse.cz>
540 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
543 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
545 * config/arc/arcHS.md: Update ARCHS scheduling rules.
547 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
549 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
551 * config/arc/arc-cpus.def (hs4x): New cpu.
553 * config/arc/arc-tables.opt: Regenerate.
554 * config/arc/arc.c (arc_sched_issue_rate): New function.
555 (TARGET_SCHED_ISSUE_RATE): Define.
556 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
557 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
559 (attr tune): Add ARCHS4x tune values.
560 (attr tune_dspmpy): Define.
561 (*tst): Correct instruction type.
562 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
563 * config/arc/arcHS4x.md: New file.
564 * config/arc/fpu.md: Update instruction type attributes.
565 * config/arc/t-multilib: Regenerate.
567 2018-07-16 Tom de Vries <tdevries@suse.de>
570 * var-tracking.c (vt_initialize): Fix pre_dec handling.
572 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
574 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
577 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
579 PR tree-optimization/86514
580 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
581 conversion to a boolean type from a type with greater precision.
583 2018-07-16 Tom de Vries <tdevries@suse.de>
585 * var-tracking.c (vt_initialize): Print adjusted insn slim if
586 dump_flags request TDF_SLIM.
588 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
590 * fold-const.c (int_const_binop_1): Abstract...
591 (wide_int_binop): ...wide int code here.
592 (poly_int_binop): ...poly int code here.
593 Abstract the rest of int_const_binop_1 into int_const_binop.
594 * fold-const.h (wide_int_binop): New.
595 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
596 Remove useless PLUS/MINUS_EXPR case.
597 (zero_nonzero_bits_from_vr): Move wide int code...
598 (zero_nonzero_bits_from_bounds): ...here.
599 (extract_range_from_binary_expr_1): Move mask optimization code...
600 (range_easy_mask_min_max): ...here.
601 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
602 (range_easy_mask_min_max): New.
604 2018-07-15 Jeff Law <law@redhat.com>
607 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
610 2018-07-14 Jim Wilson <jimw@sifive.com>
612 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
614 2018-07-14 Paul Koning <ni1d@arrl.net>
616 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
618 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
620 * lto-streamer-out.c (copy_function_or_variable): Dump info about
623 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
624 Steve Munroe <munroesj52@gmail.com>
626 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
627 (_mm_andnot_si128): Likewise.
628 (_mm_or_si128): Likewise.
629 (_mm_xor_si128): Likewise.
631 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
634 * builtins.c (expand_builtin_memcmp): Inline the calls first
635 when result_eq is false.
636 (expand_builtin_strcmp): Inline the calls first.
637 (expand_builtin_strncmp): Likewise.
638 (inline_string_cmp): New routine. Expand a string compare
639 call by using a sequence of char comparison.
640 (inline_expand_builtin_string_cmp): New routine. Inline expansion
641 a call to str(n)cmp/memcmp.
642 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
644 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
646 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
648 * config/arm/driver-arm.c: Include arm-native.h.
649 (host_detect_local_cpu): Use auto-generated data tables.
650 (vendors, arm_cpu_table): Delete. Move part information to ...
651 * config/arm/arm-cpus.in: ... here.
652 * config/arm/parsecpu.awk (gen_native): New function.
653 (vendor, part): New CPU fields.
654 (END): Add support for building the native CPU detection tables.
655 * config/arm/t-arm (arm-native.h): Add build rule.
656 (driver-arm.o): Add dependency on arm-native.h.
658 2018-07-13 Richard Biener <rguenther@suse.de>
661 * match.pd (addr1 - addr2): Allow either of the operand to
664 2018-07-13 Tom de Vries <tdevries@suse.de>
666 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
669 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
671 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
672 arrays instead of numbered variables.
674 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
676 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
677 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
679 2018-07-13 Richard Biener <rguenther@suse.de>
682 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
683 instead of get_context_die.
685 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
686 Richard Biener <rguenther@suse.de>
689 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
690 that the loop latch destination where phi is defined.
692 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
694 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
695 (riscv_expand_epilogue): Add assertion to check interrupt mode.
696 (riscv_set_current_function): Extract getting interrupt type to new
698 (riscv_get_interrupt_type): New function.
699 (riscv_merge_decl_attributes): New function, checking interrupt type is
701 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
703 2018-07-12 Paul Koning <ni1d@arrl.net>
705 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
708 2018-07-12 Paul Koning <ni1d@arrl.net>
710 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
711 zero reference, add doloop_end instead.
712 * doc/md.texi (decrement_and_branch_until_zero): Remove.
713 (Looping patterns): Remove decrement_and_branch_until_zero. Add
714 detail for doloop_end.
716 2018-07-12 Martin Sebor <msebor@redhat.com>
719 * attribs.c (decl_attributes): Reject conflicting attributes before
720 calling attribute handlers.
722 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
724 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
726 (gcc::dump_manager::get_dump_file_name): likewise.
727 (dump_begin): Likewise.
728 * dumpfile.h (dump_begin): Update prototype.
729 (gcc::dump_manager::get_dump_file_name,
730 gcc::dump_manager::get_dump_file_name): Update prototype.
732 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
734 * internal-fn.h (vectorizable_internal_fn_p): New function.
735 * tree-vect-slp.c (compatible_calls_p): Likewise.
736 (vect_build_slp_tree_1): Remove nops argument. Handle calls
737 to internal functions.
738 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
740 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
742 * fold-const.h (inverse_conditions_p): Declare.
743 * fold-const.c (inverse_conditions_p): New function.
744 * match.pd: Use inverse_conditions_p. Add folds of view_converts
745 that test the inverse condition of a conditional internal function.
746 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
747 * internal-fn.c (internal_fn_mask_index): Handle conditional
749 (vectorized_internal_fn_supported_p): New function.
750 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
751 (any_pred_load_store): Replace with...
752 (need_to_predicate): ...this new variable.
753 (redundant_ssa_names): New variable.
754 (ifcvt_can_use_mask_load_store): Move initial checks to...
755 (ifcvt_can_predicate): ...this new function. Handle tree codes
756 for which a conditional internal function exists.
757 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
758 instead of ifcvt_can_use_mask_load_store. Update after variable
760 (predicate_load_or_store): New function, split out from
761 predicate_mem_writes.
762 (check_redundant_cond_expr): New function.
763 (value_available_p): Likewise.
764 (predicate_rhs_code): Likewise.
765 (predicate_mem_writes): Rename to...
766 (predicate_statements): ...this. Use predicate_load_or_store
767 and predicate_rhs_code.
768 (combine_blocks, tree_if_conversion): Update after above name changes.
769 (ifcvt_local_dce): Handle redundant_ssa_names.
770 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
771 general conditional functions.
772 * tree-vect-stmts.c (vectorizable_call): Likewise.
774 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
775 Alan Hayward <alan.hayward@arm.com>
776 David Sherwood <david.sherwood@arm.com>
778 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
779 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
780 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
781 plus and minus and convert them into IFN_COND_FMA-based sequences.
782 (convert_mult_to_fma): Handle conditional plus and minus.
784 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
786 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
787 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
788 (cond_fnms_optab): New optabs.
789 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
791 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
792 * internal-fn.h (get_conditional_internal_fn): Declare.
793 (get_unconditional_internal_fn): Likewise.
794 * internal-fn.c (cond_ternary_direct): New macro.
795 (expand_cond_ternary_optab_fn): Likewise.
796 (direct_cond_ternary_optab_supported_p): Likewise.
797 (FOR_EACH_COND_FN_PAIR): Likewise.
798 (get_conditional_internal_fn): New function.
799 (get_unconditional_internal_fn): Likewise.
800 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
801 (gimple_match_op::gimple_match_op): Add a new overload for 5
803 (gimple_match_op::set_op): Likewise.
804 (gimple_resimplify5): Declare.
805 * genmatch.c (decision_tree::gen): Generate simplifications for
807 * gimple-match-head.c (gimple_simplify): Define an overload for
808 5 operands. Handle calls with 5 arguments in the top-level overload.
809 (convert_conditional_op): Handle conversions from unconditional
810 internal functions to conditional ones.
811 (gimple_resimplify5): New function.
812 (build_call_internal): Pass a fifth operand.
813 (maybe_push_res_to_seq): Likewise.
814 (try_conditional_simplification): Try converting conditional
815 internal functions to unconditional internal functions.
816 Handle 3-operand unconditional forms.
817 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
818 Define ternary equivalents of the current rules for binary conditional
820 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
822 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
823 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
824 (optab): Handle them.
825 (SVE_COND_FP_TERNARY): New int iterator.
826 (sve_fmla_op, sve_fmad_op): New int attributes.
827 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
828 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
829 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
831 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
833 * target.def (preferred_else_value): New target hook.
834 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
835 * doc/tm.texi: Regenerate.
836 * targhooks.h (default_preferred_else_value): Declare.
837 * targhooks.c (default_preferred_else_value): New function.
838 * internal-fn.h (conditional_internal_fn_code): Declare.
839 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
840 (get_conditional_internal_fn): Use it.
841 (conditional_internal_fn_code): New function.
842 * gimple-match.h (gimple_match_cond): New struct.
843 (gimple_match_op): Add a cond member function.
844 (gimple_match_op::gimple_match_op): Update all forms to take a
846 * genmatch.c (expr::gen_transform): Use the same condition as res_op
847 for the suboperation, but don't specify a particular else_value.
848 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
849 (visit_nary_op, visit_reference_op_load): Pass
850 gimple_match_cond::UNCOND to the gimple_match_op constructor.
851 * gimple-match-head.c: Include tree-eh.h
852 (convert_conditional_op): New function.
853 (maybe_resimplify_conditional_op): Likewise.
854 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
855 (gimple_resimplify2): Likewise.
856 (gimple_resimplify3): Likewise.
857 (gimple_resimplify4): Likewise.
858 (maybe_push_res_to_seq): Return null for conditional operations.
859 (try_conditional_simplification): New function.
860 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
862 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
864 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
866 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
868 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
870 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
872 (hash_tree): Do not hash DECL_FCONTEXT
873 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
874 Do not stream DECL_FCONTEXT.
875 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
876 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
878 2018-07-12 Richard Biener <rguenther@suse.de>
881 * dwarf2out.c (gen_block_die): Only output blocks when they have
882 at least one !DECL_IGNORED_P variable.
884 2018-07-12 Richard Biener <rguenther@suse.de>
887 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
888 Remove -mieee-fp handling.
890 2018-07-12 Richard Biener <rguenther@suse.de>
892 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
893 left-over from last patch.
895 2018-07-12 Jakub Jelinek <jakub@redhat.com>
897 PR tree-optimization/86492
898 * gimple-ssa-store-merging.c
899 (imm_store_chain_info::coalesce_immediate_stores): Call
900 check_no_overlap even for the merge_overlapping case. Formatting fix.
902 2018-07-12 Richard Biener <rguenther@suse.de>
905 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
906 move possibly trapping operations into the conditional.
908 2018-07-12 Richard Biener <rguenther@suse.de>
910 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
911 (vn_lookup_simplify_result): Remove recursion limit applied
913 (vn_nary_build_or_lookup_1): Adjust.
914 (try_to_simplify): Likewise.
915 * gimple-match-head.c (gimple_resimplify1): Instead apply one
917 (gimple_resimplify2): Likewise.
918 (gimple_resimplify3): Likewise.
919 (gimple_resimplify4): Likewise.
921 2018-07-11 Jakub Jelinek <jakub@redhat.com>
923 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
924 Use __mmask64 type instead of __mmask8 for __M argument.
925 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
926 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
928 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
929 __mmask16 for __M argument.
930 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
931 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
932 to __mmask16 instead of __mmask8.
933 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
934 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
935 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
936 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
937 instead of __mmask16 for __U argument.
938 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
939 __mmask16 instead of __mmask8 for __U argument.
940 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
942 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
944 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
946 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
948 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
950 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
952 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
954 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
956 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
958 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
960 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
961 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
962 return type as well as __M argument type and all casts from __mmask8
964 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
965 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
966 return type as well as __M argument type and all casts from __mmask8
968 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
969 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
970 return type as well as __M argument type and all casts from __mmask8
972 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
973 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
974 return type as well as __M argument type and all casts from __mmask8
976 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
977 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
980 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
982 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
983 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
986 2018-07-11 Paul Koning <ni1d@arrl.net>
988 * doc/md.texi (define_subst): Document how multiple occurrences of
989 the same argument in the replacement pattern are handled.
991 2018-07-11 Paul Koning <ni1d@arrl.net>
993 * doc/extend.texi (Common Variable Attributes): Move "mode" into
995 (Common Type Attributes): Add "mode" attribute.
997 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
999 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1000 stream DECL_ORIGINAL_TYPE.
1001 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1002 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1003 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1004 Do not walk original type.
1005 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1007 (write_ts_decl_non_common_tree_pointers): Do not stream
1009 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1010 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1012 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1014 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1015 thread twice from the same starting edge.
1017 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1019 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1020 * gimple.c (gimple_call_nonnull_result_p): ...here...
1021 (gimple_call_nonnull_arg): ...and here.
1022 * gimple.h (gimple_call_nonnull_result_p): New.
1023 (gimple_call_nonnull_arg): New.
1025 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
1027 * config/arm/arm-cpus.in: Move information from fpu field of each
1028 cpu definition to the isa field.
1029 * config/arm/parsecpu.awk (fpu): Delete match rule.
1030 (gen_comm_data): Don't add bits from the CPU's FPU entry.
1032 2018-07-11 Richard Biener <rguenther@suse.de>
1035 * dwarf2out.c (init_sections_and_labels): Use
1036 output_asm_line_debug_info consistently.
1037 (dwarf2out_early_finish): Likewise.
1038 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1041 2018-07-11 Richard Biener <rguenther@suse.de>
1043 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1044 Rework father_bb setting in a way to avoid propagating constants
1045 multiple times on a loop body.
1047 2018-07-10 Mark Wielaard <mark@klomp.org>
1050 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1052 2018-07-10 Richard Biener <rguenther@suse.de>
1054 * hash-map.h (hash_map::iterator::operator*): Return
1055 references to key and value.
1057 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1060 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1061 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1062 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1063 (gimplify_omp_for): For composite loops, move outer
1064 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1065 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
1066 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
1067 TREE_LIST for both the original class iterator and the "last" helper
1068 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
1069 loop, remember has_decl_expr from outer composite loops for the
1070 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1072 2018-07-09 Martin Sebor <msebor@redhat.com>
1076 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1077 accessing implicitly initialized array elements.
1078 * expr.c (string_constant): Handle string initializers of
1079 character arrays within aggregates.
1080 * gimple-fold.c (fold_array_ctor_reference): Add argument.
1081 Store element offset. As a special case, handle zero size.
1082 (fold_nonarray_ctor_reference): Same.
1083 (fold_ctor_reference): Add argument. Store subobject offset.
1084 * gimple-fold.h (fold_ctor_reference): Add argument.
1086 2018-07-09 Paul Koning <ni1d@arrl.net>
1088 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1089 (pdp11_insn_cost): New function.
1090 (pdp11_md_asm_adjust): New function.
1091 (TARGET_INVALID_WITHIN_DOLOOP): Define.
1092 (pdp11_rtx_costs): Update to match machine better.
1093 (output_addr_const_pdp11): Correct format mismatch warnings.
1094 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1095 * config/pdp11/pdp11.md: General change to add base_cost and/or
1096 length attributes for use by new pdp11_insn_cost function.
1097 (MIN_BRANCH): Correct definition.
1099 (doloop_end): Use standard pattern name for looping pattern.
1100 (doloop_end_nocc): New.
1101 (movsf): Add another constraint alternative.
1102 (zero_extendqihi2): Add constraint alternatives for not in place
1104 (zero_extendhisi2): Remove.
1105 (shift patterns): Add CC handling variants.
1109 (define_peephole2): New peephole to recognize mov that sets CC for
1112 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1114 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1115 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1118 2018-07-09 Jakub Jelinek <jakub@redhat.com>
1121 * real.c (real_nextafter): Return true if result is denormal.
1123 2018-07-09 Martin Liska <mliska@suse.cz>
1125 * common.opt: Add back wrongly removed attribute.
1127 2018-07-09 Richard Biener <rguenther@suse.de>
1130 * dwarf2out.c (gen_block_die): For an early generated DIE
1131 always output high/low PC attributes.
1133 2018-07-09 Tom de Vries <tdevries@suse.de>
1135 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1136 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1137 onto VAR_DECL with abstract origin.
1139 2018-07-07 Jim Wilson <jimw@sifive.com>
1141 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1143 2018-07-07 Tom de Vries <tdevries@suse.de>
1145 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1147 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
1149 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1151 (combine_bound): Use wide-int overflow calculation instead of
1153 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1155 * fold-const.c (int_const_binop_2): Same.
1156 (extract_muldiv_1): Same.
1157 (fold_div_compare): Same.
1158 (fold_abs_const): Same.
1160 * poly-int.h (add): Same.
1164 * predict.c (predict_iv_comparison): Same.
1165 * profile-count.c (slow_safe_scale_64bit): Same.
1166 * simplify-rtx.c (simplify_const_binary_operation): Same.
1167 * tree-chrec.c (tree_fold_binomial): Same.
1168 * tree-data-ref.c (split_constant_offset_1): Same.
1169 * tree-if-conv.c (idx_within_array_bound): Same.
1170 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1171 * tree-ssa-phiopt.c (minmax_replacement): Same.
1172 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1173 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1174 * vr-values.c (vr_values::adjust_range_with_scev): Same.
1175 * wide-int.cc (wi::add_large): Same.
1176 (wi::mul_internal): Same.
1177 (wi::sub_large): Same.
1178 (wi::divmod_internal): Same.
1179 * wide-int.h: Change overflow type to overflow_type for neg, add,
1180 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1181 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1182 mul_internal, divmod_internal.
1183 (overflow_type): New enum.
1184 (accumulate_overflow): New.
1186 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1188 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1189 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1191 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1193 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1194 argument is checked for zero before entering loop, avoid checking again.
1196 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1198 * gimplify.h (generic_expr_could_trap_p): Set as global function.
1199 * gimplify.h (generic_expr_could_trap_p): Likwise.
1200 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1202 2018-07-06 Jakub Jelinek <jakub@redhat.com>
1204 PR tree-optimization/86401
1205 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1206 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1207 (fold_bit_and_mask): ... here. New helper function for match.pd.
1208 * fold-const.h (fold_bit_and_mask): Declare.
1209 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1211 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1214 * target.def (translate_mode_attribute): New hook.
1215 * targhooks.h (default_translate_mode_attribute): Declare.
1216 * targhooks.c (default_translate_mode_attribute): New function.
1217 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1218 * doc/tm.texi: Regenerate.
1219 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1220 (rs6000_translate_mode_attribute): New function.
1222 2018-07-06 Paul Koning <ni1d@arrl.net>
1224 * doc/md.texi (define_split): Document DONE and FAIL.
1225 (define_peephole2): Ditto.
1227 2018-07-05 Jeff Law <law@redhat.com>
1229 PR tree-optimization/86010
1230 * tree-ssa-dse.c (compute_trims): More aggressively trim at
1231 both the head and tail of mem* and str* calls.
1233 2018-07-05 Jim Wilson <jimw@sifive.com>
1235 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1237 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
1239 * config/aarch64/aarch64-simd.md: correct flags text for
1240 MIN_EXPR replacement.
1242 2018-07-05 James Clarke <jrtc27@jrtc27.com>
1244 * configure: Regenerated.
1246 2018-07-05 Carl Love <cel@us.ibm.com>
1248 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1249 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1250 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1251 VSX_BUILTIN_DOUBLEL_V4SF.
1253 2018-07-05 Martin Sebor <msebor@redhat.com>
1256 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1257 than its domain to compute its the upper bound of a char array.
1259 2018-07-05 Nathan Sidwell <nathan@acm.org>
1261 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1262 * doc/cpp.texi: Update comment.
1263 * doc/tm.texi: Rebuilt.
1264 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1265 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1266 * doc/extend.texi (Backwards Compatibility): Clarify it is system
1267 headers affected by extern "C".
1268 * system.h: Poison NO_IMPLICIT_EXTERN_C.
1269 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1270 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1271 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1272 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1273 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1274 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1275 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1276 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1277 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1278 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1279 config/sparc/sp64-elf.h, config/spu/spu.h,
1280 config/stormy16/stormy16.h, config/v850/v850.h,
1281 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1282 define NO_IMPLICIT_EXTERN_C.
1283 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1285 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1288 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1289 instead of GET_MODE_SIZE when comparing Units.
1291 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1294 * rtlanal.c (set_noop_p): Constrain on mode change,
1295 include hard-reg-set.h
1297 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1299 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1301 2018-07-05 Jakub Jelinek <jakub@redhat.com>
1304 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1307 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1309 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1311 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1314 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1316 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1318 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
1321 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1323 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
1325 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1326 neg_*_op* variables.
1328 2018-07-04 Martin Liska <mliska@suse.cz>
1330 * tree-switch-conversion.c: Define
1331 max_ratio_for_speed and max_ratio_for_size constants.
1333 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1334 Martin Liska <mliska@suse.cz>
1339 * common.opt: Rename align options with 'str_' prefix.
1340 * common/config/i386/i386-common.c (set_malign_value): New
1342 (ix86_handle_option): Use it to set -falign-* options/
1343 * config/aarch64/aarch64-protos.h (struct tune_params): Change
1344 type from int to string.
1345 * config/aarch64/aarch64.c: Update default values from int
1347 * config/alpha/alpha.c (alpha_override_options_after_change):
1349 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1350 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1351 max skip conditionally.
1352 * config/i386/freebsd.h (SUBALIGN_LOG): New.
1353 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1354 max skip conditionally.
1355 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1356 max skip conditionally.
1357 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1358 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1359 max skip conditionally.
1360 * config/i386/i386.c (struct ptt): Change type from int to
1362 (ix86_default_align): Set default values.
1363 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1364 max skip conditionally.
1365 * config/i386/iamcu.h (SUBALIGN_LOG): New.
1366 (ASM_OUTPUT_MAX_SKIP_ALIGN):
1367 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1368 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1369 max skip conditionally.
1370 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1371 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1372 * config/i386/x86-64.h (SUBALIGN_LOG): New.
1373 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1374 max skip conditionally.
1375 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1376 * config/ia64/ia64.c (ia64_option_override): Set default values
1377 for alignment options.
1378 * config/m68k/m68k.c: Handle new str_align_* options.
1379 * config/mips/mips.c (mips_set_compression_mode): Change
1381 (mips_option_override): Set default values for options.
1382 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1384 * config/rs6000/rs6000.c (rs6000_option_override_internal):
1386 * config/rx/rx.c (rx_option_override): Likewise.
1387 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1388 (LABEL_ALIGN): Use align_labels_log.
1389 (LOOP_ALIGN): Use align_loops_align.
1390 * config/s390/s390.c (s390_asm_output_function_label): Use new
1392 * config/sh/sh.c (sh_override_options_after_change):
1393 Change type of constants.
1394 * config/spu/spu.c (spu_sched_init): Likewise.
1395 * config/sparc/sparc.c (sparc_option_override): Set default
1397 * config/visium/visium.c (visium_option_override): Likewise.
1398 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1399 emit p2align format with last argument if it's not needed.
1400 * doc/invoke.texi: Document extended format of -falign-*.
1401 * final.c: Use align_labels alignment.
1402 * flags.h (struct target_flag_state): Change type to use
1404 (struct align_flags_tuple): New.
1405 (struct align_flags): Likewise.
1406 (align_loops_log): Redefine macro to use new types.
1407 (align_loops_max_skip): Redefine macro to use new types.
1408 (align_jumps_log): Redefine macro to use new types.
1409 (align_jumps_max_skip): Redefine macro to use new types.
1410 (align_labels_log): Redefine macro to use new types.
1411 (align_labels_max_skip): Redefine macro to use new types.
1412 (align_functions_log): Redefine macro to use new types.
1413 (align_loops): Redefine macro to use new types.
1414 (align_jumps): Redefine macro to use new types.
1415 (align_labels): Redefine macro to use new types.
1416 (align_functions): Redefine macro to use new types.
1417 (align_functions_max_skip): Redefine macro to use new types.
1418 (align_loops_value): New macro.
1419 (align_jumps_value): New macro.
1420 (align_labels_value): New macro.
1421 (align_functions_value): New macro.
1422 * function.c (invoke_set_current_function_hook): Propagate
1423 alignment values from flags to global variables default in
1425 * ipa-icf.c (sem_function::equals_wpa): Use
1426 cl_optimization_option_eq instead of memcmp.
1427 * lto-streamer.h (cl_optimization_stream_out): Support streaming
1429 (cl_optimization_stream_in): Likewise.
1430 * optc-save-gen.awk: Support strings in cl_optimization.
1431 * opth-gen.awk: Likewise.
1432 * opts.c (finish_options): Remove error checking of invalid
1434 (MAX_CODE_ALIGN): Remove.
1435 (MAX_CODE_ALIGN_VALUE): Likewise.
1436 (parse_and_check_align_values): New function.
1437 (check_alignment_argument): Likewise.
1438 (common_handle_option): Use check_alignment_argument.
1439 * opts.h (parse_and_check_align_values): Declare.
1440 * toplev.c (init_alignments): Remove.
1441 (read_log_maxskip): New.
1442 (parse_N_M): Likewise.
1443 (parse_alignment_opts): Likewise.
1444 (backend_init_target): Remove usage of init_alignments.
1445 * toplev.h (parse_alignment_opts): Declare.
1446 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1448 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1449 * tree.c (cl_option_hasher::equal): New.
1450 * varasm.c: Use new global macros.
1452 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1454 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1455 Use a simpler align directive also if MAXSKIP = ALIGN-1.
1456 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1457 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1458 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1459 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1460 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1461 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1462 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1463 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1464 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1465 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1466 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1468 2018-07-04 Martin Liska <mliska@suse.cz>
1469 Jonathan Wakely <jwakely@redhat.com>
1471 * coverage.c: Use correct type.
1472 * doc/invoke.texi: Language correction.
1474 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
1477 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1478 ENDBRANCH for non-tail call which may return via indirect branch.
1479 * doc/extend.texi: Document indirect_return attribute.
1481 2018-07-03 Martin Sebor <msebor@redhat.com>
1483 PR tree-optimization/86274
1484 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1486 (format_floating): Correct handling of infinities and NaNs.
1488 2018-07-03 Martin Sebor <msebor@redhat.com>
1490 * print-tree.c (print_real_cst): New function.
1491 (print_node_brief): Call it.
1492 (print_node): Ditto.
1494 2018-07-03 Jeff Law <law@redhat.com>
1496 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1497 into a single pattern.
1499 * config/h8300/h8300.md (ors code_iterator): New.
1500 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1501 a single pattern and single splitter.
1502 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1503 (iorqi3_1, xorqi3_1): Likewise.
1504 (iorqi3, xorqi3 expanders): Similarly.
1506 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1507 (movmd_internal) into a single pattern using the P mode iterator.
1508 (movmd splitters): Similarly.
1509 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1510 (movsd splitters): Similarly.
1512 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1513 ADDB, ADDW and ADDL into a single ADD attribute which selects the
1514 right table based on the size of the operand.
1515 * config/h8300/h8300.md (length_table): Corresponding changes. All
1516 references to "addb", "addw" and "addl" changed to "add".
1517 (btst patterns): Merge two variants into a single pattern.
1518 (tstqi, tsthi): Likewise.
1519 (addhi3_incdec, addsi3_incdec): Likewise.
1520 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1521 (mulhi3, mulsi3): Likewise.
1522 (udivhi3, udivsi3): Likewise.
1523 (divhi3, divsi3): Likewise.
1524 (andorqi3, andorhi3, andorsi3): Likewise.
1526 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
1529 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1530 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1532 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1534 PR tree-optimization/85694
1535 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1536 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1538 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1539 (<u>avg<mode>3_ceil): New patterns.
1541 2018-07-03 David Malcolm <dmalcolm@redhat.com>
1543 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1544 scan-tree-dump directive.
1545 * gcc.dg/vect/slp-perm-2.c: Likewise.
1546 * gcc.dg/vect/slp-perm-3.c: Likewise.
1547 * gcc.dg/vect/slp-perm-5.c: Likewise.
1548 * gcc.dg/vect/slp-perm-6.c: Likewise.
1549 * gcc.dg/vect/slp-perm-7.c: Likewise.
1550 * gcc.dg/vect/slp-perm-8.c: Likewise.
1552 2018-07-03 Marek Polacek <polacek@redhat.com>
1555 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1557 2018-07-03 Richard Biener <rguenther@suse.de>
1560 * tree-ssa-structalias.c (find_func_clobbers): Properly
1561 handle indirect calls.
1563 2018-07-03 Jeff Law <law@redhat.com>
1565 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1566 (shifts): New code iterator.
1567 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1568 expander. Fix HImode handling on H8/SX.
1569 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1570 (subqi3, subhi3, subsi3 expanders): Likewise.
1571 (andqi3, andhi3, andsi3 expanders): Likewise.
1572 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1573 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1574 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1575 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1576 (zero_extendqihi2, zero_extendqisi2): Likewise.
1577 (extendqihi2, extendqisi2): Likewise.
1578 (rotlqi3, rotlhi3, rotlsi3): Likewise.
1579 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1580 (rotlqi3_1, rotlhi3_1): Likewise.
1581 (logicalhi3_sn, logicalsi3_sn): Likewise.
1582 (logicalhi3, logicalsi3): Likewise.
1584 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1586 * tree-vect-patterns.c (vect_recog_rotate_pattern)
1587 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1588 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1589 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1590 type to append_pattern_def_seq instead of creating a stmt_vec_info
1592 (build_mask_conversion): Likewise. Remove vinfo argument.
1593 (vect_add_conversion_to_patterm): Likewise, renaming to...
1594 (vect_add_conversion_to_pattern): ...this.
1595 (vect_recog_mask_conversion_pattern): Update call to
1596 build_mask_conversion. Pass the vector type to
1597 append_pattern_def_seq here too.
1598 (vect_recog_gather_scatter_pattern): Update call to
1599 vect_add_conversion_to_pattern.
1601 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1603 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1604 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1605 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1606 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1607 STMT_VINFO_PATTERN_DEF_SEQ to null here.
1608 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1609 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1610 append_pattern_def_seq instead of new_pattern_def_seq.
1611 (vect_recog_divmod_pattern): Do both of the above.
1612 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1615 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1617 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1618 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1619 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1620 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1621 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1622 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1623 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1624 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1625 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1626 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1627 parameter with a single stmt_vec_info.
1628 (vect_recog_func_ptr): Likewise.
1629 (vect_recog_gather_scatter_pattern): Likewise, folding in...
1630 (vect_try_gather_scatter_pattern): ...this.
1631 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1632 the stmt_vec_info of the statement to be matched. Don't clear
1633 STMT_VINFO_RELATED_STMT.
1634 (vect_pattern_recog): Update call accordingly.
1636 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1638 PR tree-optimization/85694
1639 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1640 (uavgM3_ceil): Document new optabs.
1641 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1642 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1644 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1645 (savg_ceil_optab): New optabs.
1646 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1647 (vect_vect_recog_func_ptrs): Add it.
1648 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1649 constant directly from the associated lhs.
1651 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1653 * tree-vect-patterns.c (vect_split_statement): New function.
1654 (vect_convert_input): Use it to try to split an existing cast.
1656 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1658 * poly-int.h (print_hex): New function.
1659 * dumpfile.h (dump_dec, dump_hex): Declare.
1660 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1661 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1662 min_input_precision, operation_precision and operation_sign.
1663 * tree-vect-patterns.c (vect_get_range_info): New function.
1664 (vect_same_loop_or_bb_p, vect_single_imm_use)
1665 (vect_operation_fits_smaller_type): Delete.
1666 (vect_look_through_possible_promotion): Add an optional
1667 single_use_p parameter.
1668 (vect_recog_over_widening_pattern): Rewrite to use new
1669 stmt_vec_info infomration. Handle one operation at a time.
1670 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1671 (vect_truncatable_operation_p, vect_set_operation_type)
1672 (vect_set_min_input_precision): New functions.
1673 (vect_determine_min_output_precision_1): Likewise.
1674 (vect_determine_min_output_precision): Likewise.
1675 (vect_determine_precisions_from_range): Likewise.
1676 (vect_determine_precisions_from_users): Likewise.
1677 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1678 (vect_vect_recog_func_ptrs): Put over_widening first.
1680 (vect_pattern_recog): Call vect_determine_precisions.
1682 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1684 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1685 statements that have been replaced by further pattern statements.
1686 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1688 2018-07-03 Richard Biener <rguenther@suse.de>
1690 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1691 always set *dt. Dump vectype in vectype overload.
1692 * dumpfile.h (dump_gimple_expr): New function.
1693 (dump_gimple_expr_loc): Likewise.
1694 * dumpfile.c (dump_gimple_expr): New function.
1695 (dump_gimple_expr_loc): Likewise.
1697 2018-07-02 Jeff Law <law@redhat.com>
1699 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1700 the H8/300, H8/300H and H8/S variants into a single pattern.
1701 (movhi_h8300, movqi_h8300hs): Similarly.
1702 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1703 (QHI mode iterator): New.
1705 * config/h8300/h8300.md: Remove trailing whitespace.
1707 2018-07-02 Jim Wilson <jimw@sifive.com>
1709 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1710 instead of emit_insn for interrupt returns.
1711 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1712 (riscv_sret, riscv_uret): Likewise.
1714 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1716 * pretty-print.c (selftest::test_pp_format): Move save and restore
1717 of quotes to class auto_fix_quotes, and add an instance.
1718 * selftest.c: Include "intl.h".
1719 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1720 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1721 * selftest.h (selftest::auto_fix_quotes): New class.
1723 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
1725 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1726 (aarch64_sve_prepare_conditional_op): Remove.
1727 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1728 Allow aarch64_simd_reg_or_zero as select operand; remove
1729 the aarch64_sve_prepare_conditional_op call.
1730 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1731 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1732 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1733 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1734 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1735 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1736 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1737 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1738 and a splitters to match all of the *_any patterns.
1739 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1741 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1742 (SVE_COND_FP_BINARY_REV): Remove.
1743 (sve_int_op_rev, sve_fp_op_rev): New.
1744 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
1745 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
1746 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
1747 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
1748 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
1749 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
1750 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
1751 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
1752 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
1754 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
1755 Remove match_dup 1 from the inner unspec.
1756 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1758 * config/aarch64/aarch64.md (movprfx): New attr.
1759 (length): Default movprfx to 8.
1760 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
1761 (*madd<SVE_I>, *msub<SVE_I): Likewise.
1762 (*<su>mul<SVE_I>3_highpart): Likewise.
1763 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
1764 (*v<ASHIFT><SVE_I>3): Likewise.
1765 (*<su><MAXMIN><SVE_I>3): Likewise.
1766 (*<su><MAXMIN><SVE_F>3): Likewise.
1767 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
1768 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
1769 (*div<SVE_F>4): Likewise.
1771 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
1773 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
1776 2018-07-02 Richard Biener <rguenther@suse.de>
1778 PR tree-optimization/86363
1779 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
1780 memset argument refers to a non-variable address.
1782 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1784 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
1785 {PLUS,MINUS}_EXPR code to...
1786 (adjust_symbolic_bound): ...here,
1787 (combine_bound): ...here,
1788 (set_value_range_with_overflow): ...and here.
1790 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1792 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
1794 (extract_range_from_abs_expr): ...here.
1796 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
1798 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
1799 -fno-omit-frame-pointer when not optimizing.
1801 2018-07-02 Martin Liska <mliska@suse.cz>
1804 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
1805 (propagate_nothrow): Likewise.
1807 2018-07-02 Martin Liska <mliska@suse.cz>
1810 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
1812 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1814 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
1815 function in r262149, changing "loc" param from source_location to
1816 const dump_location_t &.
1817 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
1818 declaration, as above.
1820 2018-07-01 Paul Koning <ni1d@arrl.net>
1822 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1823 -munit-asm, -mgnu-asm, -mdec-asm.
1824 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
1825 (pdp11_output_labelref): New.
1826 (pdp11_output_def): New.
1827 (pdp11_output_addr_vec_elt): New.
1828 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
1829 %# and %@ format codes.
1830 (pdp11_option_override): New.
1831 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
1832 (pdp11_output_ident): New.
1833 (pdp11_asm_named_section): New.
1834 (pdp11_asm_init_sections): New.
1835 (pdp11_file_start): New.
1836 (pdp11_file_end): New.
1837 (output_ascii): Use .ascii/.asciz for -mdec-asm.
1838 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
1839 %o, like %c but octal.
1840 (pdp11_option_override): New.
1841 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
1843 (DATA_SECTION_ASM_OP): Ditto.
1844 (READONLY_DATA_SECTION_ASM_OP): New.
1845 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
1846 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
1847 (ASM_OUTPUT_LABELREF): Ditto.
1848 (ASM_OUTPUT_DEF): Ditto.
1849 (ASM_OUTPUT_EXTERNAL): New.
1850 (ASM_OUTPUT_SOURCE_FILENAME): New.
1851 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
1852 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
1853 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
1854 %# and %@ format codes.
1855 * config/pdp11/pdp11.opt (mgnu-asm): New.
1856 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
1857 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
1858 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
1860 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
1862 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
1863 dereferencing path[] beyond its length.
1865 (debug_all_paths): New.
1866 (rewire_first_differing_edge): New.
1867 (adjust_paths_after_duplication): New.
1868 (duplicate_thread_path): Call adjust_paths_after_duplication.
1870 (thread_through_all_blocks): Add new argument to
1871 duplicate_thread_path.
1873 2018-06-30 Jim Wilson <jimw@sifive.com>
1875 * config/riscv/predicates.md (p2m1_shift_operand): New.
1876 (high_mask_shift_operand): New.
1877 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
1878 pattern using p2m1_shift_operand.
1879 (lshsi3_zero_extend_3+2): New combiner pattern using
1880 high_mask_shift_operand.
1882 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1884 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
1886 (vect_recog_rotate_pattern): ...here.
1887 (vect_convert_input): Try to insert casts of invariants in the
1889 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
1890 preheader to be empty.
1892 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1894 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
1895 vector type. If given, install it in the new statement's
1897 (vect_element_precision): New function.
1898 (vect_unpromoted_value): New struct.
1899 (vect_unpromoted_value::vect_unpromoted_value): New function.
1900 (vect_unpromoted_value::set_op): Likewise.
1901 (vect_look_through_possible_promotion): Likewise.
1902 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
1903 (vect_widened_op_tree, vect_convert_input): Likewise.
1904 (vect_convert_inputs, vect_convert_output): Likewise.
1905 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
1906 to handle the optional cast of the multiplication result and
1907 vect_widened_op_tree to detect the widened multiplication itself.
1908 Do not require the input and output of promotion casts to have
1909 the same sign, but base the signedness of the operation on the
1910 input rather than the result. If the pattern includes two
1911 promotions, check that those promotions have the same sign.
1912 Do not restrict the MULT_EXPR handling to a double-width result;
1913 handle quadruple-width results and wider. Use vect_convert_inputs
1914 to convert the inputs to the common type.
1915 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
1916 to handle the optional cast of the ABS result. Also allow a sign
1917 change or a sign extension between the ABS and MINUS.
1918 Use vect_widened_op_tree to detect the widened subtraction and use
1919 vect_convert_inputs to convert the inputs to the common type.
1920 (vect_handle_widen_op_by_const): Delete.
1921 (vect_recog_widen_op_pattern): New function.
1922 (vect_recog_widen_mult_pattern): Use it.
1923 (vect_recog_widen_shift_pattern): Likewise.
1924 (vect_recog_widen_sum_pattern): Use
1925 vect_look_through_possible_promotion to handle the promoted
1928 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1930 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
1931 the containing gimple_seq *.
1932 * gimple-iterator.h (gsi_for_stmt): Declare it.
1933 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
1934 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
1935 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1936 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1937 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
1939 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
1941 (vect_mark_pattern_stmts): ...here. Handle cases in which the
1942 statement being replaced is part of an existing pattern
1943 definition sequence, inserting the new pattern statements before
1945 (vect_pattern_recog_1): Don't return a bool. If the statement
1946 is already part of a pattern, instead apply pattern matching
1947 to the pattern definition statements. Don't clear the
1948 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
1949 (vect_pattern_recog): Don't break after the first match;
1950 continue processing the pattern definition statements instead.
1951 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
1953 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1955 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
1956 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1957 (vect_recog_widen_sum_pattern): Use it.
1959 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1961 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1962 phi is not a pattern statement and has not been replaced by
1963 a pattern statement.
1964 * tree-vect-patterns.c (type_conversion_p): Don't check
1965 STMT_VINFO_IN_PATTERN_P.
1966 (vect_recog_vector_vector_shift_pattern): Likewise.
1967 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
1968 the pattern statement rather than the original statement; check
1969 directly for a WIDEN_MULT_EXPR here.
1970 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
1971 vect_is_simple_use to return the pattern statement rather
1972 than the original statement; use is_pattern_stmt_p to check
1973 for such a pattern statement.
1974 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
1975 to return the pattern statement rather than the original statement;
1976 don't do the same transformation here.
1977 (vect_is_simple_use): If the defining statement has been replaced
1978 by a pattern statement, return the pattern statement instead.
1979 Remove the corresponding (local) transformation from the vectype
1982 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1984 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
1985 end and default to null.
1986 * tree-vect-loop.c (vect_create_epilog_for_reduction)
1987 (vectorizable_reduction): Update calls accordingly, dropping the
1988 gimple ** argument if the passed-back statement isn't needed.
1989 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
1990 (vect_recog_rotate_pattern): Likewise.
1991 (vect_recog_mask_conversion_pattern): Likewise.
1992 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1993 (vect_mask_constant_operand_p): Likewise.
1994 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
1995 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
1996 (get_group_load_store_type, get_load_store_type): Likewise.
1997 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
1998 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
1999 (vectorizable_conversion, vectorizable_assignment): Likewise.
2000 (vectorizable_shift, vectorizable_operation): Likewise.
2001 (vectorizable_store, vect_is_simple_cond): Likewise.
2002 (vectorizable_condition, vectorizable_comparison): Likewise.
2003 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2004 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2005 and move it to the end. Cope with null def_stmt_outs.
2007 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2009 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2011 2018-06-29 Jeff Law <law@redhat.com>
2013 * config/v850/v850.c (v850_legitimate_address_p): Handle large
2014 displacements for TARGET_V850E2V3 and newer.
2015 (TARGET_LRA_P): Remove. Defaults to LRA now.
2016 * config/v850/v850.md (sign23byte_load): Remove.
2017 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2018 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2020 2018-06-29 Martin Liska <mliska@suse.cz>
2023 * coverage.c (coverage_init): Mangle full path name.
2024 * doc/invoke.texi: Document the change.
2025 * gcov-io.c (mangle_path): New.
2026 * gcov-io.h (mangle_path): Likewise.
2027 * gcov.c (mangle_name): Use mangle_path for path mangling.
2029 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2031 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2032 if starting source register is not even.
2034 2018-06-29 Martin Liska <mliska@suse.cz>
2036 PR tree-optimization/86263
2037 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2038 Make edge redirection.
2040 2018-06-29 David Malcolm <dmalcolm@redhat.com>
2042 * dumpfile.c (dump_loc): Add indentation based on scope depth.
2043 (dump_scope_depth): New variable.
2044 (get_dump_scope_depth): New function.
2045 (dump_begin_scope): New function.
2046 (dump_end_scope): New function.
2047 * dumpfile.h (get_dump_scope_depth): New declaration.
2048 (dump_begin_scope): New declaration.
2049 (dump_end_scope): New declaration.
2050 (class auto_dump_scope): New class.
2051 (AUTO_DUMP_SCOPE): New macro.
2052 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2055 2018-06-29 Richard Biener <rguenther@suse.de>
2057 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2058 compute_all_dependences succeeds.
2059 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2060 exceed --param loop-max-datarefs-for-datadeps.
2062 2018-06-29 Jakub Jelinek <jakub@redhat.com>
2064 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2066 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
2069 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2070 alternative 0 in preferred_for_speed attribute.
2072 2018-06-28 Paul Koning <ni1d@arrl.net>
2074 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2075 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2076 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2077 * config/pdp11/pdp11.md: Correct "length" attribute calculation
2078 for shift insn patterns.
2080 2018-06-28 David Malcolm <dmalcolm@redhat.com>
2082 * cgraph.c (cgraph_node::get_body): Replace assignments to
2083 "dump_file" with calls to set_dump_file.
2084 * dumpfile.c (alt_dump_file): Make static, and group with...
2085 (alt_flags): ...this definition.
2086 (dumps_are_enabled): New variable.
2087 (refresh_dumps_are_enabled): New function.
2088 (set_dump_file): New function.
2089 (set_alt_dump_file): New function.
2090 (gcc::dump_manager::dump_start): Replace assignments to
2091 "dump_file" and "alt_dump_file" with calls to set_dump_file and
2093 (gcc::dump_manager::dump_finish): Likewise.
2094 * dumpfile.h (alt_dump_file): Delete decl.
2095 (dumps_are_enabled): New variable decl.
2096 (set_dump_file): New function decl.
2097 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2099 * tree-nested.c (lower_nested_functions): Replace assignments to
2100 "dump_file" with calls to set_dump_file.
2102 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2104 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2105 goto_locus of each outgoing edge of each basic block.
2107 2018-06-28 Richard Biener <rguenther@suse.de>
2109 * dwarf2out.c (decl_scope_table): Remove.
2110 (push_decl_scope): Likewise.
2111 (pop_decl_scope): Likewise.
2112 (gen_type_die_for_member): Do not call push/pop_decl_scope.
2113 (gen_struct_or_union_type_die): Likewise.
2114 (gen_tagged_type_die): Likewise.
2115 (dwarf2out_init): Do not initialize decl_scope_table.
2116 (dwarf2out_c_finalize): Do not free it.
2118 2018-06-28 Richard Biener <rguenther@suse.de>
2120 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2121 deciding whether to not re-use a DIE.
2123 2018-06-28 Richard Biener <rguenther@suse.de>
2125 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2126 DW_AT_abstract_origin attribute.
2128 2018-06-28 Martin Liska <mliska@suse.cz>
2130 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2131 Use newly introduced constants.
2132 * tree-switch-conversion.h (struct jump_table_cluster):
2133 Define max_ratio_for_size and max_ratio_for_speed.
2135 2018-06-28 Martin Liska <mliska@suse.cz>
2137 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2138 Add new checking assert to catch invalid state.
2139 (jump_table_cluster::can_be_handled): Handle single case
2141 (jump_table_cluster::is_beneficial): Bail out for such case.
2142 (bit_test_cluster::find_bit_tests):
2143 Add new checking assert to catch invalid state.
2144 (bit_test_cluster::can_be_handled): Handle single case
2146 (bit_test_cluster::is_beneficial): Bail out for such case.
2147 (switch_decision_tree::analyze_switch_statement):
2150 2018-06-28 Martin Liska <mliska@suse.cz>
2152 * common.opt: Introduce -completion option.
2153 * gcc.c (driver_handle_option): Handle it.
2154 (driver::main): Print completions if completion
2156 * opt-suggestions.c (option_proposer::get_completions):
2158 (option_proposer::suggest_completion): Likewise.
2159 (option_proposer::find_param_completions): Likewise.
2160 (verify_autocompletions): Likewise.
2161 (test_completion_valid_options): Likewise.
2162 (test_completion_valid_params): Likewise.
2163 (in_completion_p): Likewise.
2164 (empty_completion_p): Likewise.
2165 (test_completion_partial_match): Likewise.
2166 (test_completion_garbage): Likewise.
2167 (opt_proposer_c_tests): Likewise.
2168 * opt-suggestions.h: Declare new functions.
2169 * opts.c (common_handle_option): Handle OPT__completion_.
2170 * selftest-run-tests.c (selftest::run_tests): Add
2171 opt_proposer_c_tests.
2172 * selftest.c (assert_str_startswith): New.
2173 * selftest.h (assert_str_startswith): Likewise.
2174 (opt_proposer_c_tests): New.
2175 (ASSERT_STR_STARTSWITH): Likewise.
2177 2018-06-28 Martin Liska <mliska@suse.cz>
2179 * Makefile.in: Add opt-suggestions.o.
2180 * gcc-main.c: Include opt-suggestions.h.
2181 * gcc.c (driver::driver): Likewise.
2182 (driver::~driver): Remove m_option_suggestions.
2183 (driver::build_option_suggestions): Moved to option_proposer.
2184 (driver::suggest_option): Likewise.
2185 (driver::handle_unrecognized_options): Use option_proposer.
2186 * gcc.h (class driver): Add new memver m_option_proposer.
2187 * opt-suggestions.c: New file.
2188 * opt-suggestions.h: New file.
2190 2018-06-28 Martin Liska <mliska@suse.cz>
2192 * vec.h (class auto_string_vec): New (moved from auto_argvec).
2193 (auto_string_vec::~auto_string_vec): Likewise.
2195 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2197 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2198 prevent_decl_creation_for_types fields up and add reset_location field.
2199 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2200 statement if id->reset_location is true.
2201 (copy_edges_for_bb): Do not set goto_locus on the new edges if
2202 id->reset_location is true.
2203 (copy_phis_for_bb): Force input_location on the arguments if
2204 id->reset_location is true.
2205 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2206 is set on the function to be inlined.
2208 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
2210 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2212 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
2214 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2215 registers for Pmode.
2216 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2217 hard registers for the clobbered pseudo.
2219 2018-06-27 Paul Koning <ni1d@arrl.net>
2221 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2222 mutually exclusive options.
2223 * config/pdp11/constraints.md (h): New constraint.
2224 (O): Update definition to match shift code generation.
2225 (D): New constraint.
2226 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2228 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2230 (output_jump): Change arguments.
2231 (pdp11_fixed_cc_regs): New function.
2232 (pdp11_cc_mode): Ditto.
2233 (pdp11_expand_shift): Ditto.
2234 (pdp11_assemble_shift): Ditto.
2235 (pdp11_small_shift): Ditto.
2236 (pdp11_branch_cost): Remove.
2237 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2239 (pdp11_register_move_cost): Update for CC registers.
2240 (pdp11_rtx_costs): Add case for LSHIFTRT.
2241 (pdp11_output_jump): Add CCNZ mode conditional branches.
2242 (notice_update_cc_on_set): Remove.
2243 (pdp11_cc_mode): New function.
2244 (simple_memory_operand): Correct pre/post decrement case.
2245 (no_side_effect_operand): New function.
2246 (pdp11_regno_reg_class): Add CC_REGS class.
2247 (pdp11_fixed_cc_regs): New function.
2248 (pdp11_small_shift): New function.
2249 (pdp11_expand_shift): New function to expand shift insns.
2250 (pdp11_assemble_shift): New function to output shifts.
2251 (pdp11_branch_cost): Remove.
2252 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2253 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2254 (WCHAR_TYPE): Ditto.
2255 (PTRDIFF_TYPE): Ditto.
2256 (ADJUST_INSN_LENGTH): New macro.
2257 (FIXED_REGISTERS): Add CC registers.
2258 (CALL_USED_REGISTERS): Ditto.
2260 (REG_CLASS_NAMES): Ditto.
2261 (REG_CLASS_CONTENTS): Ditto.
2262 (SELECT_CC_MODE): Use new function.
2263 (TARGET_FLAGS_REGNUM): New macro.
2264 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2265 (cc0_reg_rtx): Remove.
2266 (CC_STATUS_MDEP): Remove.
2267 (CC_STATUS_MDEFP_INIT): Remove.
2268 (CC_IN_FPU): Remove.
2269 (NOTICE_UPDATE_CC): Remove.
2270 (REGISTER_NAMES): Add CC registers.
2271 (BRANCH_COST): Change to constant 1.
2272 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2274 * config/pdp11/pdp11.opt (mbcopy): Remove.
2275 (mbcopy-builtin): Remove.
2276 (mbranch-cheap): Remove.
2277 (mbranch-expensive): Remove.
2278 * config/pdp11/predicates.md (expand_shift_operand): Update to
2279 match shift code generation.
2280 (ccnz_operator): New predicate.
2281 * doc/invoke.texi (PDP-11 Options): Remove deleted options
2282 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2283 Remove non-existent option -mabshi, -mno-abshi. Document mutually
2285 * doc/md.texi (PDP-11): Document new D and h constraints. Update
2286 description of O constraint.
2288 2018-06-27 Jeff Law <law@redhat.com>
2289 Austin Law <austinklaw@gmail.com>
2291 * config/v850/v850.md (addsi3_set_flags): New pattern.
2292 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2293 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2294 (zero_extendhisi2_v850_set_flags): Likewise.
2295 (zero_extendqisi2_v850_set_flags): Likewise.
2296 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2297 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2298 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2300 * config/v850/v850-protos.h (notice_update_cc): Remove.
2301 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2302 (v850_print_operand): Handle 'D' and "d".
2303 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2304 Add handling of arithmetic/logical operations compared against zero.
2305 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2306 Do not look at v850_compare_op, instead get mode from last argument.
2307 (v850_gen_compare): Remove
2308 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2309 after reload for prologue insns.
2310 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2312 (construct_save_jarl): Likewise.
2313 (TARGET_FLAGS_REGNUM): Define.
2314 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2315 (NOTICE_UPDATE_CC): Remove.
2316 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2317 than cc0. Conditionalize on reload_completed.
2318 (cmpsi_insn, setfcc_insn): Likewise.
2319 (tst1 splitter): Turn into define_and_split which sets the flags
2321 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2322 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2323 (cstoresf4, cstoredf4): Clobber the flags.
2324 (cmpsi, cmpsf, cmpdf): Remove expanders.
2325 (setf_insn): Remove pattern.
2326 (addsi3): Turn into define_and_split which clobbers the flags after
2327 reload and a suitable pattern (addsi3_clobber_flags) for use after
2329 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2330 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2331 (ashrsi3, ashrsi3_v850e2): Likewise.
2332 (bins): Clobber the flags.
2333 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2334 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2335 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2336 (call_value_internal_short, call_value_internal_long): Likewise.
2337 (callt_save_interrupt, callt_return_interrupt): Likewise.
2338 (save_interrupt, return_interrupt): Likewise.
2339 (callt_save_all_interrupt, save_all_interrupt): Likewise.
2340 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2341 (restore_all_interrupt, _restore_all_interrupt): Likewise.
2342 (All FP comparisons): Only allow after reload has completed.
2344 (divh, divhu): Tweak output template.
2345 (branch_z_normal, branch_z_invert): Remove
2346 (branch_nz_normal, branch_nz_invert): Likewise.
2347 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2349 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2350 * config/v850/v850.c (notice_update_cc): Remove.
2351 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
2352 (CC_NO_CARRY): Likewise.
2353 (NOTICE_UPDATE_CC): Define to nothing.
2354 * config/v850/v850.md: Remove block comment on cc0 handling
2355 Remove "cc" attribute from all patterns. Remove cc_status handling
2356 from all patterns. Minor formatting fixes.
2358 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2360 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2361 (cortex-a76.cortex-a55): Likewise.
2362 * config/aarch64/aarch64-tune.md: Regenerate.
2363 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2364 cortex-a76.cortex-a55.
2366 2018-06-27 Jeff Law <law@redhat.com>
2368 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2369 (MULTILIB_DIRNAMES): Similarly.
2371 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
2373 * gimple.h (gimple_return_retbnd): Delete.
2374 (gimple_return_set_retbnd): Likewise.
2375 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2376 gimple_return_set_retbnd.
2377 * gimple-pretty-print.c (dump_gimple_return): Remove call to
2378 gimple_return_retbnd and adjust.
2379 * tree-inline.h (struct copy_body_data): Remove retbnd field.
2380 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2381 Explicitly return NULL in a couple more cases. Move assertion
2382 on debug statements and remove unreachable code.
2383 (reset_debug_binding): Do not test id->retbnd.
2384 (expand_call_inline): Do not set it.
2386 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2388 * configure.ac: Add --disable-gcov option.
2389 * configure: Regenerate.
2390 * Makefile.in: Honour @enable_gcov@.
2391 * doc/install.texi: Document --disable-gcov.
2393 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2395 * config/arm/arm-cpus.in (cortex-a76): New entry.
2396 (cortex-a76.cortex-a55): Likewise.
2397 * config/arm/arm-tables.opt: Regenerate.
2398 * config/arm/arm-tune.md: Likewise.
2399 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2400 * doc/invoke.texi (ARM Options): Document cortex-a76 and
2401 cortex-a76.cortex-a55.
2403 2018-06-27 Tamar Christina <tamar.christina@arm.com>
2406 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2408 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
2410 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2412 (EPILOGUE_USES): Likewise.
2414 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
2416 * tree-inline.c (remap_location): New function extracted from...
2417 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
2418 (copy_phis_for_bb): ...here. Call remap_location.
2419 (copy_cfg_body): Adjust call to copy_edges_for_bb.
2421 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2423 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2424 unaligned vsx for 16B memset.
2426 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
2429 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2430 ieee128_float_type_node to long_double_type_node unless
2431 TARGET_LONG_DOUBLE_128 is set.
2433 2018-06-26 David Malcolm <dmalcolm@redhat.com>
2435 * cfgloop.c (get_loop_location): Convert return type from
2436 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2437 by implicit construction from rtx_insn *, and using
2438 dump_user_location_t::from_function_decl for the fallback case.
2439 * cfgloop.h (get_loop_location): Convert return type from
2440 location_t to dump_user_location_t.
2441 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2442 dump_printf_loc to pass in a dump_location_t rather than a
2443 location_t, via the gimple stmt.
2444 * coverage.c (get_coverage_counts): Update calls to
2445 dump_printf_loc to pass in dump_location_t rather than a
2447 * doc/optinfo.texi (Dump types): Convert example of
2448 dump_printf_loc from taking "locus" to taking "insn". Update
2449 description of the "_loc" calls to cover dump_location_t.
2450 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2452 (dump_user_location_t::dump_user_location_t): New constructors,
2453 from gimple *stmt and rtx_insn *.
2454 (dump_user_location_t::from_function_decl): New function.
2455 (dump_loc): Make static.
2456 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2457 const dump_location_t &.
2458 (dump_generic_expr_loc): Delete.
2459 (dump_printf_loc): Convert param "loc" from location_t to
2460 const dump_location_t &.
2461 (selftest::test_impl_location): New function.
2462 (selftest::dumpfile_c_tests): New function.
2463 * dumpfile.h: Include "profile-count.h".
2464 (class dump_user_location_t): New class.
2465 (struct dump_impl_location_t): New struct.
2466 (class dump_location_t): New class.
2467 (dump_printf_loc): Convert 2nd param from source_location to
2468 const dump_location_t &.
2469 (dump_generic_expr_loc): Delete.
2470 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2471 const dump_location_t &.
2472 * gimple-fold.c (fold_gimple_assign): Update call to
2473 dump_printf_loc to pass in a dump_location_t rather than a
2474 location_t, via the gimple stmt.
2475 (gimple_fold_call): Likewise.
2476 * gimple-loop-interchange.cc
2477 (loop_cand::analyze_iloop_reduction_var): Update for change to
2478 check_reduction_path.
2479 (tree_loop_interchange::interchange): Update for change to
2481 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2482 change in return-type of find_loop_location.
2483 (graphite_regenerate_ast_isl): Likewise.
2484 * graphite-optimize-isl.c (optimize_isl): Likewise.
2485 * graphite.c (graphite_transform_loops): Likewise.
2486 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2487 pass in a dump_location_t rather than a location_t, via the
2489 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2490 * ipa.c (walk_polymorphic_call_targets): Likewise.
2491 * loop-unroll.c (report_unroll): Convert "locus" param from
2492 location_t to dump_location_t.
2493 (decide_unrolling): Update for change to get_loop_location's
2495 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2496 location_t to dump_user_location_t.
2497 (grid_find_single_omp_among_assignments_1): Updates calls to
2498 dump_printf_loc to pass in a dump_location_t rather than a
2499 location_t, via the gimple stmt.
2500 (grid_parallel_clauses_gridifiable): Convert "tloc" from
2501 location_t to dump_location_t. Updates calls to dump_printf_loc
2502 to pass in a dump_location_t rather than a location_t, via the
2504 (grid_inner_loop_gridifiable_p): Likewise.
2505 (grid_dist_follows_simple_pattern): Likewise.
2506 (grid_gfor_follows_tiling_pattern): Likewise.
2507 (grid_target_follows_gridifiable_pattern): Likewise.
2508 (grid_attempt_target_gridification): Convert initialization
2509 of local "grid" from memset to zero-initialization; FIXME: does
2510 this require C++11? Update call to dump_printf_loc to pass in a
2511 optinfo_location rather than a location_t, via the gimple stmt.
2512 * profile.c (read_profile_edge_counts): Updates call to
2513 dump_printf_loc to pass in a dump_location_t rather than a
2515 (compute_branch_probabilities): Likewise.
2516 * selftest-run-tests.c (selftest::run_tests): Call
2518 * selftest.h (dumpfile_c_tests): New decl.
2519 * tree-loop-distribution.c (pass_loop_distribution::execute):
2520 Update for change in return type of find_loop_location.
2521 * tree-parloops.c (parallelize_loops): Likewise.
2522 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2523 "locus" from location_t to dump_user_location_t.
2524 (canonicalize_loop_induction_variables): Likewise.
2525 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2526 for change in return type of find_loop_location.
2527 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2528 to dump_printf_loc to pass in a dump_location_t rather than a
2529 location_t, via the stmt.
2530 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2532 * tree-vect-loop-manip.c (find_loop_location): Convert return
2533 type from source_location to dump_user_location_t.
2534 (vect_do_peeling): Update for above change.
2535 (vect_loop_versioning): Update for change in type of
2537 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2538 from location_t to dump_user_location_t.
2539 (vect_estimate_min_profitable_iters): Update for change in type
2541 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2542 location_t to dump_location_t.
2543 (vect_slp_bb): Update for change in type of vect_location.
2544 * tree-vectorizer.c (vect_location): Convert from source_location
2545 to dump_user_location_t.
2546 (try_vectorize_loop_1): Update for change in vect_location's type.
2547 (vectorize_loops): Likewise.
2548 (increase_alignment): Likewise.
2549 * tree-vectorizer.h (vect_location): Convert from source_location
2550 to dump_user_location_t.
2551 (find_loop_location): Convert return type from source_location to
2552 dump_user_location_t.
2553 (check_reduction_path): Convert 1st param from location_t to
2554 dump_user_location_t.
2555 * value-prof.c (check_counter): Update call to dump_printf_loc to
2556 pass in a dump_user_location_t rather than a location_t; update
2557 call to error_at for change in type of "locus".
2558 (check_ic_target): Update call to dump_printf_loc to
2559 pass in a dump_user_location_t rather than a location_t, via the
2562 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
2564 * config/s390/s390.h (enum processor_flags): Do not use
2565 default tune parameter when -march was specified.
2567 2018-06-26 Jakub Jelinek <jakub@redhat.com>
2570 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2571 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2574 2018-06-26 Richard Biener <rguenther@suse.de>
2576 PR tree-optimization/86287
2578 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2579 (vect_analyze_loop): Initialize n_stmts.
2581 2018-06-26 Richard Biener <rguenther@suse.de>
2584 * fold-const.c (fold_convertible_p): Pointer extension
2587 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
2590 * dwarf2out.c (loc_list_has_views): Adjust comments.
2591 (dw_loc_list): Split single cross-partition range with
2594 2018-06-25 Jeff Law <law@redhat.com>
2596 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2597 on -mbig-switch by default.
2599 * config/v850/predicates.md (const_float_1_operand): Fix match_code
2601 (const_float_0_operand): Remove unused predicate.
2602 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2603 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2604 (recipsf2): New expander. Original pattern now called
2606 (recipdf2, recipdf2_insn): Similarly.
2607 (rsqrtsf2, rsqrtsf2_insn): Similarly
2608 (rsqrtdf2, rsqrtdf2_insn): Similarly
2610 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
2612 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2613 Simplify logic for FreeBSD (twice).
2615 2018-06-25 Martin Sebor <msebor@redhat.com>
2617 PR tree-optimization/86204
2618 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2619 a strnlen result if it's less than the length of the string.
2621 2018-06-25 Martin Sebor <msebor@redhat.com>
2623 PR tree-optimization/85700
2624 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2625 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2626 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2628 2018-06-25 Martin Sebor <msebor@redhat.com>
2630 * doc/extend.texi (Zero-length arrays): Update and clarify.
2632 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
2634 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2635 added IEEE/IBM long double multilib support on PowerPC little
2636 endian Linux systems.
2637 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2638 (MULTILIB_DEFAULTS): Likewise.
2639 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2641 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2642 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2643 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2645 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
2648 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2649 (REORDER_45): Likewise.
2651 2018-06-25 Jeff Law <law@redhat.com>
2653 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2654 dividend to 32 bits. Adjust length.
2655 (udivmodhi4): Cleanup output template. Fix length.
2657 2018-06-25 Carl Love <cel@us.ibm.com>
2659 * config/rs6000/vsx.md: Change word selector to prefered location.
2661 2018-06-25 Richard Biener <rguenther@suse.de>
2663 PR tree-optimization/86304
2664 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2665 epilogue-if-converted loops as well.
2667 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
2669 * lto-section-out.c (lto_begin_section): Do not print section
2670 name for noaddr and unnumbered dumps.
2672 2018-06-25 Richard Biener <rguenther@suse.de>
2674 * tree-vectorizer.h (struct vec_info_shared): New structure
2675 with parts split out from struct vec_info and loop_nest from
2676 struct _loop_vec_info.
2677 (struct vec_info): Adjust accordingly.
2678 (struct _loop_vec_info): Likewise.
2679 (LOOP_VINFO_LOOP_NEST): Adjust.
2680 (LOOP_VINFO_DATAREFS): Likewise.
2681 (LOOP_VINFO_DDRS): Likewise.
2682 (struct _bb_vec_info): Likewise.
2683 (BB_VINFO_DATAREFS): Likewise.
2684 (BB_VINFO_DDRS): Likewise.
2685 (struct _stmt_vec_info): Add dr_aux member.
2686 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2687 (DR_MISALIGNMENT_UNINITIALIZED): New.
2688 (set_dr_misalignment): Adjust.
2689 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2690 (vect_analyze_loop): Adjust prototype.
2691 (vect_analyze_loop_form): Likewise.
2692 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2693 Compute dependences lazily.
2694 (vect_record_base_alignments): Use shared datarefs/ddrs.
2695 (vect_verify_datarefs_alignment): Likewise.
2696 (vect_analyze_data_refs_alignment): Likewise.
2697 (vect_analyze_data_ref_accesses): Likewise.
2698 (vect_analyze_data_refs): Likewise.
2699 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2700 constructor parameter for shared part.
2701 (vect_analyze_loop_form): Pass in shared part and adjust.
2702 (vect_analyze_loop_2): Pass in storage for the number of
2703 stmts. Move loop nest finding to the caller. Compute
2705 (vect_analyze_loop): Pass in shared part.
2706 (vect_transform_loop): Verify shared datarefs are unchanged.
2707 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2708 constructor parameter for shared part.
2709 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2710 (vect_slp_bb): Verify shared datarefs are unchanged before
2712 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2714 (new_stmt_vec_info): Initialize DR_AUX misalignment to
2715 DR_MISALIGNMENT_UNINITIALIZED.
2716 * tree-vectorizer.c (vec_info::vec_info): Add constructor
2717 parameter for shared part.
2718 (vec_info::~vec_info): Adjust.
2719 (vec_info_shared::vec_info_shared): New.
2720 (vec_info_shared::~vec_info_shared): Likewise.
2721 (vec_info_shared::save_datarefs): Likewise.
2722 (vec_info_shared::check_datarefs): Likewise.
2723 (try_vectorize_loop_1): Construct shared part live for analyses
2724 of a single loop for multiple vector sizes.
2725 * tree-parloops.c (gather_scalar_reductions): Adjust.
2727 2018-06-25 Richard Biener <rguenther@suse.de>
2729 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2730 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2731 (vect_analyze_data_refs): Remove similar code from here and
2732 simplify accordingly.
2734 2018-06-25 Richard Biener <rguenther@suse.de>
2736 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2737 for reverse storage order accesses rather than asserting
2738 they cannot happen here.
2740 2018-06-25 Tom de Vries <tdevries@suse.de>
2743 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
2744 Use data16 instead of .byte for insn prefix.
2746 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
2749 * parser.c (make_char_string_pack): Pass this literal chars
2750 through cpp_interpret_string.
2751 (cp_parser_userdef_numeric_literal): Check the result of
2752 make_char_string_pack.
2754 2018-06-24 Maya Rashish <coypu@sdf.org>
2756 * ginclude/stddef.h: Simplify conditions around avoiding
2757 re-definition of __size_t.
2759 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2761 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
2762 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
2764 2018-06-22 Maya Rashish <coypu@sdf.org>
2766 * doc/invoke.texi (mno-fancy-math-387): Update for changes
2767 made to OpenBSD and NetBSD through the years.
2769 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
2771 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2772 behavior of vec_pack (vector double, vector double) to match
2773 behavior of vec_float2 (vector double, vector double).
2775 2018-06-22 Olivier Hainque <hainque@adacore.com>
2777 * gimplify.c (gimplify_function_tree): Prevent creation
2778 of a trampoline for the address of the current function
2779 passed to entry/exit instrumentation hooks.
2781 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
2784 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
2787 2018-06-22 Martin Liska <mliska@suse.cz>
2789 PR tree-optimization/86263
2790 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2791 Bail out if is_enabled is false.
2792 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
2794 (jump_table_cluster::is_enabled): New function.
2796 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2798 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2799 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
2800 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
2801 (lto_input_ts_binfo_tree_pointers): Likewise.
2802 * tree-streamer-out.c (streamer_write_tree_bitfields,
2803 write_ts_binfo_tree_pointers): Likewise.
2804 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2806 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2808 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2810 2018-06-22 Martin Liska <mliska@suse.cz>
2812 * symbol-summary.h (get): Make it pure and inline move
2813 functionality from ::get function.
2814 (get): Remove and inline into ::get and ::get_create.
2815 (get_create): Move code from ::get function.
2817 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2820 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
2821 -x assembler-with-cpp.
2823 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2825 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
2826 _FILE_OFFSET_BITS=64 for C++.
2828 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
2830 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
2831 conversion insn that shows up when pr85657-3.c is compiled using
2832 IEEE 128-bit long double.
2833 (neg<mode>2_internal): Use the correct mode to check whether the
2834 mode is IBM extended.
2835 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
2836 multiply and divide external functions from being created more
2839 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2841 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
2843 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
2844 the edge can be forwarded.
2845 (cfg_layout_merge_blocks): Likewise.
2847 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2849 * except.c (finish_eh_generation): Commit edge insertions only after
2850 the EH edges have been redirected from post-landing to landing pads.
2852 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2854 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
2855 create_tmp_var_for to create the FRAME decl.
2856 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
2858 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2860 * tree-inline.c (copy_edges_for_bb): Minor tweak.
2861 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
2862 debug statement when resetting its value.
2863 (expand_call_inline): Copy the locus of the call onto the assignment
2864 of the return value, if any. Use local variable in more cases.
2866 2018-06-21 Martin Liska <mliska@suse.cz>
2868 * ipa-pure-const.c (propagate_nothrow): Use
2869 funct_state_summaries->get.
2870 (dump_malloc_lattice): Likewise.
2871 (propagate_malloc): Likewise.
2873 2018-06-21 Richard Biener <rguenther@suse.de>
2875 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
2876 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
2877 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
2879 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
2880 BLOCK_ABSTRACT_ORIGIN unconditionally.
2882 2018-06-21 David Malcolm <dmalcolm@redhat.com>
2884 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
2886 * ipa-reference.c (ipa_reference_c_finalize): Delete
2887 ipa_ref_opt_sum_summaries and set it to NULL.
2889 2018-06-21 Tom de Vries <tdevries@suse.de>
2891 PR tree-optimization/85859
2892 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
2893 test with comment from bb_no_side_effects_p.
2895 2018-06-21 Richard Biener <rguenther@suse.de>
2897 PR tree-optimization/86232
2898 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
2899 max for constant niter.
2901 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2903 * config/aarch64/aarch64-simd.md
2904 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
2906 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2908 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
2909 Make opernads of the unspec commutative.
2911 2018-06-21 Richard Biener <rguenther@suse.de>
2913 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
2914 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
2915 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
2916 (vect_analyze_data_ref_dependence): Re-order checks to deal with
2918 (vect_record_base_alignments): Do not record base alignment
2919 for gathers or scatters.
2920 (vect_compute_data_ref_alignment): Drop return value that is always
2921 true. Bail out early for gathers or scatters.
2922 (vect_enhance_data_refs_alignment): Bail out early for gathers
2924 (vect_find_same_alignment_drs): Likewise.
2925 (vect_analyze_data_refs_alignment): Remove dead code.
2926 (vect_slp_analyze_and_verify_node_alignment): Likewise.
2927 (vect_analyze_data_refs): For possible gathers or scatters do
2928 not create an alternate DR, just check their possible validity
2929 and mark them. Adjust DECL_NONALIASED handling to not rely
2931 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
2932 update inits of gathers or scatters.
2933 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
2934 Also copy gather/scatter flag to pattern vinfo.
2936 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
2938 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2939 behavior of vec_packsu (vector unsigned long long, vector unsigned
2940 long long) to match behavior of vec_packs with same signature.
2942 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2943 Thomas Schwinge <thomas@codesourcery.com>
2944 Cesar Philippidis <cesar@codesourcery.com>
2946 * gimplify.c (gimplify_scan_omp_clauses): Add support for
2947 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2948 (gimplify_adjust_omp_clauses): Likewise.
2949 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
2950 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
2951 (gimplify_omp_target_update): Update handling of acc update and
2953 * omp-low.c (install_var_field): Remove unused parameter
2954 base_pointers_restrict.
2955 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
2956 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
2958 (omp_target_base_pointers_restrict_p): Delete.
2959 (scan_omp_target): Update call to scan_sharing_clauses.
2960 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
2962 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2963 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2964 (convert_local_omp_clauses): Likewise.
2965 * tree-pretty-print.c (dump_omp_clause): Likewise.
2966 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
2968 (omp_clause_code_name): Likewise.
2970 2018-06-20 Jakub Jelinek <jakub@redhat.com>
2973 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
2976 PR tree-optimization/86231
2977 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
2978 anti-range don't overwrite *vr0min before using it to compute *vr0max.
2980 2018-06-20 Tom de Vries <tdevries@suse.de>
2982 PR tree-optimization/86097
2983 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
2984 iv type if signedness of iv type is not the same as that of *nit.
2986 2018-06-20 Jakub Jelinek <jakub@redhat.com>
2988 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
2989 EDGE_EH edges, verify they are all EDGE_EH.
2991 2018-06-20 Maya Rashish <coypu@sdf.org>
2993 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
2995 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2997 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
2998 * config/aarch64/aarch64.c (xgene1_tunings): Add
2999 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3000 (aarch64_mode_valid_for_sched_fusion_p):
3001 Allow 16-byte modes.
3002 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3003 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3005 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3007 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3008 * config/aarch64/iterators.md (VQ2): New mode iterator.
3010 2018-06-20 Martin Liska <mliska@suse.cz>
3012 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3013 Change default ratio from 10 to 8.
3015 2018-06-20 Martin Liska <mliska@suse.cz>
3017 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3019 (bit_test_cluster::find_bit_tests): Likewise.
3020 (switch_decision_tree::analyze_switch_statement): Find clusters.
3021 * tree-switch-conversion.h (struct jump_table_cluster): Document
3024 2018-06-20 Martin Liska <mliska@suse.cz>
3026 * tree-switch-conversion.c (switch_conversion::collect):
3027 Record m_uniq property.
3028 (switch_conversion::expand): Bail out for special conditions.
3029 (group_cluster::~group_cluster): New.
3030 (group_cluster::group_cluster): Likewise.
3031 (group_cluster::dump): Likewise.
3032 (jump_table_cluster::emit): New.
3033 (switch_decision_tree::fix_phi_operands_for_edges): New.
3034 (struct case_node): Remove struct.
3035 (jump_table_cluster::can_be_handled): New.
3036 (case_values_threshold): Moved to header.
3037 (reset_out_edges_aux): Likewise.
3038 (jump_table_cluster::is_beneficial): New.
3039 (bit_test_cluster::can_be_handled): Likewise.
3040 (add_case_node): Remove.
3041 (bit_test_cluster::is_beneficial): New.
3042 (case_bit_test::cmp): New.
3043 (bit_test_cluster::emit): New.
3044 (expand_switch_as_decision_tree_p): Remove.
3045 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3046 (fix_phi_operands_for_edge): Likewise.
3047 (switch_decision_tree::analyze_switch_statement): New.
3048 (compute_cases_per_edge): Move ...
3049 (switch_decision_tree::compute_cases_per_edge): ... here.
3050 (try_switch_expansion): Likewise.
3051 (switch_decision_tree::try_switch_expansion): Likewise.
3052 (record_phi_operand_mapping): Likewise.
3053 (switch_decision_tree::record_phi_operand_mapping): Likewise.
3054 (emit_case_decision_tree): Likewise.
3055 (switch_decision_tree::emit): Likewise.
3056 (balance_case_nodes): Likewise.
3057 (switch_decision_tree::balance_case_nodes): Likewise.
3058 (dump_case_nodes): Likewise.
3059 (switch_decision_tree::dump_case_nodes): Likewise.
3060 (emit_jump): Likewise.
3061 (switch_decision_tree::emit_jump): Likewise.
3062 (emit_cmp_and_jump_insns): Likewise.
3063 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3064 (emit_case_nodes): Likewise.
3065 (switch_decision_tree::emit_case_nodes): Likewise.
3066 (conditional_probability): Remove.
3067 * tree-switch-conversion.h (enum cluster_type): New.
3069 (struct cluster): Likewise.
3070 (cluster::cluster): Likewise.
3071 (struct simple_cluster): Likewise.
3072 (simple_cluster::simple_cluster): Likewise.
3073 (struct group_cluster): Likewise.
3074 (struct jump_table_cluster): Likewise.
3075 (struct bit_test_cluster): Likewise.
3076 (struct min_cluster_item): Likewise.
3077 (struct case_tree_node): Likewise.
3078 (case_tree_node::case_tree_node): Likewise.
3079 (jump_table_cluster::case_values_threshold): Likewise.
3080 (struct case_bit_test): Likewise.
3081 (struct switch_decision_tree): Likewise.
3082 (struct switch_conversion): Likewise.
3083 (switch_decision_tree::reset_out_edges_aux): Likewise.
3085 2018-06-20 Martin Liska <mliska@suse.cz>
3087 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3088 (hoist_edge_and_branch_if_true): Likewise.
3089 (expand_switch_using_bit_tests_p): Likewise.
3090 (struct case_bit_test): Likewise.
3091 (case_bit_test_cmp): Likewise.
3092 (emit_case_bit_tests): Likewise.
3093 (switch_conversion::switch_conversion): New class.
3094 (struct switch_conv_info): Remove old struct.
3095 (collect_switch_conv_info): More to ...
3096 (switch_conversion::collect): ... this.
3097 (check_range): Likewise.
3098 (switch_conversion::check_range): Likewise.
3099 (check_all_empty_except_final): Likewise.
3100 (switch_conversion::check_all_empty_except_final): Likewise.
3101 (check_final_bb): Likewise.
3102 (switch_conversion::check_final_bb): Likewise.
3103 (create_temp_arrays): Likewise.
3104 (switch_conversion::create_temp_arrays): Likewise.
3105 (free_temp_arrays): Likewise.
3106 (gather_default_values): Likewise.
3107 (switch_conversion::gather_default_values): Likewise.
3108 (build_constructors): Likewise.
3109 (switch_conversion::build_constructors): Likewise.
3110 (constructor_contains_same_values_p): Likewise.
3111 (switch_conversion::contains_same_values_p): Likewise.
3112 (array_value_type): Likewise.
3113 (switch_conversion::array_value_type): Likewise.
3114 (build_one_array): Likewise.
3115 (switch_conversion::build_one_array): Likewise.
3116 (build_arrays): Likewise.
3117 (switch_conversion::build_arrays): Likewise.
3118 (gen_def_assigns): Likewise.
3119 (switch_conversion::gen_def_assigns): Likewise.
3120 (prune_bbs): Likewise.
3121 (switch_conversion::prune_bbs): Likewise.
3122 (fix_phi_nodes): Likewise.
3123 (switch_conversion::fix_phi_nodes): Likewise.
3124 (gen_inbound_check): Likewise.
3125 (switch_conversion::gen_inbound_check): Likewise.
3126 (process_switch): Use the newly created class.
3127 (switch_conversion::expand): New.
3128 (switch_conversion::~switch_conversion): New.
3129 * tree-switch-conversion.h: New file.
3131 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3133 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3134 tree-vect-patterns.c.
3135 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3136 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
3137 (vect_recog_sad_pattern): Likewise.
3138 (vect_recog_widen_sum_pattern): Likewise.
3139 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
3140 (vect_recog_widen_shift_pattern): Remove the type_in argument.
3141 (vect_recog_rotate_pattern): Likewise.
3142 (vect_recog_mult_pattern): Likewise.
3143 (vect_recog_vector_vector_shift_pattern): Likewise.
3144 (vect_recog_divmod_pattern): Likewise.
3145 (vect_recog_mixed_size_cond_pattern): Likewise.
3146 (vect_recog_bool_pattern): Likewise.
3147 (vect_recog_mask_conversion_pattern): Likewise.
3148 (vect_try_gather_scatter_pattern): Likewise.
3149 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
3150 (vect_recog_over_widening_pattern): Likewise.
3151 (vect_recog_gather_scatter_pattern): Likewise.
3152 (vect_recog_func_ptr): Move from tree-vectorizer.h
3153 (vect_vect_recog_func_ptrs): Move further down the file.
3154 (vect_recog_func): Likewise. Remove the third argument.
3155 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3156 (vect_pattern_recog_1): Expect the pattern function to do any
3157 necessary target tests. Also expect it to provide a vector type.
3158 Remove the type_in handling.
3160 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3162 * tree-vect-patterns.c (vect_pattern_detected): New function.
3163 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3164 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3165 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3166 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3167 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3168 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3169 (vect_recog_mask_conversion_pattern)
3170 (vect_try_gather_scatter_pattern): Likewise.
3172 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3174 * tree-vect-patterns.c (vect_get_internal_def): New function.
3175 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3176 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3177 (search_type_for_mask_1): Use it.
3179 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3181 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3182 redundant WIDEN_SUM_EXPR handling.
3183 (vect_recog_sad_pattern): Likewise.
3185 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3187 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3188 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3189 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3190 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3191 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3193 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3195 * tree-vect-stmts.c (vectorizable_call): Make sure that we
3196 use the stmt_vec_info of the original bb statement for the
3197 new zero assignment, even if the call is part of a pattern.
3199 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3201 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3202 that the sequence is attached to the original statement rather
3203 than the pattern statement.
3204 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3205 PATTERN_DEF_SEQ from the original statement rather than
3206 the main pattern statement.
3207 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3208 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3209 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3211 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3213 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3214 definition statements before the early exit for statements that aren't
3216 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3218 (vect_transform_loop): ...here. Process pattern definition
3219 statements without first checking whether the main pattern
3220 statement is live or relevant.
3222 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3224 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3225 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3227 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
3229 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3230 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3231 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3232 (expand_block_compare): Change select_block_compare_mode call.
3233 (expand_strncmp_align_check): Use new functions, fix comment.
3234 (emit_final_str_compare_gpr): New function.
3235 (expand_strn_compare): Refactor and clean up code.
3236 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3238 2018-06-19 Tony Reix <tony.reix@atos.com>
3239 Damien Bergamini <damien.bergamini@atos.com>
3240 David Edelsohn <dje.gcc@gmail.com>
3242 * collect2.c (static_obj): New variable.
3243 (static_libs): New variable.
3244 (is_in_list): Uncomment declaration.
3245 (main): Track AIX libraries linked statically.
3246 (is_in_list): Uncomment definition.
3247 (scan_prog_file): Don't add AIX shared libraries initializer
3248 to constructor list if linking statically.
3250 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3252 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3254 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3256 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
3258 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3261 2018-06-19 Martin Liska <mliska@suse.cz>
3263 * config/i386/i386.c (ix86_can_inline_p): Do not use
3264 ipa_fn_summaries::get_create.
3265 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3267 (devirtualization_time_bonus): Likewise.
3268 (ipcp_propagate_stage): Likewise.
3269 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3270 (edge_set_predicate): Likewise.
3271 (evaluate_conditions_for_known_args): Likewise.
3272 (evaluate_properties_for_edge): Likewise.
3273 (ipa_call_summary::reset): Tranform to ...
3274 (ipa_call_summary::~ipa_call_summary): ... this.
3275 (ipa_fn_summary::reset): Transform to ...
3276 (ipa_fn_summary::~ipa_fn_summary): ... this.
3277 (ipa_fn_summary_t::remove): Rename to ...
3278 (ipa_fn_summary_t::remove_callees): ... this.
3279 (ipa_fn_summary_t::duplicate): Use placement new
3280 instead of memory copy.
3281 (ipa_call_summary_t::duplicate): Likewise.
3282 (ipa_call_summary_t::remove): Remove.
3283 (dump_ipa_call_summary): Change get_create to get.
3284 (ipa_dump_fn_summary): Dump only when summary exists.
3285 (analyze_function_body): Use symbol_summary::get instead
3287 (compute_fn_summary): Likewise.
3288 (estimate_edge_devirt_benefit): Likewise.
3289 (estimate_edge_size_and_time): Likewise.
3290 (inline_update_callee_summaries): Likewise.
3291 (remap_edge_change_prob): Likewise.
3292 (remap_edge_summaries): Likewise.
3293 (ipa_merge_fn_summary_after_inlining): Likewise.
3294 (write_ipa_call_summary): Likewise.
3295 (ipa_fn_summary_write): Likewise.
3296 (ipa_free_fn_summary): Likewise.
3297 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3298 (struct ipa_call_summary): Likewise.
3299 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3301 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3302 (estimate_size_after_inlining): Likewise.
3303 (estimate_growth): Likewise.
3304 (growth_likely_positive): Likewise.
3305 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3306 (inline_call): Likewise.
3307 * ipa-inline.c (caller_growth_limits): Likewise.
3308 (can_inline_edge_p): Likewise.
3309 (can_inline_edge_by_limits_p): Likewise.
3310 (compute_uninlined_call_time): Likewise.
3311 (compute_inlined_call_time): Likewise.
3312 (want_inline_small_function_p): Likewise.
3313 (edge_badness): Likewise.
3314 (update_caller_keys): Likewise.
3315 (update_callee_keys): Likewise.
3316 (inline_small_functions): Likewise.
3317 (inline_to_all_callers_1): Likewise.
3318 (dump_overall_stats): Likewise.
3319 (early_inline_small_functions): Likewise.
3320 (early_inliner): Likewise.
3321 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3322 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3323 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3324 * ipa-split.c (execute_split_functions): Likewise.
3325 * symbol-summary.h: Likewise.
3326 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3328 2018-06-19 Richard Biener <rguenther@suse.de>
3330 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3331 (vectorize_loops): ... here. Fix dbgcnt handling.
3332 (try_vectorize_loop): Wrap try_vectorize_loop_1.
3334 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
3337 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3338 ieee128 argument takes up only one (vector) register, not two (floating
3341 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3343 * gimplify.c (gimplify_init_constructor): Really never clear for an
3344 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3346 2018-06-19 Richard Biener <rguenther@suse.de>
3348 PR tree-optimization/86179
3349 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3350 after failed recognition.
3352 2018-06-18 Martin Sebor <msebor@redhat.com>
3355 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3356 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3357 Handle integer subtraction.
3358 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3359 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3361 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3363 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3364 param from rtx to rtx_insn *.
3365 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3367 (frv_ifcvt_modify_insn): Likwise.
3368 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3369 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
3370 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3371 as_a <rtx_insn *> cast to local "unprotected_region" once
3372 it's been established that it's not NULL or pc_rtx.
3373 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3374 param "sethi" from rtx to rtx_insn *.
3375 (nds32_group_float_insns): Likewise for param "insn".
3376 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3378 (vax_output_int_subtract): Likewise.
3379 * config/vax/vax.c (vax_output_int_add): Likewise for param
3381 (vax_output_int_subtract): Likewise.
3382 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3383 (emit_pattern_after): Likewise for param "after".
3384 (emit_insn_after): Likewise.
3385 (emit_jump_insn_after): Likewise.
3386 (emit_call_insn_after): Likewise.
3387 (emit_debug_insn_after): Likewise.
3388 (emit_pattern_before): Likewise for param "before".
3389 (emit_insn_before): Likewise.
3390 (emit_jump_insn_before): Likewise.
3391 * final.c (get_insn_template): Likewise for param "insn", removing
3393 * output.h (get_insn_template): Likewise for 2nd param.
3394 * rtl.h (emit_insn_before): Likewise.
3395 (emit_jump_insn_before): Likewise.
3396 (emit_debug_insn_before_noloc): Likewise.
3397 (emit_insn_after): Likewise.
3398 (emit_jump_insn_after): Likewise.
3399 (emit_call_insn_after): Likewise.
3400 (emit_debug_insn_after): Likewise.
3401 (set_insn_deleted): Likewise for param.
3403 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
3406 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3407 floating point modes, so that IFmode is numerically greater than
3408 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3409 to declare the ordering. This prevents IFmode from being
3410 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3411 machine. Include rs6000-modes.h to share the fractional values
3412 between genmodes* and the rest of the compiler.
3416 * config/rs6000/rs6000-modes.h: New file.
3417 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3418 meaning of rs6000_long_double_size so that 126..128 selects an
3419 appropriate 128-bit floating point type.
3420 (rs6000_option_override_internal): Likewise.
3421 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3422 (TARGET_LONG_DOUBLE_128): Change the meaning of
3423 rs6000_long_double_size so that 126..128 selects an appropriate
3424 128-bit floating point type.
3425 (LONG_DOUBLE_TYPE_SIZE): Update comment.
3426 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3427 source and destination to match the standard usage.
3428 (truncifkf2): Likewise.
3429 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3430 ISA 2.07 to use an explicit clobber, instead of passing in a
3432 (copysign<mode>3_soft): Likewise.
3434 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3436 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3437 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3438 (vect_slp_analyze_instance_dependence): Likewise.
3439 (vect_enhance_data_refs_alignment): Likewise.
3440 (vect_analyze_data_refs_alignment): Likewise.
3441 (vect_slp_analyze_and_verify_instance_alignment
3442 (vect_analyze_data_ref_accesses): Likewise.
3443 (vect_prune_runtime_alias_test_list): Likewise.
3444 (vect_analyze_data_refs): Likewise.
3445 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3446 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3447 (vect_analyze_scalar_cycles_1): Likewise.
3448 (vect_get_loop_niters): Likewise.
3449 (vect_analyze_loop_form_1): Likewise.
3450 (vect_update_vf_for_slp): Likewise.
3451 (vect_analyze_loop_operations): Likewise.
3452 (vect_analyze_loop): Likewise.
3453 (vectorizable_induction): Likewise.
3454 (vect_transform_loop): Likewise.
3455 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3456 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3457 (vect_make_slp_decision): Likewise.
3458 (vect_detect_hybrid_slp): Likewise.
3459 (vect_slp_analyze_operations): Likewise.
3460 (vect_slp_bb): Likewise.
3461 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3462 (vectorizable_bswap): Likewise.
3463 (vectorizable_call): Likewise.
3464 (vectorizable_simd_clone_call): Likewise.
3465 (vectorizable_conversion): Likewise.
3466 (vectorizable_assignment): Likewise.
3467 (vectorizable_shift): Likewise.
3468 (vectorizable_operation): Likewise.
3469 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3471 2018-06-18 Martin Sebor <msebor@redhat.com>
3473 PR tree-optimization/81384
3474 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3475 * builtins.c (expand_builtin_strnlen): New function.
3476 (expand_builtin): Call it.
3477 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3478 * builtins.def (BUILT_IN_STRNLEN): New.
3479 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3480 Warn for bounds in excess of maximum object size.
3481 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3482 single-value ranges. Handle strnlen.
3483 (handle_builtin_strlen): Handle strnlen.
3484 (strlen_check_and_optimize_stmt): Same.
3485 * doc/extend.texi (Other Builtins): Document strnlen.
3487 2018-06-18 Maya Rashish <coypu@sdf.org>
3489 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3490 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3491 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3493 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3495 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3497 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3499 * tree.c (escaped_string::escape): Replace cast to char * by
3500 const_cast<char *> (unescaped).
3502 2018-06-18 Nick Clifton <nickc@redhat.com>
3505 * tree.c (escaped_string): New class. Converts an unescaped
3506 string into its escaped equivalent.
3507 (warn_deprecated_use): Use the new class to convert the
3508 deprecation message, if present.
3509 (test_escaped_strings): New self test.
3510 (test_c_tests): Add test_escaped_strings.
3511 * doc/extend.texi (deprecated): Add a note that the
3512 deprecation message is affected by the -fmessage-length
3513 option, and that control characters will be escaped.
3514 (#pragma GCC error): Document this pragma.
3515 (#pragma GCC warning): Likewise.
3516 * doc/invoke.texi (-fmessage-length): Document this option's
3517 effect on the #warning and #error preprocessor directives and
3518 the deprecated attribute.
3520 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
3522 * tree.c (decl_value_expr_lookup): Revert latest change.
3523 (decl_value_expr_insert): Likewise.
3525 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
3527 * gimplify.c (nonlocal_vlas): Delete.
3528 (nonlocal_vla_vars): Likewise.
3529 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3531 (gimplify_body): Do not create and destroy nonlocal_vlas.
3532 * tree-nested.c: Include diagnostic.h.
3533 (use_pointer_in_frame): Tweak.
3534 (lookup_field_for_decl): Add assertion and declare the transformation.
3535 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3536 internal error when the reference is in a wrong context. Do not
3537 create a debug decl by default.
3538 (note_nonlocal_block_vlas): Delete.
3539 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3540 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
3541 create a debug decl by default.
3542 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3543 call is in a wrong context.
3544 (fixup_vla_decls): New function.
3545 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
3546 debug variables were created.
3547 * tree.c (decl_value_expr_lookup): Add checking assertion.
3548 (decl_value_expr_insert): Likewise.
3550 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3553 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3554 * tree-scalar-evolution.c (interpret_expr): Likewise.
3555 (expression_expensive_p): Likewise.
3556 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3557 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3558 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3559 (ssa_defined_by_minus_one_stmt_p): New.
3561 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3564 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3565 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3566 * dojump.c (do_jump): Likewise.
3567 * expr.c (expand_expr_real_2): Check operand type's sign.
3568 * fold-const.c (const_unop): Handle ABSU_EXPR.
3569 (fold_abs_const): Likewise.
3570 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3571 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3572 (strip_sign_op_1): Likesise.
3573 * match.pd: Add new pattern to generate ABSU_EXPR.
3574 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3575 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3576 * tree-eh.c (operation_could_trap_helper_p): Likewise.
3577 * tree-inline.c (estimate_operator_cost): Likewise.
3578 * tree-pretty-print.c (dump_generic_node): Likewise.
3579 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3580 * tree.def (ABSU_EXPR): New.
3582 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3585 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3586 documented as preserved for backward compatibility only.
3587 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3589 PR rtl-optimization/86108
3590 * bb-reorder.c (create_forwarder_block): Renamed to ...
3591 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
3592 jump from new landing pad to the second part.
3593 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3596 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3599 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3600 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3601 Only call store_expr for halves if the mode is the same.
3604 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3605 Fix up comment formatting.
3607 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3609 * typed-splay-tree.h (typed_splay_tree::remove): New function.
3610 (typed_splay_tree::closure,
3611 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3612 (typed_splay_tree::typed_splay_tree,
3613 typed_splay_tree::operator =): Declared private.
3614 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3615 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3616 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3617 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3618 typed_splay_tree::splay_tree_splay,
3619 typed_splay_tree::splay_tree_foreach_helper,
3620 typed_splay_tree::splay_tree_insert,
3621 typed_splay_tree::splay_tree_remove,
3622 typed_splay_tree::splay_tree_lookup,
3623 typed_splay_tree::splay_tree_predecessor,
3624 typed_splay_tree::splay_tree_successor,
3625 typed_splay_tree::splay_tree_min,
3626 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3627 (typed_splay_tree::root, typed_splay_tree::comp,
3628 typed_splay_tree::delete_key,
3629 typed_splay_tree::delete_value): New data members.
3630 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3631 typed_splay_tree::remove.
3633 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
3635 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3636 -mginv and -mno-ginv to the assembler.
3637 * config/mips/mips.opt (-mcrc): New option.
3639 * doc/invoke.text (-mcrc): Document.
3642 2018-06-15 Nick Clifton <nickc@redhat.com>
3645 * tree.c (escaped_string): New class. Converts an unescaped
3646 string into its escaped equivalent.
3647 (warn_deprecated_use): Use the new class to convert the
3648 deprecation message, if present.
3649 (test_escaped_strings): New self test.
3650 (test_c_tests): Add test_escaped_strings.
3651 * doc/extend.texi (deprecated): Add a note that the
3652 deprecation message is affected by the -fmessage-length
3653 option, and that control characters will be escaped.
3654 (#pragma GCC error): Document this pragma.
3655 (#pragma GCC warning): Likewise.
3656 * doc/invoke.texi (-fmessage-length): Document this option's
3657 effect on the #warning and #error preprocessor directives and
3658 the deprecated attribute.
3660 2018-06-15 Richard Biener <rguenther@suse.de>
3662 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3663 here, also noting vector size used.
3664 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
3665 size used in MSG_OPTIMIZED_LOCATIONS dump.
3666 (pass_slp_vectorize::execute): Adjust.
3668 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
3671 * config/arc/arc.c (arc_return_address_register): Fix
3674 2018-06-15 Richard Biener <rguenther@suse.de>
3677 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3678 leave useless conversion stripping to force_gimple_operand_gsi.
3679 (gimplify_build2): Likewise.
3680 (gimplify_build1): Likewise.
3682 2018-06-15 Richard Biener <rguenther@suse.de>
3685 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3686 before adjusting their block.
3688 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3690 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3691 multilibs for *-*-rtems*.
3692 * config/riscv/t-rtems: New file.
3694 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3697 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3698 unsigned_type_for returns NULL.
3701 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3702 subregs of multi-word pseudos unless the float mode has word size.
3704 2018-06-14 Richard Biener <rguenther@suse.de>
3707 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3708 duplicate and harmful type_hash_canon.
3709 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3711 2018-06-14 Richard Biener <rguenther@suse.de>
3714 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3717 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3719 * config/rtems.h (STDINT_LONG32): Define.
3721 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
3722 Prachi Godbole <prachi.godbole@imgtec.com>
3724 * config/mips/mips-cpus.def: Define P6600.
3725 * config/mips/mips-tables.opt: Regenerate.
3726 * config/mips/mips.c (mips_ucbranch_type): New enum.
3727 (mips_rtx_cost_data): Add support for P6600.
3728 (mips_issue_rate): Likewise.
3729 (mips_multipass_dfa_lookahead): Likewise.
3730 (mips_avoid_hazard): Likewise.
3731 (mips_reorg_process_insns): Likewise.
3732 (mips_classify_branch_p6600): New function.
3733 * config/mips/mips.h (TUNE_P6600): New define.
3734 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3735 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3736 * config/mips/mips.md: Include p6600.md.
3737 (processor): Add p6600.
3738 * config/mips/p6600.md: New file.
3739 * doc/invoke.texi: Add p6600 to supported architectures.
3741 2018-06-13 Martin Sebor <msebor@redhat.com>
3743 PR tree-optimization/86114
3744 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3746 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3748 2018-06-13 Richard Biener <rguenther@suse.de>
3750 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
3751 Properly set vector type of the intermediate stmt.
3752 * tree-vect-stmts.c (vectorizable_operation): The destination
3753 var always has vectype_out type.
3755 2018-06-13 Jeff Law <law@redhat.com>
3757 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
3758 integer 0 for argument to print_rtl_with_bb.
3759 (rl78_reorg): Likewise.
3761 2018-06-13 David Malcolm <dmalcolm@redhat.com>
3763 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
3764 from rtx to rtx_insn *.
3765 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
3767 (add_sched_insns_for_speculation): Likewise for local "target",
3768 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3769 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
3770 from rtx_insn ** to rtx_code_label **.
3771 (reorg_emit_nops): Likewise.
3772 (c6x_reorg): Likewise for local "call_labels".
3773 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
3775 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
3776 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
3777 the loops over LABEL_REFS.
3778 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
3780 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3781 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
3782 (split_branches): Strengthen local "olabel" from rtx to
3783 rtx_insn *, adding a safe_as_a cast.
3784 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
3786 (add_insn_after): Likewise for first two params.
3787 (add_insn_before): Likewise.
3788 (remove_insn): Likewise for param.
3789 (emit_pattern_before_noloc): Likewise for second and third params.
3790 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
3791 (emit_call_insn_before_noloc): Likewise.
3792 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
3794 (emit_barrier_before): Likewise.
3795 (emit_label_before): Strengthen "label" param from "rtx" to
3796 "rtx_code_label *". Strengthen "before" param from "rtx" to
3798 (emit_insn_after_1): Strengthen "after" param from "rtx" to
3800 (emit_pattern_after_noloc): Likewise.
3801 (emit_insn_after_noloc): Likewise.
3802 (emit_jump_insn_after_noloc): Likewise.
3803 (emit_call_insn_after_noloc): Likewise.
3804 (emit_debug_insn_after_noloc): Likewise.
3805 (emit_barrier_after): Likewise.
3806 (emit_label_after): Likewise for both params.
3807 (emit_pattern_after_setloc): Likewise for "after" param. Convert
3808 "loc" param from "int" to "location_t".
3809 (emit_insn_after_setloc): Likewise.
3810 (emit_jump_insn_after_setloc): Likewise.
3811 (emit_call_insn_after_setloc): Likewise.
3812 (emit_debug_insn_after_setloc): Likewise.
3813 (emit_pattern_before_setloc): Likewise for "before" param. Convert
3814 "loc" param from "int" to "location_t".
3815 (emit_pattern_before): Convert NULL_RTX to NULL.
3816 (emit_insn_before_setloc): Convert "loc" param from "int" to
3818 (emit_jump_insn_before_setloc): Likewise.
3819 (emit_call_insn_before_setloc): Likewise.
3820 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
3821 rtx_insn *. Convert "loc" param from "int" to "location_t".
3822 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
3823 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
3824 Convert 3rd param from "int" to "location_t".
3825 (emit_barrier_before, emit_barrier_after, next_real_insn):
3826 Strengthen param from rtx to rtx_insn *.
3827 (emit_label_before): Strengthen 1st param from "rtx" to
3828 "rtx_code_label *". Strengthen 2nd param from "rtx" to
3830 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
3831 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
3832 Strengthen 2nd param from "rtx" to "rtx_insn *".
3833 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
3834 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
3835 Likewise. Convert 3rd param from "int" to "location_t".
3836 (emit_label_after): Strengthen 1st param from "rtx" to
3838 (next_real_insn, remove_insn): Strengthen param from "rtx" to
3840 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
3841 from "rtx" to "rtx_insn *".
3843 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
3845 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
3846 bodies streamed in with -Q.
3847 * dumpfile.c (dump_files): Add lto-stream-out dump file.
3848 * dumpfile.h (tree_dump_index): Add lto_stream_out.
3849 * gimple-streamer-out.c: Include gimple-pretty-print.h
3850 (output_bb): Dump stmts streamed.
3851 * lto-section-out.c: Include print-tree.h
3852 (lto_begin_section): Dump sections created.
3853 (lto_output_decl_index): Dump decl encoded.
3854 * lto-streamer-out.c: Include print-tree.h
3855 (create_output_block): Dump output block created.
3856 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
3857 (output_function): Dump function output.
3858 (output_constructor): Dump constructor streamed.
3859 (write_global_stream): Output indexes encoded.
3860 (produce_asm_for_decls): Dump streams encoded.
3861 * lto-streamer.c (streamer_dump_file): New global var.
3862 * lto-streamer.h (streamer_dump_file): Declare.
3863 * passes.c (ipa_write_summaries): Initialize streamer dump.
3864 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
3867 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
3870 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
3871 offsets for register save directives. Emit a second batch of save
3872 directives, if need be, when the function accesses prior frames.
3874 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3876 * config/arc/fpu.md (fmasf4): Force operand to register.
3877 (fnmasf4): Likewise.
3879 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3881 * config/arc/arc-protos.h (arc_pad_return): Remove.
3882 * config/arc/arc.c (machine_function): Remove force_short_suffix
3884 (arc_print_operand): Adjust printing of '&'.
3885 (arc_verify_short): Remove conditional printing of short suffix.
3886 (arc_final_prescan_insn): Remove reference to size_reason.
3887 (pad_return): New function.
3888 (arc_reorg): Call pad_return.
3889 (arc_pad_return): Remove.
3890 (arc_init_machine_status): Remove reference to force_short_suffix.
3891 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3892 (attr length): When attribute iscompact is true force to 2
3893 regardless; in the case of maybe check if we want to force the
3894 instruction to have 4 bytes length.
3895 (nopv): Change it to generate 4 byte long nop as well.
3896 (blockage): New pattern.
3897 (simple_return): Remove call to arc_pad_return.
3898 (p_return_i): Likewise.
3900 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3902 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
3904 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3906 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
3909 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3911 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
3912 for ARC700 and ARCv2.
3914 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
3917 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
3918 operands[2] instead of operands[1].
3921 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
3923 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
3924 case, check whether the outer register overlaps an unallocatable
3925 register, not just whether it fits the required class.
3927 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
3929 * poly-int.h (can_div_trunc_p): Add new overload in which all values
3931 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
3932 (memrefs_conflict_p): Likewise.
3933 (init_alias_analysis): Likewise.
3934 * cfgexpand.c (expand_debug_expr): Likewise.
3935 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
3936 * cse.c (fold_rtx): Likewise.
3937 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
3938 * expr.c (emit_block_move_hints): Likewise.
3939 (clear_storage_hints, push_block, emit_push_insn): Likewise.
3940 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
3941 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
3942 (emit_group_store): Likewise.
3943 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
3944 to read the PRE/POST_MODIFY increment.
3945 * calls.c (store_one_arg): Use strip_offset.
3946 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
3948 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
3950 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
3951 (simplify_binary_operation_1): Extend CONST_INT handling to
3953 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
3954 than a HOST_WIDE_INT.
3955 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
3957 (adjust_mems, add_stores): Update accodingly.
3958 (vt_canonicalize_addr): Track polynomial offsets.
3959 (emit_note_insn_var_location): Likewise.
3960 (vt_add_function_parameter): Likewise.
3961 (vt_initialize): Likewise.
3963 2018-06-12 Jeff Law <law@redhat.com>
3965 * config.gcc (alpha*-*-freebsd*): Remove.
3966 * config/alpha/freebsd.h: Remove.
3968 2018-06-12 David Malcolm <dmalcolm@redhat.com>
3971 * spellcheck-tree.c (levenshtein_distance): Rename to...
3972 (get_edit_distance): ...this, and update for underlying renaming.
3973 * spellcheck-tree.h (levenshtein_distance): Rename to...
3974 (get_edit_distance): ...this.
3975 * spellcheck.c (levenshtein_distance): Rename to...
3976 (get_edit_distance): ...this. Convert from Levenshtein distance
3977 to Damerau-Levenshtein distance by supporting transpositions of
3978 adjacent characters. Rename "v1" to "v_next" and "v0" to
3980 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
3981 (selftest::test_edit_distance_unit_test_oneway): ...this, and
3982 update for underlying renaming.
3983 (selftest::levenshtein_distance_unit_test): Rename to...
3984 (selftest::test_get_edit_distance_unit): ...this, and update for
3985 underlying renaming.
3986 (selftest::test_find_closest_string): Add example from PR 69968
3987 where transposition helps
3988 (selftest::test_metric_conditions): Update for renaming.
3989 (selftest::test_metric_conditions): Likewise.
3990 (selftest::spellcheck_c_tests): Likewise.
3991 * spellcheck.h (levenshtein_distance): Rename both overloads to...
3992 (get_edit_distance): ...this.
3993 (best_match::consider): Update for renaming.
3995 2018-06-12 Martin Sebor <msebor@redhat.com>
3997 PR tree-optimization/85259
3998 * builtins.c (compute_objsize): Handle constant offsets.
3999 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4000 true iff a warning has been issued.
4001 * gimple.h (gimple_nonartificial_location): New function.
4002 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4003 gimple_nonartificial_location and handle -Wno-system-headers.
4004 (handle_builtin_stxncpy): Same.
4006 2018-06-12 Martin Sebor <msebor@redhat.com>
4009 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4011 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
4013 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4014 BUILTIN_VEC_XST entries for pointer to double and long long.
4016 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
4019 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4021 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4024 2018-06-12 Martin Liska <mliska@suse.cz>
4026 * doc/options.texi: Document IntegerRange.
4028 2018-06-12 Martin Liska <mliska@suse.cz>
4030 * config/i386/i386.opt: Make MPX-related options as Deprecated.
4031 * opt-functions.awk: Handle Deprecated flag.
4032 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4034 (read_cmdline_option): Report warning for a deprecated option.
4035 * opts.h (struct cl_option): Add new field cl_deprecated.
4036 (CL_ERR_DEPRECATED): New.
4038 2018-06-12 Martin Liska <mliska@suse.cz>
4040 * doc/options.texi: Document Deprecated option flag.
4042 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4044 * config/arc/arc-arch.h (arc_extras): New enum.
4045 (arc_cpu_t):Add field extra.
4046 (arc_cpu_types): Consider the extras.
4047 * config/arc/arc-cpus.def: Add extras info.
4048 * config/arc/arc-opts.h (processor_type): Consider extra field.
4049 * config/arc/arc.c (arc_override_options): Handle extra field.
4051 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4053 * config/arc/arc-arch.h: Update ARC_OPTX macro.
4054 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4056 * config/arc/arc.c (arc_init): Update pic warning.
4057 (irq_range): Update irq range parsing warnings.
4058 (arc_override_options): Update various warning messages.
4059 (arc_handle_aux_attribute): Likewise.
4061 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
4063 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4065 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4067 * doc/sourcebuild.texi: Document usage of line number 0 in verify
4068 compiler messages directives.
4070 2018-06-12 Matthew Fortune <mfortune@gmail.com>
4072 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4073 * config/mips/mips-tables.opt: Regenerate.
4074 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4076 * doc/invoke.texi: Document -march=i6500.
4078 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
4080 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4081 (i6400_gpmul): Add cpu_unit.
4082 (i6400_gpdiv): Likewise.
4083 (i6400_msa_add_d): Update reservations.
4084 (i6400_msa_int_add) Likewise.
4085 (i6400_msa_short_logic3) Likewise.
4086 (i6400_msa_short_logic2) Likewise.
4087 (i6400_msa_short_logic) Likewise.
4088 (i6400_msa_move) Likewise.
4089 (i6400_msa_cmp) Likewise.
4090 (i6400_msa_short_float2) Likewise.
4091 (i6400_msa_div_d) Likewise.
4092 (i6400_msa_long_logic1) Likewise.
4093 (i6400_msa_long_logic2) Likewise.
4094 (i6400_msa_mult) Likewise.
4095 (i6400_msa_long_float2) Likewise.
4096 (i6400_msa_long_float4) Likewise.
4097 (i6400_msa_long_float5) Likewise.
4098 (i6400_msa_long_float8) Likewise.
4099 (i6400_fpu_fadd): Include frint type.
4100 (i6400_fpu_store): New define_insn_reservation.
4101 (i6400_fpu_load): Likewise.
4102 (i6400_fpu_move): Likewise.
4103 (i6400_fpu_fcmp): Likewise.
4104 (i6400_fpu_fmadd): Likewise.
4105 (i6400_int_mult): Include imul3nc type and update reservation.
4106 (i6400_int_div): Include idiv3 type and update reservation.
4107 (i6400_int_load): Update to check type not move_type.
4108 (i6400_int_store): Likewise.
4109 (i6400_int_prefetch): Set zero latency.
4111 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
4113 * gcc.c: Document new %@{...} sequence.
4114 (LINK_COMMAND_SPEC): Use it for the -L switches.
4115 (cpp_unique_options): Use it for the -I switches.
4116 (at_file_argbuf): New global variable.
4117 (in_at_file): Likewise.
4118 (alloc_args): Create at_file_argbuf.
4119 (clear_args): Truncate at_file_argbuf.
4120 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4121 (open_at_file): New function.
4122 (close_at_file): Likewise.
4123 (create_at_file): Delete.
4124 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4127 (validate_switches_from_spec): Deal with %@{...} sequence.
4128 (validate_switches): Likewise.
4129 (driver::finalize): Call clear_args.
4131 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4133 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4135 2018-06-11 Martin Sebor <msebor@redhat.com>
4137 * doc/invoke.texi (-Wall): List -Wc++17-compat.
4138 (Wno-class-memaccess): Add @opindex.
4139 (Wno-templates, Wno-multiple-inheritance): Same.
4140 (Wno-virtual-inheritance, Wno-namespaces): Same.
4141 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4142 (Wno-format-overflow, Wno-format-truncation): Same.
4143 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4144 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4145 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4146 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4147 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4148 (Wno-misspelled-isr): Same.
4150 2018-06-11 Martin Sebor <msebor@redhat.com>
4152 * PR tree-optimization/86083
4153 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4155 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4157 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4159 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4162 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4163 on the correct operand.
4164 (*movdi_internal64): Ditto.
4166 2018-06-11 Martin Liska <mliska@suse.cz>
4168 PR tree-optimization/86089
4169 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4171 2018-06-11 Julia Koval <julia.koval@intel.com>
4173 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4174 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4175 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4177 2018-06-11 Olivier Hainque <hainque@adacore.com>
4179 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4180 for Ada with strict dwarf2.
4182 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
4185 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4188 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
4190 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4192 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
4194 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4197 2018-06-08 Martin Liska <mliska@suse.cz>
4199 * tree-cfg.h (debug_function): Fix argument type to match
4202 2018-06-08 Martin Liska <mliska@suse.cz>
4204 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4205 Remove usage of MPX-related (and removed) fields.
4206 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4208 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4210 * cfg.c (debug): Use TDF_NONE rather than 0.
4211 * cfghooks.c (debug): Likewise.
4212 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4213 (struct dump_option_value_info): Convert to...
4214 (struct kv_pair): ...this template type.
4215 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4217 (optinfo_verbosity_options): Likewise.
4218 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4220 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4221 than int for "optgroup_flags" param.
4222 (dump_generic_expr_loc): Use dump_flags_t rather than int for
4224 (dump_dec): Likewise.
4225 (dump_finish): Use TDF_NONE rather than 0.
4226 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4227 rather than int for "optgroup_flags" param. Use TDF_NONE rather
4228 than 0. Update for change to option_ptr.
4229 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4230 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
4231 0. Update for changes to optinfo_verbosity_options and
4233 (opt_info_switch_p): Convert optgroup_flags from int to
4235 (dump_basic_block): Use dump_flags_t rather than int
4236 for "dump_kind" param.
4237 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4238 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4239 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4240 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4241 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4242 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4243 TDF_NONE): Convert from macros to...
4244 (enum dump_flag): ...this new enum.
4245 (dump_flags_t): Update to use enum.
4246 (operator|, operator&, operator~, operator|=, operator&=):
4247 Implement for dump_flags_t.
4248 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4249 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4250 Convert from macros to...
4251 (enum optgroup_flag): ...this new enum.
4252 (optgroup_flags_t): New typedef.
4253 (operator|, operator|=): Implement for optgroup_flags_t.
4254 (struct dump_file_info): Convert field "alt_flags" to
4255 dump_flags_t. Convert field "optgroup_flags" to
4257 (dump_basic_block): Use dump_flags_t rather than int for param.
4258 (dump_generic_expr_loc): Likewise.
4259 (dump_dec): Likewise.
4260 (dump_register): Convert param "optgroup_flags" to
4262 (opt_info_enable_passes): Likewise.
4263 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4265 * gimple-pretty-print.c (debug): Likewise.
4266 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4267 (merged_store_group::apply_stores): Likewise.
4268 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4269 * gimple.c (verify_gimple_pp): Likewise.
4270 * graphite-poly.c (print_pbb_body): Likewise.
4271 * passes.c (pass_manager::register_one_dump_file): Convert
4272 local "optgroup_flags" to optgroup_flags_t.
4273 * print-tree.c (print_node): Use TDF_NONE rather than 0.
4275 (debug_body): Likewise.
4276 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4277 to optgroup_flags_t.
4278 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4280 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4281 (convert_mult_to_fma): Likewise.
4282 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4283 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4284 * tree-vect-data-refs.c (dump_lower_bound): Convert param
4285 "dump_kind" to dump_flags_t.
4287 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4289 * config/rs6000/rs6000.c (min, max): Delete.
4291 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4293 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4294 -mabi=spe and -mabi=no-spe.
4296 2018-06-08 Martin Liska <mliska@suse.cz>
4298 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4299 where we expect an existing summary.
4301 2018-06-08 Martin Liska <mliska@suse.cz>
4303 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4304 * ipa-inline.h (estimate_edge_growth): Likewise.
4306 2018-06-08 Martin Liska <mliska@suse.cz>
4308 * cgraph.c (function_version_hasher::hash): Use
4309 cgraph_node::get_uid ().
4310 (function_version_hasher::equal):
4311 * cgraph.h (cgraph_node::get_uid): New method.
4312 * ipa-inline.c (update_caller_keys): Use
4313 cgraph_node::get_uid ().
4314 (update_callee_keys): Likewise.
4315 * ipa-utils.c (searchc): Likewise.
4316 (ipa_reduced_postorder): Likewise.
4317 * lto-cgraph.c (input_node): Likewise.
4318 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4319 * symbol-summary.h (symtab_insertion): Likewise.
4320 (symtab_removal): Likewise.
4321 (symtab_duplication): Likewise.
4322 * tree-pretty-print.c (dump_function_header): Likewise.
4323 * tree-sra.c (convert_callers_for_node): Likewise.
4325 2018-06-08 Martin Liska <mliska@suse.cz>
4327 * cgraph.c (symbol_table::create_edge): Always assign a new
4329 (symbol_table::free_edge): Do not recycle numbers.
4330 * cgraph.h (cgraph_edge::get): New method.
4331 * symbol-summary.h (symtab_removal): Use it.
4332 (symtab_duplication): Likewise.
4333 (call_summary::hashable_uid): Remove.
4335 2018-06-08 Martin Liska <mliska@suse.cz>
4337 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4338 (initialize_growth_caches): Remove.
4339 (free_growth_caches): Likewise.
4340 (do_estimate_edge_time): Use edge_growth_cache.
4341 (do_estimate_edge_size): Likewise.
4342 (do_estimate_edge_hints): Likewise.
4343 * ipa-inline.c (reset_edge_caches): Likewise.
4344 (recursive_inlining): Likewise.
4345 (inline_small_functions): Likewise.
4346 * ipa-inline.h (initialize_growth_caches): Remove.
4347 (estimate_edge_size): Likewise.
4348 (estimate_edge_time): Likewise.
4349 (estimate_edge_hints): Likewise.
4350 (reset_edge_growth_cache): Likewise.
4351 * symbol-summary.h (call_summary::remove): New method.
4353 2018-06-08 Martin Liska <mliska@suse.cz>
4355 * ipa-cp.c (class edge_clone_summary): New summary.
4356 (grow_edge_clone_vectors): Remove.
4357 (ipcp_edge_duplication_hook): Remove.
4358 (class edge_clone_summary_t): New call_summary class.
4359 (ipcp_edge_removal_hook): Remove.
4360 (edge_clone_summary_t::duplicate): New function.
4361 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4362 (create_specialized_node): Likewise.
4363 (ipcp_driver): Initialize edge_clone_summaries and do not
4366 2018-06-08 Martin Liska <mliska@suse.cz>
4368 * symbol-summary.h (get): New function.
4369 (call_summary::m_initialize_when_cloning): New class member.
4371 2018-06-08 Martin Liska <mliska@suse.cz>
4373 * cgraph.c (cgraph_node::remove): Do not recycle uid.
4374 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4375 (symbol_table::allocate_cgraph_symbol): Do not set uid.
4376 * passes.c (uid_hash_t): Record removed_nodes by their uids.
4377 (remove_cgraph_node_from_order): Use the removed_nodes set.
4378 (do_per_function_toporder): Likwise.
4379 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4380 instead of summary_uid.
4381 (symtab_removal): Likewise.
4382 (symtab_duplication): Likewise.
4384 2018-06-08 Martin Liska <mliska@suse.cz>
4386 * ipa-cp.c (ipcp_store_bits_results): Use
4387 ipcp_transformation_sum.
4388 (ipcp_store_vr_results): Likewise.
4389 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4391 (ipcp_transformation_initialize): ... this.
4392 (ipa_set_node_agg_value_chain):
4393 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4394 (write_ipcp_transformation_info): Likewise.
4395 (read_ipcp_transformation_info): Likewise.
4396 (ipcp_update_bits): Likewise.
4397 (ipcp_update_vr): Likewise.
4398 (ipcp_transform_function): Likewise.
4399 * ipa-prop.h: Rename ipcp_transformation_summary to
4400 ipcp_transformation.
4401 (class ipcp_transformation_t): New function summary.
4402 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4403 (ipa_get_agg_replacements_for_node): Likewise.
4405 2018-06-08 Martin Liska <mliska@suse.cz>
4407 * ipa-pure-const.c (struct funct_state_d): Do it class instead
4409 (class funct_state_summary_t): New function_summary class.
4410 (has_function_state): Remove.
4411 (get_function_state): Likewise.
4412 (set_function_state): Likewise.
4413 (add_new_function): Likewise.
4414 (funct_state_summary_t::insert): New function.
4415 (duplicate_node_data): Remove.
4416 (remove_node_data): Remove.
4417 (funct_state_summary_t::duplicate): New function.
4418 (register_hooks): Create new funct_state_summaries.
4419 (pure_const_generate_summary): Use it.
4420 (pure_const_write_summary): Likewise.
4421 (pure_const_read_summary): Likewise.
4422 (propagate_pure_const): Likewise.
4423 (propagate_nothrow): Likewise.
4424 (dump_malloc_lattice): Likewise.
4425 (propagate_malloc): Likewise.
4426 (execute): Do not register hooks, just remove summary
4428 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4431 2018-06-08 Martin Liska <mliska@suse.cz>
4433 * ipa-reference.c (remove_node_data): Remove.
4434 (duplicate_node_data): Likewise.
4435 (class ipa_ref_var_info_summary_t): New class.
4436 (class ipa_ref_opt_summary_t): Likewise.
4437 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4438 (get_reference_optimization_summary): Use
4439 ipa_ref_opt_sum_summaries.
4440 (set_reference_vars_info): Remove.
4441 (set_reference_optimization_summary): Likewise.
4442 (ipa_init): Create summaries.
4443 (init_function_info): Use function summary.
4444 (ipa_ref_opt_summary_t::duplicate): New function.
4445 (ipa_ref_opt_summary_t::remove): New function.
4446 (get_read_write_all_from_node): Fix GNU coding style.
4447 (propagate): Use function summary.
4448 (write_node_summary_p): Fix GNU coding style.
4449 (stream_out_bitmap): Likewise.
4450 (ipa_reference_read_optimization_summary): Use function summary.
4451 (ipa_reference_c_finalize): Do not release hooks.
4453 2018-06-08 Martin Liska <mliska@suse.cz>
4455 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4456 (analyze_function_body): Extract multiple calls of get_create.
4457 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4458 * ipa-inline.c (recursive_inlining): Use ::get method.
4459 * ipa-inline.h (estimate_edge_growth): Likewise.
4461 2018-06-08 Martin Liska <mliska@suse.cz>
4463 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4465 (hsa_function_summary::hsa_function_summary): Use the new enum
4467 (hsa_gpu_implementation_p): Use hsa_summaries::get.
4468 * hsa-gen.c (hsa_get_host_function): Likewise.
4469 (get_brig_function_name): Likewise.
4470 * ipa-hsa.c (process_hsa_functions): Likewise.
4471 (ipa_hsa_write_summary): Likewise.
4472 * symbol-summary.h (symtab_duplication): Use ::get function/
4473 (get): New function.
4475 2018-06-08 Martin Liska <mliska@suse.cz>
4477 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4479 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4480 (hsa_register_kernel): Likewise.
4481 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4482 * hsa-gen.c (hsa_get_host_function): Likewise.
4483 (get_brig_function_name): Likewise.
4484 (generate_hsa): Likewise.
4485 (pass_gen_hsail::execute): Likewise.
4486 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4487 (devirtualization_time_bonus): Likewise.
4488 (ipcp_propagate_stage): Likewise.
4489 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4490 (edge_set_predicate): Likewise.
4491 (evaluate_conditions_for_known_args): Likewise.
4492 (evaluate_properties_for_edge): Likewise.
4493 (ipa_fn_summary::reset): Likewise.
4494 (ipa_fn_summary_t::duplicate): Likewise.
4495 (dump_ipa_call_summary): Likewise.
4496 (ipa_dump_fn_summary): Likewise.
4497 (analyze_function_body): Likewise.
4498 (compute_fn_summary): Likewise.
4499 (estimate_edge_devirt_benefit): Likewise.
4500 (estimate_edge_size_and_time): Likewise.
4501 (estimate_calls_size_and_time): Likewise.
4502 (estimate_node_size_and_time): Likewise.
4503 (inline_update_callee_summaries): Likewise.
4504 (remap_edge_change_prob): Likewise.
4505 (remap_edge_summaries): Likewise.
4506 (ipa_merge_fn_summary_after_inlining): Likewise.
4507 (ipa_update_overall_fn_summary): Likewise.
4508 (read_ipa_call_summary): Likewise.
4509 (inline_read_section): Likewise.
4510 (write_ipa_call_summary): Likewise.
4511 (ipa_fn_summary_write): Likewise.
4512 (ipa_free_fn_summary): Likewise.
4513 * ipa-hsa.c (process_hsa_functions): Likewise.
4514 (ipa_hsa_write_summary): Likewise.
4515 (ipa_hsa_read_section): Likewise.
4516 * ipa-icf.c (sem_function::merge): Likewise.
4517 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4518 (do_estimate_edge_time): Likewise.
4519 (estimate_size_after_inlining): Likewise.
4520 (estimate_growth): Likewise.
4521 (growth_likely_positive): Likewise.
4522 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4523 (inline_call): Likewise.
4524 * ipa-inline.c (caller_growth_limits): Likewise.
4525 (can_inline_edge_p): Likewise.
4526 (can_inline_edge_by_limits_p): Likewise.
4527 (compute_uninlined_call_time): Likewise.
4528 (compute_inlined_call_time): Likewise.
4529 (want_inline_small_function_p): Likewise.
4530 (edge_badness): Likewise.
4531 (update_caller_keys): Likewise.
4532 (update_callee_keys): Likewise.
4533 (recursive_inlining): Likewise.
4534 (inline_small_functions): Likewise.
4535 (inline_to_all_callers_1): Likewise.
4536 (dump_overall_stats): Likewise.
4537 (early_inline_small_functions): Likewise.
4538 (early_inliner): Likewise.
4539 * ipa-inline.h (estimate_edge_growth): Likewise.
4540 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4541 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4542 * ipa-prop.h (IPA_NODE_REF): Likewise.
4543 (IPA_EDGE_REF): Likewise.
4544 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4545 (propagate_malloc): Likewise.
4546 * ipa-split.c (execute_split_functions): Likewise.
4547 * symbol-summary.h: Rename get to get_create.
4549 (get_create): Likewise.
4550 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4552 2018-06-08 Martin Liska <mliska@suse.cz>
4554 * symbol-summary.h (release): Move definition out of class
4556 (symtab_removal): Likewise.
4557 (symtab_duplication): Likewise.
4559 2018-06-08 Martin Liska <mliska@suse.cz>
4561 * symbol-summary.h (function_summary): Move constructor
4562 implementation out of class declaration.
4563 (release): Likewise.
4564 (symtab_insertion): Likewise.
4565 (symtab_removal): Likewise.
4566 (symtab_duplication): Likewise.
4569 2018-06-08 Martin Liska <mliska@suse.cz>
4571 * Makefile.in: Remove support for MPX (macros, related functions,
4572 fields in cgraph_node, ...).
4573 * builtin-types.def (BT_BND): Likewise.
4574 (BT_FN_BND_CONST_PTR): Likewise.
4575 (BT_FN_CONST_PTR_BND): Likewise.
4576 (BT_FN_VOID_PTR_BND): Likewise.
4577 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4578 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4579 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4580 (expand_builtin_mempcpy_with_bounds): Likewise.
4581 (expand_builtin_memset_with_bounds): Likewise.
4582 (expand_builtin_memset_args): Likewise.
4583 (std_expand_builtin_va_start): Likewise.
4584 (expand_builtin): Likewise.
4585 (expand_builtin_with_bounds): Likewise.
4586 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4587 (DEF_LIB_BUILTIN_CHKP): Likewise.
4588 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4589 (DEF_CHKP_BUILTIN): Likewise.
4590 (BUILT_IN_MEMCPY): Likewise.
4591 (BUILT_IN_MEMMOVE): Likewise.
4592 (BUILT_IN_MEMPCPY): Likewise.
4593 (BUILT_IN_MEMSET): Likewise.
4594 (BUILT_IN_STPCPY): Likewise.
4595 (BUILT_IN_STRCAT): Likewise.
4596 (BUILT_IN_STRCHR): Likewise.
4597 (BUILT_IN_STRCPY): Likewise.
4598 (BUILT_IN_STRLEN): Likewise.
4599 (BUILT_IN_MEMCPY_CHK): Likewise.
4600 (BUILT_IN_MEMMOVE_CHK): Likewise.
4601 (BUILT_IN_MEMPCPY_CHK): Likewise.
4602 (BUILT_IN_MEMSET_CHK): Likewise.
4603 (BUILT_IN_STPCPY_CHK): Likewise.
4604 (BUILT_IN_STRCAT_CHK): Likewise.
4605 (BUILT_IN_STRCPY_CHK): Likewise.
4606 * calls.c (store_bounds): Likewise.
4607 (emit_call_1): Likewise.
4608 (special_function_p): Likewise.
4609 (maybe_warn_nonstring_arg): Likewise.
4610 (initialize_argument_information): Likewise.
4611 (finalize_must_preallocate): Likewise.
4612 (compute_argument_addresses): Likewise.
4613 (expand_call): Likewise.
4614 * cfgexpand.c (expand_call_stmt): Likewise.
4615 (expand_return): Likewise.
4616 (expand_gimple_stmt_1): Likewise.
4617 (pass_expand::execute): Likewise.
4618 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4619 (cgraph_node::remove): Likewise.
4620 (cgraph_node::dump): Likewise.
4621 (cgraph_node::verify_node): Likewise.
4622 * cgraph.h (chkp_function_instrumented_p): Likewise.
4623 (symtab_node::get_alias_target): Likewise.
4624 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4625 (cgraph_local_p): Likewise.
4626 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4627 (cgraph_edge::rebuild_references): Likewise.
4628 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4629 (walk_polymorphic_call_targets): Likewise.
4630 (cgraph_node::expand_thunk): Likewise.
4631 (symbol_table::output_weakrefs): Likewise.
4632 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4633 (ix86_handle_option): Likewise.
4634 * config/i386/constraints.md: Likewise.
4635 * config/i386/i386-builtin-types.def (BND): Likewise.
4639 * config/i386/i386-builtin.def (BDESC_END): Likewise.
4640 (BDESC_FIRST): Likewise.
4642 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4643 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4644 * config/i386/i386.c (enum reg_class): Likewise.
4645 (ix86_target_string): Likewise.
4646 (ix86_option_override_internal): Likewise.
4647 (ix86_conditional_register_usage): Likewise.
4648 (ix86_valid_target_attribute_inner_p): Likewise.
4649 (ix86_set_indirect_branch_type): Likewise.
4650 (ix86_set_current_function): Likewise.
4651 (ix86_function_arg_regno_p): Likewise.
4652 (init_cumulative_args): Likewise.
4653 (ix86_function_arg_advance): Likewise.
4654 (ix86_function_arg): Likewise.
4655 (ix86_pass_by_reference): Likewise.
4656 (ix86_function_value_regno_p): Likewise.
4657 (ix86_function_value_1): Likewise.
4658 (ix86_function_value_bounds): Likewise.
4659 (ix86_return_in_memory): Likewise.
4660 (ix86_setup_incoming_vararg_bounds): Likewise.
4661 (ix86_va_start): Likewise.
4662 (indirect_thunk_need_prefix): Likewise.
4663 (print_reg): Likewise.
4664 (ix86_print_operand): Likewise.
4665 (ix86_expand_call): Likewise.
4666 (ix86_output_function_return): Likewise.
4667 (reg_encoded_number): Likewise.
4668 (BDESC_VERIFYS): Likewise.
4669 (ix86_init_mpx_builtins): Likewise.
4670 (ix86_init_builtins): Likewise.
4671 (ix86_emit_cmove): Likewise.
4672 (ix86_emit_move_max): Likewise.
4673 (ix86_expand_builtin): Likewise.
4674 (ix86_builtin_mpx_function): Likewise.
4675 (ix86_get_arg_address_for_bt): Likewise.
4676 (ix86_load_bounds): Likewise.
4677 (ix86_store_bounds): Likewise.
4678 (ix86_load_returned_bounds): Likewise.
4679 (ix86_store_returned_bounds): Likewise.
4680 (ix86_class_likely_spilled_p): Likewise.
4681 (ix86_hard_regno_mode_ok): Likewise.
4682 (x86_order_regs_for_local_alloc): Likewise.
4683 (ix86_mitigate_rop): Likewise.
4684 (ix86_bnd_prefixed_insn_p): Likewise.
4685 (ix86_mpx_bound_mode): Likewise.
4686 (ix86_make_bounds_constant): Likewise.
4687 (ix86_initialize_bounds): Likewise.
4688 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4689 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4690 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4691 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4692 (TARGET_CHKP_BOUND_MODE): Likewise.
4693 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4694 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4695 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4696 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4697 * config/i386/i386.h (TARGET_MPX): Likewise.
4698 (TARGET_MPX_P): Likewise.
4699 (VALID_BND_REG_MODE): Likewise.
4700 (FIRST_BND_REG): Likewise.
4701 (LAST_BND_REG): Likewise.
4702 (enum reg_class): Likewise.
4703 (BND_REG_P): Likewise.
4704 (BND_REGNO_P): Likewise.
4705 (BNDmode): Likewise.
4706 (ADJUST_INSN_LENGTH): Likewise.
4707 * config/i386/i386.md: Likewise.
4708 * config/i386/i386.opt: Likewise.
4709 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4710 (defined): Likewise.
4711 (LINK_MPX): Likewise.
4712 (MPX_SPEC): Likewise.
4713 (LIBMPX_SPEC): Likewise.
4714 (LIBMPXWRAPPERS_SPEC): Likewise.
4715 (CHKP_SPEC): Likewise.
4716 * config/i386/predicates.md: Likewise.
4717 * dbxout.c (dbxout_type): Likewise.
4718 * doc/extend.texi: Likewise.
4719 * doc/invoke.texi: Likewise.
4720 * doc/md.texi: Likewise.
4721 * doc/tm.texi: Likewise.
4722 * doc/tm.texi.in: Likewise.
4723 * dwarf2out.c (is_base_type): Likewise.
4724 (gen_formal_types_die): Likewise.
4725 (gen_subprogram_die): Likewise.
4726 (gen_type_die_with_usage): Likewise.
4727 (gen_decl_die): Likewise.
4728 (dwarf2out_late_global_decl): Likewise.
4729 * expr.c (expand_assignment): Likewise.
4730 (emit_storent_insn): Likewise.
4731 (store_expr_with_bounds): Likewise.
4732 (store_expr): Likewise.
4733 (expand_expr_real_1): Likewise.
4734 * expr.h (store_expr_with_bounds): Likewise.
4735 * function.c (use_register_for_decl): Likewise.
4736 (struct bounds_parm_data): Likewise.
4737 (assign_parms_augmented_arg_list): Likewise.
4738 (assign_parm_find_entry_rtl): Likewise.
4739 (assign_parm_is_stack_parm): Likewise.
4740 (assign_parm_load_bounds): Likewise.
4741 (assign_bounds): Likewise.
4742 (assign_parms): Likewise.
4743 (expand_function_start): Likewise.
4744 * gcc.c (CHKP_SPEC): Likewise.
4745 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4746 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
4747 (wrestrict_dom_walker::check_call): Likewise.
4748 * gimple.c (gimple_build_call_from_tree): Likewise.
4749 * gimple.h (enum gf_mask): Likewise.
4750 (gimple_call_with_bounds_p): Likewise.
4751 (gimple_call_set_with_bounds): Likewise.
4752 * gimplify.c (gimplify_init_constructor): Likewise.
4753 * ipa-cp.c (initialize_node_lattices): Likewise.
4754 (propagate_constants_across_call): Likewise.
4755 (find_more_scalar_values_for_callers_subset): Likewise.
4756 * ipa-hsa.c (process_hsa_functions): Likewise.
4757 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
4758 * ipa-icf.c (sem_function::merge): Likewise.
4759 * ipa-inline.c (early_inliner): Likewise.
4760 * ipa-pure-const.c (warn_function_noreturn): Likewise.
4761 (warn_function_cold): Likewise.
4762 (propagate_pure_const): Likewise.
4763 * ipa-ref.h (enum GTY): Likewise.
4764 * ipa-split.c (find_retbnd): Likewise.
4765 (consider_split): Likewise.
4766 (split_function): Likewise.
4767 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4768 * ipa.c (walk_polymorphic_call_targets): Likewise.
4769 (symbol_table::remove_unreachable_nodes): Likewise.
4770 (process_references): Likewise.
4771 (cgraph_build_static_cdtor_1): Likewise.
4772 * lto-cgraph.c (lto_output_node): Likewise.
4773 (output_refs): Likewise.
4774 (compute_ltrans_boundary): Likewise.
4775 (input_overwrite_node): Likewise.
4776 (input_node): Likewise.
4777 (input_cgraph_1): Likewise.
4778 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
4779 * passes.c (pass_manager::execute_early_local_passes): Likewise.
4780 (class pass_chkp_instrumentation_passes): Likewise.
4781 (make_pass_chkp_instrumentation_passes): Likewise.
4782 * passes.def: Likewise.
4783 * rtl.h (struct GTY): Likewise.
4784 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
4785 * stor-layout.c (layout_type): Likewise.
4786 * symtab.c: Likewise.
4787 * target.def: Likewise.
4788 * targhooks.c (default_chkp_bound_type): Likewise.
4789 (default_chkp_bound_mode): Likewise.
4790 (default_builtin_chkp_function): Likewise.
4791 (default_chkp_function_value_bounds): Likewise.
4792 (default_chkp_make_bounds_constant): Likewise.
4793 (default_chkp_initialize_bounds): Likewise.
4794 * targhooks.h (default_chkp_bound_type): Likewise.
4795 (default_chkp_bound_mode): Likewise.
4796 (default_builtin_chkp_function): Likewise.
4797 (default_chkp_function_value_bounds): Likewise.
4798 (default_chkp_make_bounds_constant): Likewise.
4799 (default_chkp_initialize_bounds): Likewise.
4800 * toplev.c (compile_file): Likewise.
4801 (process_options): Likewise.
4802 * tree-core.h (DEF_BUILTIN): Likewise.
4803 (DEF_BUILTIN_CHKP): Likewise.
4804 * tree-inline.c (declare_return_variable): Likewise.
4805 (remap_gimple_stmt): Likewise.
4806 (copy_bb): Likewise.
4807 (initialize_inlined_parameters): Likewise.
4808 (expand_call_inline): Likewise.
4809 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
4810 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
4811 (make_pass_ipa_chkp_produce_thunks): Likewise.
4812 (make_pass_chkp): Likewise.
4813 (make_pass_chkp_opt): Likewise.
4814 (make_pass_chkp_instrumentation_passes): Likewise.
4815 * tree-pretty-print.c (dump_generic_node): Likewise.
4816 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
4817 * tree-ssa-dce.c (propagate_necessity): Likewise.
4818 (eliminate_unnecessary_stmts): Likewise.
4819 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
4820 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4821 * tree-ssa-sccvn.h: Likewise.
4822 * tree-ssa-strlen.c (get_string_length): Likewise.
4823 (valid_builtin_call): Likewise.
4824 (adjust_last_stmt): Likewise.
4825 (handle_builtin_strchr): Likewise.
4826 (handle_builtin_strcpy): Likewise.
4827 (handle_builtin_stxncpy): Likewise.
4828 (handle_builtin_memcpy): Likewise.
4829 (handle_builtin_strcat): Likewise.
4830 (strlen_check_and_optimize_stmt): Likewise.
4831 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
4832 * tree-streamer-in.c: Likewise.
4833 * tree-streamer.c (record_common_node): Likewise.
4834 * tree.c (tree_code_size): Likewise.
4835 (wide_int_to_tree_1): Likewise.
4836 (type_contains_placeholder_1): Likewise.
4837 (build_common_tree_nodes): Likewise.
4838 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
4839 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
4840 (POINTER_BOUNDS_P): Likewise.
4841 (BOUNDED_TYPE_P): Likewise.
4842 (BOUNDED_P): Likewise.
4843 (CALL_WITH_BOUNDS_P): Likewise.
4844 (pointer_bounds_type_node): Likewise.
4845 * value-prof.c (gimple_ic): Likewise.
4846 * var-tracking.c (vt_add_function_parameters): Likewise.
4847 * varasm.c (make_decl_rtl): Likewise.
4848 (assemble_start_function): Likewise.
4849 (output_constant): Likewise.
4850 (maybe_assemble_visibility): Likewise.
4851 * varpool.c (ctor_for_folding): Likewise.
4852 * chkp-builtins.def: Remove.
4853 * ipa-chkp.c: Remove.
4854 * ipa-chkp.h: Remove.
4855 * rtl-chkp.c: Remove.
4856 * rtl-chkp.h: Remove.
4857 * tree-chkp-opt.c: Remove.
4858 * tree-chkp.c: Remove.
4859 * tree-chkp.h: Remove.
4861 2018-06-07 Carl Love <cel@us.ibm.com>
4863 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4864 vextract_fp_from_shortl): Add BE support.
4866 2018-06-07 Paul Koning <ni1d@arrl.net>
4868 * compare-elim.c (try_merge_compare): Don't merge compare if
4869 address contains a side effect.
4870 (try_eliminate_compare): Likewise.
4872 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
4874 * config.gcc: Support "tremont".
4875 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
4876 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4878 * config/i386/i386.c (m_TREMONT): Define.
4879 (processor_target_table): Add "tremont".
4880 (PTA_TREMONT): Define.
4881 (ix86_lea_outperforms): Add TARGET_TREMONT.
4882 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
4883 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
4884 and M_INTEL_GOLDMONT_PLUS.
4885 (fold_builtin_cpu): Add "tremont".
4886 (ix86_add_stmt_cost): Add TARGET_TREMONT.
4887 (ix86_option_override_internal): Add "tremont".
4888 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
4889 (processor_type): Add PROCESSOR_TREMONT.
4890 * config/i386/x86-tune.def: Add m_TREMONT.
4891 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
4893 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4895 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
4896 symbol defined for msp430i* devices to be lower case.
4898 gcc/testsuite/gcc.target/msp430/
4899 * msp430i-device-symbol.c: New test.
4900 * msp430f-device-symbol.c: New test.
4901 * msp430.h: New test header file.
4903 2018-06-07 Richard Biener <rguenther@suse.de>
4905 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
4906 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
4907 Properly wrap signed arithmetic if overflow wraps.
4909 2018-06-07 Jakub Jelinek <jakub@redhat.com>
4911 PR tree-optimization/69615
4912 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
4913 of a cast from a same precision integral SSA_NAME in a bb dominated
4914 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
4915 cast to utype if rhs2 has already a compatible type.
4917 2018-06-07 Richard Biener <rguenther@suse.de>
4919 PR tree-optimization/85935
4920 * graphite-scop-detection.c (find_params_in_bb): Analyze
4921 condition operands with respect to the correct loop. Assert
4922 the analysis doesn't fail.
4924 2018-06-04 Carl Love <cel@us.ibm.com>
4926 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
4927 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
4928 as it is slightly cheaper.
4929 (first_match_or_eos_index_<mode>):
4930 Calculate index using natural element order.
4931 (first_match_index_<mode>):
4932 Calculate index using natural element order.
4933 (first_match_or_eos_index_<mode>):
4934 Calculate index using natural order.
4935 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4936 for BE and LE modes.
4937 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4938 P9V_BUILTIN_VCLZLSBB_V16QI.
4939 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4942 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
4944 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
4945 indentation and line wrap for many prototypes. Add missing
4946 @smallexample directives around block of prototypes for vec_xl and
4949 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
4951 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
4952 track if we pass or return IEEE 128-bit floating point.
4953 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
4954 C++ mangling that is compatible with GCC 8.1.
4955 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
4956 (init_cumulative_args): Note if we pass or return IEEE 128-bit
4957 floating point types.
4958 (rs6000_function_arg_advance_1): Likewise.
4959 (rs6000_mangle_type): Optionally generate mangled names that match
4960 what GCC 8.1 generated for IEEE 128-bit floating point types.
4961 (rs6000_globalize_decl_name): If we have an external function that
4962 passes or returns IEEE 128-bit types, generate a weak reference
4963 from the mangled name used in GCC 8.1 to the current mangled
4965 (rs6000_init_builtins): Make __ibm128 use the long double type if
4966 long double is IBM extended double. Make __float128 use the long
4967 double type if long double is IEEE 128-bit.
4970 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
4971 macro for __ibm128 built-in functions.
4972 (PACK_IF): Add __ibm128 pack/unpack functions.
4973 (UNPACK_IF): Likewise.
4974 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
4975 enable long double built-in functions if long double is IEEE
4976 128-bit floating point.
4977 (rs6000_invalid_builtin): Update long double built-in function
4979 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
4980 functions, adjust the built-in function to use the long double
4981 built-in function if __ibm128 and long double are the same type.
4982 * doc/extend.texi (PowerPC builtins): Update documention for
4983 __builtin_{,un}pack_longdouble. Add documentation for
4984 __builtin_{,un}pack_ibm128.
4986 2018-06-06 Jim Wilson <jimw@sifive.com>
4988 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
4989 (struct machine_function): New field interrupt_mode.
4990 (riscv_handle_type_attribute): New function. Add forward declaration.
4991 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
4992 (riscv_expand_epilogue): Check interrupt_mode field.
4993 (riscv_set_current_function): Check interrupt attribute args and
4994 set interrupt_mode field.
4995 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
4996 (riscv_sret, riscv_uret): New.
4997 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
4998 new arguments to interrupt attribute.
5000 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
5003 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5004 Don't handle -mcpu=power8 if -mpower9-vector is also used.
5006 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5008 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5009 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5010 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5011 several redundant entries.
5013 2018-06-06 David Malcolm <dmalcolm@redhat.com>
5015 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5016 type from "rtx" to "rtx_insn *".
5017 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5018 for local "call_insn", removing cast.
5019 (ix86_expand_call): Likewise, introducing a "call_insn" local.
5021 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
5023 PR tree-optimization/86066
5024 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5025 for BIT_INSERT_EXPR stores.
5027 2018-06-06 Richard Biener <rguenther@suse.de>
5029 PR tree-optimization/86062
5030 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5031 component refs ontop
5032 of to be offsetted base.
5034 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5036 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5037 to be static and remove check on interrupt attribute name.
5039 gcc/testsuite/gcc.target/msp430/
5040 * function-attributes-4.c: New test.
5041 * static-interrupts.c: New test.
5043 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
5045 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5046 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5048 2018-06-05 Steve Ellcey <sellcey@cavium.com>
5051 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5053 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5054 Remove second argument, change how error is called.
5055 (aarch64_layout_arg): Remove second argument from
5056 aarch64_err_no_fpadvsimd call.
5057 (aarch64_init_cumulative_args): Ditto.
5058 (aarch64_gimplify_va_arg_expr): Ditto.
5059 * config/aarch64/aarch64.md (mov<mode>): Ditto.
5061 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
5063 * config/i386/i386.md (simple_return_indirect_internal): New expander.
5064 (*simple_return_indirect_internal<mode>): Rename from
5065 simple_return_indirect_internal. Use W mode iterator.
5066 (rstorssp): New expander.
5067 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
5068 (clrssbsy): New expander.
5069 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
5071 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
5073 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5075 (cmse_check_pointed_object): Likewise.
5077 2018-06-05 Martin Liska <mliska@suse.cz>
5079 PR gcov-profile/47618
5080 * doc/invoke.texi: Document how -fprofile-dir format
5083 2018-06-05 Richard Biener <rguenther@suse.de>
5085 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5086 removal pretend DOM info isn't available so we do not update
5087 it and only remove edges, not dominated blocks. Actually free
5088 DOM info in case we removed something. Remove unreachable blocks.
5089 (mfb_keep_latches): Work with either DOM info or marked backedges.
5090 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5091 first. Mark backedges if DOM info isn't available.
5092 (Re-)compute DOM info after cleanup_control_flow_pre.
5094 2018-06-05 Richard Biener <rguenther@suse.de>
5096 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5097 (locus_discrim_hasher::hash): Adjust.
5098 (locus_discrim_hasher::equal): Likewise.
5099 (next_discriminator_for_locus): Work on line directly.
5100 (same_line_p): Pass in expanded locus1 as well.
5101 (assign_discriminators): Avoid redundant location expansions.
5103 2018-06-05 Richard Biener <rguenther@suse.de>
5105 PR tree-optimization/86046
5106 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5107 if required after clearing TREE_ADDRESSABLE.
5109 2018-06-05 Richard Biener <rguenther@suse.de>
5111 PR tree-optimization/86047
5112 * tree-ssa-loop.c (for_each_index): Glob handling of all
5113 decls and constants and really handle all of them.
5115 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5118 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5119 qualifier_void_pointer and qualifier_const_void_pointer.
5120 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5121 (arm_init_builtins): Handle the above.
5122 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5123 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5124 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5127 2018-06-05 Martin Liska <mliska@suse.cz>
5129 * auto-profile.c (read_autofdo_file): Do not use
5130 gcov_ctr_summary struct.
5131 (afdo_callsite_hot_enough_for_early_inline): Likewise.
5132 * coverage.c (struct counts_entry): Likewise.
5133 (read_counts_file): Read just single summary entry.
5134 (get_coverage_counts): Use gcov_summary struct.
5135 * coverage.h (get_coverage_counts): Likewise.
5136 * gcov-dump.c (dump_working_sets): Likewise.
5137 (tag_summary): Dump just single summary.
5138 * gcov-io.c (gcov_write_summary): Write just histogram
5140 (gcov_read_summary): Read just single summary.
5141 (compute_working_sets): Use gcov_summary struct.
5142 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5143 of GCOV_COUNTERS_SUMMABLE.
5144 (GCOV_COUNTERS_SUMMABLE): Remove.
5145 (GCOV_FIRST_VALUE_COUNTER): Replace with
5146 GCOV_COUNTER_V_INTERVAL.
5147 (struct gcov_ctr_summary): Remove.
5148 (struct gcov_summary): Directly use fields of former
5150 (compute_working_sets): Use gcov_summary struct.
5151 * gcov.c (read_count_file): Do not use ctrs fields.
5152 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5154 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5156 * profile.c: Likewise.
5157 * profile.h: Likewise.
5159 2018-06-05 Martin Liska <mliska@suse.cz>
5161 PR gcov-profile/84846
5162 * gcov.c (output_lines): Print working directory only
5163 in intermediate format.
5165 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
5167 * config/s390/s390-builtin-types.def: Add void function type.
5168 * config/s390/s390-builtins.def: Use the function type for the
5171 2018-06-04 Jim Wilson <jimw@sifive.com>
5173 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5175 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5176 and maybe_eh_return. Change regno to unsigned int. Use new args to
5177 handle EH_RETURN_DATA_REGNO registers properly.
5178 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5179 (riscv_expand_epilogue): Update comment. Change argument name and
5180 type. Update code to use new name and type. Pass new args to
5181 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
5183 * config/riscv/riscv.md (NORMAL_RETURN): New.
5184 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5185 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5186 (eh_return): Call gen_eh_return_internal and emit barrier.
5187 (eh_return_internal): Call riscv_expand_epilogue.
5189 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
5191 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5192 bit_insertion field and declare can_be_merged_into method.
5193 (merged_store_group::can_be_merged_into): New method.
5194 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5195 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
5196 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5198 2018-06-04 Richard Biener <rguenther@suse.de>
5200 PR tree-optimization/85955
5201 * builtins.c (fold_builtin_sincos): Convert pointers to
5202 destination to appropriate type before dereferencing.
5204 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
5206 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5208 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
5210 * expr.c (expand_expr_real_1): Force the operand into memory if
5211 its TYPE_MODE is BLKmode and if there is no integer mode for
5212 the number of bits being extracted.
5214 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5218 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5219 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5221 2018-06-04 Richard Biener <rguenther@suse.de>
5223 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5224 (cleanup_tree_cfg_noloop): ... single caller. Do
5225 start_recording_case_labels later.
5227 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
5229 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5230 to _IMMINTRIN_H_INCLUDED.
5231 * config/i386/pconfigintrin.h: Ditto.
5232 * config/i386/waitpkgintrin.h: Ditto.
5233 * config/i386/immintrin.h: Add includes for sgxintrin.h,
5234 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5235 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5236 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5237 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5238 waitpkgintrin.h and cldemoteintrin.h.
5240 2018-06-04 Richard Biener <rguenther@suse.de>
5242 PR tree-optimization/86038
5243 * tracer.c (find_best_successor): Check probability for
5244 being initialized, bail out if not.
5246 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
5249 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5250 of bits to ignore when comparing architectures.
5252 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5254 PR tree-optimization/69615
5255 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5256 maximum or minimum of the type, try to merge it also as if
5257 range1 is + [-, x - 1] or + [x + 1, -].
5260 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5262 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
5264 PR tree-optimization/86034
5265 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5266 the unsigned bitfield type in a bit insertion sequence if it does not
5267 have a larger precision than the bitfield size.
5268 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5270 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
5272 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5274 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5276 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5277 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5278 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5279 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5281 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5283 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5284 Disable -fdelete-null-pointer-checks for ELF toolchain.
5286 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5287 Kito Cheng <kito.cheng@gmail.com>
5289 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5290 (nds32le-*-*, nds32be-*-*): Integrate checking process.
5291 (nds32*-*-*): Add glibc and uclibc conditions.
5292 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5293 (TARGET_EXCEPT_UNWIND_INFO): Define.
5294 * config/nds32/elf.h: New file.
5295 * config/nds32/linux.h: New file.
5296 * config/nds32/nds32-elf.opt: New file.
5297 * config/nds32/nds32-linux.opt: New file.
5298 * config/nds32/nds32-fp-as-gp.c
5299 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5300 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5302 (nds32_asm_file_end): Ditto.
5303 (nds32_print_operand): Ditto.
5304 (nds32_insert_attributes): Ditto.
5305 (nds32_init_libfuncs): New function.
5306 (TARGET_HAVE_TLS): Define.
5307 (TARGET_INIT_LIBFUNCS): Define.
5308 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5310 (TARGET_ELF): Apply different mcmodel setting.
5311 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5312 been migrated into elf.h and linux.h files.
5313 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5314 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5315 (mcmodel): The content has been migrated into nds32-elf.opt and
5316 nds32-linux.opt files.
5317 * config/nds32/t-elf: New file.
5318 * config/nds32/t-linux: New file.
5320 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5321 Shiva Chen <shiva0217@gmail.com>
5323 * config/nds32/constants.md (unspec_volatile_element): Add
5324 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5325 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5327 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5328 (make_pass_nds32_fp_as_gp): Declare.
5329 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5331 (nds32_asm_function_end_prologue): Remove unused asm output.
5332 (nds32_asm_function_begin_epilogue): Remove unused asm output.
5333 (nds32_asm_file_start): Output necessary fp_as_gp information.
5334 (nds32_option_override): Adjust register usage.
5335 (nds32_expand_prologue): Consider fp_as_gp situation.
5336 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5337 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5340 (simple_return): Ditto.
5341 (omit_fp_begin): Output special directive for fp_as_gp.
5342 (omit_fp_end): Output special directive for fp_as_gp.
5343 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5344 mforbid-fp-as-gp): New options.
5346 2018-06-01 Mark Wielaard <mark@klomp.org>
5348 * dwarf2out.c (dwarf2out_finish): Remove generation of
5349 DW_AT_loclists_base.
5351 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5353 * gimple-ssa-store-merging.c: Include gimple-fold.h.
5354 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5355 (struct merged_store_group): Add bit_insertion field.
5356 (dump_char_array): Use standard hexadecimal format.
5357 (merged_store_group::merged_store_group): Set bit_insertion to false.
5358 (merged_store_group::apply_stores): Use optimal buffer size. Deal
5359 with BIT_INSERT_EXPR stores. Move up code updating the mask and
5360 also print the mask in the dump file.
5361 (pass_store_merging::gate): Minor tweak.
5362 (imm_store_chain_info::coalesce_immediate): Fix wrong association
5363 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
5364 stores with INTEGER_CST stores.
5365 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5366 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5367 and use it throughout. Generate bit insertion sequences if need be.
5368 (pass_store_merging::process_store): Remove redundant condition.
5369 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5371 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
5373 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5374 the 128-bit floating point types. Fix function comment.
5376 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5378 * config/aarch64/aarch64-simd.md
5379 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5381 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5384 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5386 PR tree-optimization/85989
5387 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5389 (backprop::intersect_uses): Check it when deciding whether this
5390 is a backedge reference.
5391 (backprop::process_block): Add each phi to m_visited_phis
5392 after visiting it, then clear it at the end.
5394 2018-06-01 Richard Biener <rguenther@suse.de>
5396 * tree-vectorizer.h (vect_dr_stmt): New function.
5397 (vect_get_load_cost): Adjust.
5398 (vect_get_store_cost): Likewise.
5399 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5400 Use vect_dr_stmt instead of DR_SMTT.
5401 (vect_record_base_alignments): Likewise.
5402 (vect_calculate_target_alignment): Likewise.
5403 (vect_compute_data_ref_alignment): Likewise and make static.
5404 (vect_update_misalignment_for_peel): Likewise.
5405 (vect_verify_datarefs_alignment): Likewise.
5406 (vector_alignment_reachable_p): Likewise.
5407 (vect_get_data_access_cost): Likewise. Pass down
5408 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5409 (vect_get_peeling_costs_all_drs): Likewise.
5410 (vect_peeling_hash_get_lowest_cost): Likewise.
5411 (vect_enhance_data_refs_alignment): Likewise.
5412 (vect_find_same_alignment_drs): Likewise.
5413 (vect_analyze_data_refs_alignment): Likewise.
5414 (vect_analyze_group_access_1): Likewise.
5415 (vect_analyze_group_access): Likewise.
5416 (vect_analyze_data_ref_access): Likewise.
5417 (vect_analyze_data_ref_accesses): Likewise.
5418 (vect_vfa_segment_size): Likewise.
5419 (vect_small_gap_p): Likewise.
5420 (vectorizable_with_step_bound_p): Likewise.
5421 (vect_prune_runtime_alias_test_list): Likewise.
5422 (vect_analyze_data_refs): Likewise.
5423 (vect_supportable_dr_alignment): Likewise.
5424 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5425 (vect_gen_prolog_loop_niters): Likewise.
5426 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5427 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5429 (vect_recog_mask_conversion_pattern): Likewise.
5430 (vect_try_gather_scatter_pattern): Likewise.
5431 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5432 to vect_get_store_cost.
5433 (vect_get_store_cost): Get stmt_info instead of DR.
5434 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5435 (vect_get_load_cost): Get stmt_info instead of DR.
5437 2018-06-01 Richard Biener <rguenther@suse.de>
5440 * gimple-fold.c (var_decl_component_p): Also allow offsetted
5441 vars wrapped in MEM_REFs.
5443 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5445 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5446 Fix subreg tests so that we only return a choice between
5447 GENERAL_REGS and FP_REGS if the original classes included both.
5449 2018-06-01 Richard Biener <rguenther@suse.de>
5452 * tree-ssa-structalias.c (get_function_part_constraint):
5453 Handle NULL fi->decl.
5454 (find_func_aliases_for_call): Properly handle indirect
5455 fi from direct call.
5456 (find_func_clobbers): Likewise.
5457 (ipa_pta_execute): Likewise.
5458 (create_variable_info_for): For functions that are ifunc_resolver
5459 resolve to a varinfo that contains the result of the resolver call.
5460 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5463 2018-05-31 Michael Collison <michael.collison@arm.com>
5465 * config/aarch64/aarch64.md:
5466 (*fix_to_zero_extenddfdi2): New pattern.
5467 * gcc.target/aarch64/fix_extend1.c: New testcase.
5469 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
5473 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5474 and BUILT_IN_STRNCMP_EQ.
5475 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5476 BUILT_IN_STRNCMP_EQ.
5477 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5478 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5479 (gimple_fold_builtin): Likewise.
5480 * tree-ssa-strlen.c (compute_string_length): New function.
5481 (determine_min_obsize): New function.
5482 (handle_builtin_string_cmp): New function to handle calls to
5483 string compare functions.
5484 (strlen_optimize_stmt): Add handling to builtin string compare
5486 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5487 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5488 * tree.c (build_common_builtin_nodes): Add new defines of
5489 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5491 2018-05-31 Jakub Jelinek <jakub@redhat.com>
5494 * bb-reorder.c (pass_partition_blocks::gate): Return false for
5495 functions with naked attribute.
5497 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5499 * config/i386/sse.md (avx_vec_concat<mode>):
5500 Substitute concat_tg_mode mode attribute with xtg_mode.
5501 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5502 (concat_tg_mode): Remove mode attribute.
5504 2018-05-31 Martin Sebor <msebor@redhat.com>
5507 * calls.c (alloc_max_size): Correct a logic error/typo.
5508 Treat excessive arguments as infinite. Warn for invalid arguments.
5509 * doc/invoke.texi (-Walloc-size-larger-than): Update.
5511 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
5514 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5515 and movx for Haswell.
5517 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
5518 Cesar Philippidis <cesar@codesourcery.com>
5521 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5522 when emitting error on private/firstprivate reductions.
5523 * omp-low.c (lower_omp_target): Avoid reference-type processing
5524 on pointers for firstprivate clause.
5526 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5528 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5531 * config/aarch64/aarch64-simd.md
5532 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5533 (aarch64_ld1_x3_<mode>): Likewise
5534 (aarch64_st1x2<VALLDIF:mode>): Likewise
5535 (aarch64_st1_x2_<mode>): Likewise
5536 (aarch64_st1x3<VALLDIF:mode>): Likewise
5537 (aarch64_st1_x3_<mode>): Likewise
5538 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5539 (vld1_s8_x3): Likewise.
5540 (vld1_u16_x3): Likewise.
5541 (vld1_s16_x3): Likewise.
5542 (vld1_u32_x3): Likewise.
5543 (vld1_s32_x3): Likewise.
5544 (vld1_u64_x3): Likewise.
5545 (vld1_s64_x3): Likewise.
5546 (vld1_f16_x3): Likewise.
5547 (vld1_f32_x3): Likewise.
5548 (vld1_f64_x3): Likewise.
5549 (vld1_p8_x3): Likewise.
5550 (vld1_p16_x3): Likewise.
5551 (vld1_p64_x3): Likewise.
5552 (vld1q_u8_x3): Likewise.
5553 (vld1q_s8_x3): Likewise.
5554 (vld1q_u16_x3): Likewise.
5555 (vld1q_s16_x3): Likewise.
5556 (vld1q_u32_x3): Likewise.
5557 (vld1q_s32_x3): Likewise.
5558 (vld1q_u64_x3): Likewise.
5559 (vld1q_s64_x3): Likewise.
5560 (vld1q_f16_x3): Likewise.
5561 (vld1q_f32_x3): Likewise.
5562 (vld1q_f64_x3): Likewise.
5563 (vld1q_p8_x3): Likewise.
5564 (vld1q_p16_x3): Likewise.
5565 (vld1q_p64_x3): Likewise.
5566 (vst1_s64_x2): Likewise.
5567 (vst1_u64_x2): Likewise.
5568 (vst1_f64_x2): Likewise.
5569 (vst1_s8_x2): Likewise.
5570 (vst1_p8_x2): Likewise.
5571 (vst1_s16_x2): Likewise.
5572 (vst1_p16_x2): Likewise.
5573 (vst1_s32_x2): Likewise.
5574 (vst1_u8_x2): Likewise.
5575 (vst1_u16_x2): Likewise.
5576 (vst1_u32_x2): Likewise.
5577 (vst1_f16_x2): Likewise.
5578 (vst1_f32_x2): Likewise.
5579 (vst1_p64_x2): Likewise.
5580 (vst1q_s8_x2): Likewise.
5581 (vst1q_p8_x2): Likewise.
5582 (vst1q_s16_x2): Likewise.
5583 (vst1q_p16_x2): Likewise.
5584 (vst1q_s32_x2): Likewise.
5585 (vst1q_s64_x2): Likewise.
5586 (vst1q_u8_x2): Likewise.
5587 (vst1q_u16_x2): Likewise.
5588 (vst1q_u32_x2): Likewise.
5589 (vst1q_u64_x2): Likewise.
5590 (vst1q_f16_x2): Likewise.
5591 (vst1q_f32_x2): Likewise.
5592 (vst1q_f64_x2): Likewise.
5593 (vst1q_p64_x2): Likewise.
5594 (vst1_s64_x3): Likewise.
5595 (vst1_u64_x3): Likewise.
5596 (vst1_f64_x3): Likewise.
5597 (vst1_s8_x3): Likewise.
5598 (vst1_p8_x3): Likewise.
5599 (vst1_s16_x3): Likewise.
5600 (vst1_p16_x3): Likewise.
5601 (vst1_s32_x3): Likewise.
5602 (vst1_u8_x3): Likewise.
5603 (vst1_u16_x3): Likewise.
5604 (vst1_u32_x3): Likewise.
5605 (vst1_f16_x3): Likewise.
5606 (vst1_f32_x3): Likewise.
5607 (vst1_p64_x3): Likewise.
5608 (vst1q_s8_x3): Likewise.
5609 (vst1q_p8_x3): Likewise.
5610 (vst1q_s16_x3): Likewise.
5611 (vst1q_p16_x3): Likewise.
5612 (vst1q_s32_x3): Likewise.
5613 (vst1q_s64_x3): Likewise.
5614 (vst1q_u8_x3): Likewise.
5615 (vst1q_u16_x3): Likewise.
5616 (vst1q_u32_x3): Likewise.
5617 (vst1q_u64_x3): Likewise.
5618 (vst1q_f16_x3): Likewise.
5619 (vst1q_f32_x3): Likewise.
5620 (vst1q_f64_x3): Likewise.
5621 (vst1q_p64_x3): Likewise.
5623 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5625 * config/msp430/msp430.c (msp430_output_labelref): Prepend
5626 user_label_prefix to name.
5628 * tree-core.h: Update comment about the format of NAME string
5629 passed to handler in attribute_spec.
5631 * config/msp430/msp430.md: Remove erroneous subreg expression from
5632 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5633 zero_extend{q,h}isi2.
5635 2018-05-30 Borislav Petkov <bp@suse.de>
5637 * doc/extend.texi: Document some architecture specific
5638 constraints and sort entries.
5640 2018-05-30 Martin Sebor <msebor@redhat.com>
5643 * builtins.c (expand_builtin_stpcpy_1): New function.
5644 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5645 only if the former succeeds.
5647 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5649 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5652 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5654 * doc/invoke.texi (-flinker-output): Document
5656 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5658 * passes.c (ipa_write_summaries): Only modify statements if body
5660 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5661 incrementally linking.
5662 (ipa_passes): Likewise.
5663 * lto-cgraph.c (lto_output_node): When incrementally linking do not
5664 pass down resolution info.
5665 * common.opt (flag_incremental_link): Update info.
5666 * gcc.c (plugin specs): Turn flinker-output=* to
5667 -plugin-opt=-linker-output-known
5668 * toplev.c (compile_file): Also cut compilation when doing incremental
5670 * flag-types. (enum lto_partition_model): Add
5671 LTO_LINKER_OUTPUT_NOLTOREL.
5672 (invoke.texi): Add -flinker-output docs.
5673 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5674 link same way as WPA; do not stream in dead initializers.
5676 * dwarf2out.c (dwarf2out_die_ref_for_decl,
5677 darf2out_register_external_decl): Support incremental link.
5679 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5681 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5683 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5685 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5686 it down to simple_object_copy_lto_debug_sections.
5687 (run_gcc): Determine incremental LTO link time and configure
5688 lto1 into non-wpa mode, disable renaming of debug sections.
5690 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
5692 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5693 descriptions of various incorrectly documented functions.
5695 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
5698 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5699 address check not strict.
5701 2018-05-30 Richard Biener <rguenther@suse.de>
5703 PR tree-optimization/85964
5704 * tracer.c (better_p): Drop initialized count check, we only
5705 call the function with initialized counts now.
5706 (find_best_successor): Do find a best edge if one
5707 has uninitialized count.
5708 (find_best_predecessor): Likewise. Do BB frequency check only
5709 if count is initialized.
5711 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
5713 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5714 (aarch64_ldrstr_offset_compare): New.
5715 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5716 load/store orderings.
5717 (aarch64_gen_adjusted_ldpstp): Likewise.
5719 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
5721 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5722 Check for subset of GENERAL_REGS and FP_REGS.
5723 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5726 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
5728 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5729 and wi::to_poly_offset. Add the current offset and then check
5730 whether the sum fits, rather than using an unchecked addition of
5731 a checked term. Check for a shwi rather than a uhwi.
5732 * expr.c (get_bit_range): Use tree_to_poly_uint64.
5733 (store_constructor): Use poly_int_tree_p.
5734 (expand_expr_real_1): Likewise.
5735 * function.c (assign_temp): Likewise.
5736 * fold-const.c (const_binop): Use poly_int_tree_p and
5738 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
5740 * ipa-icf-gimple.c (func_checker::compare_operand): Use
5741 to_poly_offset for MEM offsets.
5742 * ipa-icf.c (sem_variable::equals): Likewise.
5743 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5744 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5745 wi::to_poly_offset for BIT_FIELD_REF offsets.
5746 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5748 * var-tracking.c (emit_note_insn_var_location): Use
5749 tree_to_poly_uint64.
5751 2018-05-29 Jim Wilson <jimw@sifive.com>
5753 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
5755 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
5758 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
5759 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
5761 (sse4_1_round<mode>2): Use nonimmediate_operand
5762 for operand 1 predicate.
5764 2018-05-29 Martin Sebor <msebor@redhat.com>
5765 Richard Biener <rguenther@suse.de>
5768 * calls.c (get_size_range): Call determine_value_range instead
5769 of get_value_range..
5770 * tree-vrp.h (determine_value_range): Declared new function.
5771 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
5773 2018-05-29 Richard Biener <rguenther@suse.de>
5775 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
5776 sure to use non-pattern stmts for get_earlier_stmt arguments.
5777 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
5778 called on pattern stmts.
5779 (get_later_stmt): Likewise.
5781 2018-05-29 Martin Liska <mliska@suse.cz>
5783 PR gcov-profile/85759
5784 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
5787 2018-05-29 Jakub Jelinek <jakub@redhat.com>
5789 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
5791 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
5795 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5796 VEC_PACK_FLOAT_EXPR): New tree codes.
5797 * tree-pretty-print.c (op_code_prio): Handle
5798 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5799 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5800 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5801 * tree-inline.c (estimate_operator_cost): Likewise.
5802 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
5803 * fold-const.c (const_binop): Likewise.
5804 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
5805 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5806 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5807 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
5808 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5809 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5810 * expr.c (expand_expr_real_2): Likewise.
5811 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
5812 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
5813 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
5815 * optabs.c (expand_widen_pattern_expr): For
5816 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
5817 sign from result type rather than operand's type.
5818 (expand_binop_directly): For vec_packu_float_optab and
5819 vec_packs_float_optab allow result type to be different from operand's
5821 * optabs-tree.c (optab_for_tree_code): Handle
5822 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5823 VEC_PACK_FLOAT_EXPR. Formatting fixes.
5824 * tree-vect-generic.c (expand_vector_operations_1): Handle
5825 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5826 VEC_PACK_FLOAT_EXPR.
5827 * tree-vect-stmts.c (supportable_widening_operation): Handle
5829 (supportable_narrowing_operation): Handle FLOAT_EXPR.
5830 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
5831 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
5832 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
5833 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
5835 (vec_pack<floatprefix>_float_<mode>): New expander.
5836 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
5838 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
5839 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
5840 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
5841 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
5842 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
5844 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
5845 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
5846 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5847 VEC_PACK_FLOAT_EXPR): Document.
5849 2018-05-29 Richard Biener <rguenther@suse.de>
5851 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
5853 (stmt_vec_info_vec): Make pointer.
5854 (init_stmt_vec_info_vec): Remove.
5855 (free_stmt_vec_info_vec): Likewise.
5856 (set_stmt_vec_info_vec): New function.
5857 (free_stmt_vec_infos): Likewise.
5858 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
5859 (set_vinfo_for_stmt): Likewise.
5860 (get_earlier_stmt): Likewise.
5861 (get_later_stmt): Likewise.
5862 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
5863 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
5864 (vec_info::~vec_info): Free stmt_vec_infos.
5865 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
5866 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
5867 (pass_slp_vectorize::execute): Likewise.
5868 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
5869 (free_stmt_vec_info_vec): Likewise.
5870 (set_stmt_vec_info_vec): New function.
5871 (free_stmt_vec_infos): Likewise.
5872 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
5873 the global stmt_vec_info_vec.
5874 * tree-parloops.c (gather_scalar_reductions): Use
5875 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
5878 2018-05-29 Richard Biener <rguenther@suse.de>
5880 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
5882 2018-05-29 Martin Liska <mliska@suse.cz>
5883 David Malcolm <dmalcolm@redhat.com>
5885 * vec.c (test_reverse): New.
5886 (vec_c_tests): Add new test.
5887 * vec.h (vl_ptr>::reverse): New function.
5889 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
5891 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
5893 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
5896 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5898 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
5900 2018-05-28 Richard Biener <rguenther@suse.de>
5902 PR tree-optimization/85933
5903 * tree-vect-data-refs.c (vect_record_base_alignments): Only
5904 look at stmts marked as vectorizable.
5906 2018-05-28 Richard Biener <rguenther@suse.de>
5908 PR tree-optimization/85934
5909 * tree-vect-generic.c (expand_vector_operations_1): Hoist
5910 vector boolean check before scalar optimization.
5912 2018-05-28 Jakub Jelinek <jakub@redhat.com>
5914 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
5917 2018-05-28 Mark Wielaard <mark@klomp.org>
5919 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
5920 if it is an expression containing a minus sign.
5922 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
5924 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
5926 2018-05-27 Paul Koning <ni1d@arrl.net>
5928 * config/pdp11/pdp11.md (truncsihi2): Remove.
5930 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
5931 Chung-Ju Wu <jasonwucj@gmail.com>
5933 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
5935 (unaligned_store_dw): Ditto.
5936 * config/nds32/nds32-memory-manipulation.c
5937 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
5938 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
5939 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
5940 (emit_setmem_word_loop): Rename to ...
5941 (emit_setmem_doubleword_loop): ... this.
5942 (nds32_gen_dup_4_byte_to_word_value): New function.
5943 (nds32_gen_dup_8_byte_to_double_word_value): New function.
5944 (nds32_expand_setmem_loop): Refine implementation.
5945 (nds32_expand_setmem_loop_v3m): Ditto.
5946 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
5949 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
5951 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
5953 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
5955 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
5956 (nds32_init_machine_status): Initialize machine->attr_naked_p and
5957 machine->attr_no_prologue_p.
5958 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
5959 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
5960 (nds32_expand_epilogue): Consider attr_naked_p.
5961 (nds32_expand_epilogue_v3pop): Likewise.
5962 (nds32_can_use_return_insn): Likewise.
5963 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
5964 attr_no_prologue_p fields.
5965 * config/nds32/nds32.opt (mret-in-naked-func): New option.
5967 2018-05-27 Jakub Jelinek <jakub@redhat.com>
5970 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
5972 * config/i386/sse.md
5973 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
5975 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
5977 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
5979 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
5981 (*<floatsuffix>floatv2div2sf2): Rename to ...
5982 (*float<floatunssuffix>v2div2sf2): ... this.
5983 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
5984 (float<floatunssuffix>v2div2sf2_mask): ... this.
5985 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
5986 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
5987 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
5989 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
5991 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5993 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5995 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5997 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5999 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6000 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6001 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6002 gen_ufix_truncv8dfv8si2.
6003 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6004 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6005 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6006 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6007 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6008 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6009 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6010 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6012 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6016 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6018 2018-05-25 Jim Wilson <jimw@sifive.com>
6020 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6021 * config/riscv/riscv.c (struct machine_function): Add
6022 interrupt_handler_p and attribute_checked_p fields.
6023 (riscv_attribute_table): Add interrupt.
6024 (riscv_interrupt_type_p): New.
6025 (riscv_save_reg_p): Save extra regs for interrupt handler.
6026 (riscv_use_save_libcall): Return false for interrupt handler.
6027 (riscv_first_stack_step): Add forward declaration.
6028 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
6029 for interrupt handler with large frame. Use it for saved reg list.
6030 (riscv_expand_prologue): Move flag_stack_usage_info support to
6031 eliminate duplication.
6032 (riscv_expand_epilogue): Generate mret for interrupt handler.
6033 (riscv_epilogue_uses): New.
6034 (riscv_can_use_return_insn): Return false for interrupt handler.
6035 (riscv_function_ok_for_sibcall): Likewise.
6036 (riscv_set_current_function): Add interrupt handler support.
6037 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6038 * config/riscv/riscv.md (UNSPECV_MRET): New.
6040 (riscv_frflags, riscv_fsflags): Use tab after opcode.
6042 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6044 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
6046 PR tree-optimization/85712
6047 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6048 this candidate has already been replaced in-situ by a copy.
6050 2018-05-25 Jason Merrill <jason@redhat.com>
6052 PR c++/80485 - inline function non-zero address.
6053 * symtab.c (nonzero_address): Check DECL_COMDAT.
6055 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
6058 * config/alpha/alpha.md (ashlsi3): New insn pattern.
6059 (*ashlsi_se): Rename from *ashldi_se. Define as sign
6060 extension of SImode operation. Use const123_operand predicate.
6061 (*saddsi_1): Remove.
6062 (*saddl_se_1): Ditto.
6064 (*ssubl_se_1): Ditto.
6065 * config/alpha/predicates.md (const123_operand): New predicate.
6066 * config/alpha/constraints.md (P): Use IN_RANGE.
6068 2018-05-25 Richard Biener <rguenther@suse.de>
6070 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6072 (ref_maybe_used_by_stmt_p): Likewise.
6073 (stmt_may_clobber_ref_p): Likewise.
6074 (stmt_may_clobber_ref_p_1): Likewise.
6075 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6077 (ref_maybe_used_by_stmt_p): Likewise.
6078 (stmt_may_clobber_ref_p): Likewise.
6079 (stmt_may_clobber_ref_p_1): Likewise.
6080 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6081 the alias oracle to disambiguate DRs with stmts DR analysis
6083 (vect_analyze_data_refs): Do not give up on not analyzable
6084 DRs for BB vectorization. Remove code truncating the dataref
6087 2018-05-25 Jakub Jelinek <jakub@redhat.com>
6090 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6091 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
6092 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6094 2018-05-25 Richard Biener <rguenther@suse.de>
6096 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6097 function, combining stmt data ref gathering and fatal analysis
6099 (vect_analyze_data_refs): Remove now redudnant code and simplify.
6100 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6101 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6102 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6103 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6105 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6107 PR tree-optimization/85720
6108 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6109 SCC if all partitions are builtins.
6110 (version_loop_by_alias_check): New parameter. Generate cancelable
6111 runtime alias check if all partitions are builtins.
6112 (distribute_loop): Update call to above function.
6114 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6116 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6117 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6118 (parm_default_def_partition_arg): Ditto.
6119 (set_parm_default_def_partition): Ditto.
6120 (get_parm_default_def_partitions): Ditto and make it static.
6121 (get_undefined_value_partitions): Ditto and make it static.
6122 (remove_ssa_form): Refactor call to init_var_map here.
6123 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6124 computation for loop region.
6125 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6126 (register_default_def): Delete.
6127 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6128 (parm_default_def_partition_arg): Ditto.
6129 (set_parm_default_def_partition): Ditto.
6130 (get_parm_default_def_partitions): Ditto and make it static.
6131 (get_undefined_value_partitions): Ditto and make it static.
6132 (coalesce_with_default, coalesce_with_default): Update comment.
6133 (create_coalesce_list_for_region): New func factored out from
6134 create_outofssa_var_map.
6135 (populate_coalesce_list_for_outofssa): New func factored out from
6136 create_outofssa_var_map and coalesce_ssa_name.
6137 (create_outofssa_var_map): Delete.
6138 (coalesce_ssa_name): Refactor to support live range computation.
6139 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6140 (get_parm_default_def_partitions): Delete.
6141 (get_undefined_value_partitions): Ditto.
6142 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6143 computation for loop region.
6144 (new_tree_live_info, loe_visit_block): Ditto.
6145 (live_worklist, set_var_live_on_entry): Ditto.
6146 (calculate_live_on_exit, verify_live_on_entry): Ditto.
6147 * tree-ssa-live.h (struct _var_map): New fields.
6148 (init_var_map): Change decl.
6149 (region_contains_p): New.
6151 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6153 * tree-ssa-live.h (live_merge_and_clear): Delete.
6155 2018-05-25 Richard Biener <rguenther@suse.de>
6158 * tree-dump.c (dequeue_and_dump): Remove access to removed
6159 operand 2 of a SWITCH_EXPR.
6161 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6163 * doc/sourcebuild.texi (vect_double_cond_arith): Include
6164 multiplication and division.
6165 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6166 (cond_udiv@var{m}, cond_umod@var{m}): Document.
6167 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6168 (cond_udiv_optab, cond_umod_optab): New optabs.
6169 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6170 (IFN_COND_RDIV): New internal functions.
6171 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6172 TRUNC_MOD_EXPR and RDIV_EXPR.
6173 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6174 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6176 (SVE_INT_BINARY): Include mult.
6177 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6178 (optab, sve_int_op): Handle mult.
6179 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6181 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6182 for SVE_INT_BINARY_SD.
6184 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6186 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6187 (optab, sve_int_op): Handle div and udiv.
6188 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6189 for SVE_INT_BINARY_SD.
6190 (*<optab><mode>3): New insn for the same.
6192 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6194 * tree-vect-patterns.c: Include predict.h.
6195 (vect_recog_divmod_pattern): Restrict check for division support
6196 to when optimizing for size.
6198 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6200 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6201 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6202 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6203 (gimple_match_op::set_op): Likewise.
6204 (gimple_resimplify4): Declare.
6205 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6206 (expr::gen_transform): Likewise.
6207 (decision_tree::gen): Generate a simplification routine for 4 operands.
6208 * gimple-match-head.c (gimple_simplify): Add an overload for
6209 4 operands. In the top-level function, handle up to 4 call
6210 arguments and call gimple_resimplify4.
6211 (gimple_resimplify4): New function.
6212 (build_call_internal): Pass a fourth operand.
6213 (maybe_push_to_seq): Likewise.
6214 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6215 Fold VEC_COND_EXPRs of an operation and a default value into
6216 an IFN_COND_* function if possible.
6217 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6219 (SVE_COND_FP_BINARY): Include them.
6220 (optab, sve_fp_op): Handle them.
6221 (SVE_INT_BINARY_REV): New code iterator.
6222 (SVE_COND_FP_BINARY_REV): New int iterator.
6223 (commutative): New int attribute.
6224 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6226 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6228 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6229 (*cond_<optab><mode>): New patterns for reversed operands.
6231 2018-05-25 Richard Biener <rguenther@suse.de>
6233 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6234 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6235 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6236 (STMT_VINFO_GROUPED_ACCESS): Adjust.
6237 * tree-vect-data-refs.c (everywhere): Adjust users.
6238 * tree-vect-loop.c (everywhere): Likewise.
6239 * tree-vect-slp.c (everywhere): Likewise.
6240 * tree-vect-stmts.c (everywhere): Likewise.
6241 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6243 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6245 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6247 (gcc_cv_as_section_exclude): ... this.
6248 Try Solaris as #exclude syntax.
6249 * configure: Regenerate.
6250 * config.in: Regenerate.
6251 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6253 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6254 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6256 * varasm.c (default_elf_asm_named_section): Don't check if
6257 HAVE_GAS_SECTION_EXCLUDE is defined.
6259 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6261 * doc/md.texi: Update the documentation of the cond_* optabs
6262 to mention the new final operand. Fix GET_MODE_NUNITS call.
6263 Describe the scalar case too.
6264 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6265 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6267 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6268 (get_conditional_internal_fn): Update comment.
6269 * tree-vect-loop.c (vectorizable_reduction): Pass the original
6270 accumulator value as a final argument to conditional functions.
6271 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6272 a define_expand and add an "else" operand. Assert for now that
6273 the else operand is equal to operand 2. Use SVE_INT_BINARY and
6274 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6275 (*cond_<optab><mode>): New patterns.
6276 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6277 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6278 (UNSPEC_COND_EOR): Delete.
6279 (optab): Remove associated mappings.
6280 (SVE_INT_BINARY): New code iterator.
6281 (sve_int_op): Remove int attribute and add "minus" to the code
6283 (SVE_COND_INT_OP): Delete.
6284 (SVE_COND_FP_OP): Rename to...
6285 (SVE_COND_FP_BINARY): ...this.
6287 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6289 * optabs.c (can_reuse_operands_p): New function.
6290 (maybe_legitimize_operands): Try to reuse the results for
6293 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6295 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6296 Add {q} suffix to insn mnemonic.
6298 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6300 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6301 (msp430_warn_func_return): New.
6303 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
6305 * fold-const.c (tree_nonzero_bits): New function.
6306 * fold-const.h (tree_nonzero_bits): Likewise.
6307 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6308 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6310 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6314 * varasm.c (assemble_alias): Check ifunc_resolver only on
6317 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6320 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6321 when memory input operand is handled.
6323 2018-05-24 Luis Machado <luis.machado@linaro.org>
6325 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6327 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6329 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6331 * match.pd: Delay FMA folds until after vectorization.
6333 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
6336 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6337 address check not strict.
6339 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6341 * gimple-match.h (gimple_match_op): New class.
6342 (mprts_hook): Replace parameters with a gimple_match_op *.
6343 (maybe_build_generic_op): Likewise.
6344 (gimple_simplified_result_is_gimple_val): Replace parameters with
6345 a const gimple_match_op *.
6346 (gimple_simplify): Replace code_helper * and tree * parameters with
6347 a gimple_match_op * parameter.
6348 (gimple_resimplify1): Replace code_helper *, tree and tree *
6349 parameters with a gimple_match_op * parameter.
6350 (gimple_resimplify2): Likewise.
6351 (gimple_resimplify3): Likewise.
6352 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6353 parameters with a gimple_match_op * parameter.
6354 * gimple-match-head.c (gimple_simplify): Change prototypes of
6355 auto-generated functions to take a gimple_match_op * instead of
6356 separate code_helper * and tree * parameters. Make the same
6357 change in the top-level overload and update calls to the
6358 gimple_resimplify routines. Update calls to the auto-generated
6359 functions and to maybe_push_res_to_seq in the publicly-facing
6360 operation-specific gimple_simplify overloads.
6361 (gimple_match_op::MAX_NUM_OPS): Define.
6362 (gimple_resimplify1): Replace rcode and ops with a single res_op
6363 parameter. Update call to gimple_simplify.
6364 (gimple_resimplify2): Likewise.
6365 (gimple_resimplify3): Likewise.
6366 (mprts_hook): Replace parameters with a gimple_match_op *.
6367 (maybe_build_generic_op): Likewise.
6368 (build_call_internal): Replace type, nargs and ops with
6369 a gimple_match_op *.
6370 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6371 with a single gimple_match_op *. Update calls to mprts_hook,
6372 build_call_internal and gimple_simplified_result_is_gimple_val.
6373 Factor out code that is common to the tree_code and combined_fn cases.
6374 * genmatch.c (expr::gen_transform): Replace tem_code and
6375 tem_ops with a gimple_match_op called tem_op. Update calls
6376 to the gimple_resimplify functions and maybe_push_res_to_seq.
6377 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6378 res_ops. Update call to the gimple_resimplify functions.
6379 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6380 (decision_tree::gen): Make the functions take a gimple_match_op *
6381 called res_op instead of separate res_code and res_ops parameters.
6382 Update call accordingly.
6383 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6384 and ops with a single res_op parameter. Update calls to
6385 maybe_build_generic_op and maybe_push_res_to_seq.
6386 (fold_stmt_1): Update calls to gimple_simplify and
6387 replace_stmt_with_simplification.
6388 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6389 and gimple_simplified_result_is_gimple_val.
6390 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6392 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6393 with a gimple_match_op *.
6394 (vn_nary_build_or_lookup): Likewise. Update call to
6395 vn_nary_build_or_lookup_1.
6396 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6397 gimple_match_op *. Update calls to the gimple_resimplify routines
6398 and to gimple_simplified_result_is_gimple_val.
6399 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6400 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6401 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6402 (visit_nary_op): Likewise.
6403 (visit_reference_op_load): Likewise.
6405 2018-05-23 Luis Machado <luis.machado@linaro.org>
6407 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6408 modifier for printing the step amount.
6410 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
6413 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6416 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
6418 * doc/sourcebuild.texi (Endianness): New subsubsection.
6420 2018-05-23 Luis Machado <luis.machado@linaro.org>
6422 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6423 <prefetch_dynamic_strides>: New const bool field.
6424 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6425 prefetch_dynamic_strides.
6426 (exynosm1_prefetch_tune): Likewise.
6427 (thunderxt88_prefetch_tune): Likewise.
6428 (thunderx_prefetch_tune): Likewise.
6429 (thunderx2t99_prefetch_tune): Likewise.
6430 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6432 (aarch64_override_options_internal): Update to set
6433 PARAM_PREFETCH_DYNAMIC_STRIDES.
6434 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6435 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6436 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6437 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6438 prefetch-dynamic-strides setting.
6440 2018-05-23 Luis Machado <luis.machado@linaro.org>
6442 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6443 <minimum_stride>: New const int field.
6444 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6445 minimum_stride field defaulting to -1.
6446 (exynosm1_prefetch_tune): Likewise.
6447 (thunderxt88_prefetch_tune): Likewise.
6448 (thunderx_prefetch_tune): Likewise.
6449 (thunderx2t99_prefetch_tune): Likewise.
6450 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6451 <default_opt_level>: Set to 3.
6452 (aarch64_override_options_internal): Update to set
6453 PARAM_PREFETCH_MINIMUM_STRIDE.
6454 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6455 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6456 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6457 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6458 stride is constant and is below the minimum stride threshold.
6460 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6462 * config/arm/arm-cpus.in (mode26): Delete.
6463 (armv4): Delete mode26 reference.
6464 * config/arm/arm.c (arm_configure_build_target): Delete use of
6467 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6469 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6471 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6472 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
6474 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
6475 (floatunsdidf2): Ditto.
6477 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6479 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6480 (fixuns_trunc<mode>si2_avx512f): Ditto.
6481 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6482 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6483 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6485 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6487 PR rtl-optimization/79985
6488 * df-scan.c (df_insn_refs_collect): Remove special case for
6489 global registers and asm statements.
6491 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6493 * extend.texi (Global Register Variables): Rewrite the bullet list.
6494 Note that the register is available for allocation. Note that access
6495 via inline asm must use constraints. Add note about async-signal
6496 handlers. Remove paragraph about automagic register selection.
6498 2018-05-23 Richard Biener <rguenther@suse.de>
6500 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6501 of fixed offset from memset VN.
6503 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
6505 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6507 (alloc_cand_and_find_basis): Initialize first_interp field.
6508 (slsr_process_mul): Modify first_interp field.
6509 (slsr_process_add): Likewise.
6510 (slsr_process_cast): Modify first_interp field for each new
6512 (slsr_process_copy): Likewise.
6513 (dump_candidate): Dump first_interp field.
6514 (replace_mult_candidate): Process all interpretations, not just
6516 (replace_rhs_if_not_dup): Likewise.
6517 (replace_one_candidate): Likewise.
6519 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
6521 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6523 (aarch64_needs_frame_chain): New function.
6524 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6526 2018-05-23 Sudakshina Das <sudi.das@arm.com>
6529 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6530 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6531 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6532 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6533 as true for strict-align.
6534 (aarch64_can_inline_p): Perform checks even when callee has no
6535 attributes to check for strict alignment.
6536 * doc/extend.texi (AArch64 Function Attributes): Document
6538 * doc/invoke.texi: (AArch64 Options): Likewise.
6540 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
6542 PR tree-optimization/85853
6543 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6544 the handling of the root of the node to...
6545 (vect_slp_analyze_node_operations_1): ...this new function,
6546 and run the whole thing with the child nodes' def types
6547 set according to their SLP node's def type.
6549 2018-05-23 Richard Biener <rguenther@suse.de>
6552 * tree-data-ref.c (create_runtime_alias_checks): Defer
6553 and ignore overflow warnings.
6555 2018-05-23 Yury Gribov <tetra2005@gmail.com>
6557 PR tree-optimization/85822
6558 * tree-vrp.c (is_masked_range_test): Fix handling of negative
6561 2018-05-23 Richard Biener <rguenther@suse.de>
6563 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6564 memset constants via native_interpret_expr.
6566 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
6569 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6571 (cgraph_node::create_alias): Likewise.
6572 (cgraph_node::get_availability): Check ifunc_resolver instead
6573 of looking up ifunc attribute.
6574 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6575 * varasm.c (do_assemble_alias): Likewise.
6576 (assemble_alias): Likewise.
6577 (default_binds_local_p_3): Likewise.
6578 * cgraph.h (cgraph_node): Add ifunc_resolver.
6579 (cgraph_node::only_called_directly_or_aliased_p): Return false
6581 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6583 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6584 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6585 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6586 instead of looking up ifunc attribute.
6588 2018-05-22 Luis Machado <luis.machado@linaro.org>
6590 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6592 2018-05-22 Martin Sebor <msebor@redhat.com>
6595 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6596 only when expasion succeeds.
6597 (expand_builtin_strcmp): Same.
6598 (expand_builtin_strncmp): Same.
6600 2018-05-22 Martin Sebor <msebor@redhat.com>
6602 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6604 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6605 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6607 * config/aarch64/aarch64-ldpstp.md: Replace uses of
6608 aarch64_mem_pair_operand with memory_operand and delete operand swapping
6610 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6611 Add check for legitimate_address.
6612 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6613 (aarch64_swap_ldrstr_operands): New.
6614 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6617 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6618 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6620 * config/aarch64/aarch64.md: New patterns to generate stp
6622 (store_pair_sw, store_pair_dw): New patterns to generate stp for
6623 single words and double words.
6624 (load_pair_sw, load_pair_dw): Likewise.
6625 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6627 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6629 * config/aarch64/aarch64-ldpstp.md: Modify peephole
6630 for different mode ldpstp and add peephole for merged zero stores.
6632 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6634 (aarch64_gen_store_pair): Rename calls to match new patterns.
6635 (aarch64_gen_load_pair): Rename calls to match new patterns.
6636 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6637 (load_pair<DREG:mode><DREG2:mode>): ... This.
6638 (store_pair<mode>): Rename to...
6639 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6640 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6642 (V_INT_EQUIV): Handle SImode.
6643 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6646 2018-05-22 Martin Sebor <msebor@redhat.com>
6649 * calls.c (maybe_warn_nonstring_arg): Use string length to set
6650 or ajust the presumed bound on an operation to avoid unnecessary
6653 2018-05-22 Martin Sebor <msebor@redhat.com>
6655 PR tree-optimization/85826
6656 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6657 assuming that a DECL necesarily has a constant size.
6659 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
6662 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6664 2018-05-22 Richard Biener <rguenther@suse.de>
6666 PR tree-optimization/85834
6667 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6668 non-constant and non-zero memset arguments.
6670 2018-05-22 Martin Liska <mliska@suse.cz>
6673 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6675 2018-05-22 Richard Biener <rguenther@suse.de>
6677 PR tree-optimization/85863
6678 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6679 comparisons when vectype is specified.
6680 (vectorizable_condition): Do not specify vectype for
6681 vect_is_simple_cond when SLP vectorizing.
6683 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
6686 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6687 define __ibm128 as long double.
6688 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6689 as a distinct type when IEEE 128-bit support is enabled.
6690 (init_float128_ieee): Fix up conversions between IFmode and IEEE
6691 128-bit types to use the correct functions.
6692 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6693 convert between 128-bit floating point types that have different
6694 modes but the same representation, instead of using gen_lowpart to
6696 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6698 (IFKF_reg): New attributes to give the register constraints for
6700 (extend<mode>tf2_internal): New insns to mark an explicit
6701 conversion between 128-bit floating point types that have a
6702 different mode but share the same representation.
6704 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
6706 PR tree-optimization/85814
6707 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6708 a null return from get_strinfo when unsharing the next
6709 strinfo in the chain.
6711 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6714 * varasm.c (weak_finish): Clean up weak_decls.
6716 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6718 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6719 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6720 UNSPEC_UADALP values.
6721 * config/aarch64/iterators.md (ABAL): New int iterator.
6724 (sur): Add mappings for the above.
6725 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6727 (aarch64_<sur>abal<mode>_4): Likewise.
6728 (aarch64_<sur>adalp<mode>_3): Likewise.
6729 (<sur>sadv16qi): New define_expand.
6731 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
6733 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6734 (*movdf_internal): Ditto.
6735 (*rcpsf2_sse): Ditto.
6736 (*rsqrtsf2_sse): Ditto.
6737 (*sqrt<mode>2_sse): Ditto.
6739 2018-05-21 Tamar Christina <tamar.christina@arm.com>
6741 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6743 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6744 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6745 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6746 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6748 * config/aarch64/arm_neon.h: Likewise.
6749 * config/aarch64/iterators.md (VQ_I): New.
6751 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
6753 * config.gcc: Add arc/t-multilib-linux to tmake_file for
6755 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
6758 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6760 * config/nds32/constraints.md (S): New constraint.
6761 * config/nds32/nds32.md (call_internal): Use constraint S.
6762 (call_value_internal): Likewise.
6763 (sibcall_internal): Likewise.
6764 (sibcall_value_internal): Likewise.
6766 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6767 Chung-Ju Wu <jasonwucj@gmail.com>
6769 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
6772 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6773 Chung-Ju Wu <jasonwucj@gmail.com>
6775 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
6776 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
6777 (nds32_rtx_costs_impl): Simplify.
6778 (nds32_address_cost_impl): Simplify.
6779 (nds32_init_rtx_costs): New function.
6780 (nds32_rtx_costs_speed_prefer): Likewise.
6781 (nds32_rtx_costs_size_prefer): Likewise.
6782 (nds32_address_cost_speed_prefer): Likewise.
6783 (nds32_address_cost_speed_fwprop): Likewise.
6784 (nds32_address_cost_size_prefer): Likewise.
6785 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
6786 * config/nds32/nds32.c (nds32_option_override): Use
6787 nds32_init_rtx_costs function.
6789 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6791 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
6792 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
6793 (TARGET_PIPELINE_N8): Likewise.
6794 (TARGET_PIPELINE_N10): Likewise.
6795 (TARGET_PIPELINE_N13): Likewise.
6796 (TARGET_PIPELINE_GRAYWOLF): Likewise.
6798 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
6800 * config/nds32/nds32-fpu.md: Update copyright year.
6802 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6804 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
6806 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6808 * config/nds32/nds32.c
6809 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
6810 * config/nds32/nds32.opt (minline-asm-r15): New option.
6812 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6814 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
6816 * config/nds32/nds32.md (abssi2): New pattern.
6818 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
6820 * config/i386/i386.md (rex64namesuffix): New mode attribute.
6821 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
6822 Merge insn pattern from sse_cvtsi2ss<round_name> and
6823 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
6824 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
6825 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
6826 using SWI48 mode iterator.
6827 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
6828 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
6829 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
6830 pattern from sse_cvttss2si<round_saeonly_name>
6831 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
6832 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
6833 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
6834 using SWI48 mode iterator.
6835 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
6836 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
6837 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
6838 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
6839 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
6840 using SWI48 mode iterator.
6841 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
6842 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
6843 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
6844 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
6845 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
6846 SWI48 mode iterator.
6847 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
6848 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
6849 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
6850 pattern from sse_cvttsd2si<round_saeonly_name>
6851 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
6853 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6855 * config/nds32/nds32-md-auxiliary.c
6856 (nds32_valid_smw_lwm_base_p): Refine.
6857 (nds32_output_smw_single_word): Refine.
6858 (nds32_output_smw_double_word): New.
6859 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
6861 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6863 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
6864 (nds32_output_stack_pop): Refine.
6865 (nds32_expand_unaligned_load): Refine.
6866 (nds32_expand_unaligned_store): Refine.
6868 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6869 Chung-Ju Wu <jasonwucj@gmail.com>
6871 * config/nds32/constants.md: Add TP_REGNUM constant.
6872 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
6873 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
6875 * config/nds32/nds32-doubleword.md: Consider flag_pic.
6876 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
6877 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
6878 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
6879 and PIC code generation.
6880 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
6882 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
6884 * config/nds32/nds32.md: Support TLS and PIC.
6885 * config/nds32/nds32.c: Support TLS and PIC.
6886 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
6887 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
6890 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6892 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
6893 mode with E_ prefix.
6895 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6896 Chung-Ju Wu <jasonwucj@gmail.com>
6898 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
6899 * config/nds32/nds32-md-auxiliary.c
6900 (symbolic_reference_mentioned_p): New.
6901 (nds32_legitimize_ict_address): New.
6902 (nds32_expand_ict_move): New.
6903 (nds32_indirect_call_referenced_p): New.
6904 (nds32_symbol_binds_local_p): Delete.
6905 (nds32_long_call_p): Modify.
6906 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
6907 * config/nds32/nds32-protos.h
6908 (symbolic_reference_mentioned_p): Declare.
6909 (nds32_legitimize_ict_address): Declare.
6910 (nds32_expand_ict_move): Declare.
6911 (nds32_indirect_call_referenced_p): Declare.
6912 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
6913 (nds32_relax_group): Use nds32_ict_const_p as condition.
6914 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
6915 (nds32_asm_file_start): Output ict_model directive in asm code.
6916 (nds32_legitimate_address_p): Consider indirect call.
6917 (nds32_print_operand): Consider indirect call.
6918 (nds32_print_operand_address): Consider indirect call.
6919 (nds32_insert_attributes): Handle "indirect_call" attribute.
6920 (TARGET_LEGITIMATE_ADDRESS_P): Define.
6921 (TARGET_LEGITIMATE_CONSTANT_P): Define.
6922 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
6923 (TARGET_DELEGITIMIZE_ADDRESS): Define.
6924 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
6925 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
6926 (TARGET_ICT_MODEL_SMALL): Define.
6927 (TARGET_ICT_MODEL_LARGE): Define.
6928 * config/nds32/nds32.md (movsi): Consider ict model.
6929 (call, call_value): Consider ict model.
6930 (sibcall, sibcall_value): Consider ict model.
6931 * config/nds32/nds32.opt (mict-model): New option.
6932 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
6935 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
6936 Monk Chiang <sh.chiang04@gmail.com>
6937 Jim Wilson <jimw@sifive.com>
6939 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
6940 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
6941 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
6942 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
6943 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
6944 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
6945 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
6946 compute save_libcall_adjustment properly.
6947 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
6948 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
6949 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
6950 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
6951 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
6952 (ABI_SPEC): Handle mabi=ilp32e.
6953 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
6954 (RVE): Add RVE mask.
6955 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
6956 <-march>: Add rv32e as an example.
6958 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
6961 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
6962 (intra_create_variable_infos): Handle C++ constructors.
6964 2018-05-18 Martin Liska <mliska@suse.cz>
6966 * passes.def: Remove a redundant pass.
6968 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
6971 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
6973 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6975 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
6977 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
6979 (armv2, armv2a, armv3, armv3m): Delete architectures.
6980 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
6981 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
6982 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
6984 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
6985 (*mulsidi3adddi): Likewise.
6986 (mulsidi3): Likewise.
6987 (*mulsidi3_nov6): Likewise.
6988 (umulsidi3): Likewise.
6989 (umulsidi3_nov6): Likewise.
6990 (umaddsidi4): Likewise.
6991 (*umulsidi3adddi): Likewise.
6992 (smulsi3_highpart): Likewise.
6993 (*smulsi3_highpart_nov6): Likewise.
6994 (umulsi3_highpart): Likewise.
6995 (*umulsi3_highpart_nov6): Likewise.
6996 * config/arm/arm.h (arm_arch3m): Delete.
6997 * config/arm/arm.c (arm_arch3m): Delete.
6998 (arm_option_override_internal): Update armv3-related comment.
6999 (arm_configure_build_target): Delete use of isa_bit_mode32.
7000 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7001 (arm_rtx_costs_internal): Delete check of arm_arch3m.
7002 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7004 (mulusa3): Likewise.
7005 * config/arm/arm-protos.h (arm_arch3m): Delete.
7006 * config/arm/arm-tables.opt: Regenerate.
7007 * config/arm/arm-tune.md: Likewise.
7008 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7009 deleted architectures.
7011 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7013 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7014 (armv5t, armv5te): New features.
7015 (ARMv5, ARMv5e): Delete fgroups.
7016 (ARMv5t, ARMv5te): Adjust for above changes.
7018 (armv5, armv5e): Delete arches.
7019 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7021 (*call_reg_arm): Likewise.
7022 (*call_value_reg_armv5): Likewise.
7023 (*call_value_reg_arm): Likewise.
7024 (*call_symbol): Likewise.
7025 (*call_value_symbol): Likewise.
7026 (*sibcall_insn): Likewise.
7027 (*sibcall_value_insn): Likewise.
7029 (prefetch): Likewise.
7030 (define_split and define_peephole2 dependent on arm_arch5):
7032 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7034 (TARGET_ARM_QBIT): Likewise.
7035 (TARGET_DSP_MULTIPLY): Likewise.
7036 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7037 (arm_arch5, arm_arch5e): Delete.
7038 (arm_arch5t, arm_arch5te): Declare.
7039 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7040 (arm_arch5t): Declare.
7041 (arm_option_reconfigure_globals): Update for the above.
7042 (arm_options_perform_arch_sanity_checks): Update comment, replace
7043 use of arm_arch5 with arm_arch5t.
7044 (use_return_insn): Likewise.
7045 (arm_emit_call_insn): Likewise.
7046 (output_return_instruction): Likewise.
7047 (arm_final_prescan_insn): Likewise.
7048 (arm_coproc_builtin_available): Likewise.
7049 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7050 arm_arch5e with arm_arch5t and arm_arch5te.
7051 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7052 (arm_arch5t, arm_arch5te): Declare.
7053 * config/arm/arm-tables.opt: Regenerate.
7054 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7055 * config/arm/t-multilib: Likewise.
7056 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7057 instead of arm_arch5.
7058 (*call_reg_thumb1): Likewise.
7059 (*call_value_reg_thumb1_v5): Likewise.
7060 (*call_value_reg_thumb1): Likewise.
7061 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7063 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7065 2018-05-18 Martin Liska <mliska@suse.cz>
7067 PR gcov-profile/84846
7068 * doc/gcov.texi: Document -t option of gcov tool.
7070 2018-05-18 Martin Liska <mliska@suse.cz>
7072 PR gcov-profile/84846
7073 * gcov.c (print_usage): Add new -t option.
7074 (process_args): Handle the option.
7075 (generate_results): Use stdout as output when requested by
7078 2018-05-18 Martin Liska <mliska@suse.cz>
7080 PR gcov-profile/84846
7081 * coverage.c (coverage_init): Write PWD to .gcno file.
7082 * doc/gcov.texi: Document how working directory is printed.
7083 * gcov-dump.c (dump_gcov_file): Print PWD.
7084 * gcov.c (output_intermediate_file): Likewise.
7085 (read_graph_file): Read PWD string.
7086 (output_lines): Print PWD.
7088 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7091 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7092 for retval and return false if all args to phi are zero.
7094 2018-05-18 Richard Biener <rguenther@suse.de>
7096 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7098 (evrp_dom_walker::before_dom_children): Call it.
7100 2018-05-18 Richard Biener <rguenther@suse.de>
7102 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7103 results when processing array refs with variable index.
7105 2018-05-18 Toon Moene <toon@moene.org>
7107 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7108 directly after that of -floop-interchange. Indicate that both
7109 options are enabled by default when specifying -O3.
7111 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7113 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7114 iterator. Delete separate integer-mode vec_set<mode> expander.
7115 (aarch64_simd_vec_setv2di): Delete.
7116 (vec_setv2di): Delete.
7117 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7118 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
7119 the "w, r" alternative.
7121 2018-05-18 Martin Liska <mliska@suse.cz>
7123 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7124 * tree-pass.h (make_pass_lower_switch_O0): New function.
7125 * tree-switch-conversion.c (node_has_low_bound): Remove.
7126 (node_has_high_bound): Likewise.
7127 (node_is_bounded): Likewise.
7128 (class pass_lower_switch): Make it a template type and create
7130 (pass_lower_switch::execute): Add template argument.
7131 (make_pass_lower_switch): New function.
7132 (make_pass_lower_switch_O0): New function.
7133 (do_jump_if_equal): Remove.
7134 (emit_case_nodes): Simplify to just handle all 3 cases and leave
7135 all the hard work to tree optimization passes.
7137 2018-05-18 Martin Liska <mliska@suse.cz>
7139 * dbgcnt.c (limit_low): Renamed from limit.
7140 (limit_high): New variable.
7141 (dbg_cnt_is_enabled): Check for upper limit.
7142 (dbg_cnt): Adjust dumping.
7143 (dbg_cnt_set_limit_by_index): Add new argument for high
7145 (dbg_cnt_set_limit_by_name): Likewise.
7146 (dbg_cnt_process_single_pair): Parse new format.
7147 (dbg_cnt_process_opt): Use strtok.
7148 (dbg_cnt_list_all_counters): Remove 'value' and add
7150 * doc/invoke.texi: Document changes.
7152 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
7154 * doc/sourcebuild.texi (scalar_all_fma): Document.
7155 * tree.def (FMA_EXPR): Delete.
7156 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7157 * internal-fn.c (ternary_direct): New macro.
7158 (expand_ternary_optab_fn): Likewise.
7159 (direct_ternary_optab_supported_p): Likewise.
7160 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7161 * builtins.c (fold_builtin_fma): Delete.
7162 (fold_builtin_3): Don't call it.
7163 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7164 * expr.c (expand_expr_real_2): Likewise.
7165 * fold-const.c (operand_equal_p): Likewise.
7166 (fold_ternary_loc): Likewise.
7167 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7168 * gimple.c (DEFTREECODE): Likewise.
7169 * gimplify.c (gimplify_expr): Likewise.
7170 * optabs-tree.c (optab_for_tree_code): Likewise.
7171 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7172 * tree-eh.c (operation_could_trap_p): Likewise.
7173 (stmt_could_throw_1_p): Likewise.
7174 * tree-inline.c (estimate_operator_cost): Likewise.
7175 * tree-pretty-print.c (dump_generic_node): Likewise.
7176 (op_code_prio): Likewise.
7177 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7178 * tree-ssa-operands.c (get_expr_operands): Likewise.
7179 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7180 * fold-const-call.h (fold_fma): Delete.
7181 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7182 CFN_FNMA and CFN_FNMS.
7184 * genmatch.c (combined_fn): New enum.
7185 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7186 (commutative_op): New function.
7187 (commutate): Use it. Handle more than 2 operands.
7188 (dt_operand::gen_gimple_expr): Use commutative_op.
7189 (parser::parse_expr): Allow :c to be used with non-binary
7190 operators if the commutative operand is known.
7191 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7192 CFN_FMS, CFN_FNMA and CFN_FNMS.
7193 (backprop::process_assign_use): Remove FMA_EXPR handling.
7194 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7195 (gen_hsa_fma): New function.
7196 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7197 IFN_FNMA and IFN_FNMS.
7198 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7199 * gimple-fold.h (follow_all_ssa_edges): Declare.
7200 * gimple-fold.c (follow_all_ssa_edges): New function.
7201 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7202 gimple_build interface and use follow_all_ssa_edges to fold the result.
7203 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7204 instead of checking for optabs directly.
7205 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7206 rather than FMA_EXPRs.
7207 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7208 call to IFN_FMA instead of an FMA_EXPR.
7210 2018-05-17 Jim Wilson <jimw@sifive.com>
7212 * expr.c (do_tablejump): When converting index to Pmode, if we have a
7213 sign extended promoted subreg, and the range does not have the sign bit
7214 set, then do a sign extend.
7216 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7217 test, check for sign extended subreg and/or constant operands, and
7218 do a sign extend in that case.
7220 2018-05-17 Steve Ellcey <sellcey@cavium.com>
7222 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7223 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7225 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7226 Change logics_shift_reg to logics_shift_imm.
7227 (thunderx2t99_fp_loadpair_basic): Delete.
7228 (thunderx2t99_fp_storepair_basic): Delete.
7229 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7230 (thunderx2t99_asimd_polynomial): Delete.
7231 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7232 and neon_fp_mul_d_scalar_q.
7233 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7234 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7235 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7236 (thunderx2t99_asimd_lut): Add missing tbl types.
7237 (thunderx2t99_asimd_ext): Delete.
7238 (thunderx2t99_asimd_load1_1_mult): Delete.
7239 (thunderx2t99_asimd_load1_2_mult): Delete.
7240 (thunderx2t99_asimd_load1_ldp): New.
7241 (thunderx2t99_asimd_load1): New.
7242 (thunderx2t99_asimd_load2): Add missing *load2* types.
7243 (thunderx2t99_asimd_load3): New.
7244 (thunderx2t99_asimd_load4): New.
7245 (thunderx2t99_asimd_store1_1_mult): Delete.
7246 (thunderx2t99_asimd_store1_2_mult): Delete.
7247 (thunderx2t99_asimd_store2_mult): Delete.
7248 (thunderx2t99_asimd_store2_onelane): Delete.
7249 (thunderx2t99_asimd_store_stp): New.
7250 (thunderx2t99_asimd_store1): New.
7251 (thunderx2t99_asimd_store2): New.
7252 (thunderx2t99_asimd_store3): New.
7253 (thunderx2t99_asimd_store4): New.
7255 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
7257 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7258 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
7260 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
7261 Segher Boessenkool <segher@kernel.crashing.org>
7264 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7267 2018-05-17 Richard Biener <rguenther@suse.de>
7269 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7270 for pruning loop and prune defs feeding only already visited PHIs.
7272 2018-05-17 Richard Biener <rguenther@suse.de>
7274 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7276 2018-05-17 Bin Cheng <bin.cheng@arm.com>
7277 Richard Biener <rguenther@suse.de>
7279 PR tree-optimization/85793
7280 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7281 for VMAT_ELEMENTWISE.
7283 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7285 * internal-fn.h (lookup_internal_fn): Declare
7286 * internal-fn.c (lookup_internal_fn): New function.
7287 * gimple.c (gimple_build_call_from_tree): Handle calls to
7289 * gimple-pretty-print.c (dump_gimple_call): Print "." before
7290 internal function names.
7291 * tree-pretty-print.c (dump_generic_node): Likewise.
7292 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7294 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7296 * gimple-fold.h (gimple_build): Make the function forms take
7297 combined_fn rather than built_in_function.
7298 (gimple_simplify): Likewise.
7299 * gimple-match-head.c (gimple_simplify): Likewise.
7300 * gimple-fold.c (gimple_build): Likewise.
7301 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7302 rather than gimple_build_call_internal.
7303 (get_initial_defs_for_reduction): Likewise.
7304 (vect_create_epilog_for_reduction): Likewise.
7305 (vectorizable_live_operation): Likewise.
7307 2018-05-17 Martin Liska <mliska@suse.cz>
7309 * gimple-ssa-sprintf.c (format_directive): Do not use
7310 space in between 'G_' and '('.
7312 2018-05-17 Jakub Jelinek <jakub@redhat.com>
7315 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7316 even if the mask is not all ones.
7319 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7321 (ix86_gimple_fold_builtin): Likewise.
7324 * config/i386/i386.c: Include tree-vector-builder.h.
7325 (ix86_vector_shift_count): New function.
7326 (ix86_fold_builtin): Fold shift builtins by scalar count.
7327 (ix86_gimple_fold_builtin): Likewise.
7329 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7330 _mm512_setzero): New intrinsics.
7332 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
7333 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7335 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7336 code generation for cases where splatting a value is not useful.
7337 * simplify-rtx.c (simplify_ternary_operation): Simplify
7338 vec_merge across a vec_duplicate and a paradoxical subreg forming
7339 a vector mode to a vec_concat.
7341 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
7343 * config.gcc: Support "goldmont-plus".
7344 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7346 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7347 PROCESSOR_GOLDMONT_PLUS.
7348 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7349 (processor_target_table): Add "goldmont-plus".
7350 (PTA_GOLDMONT_PLUS): Define.
7351 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7352 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7353 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7354 (fold_builtin_cpu): Add "goldmont-plus".
7355 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7356 (ix86_option_override_internal): Add "goldmont-plus".
7357 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7358 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7359 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7360 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7362 2018-05-17 Richard Biener <rguenther@suse.de>
7364 PR tree-optimization/85757
7365 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7366 remove defs that only feed that PHI from further processing.
7368 2018-05-16 Jim Wilson <jimw@sifive.com>
7370 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7372 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7374 2018-05-16 Mark Wielaard <mark@klomp.org>
7376 * dwarf2out.c (count_index_strings): New function.
7377 (output_indirect_strings): Call count_index_strings and generate
7378 header for dwarf_version >= 5.
7380 2018-05-16 Mark Wielaard <mark@klomp.org>
7382 * dwarf2out.c (dwarf_FORM): New function.
7383 (set_indirect_string): Use dwarf_FORM.
7384 (reset_indirect_string): Likewise.
7385 (size_of_die): Likewise.
7386 (value_format): Likewise.
7387 (output_die): Likewise.
7388 (add_skeleton_AT_string): Likewise.
7389 (output_macinfo_op): Likewise.
7390 (index_string): Likewise.
7391 (output_index_string_offset): Likewise.
7392 (output_index_string): Likewise.
7393 (count_index_strings): Likewise.
7395 2018-05-16 Carl Love <cel@us.ibm.com>
7397 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7398 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7400 2018-05-16 Martin Jambor <mjambor@suse.cz>
7402 * ipa-prop.c (ipa_free_all_edge_args): Remove.
7403 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7405 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
7407 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7408 (fnma<mode>4): Likewise.
7409 (fms<mode>4): Likewise.
7410 (fnms<mode>4): Likewise.
7411 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7412 (aarch64_fnma<mode>4): Likewise.
7413 (aarch64_fms<mode>4): Likewise.
7414 (aarch64_fnms<mode>4): Likewise.
7415 (aarch64_fnmadd<mode>4): Likewise.
7417 2018-05-16 Jason Merrill <jason@redhat.com>
7419 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
7421 2018-05-16 Richard Biener <rguenther@suse.de>
7423 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7424 (dump_stmt_cost): Declare.
7425 (add_stmt_cost): Dump cost we add.
7426 (add_stmt_costs): New function.
7427 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7429 (vect_analyze_stmt): Adjust prototype.
7430 (vectorizable_condition): Likewise.
7431 (vectorizable_live_operation): Likewise.
7432 (vectorizable_reduction): Likewise.
7433 (vectorizable_induction): Likewise.
7434 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7435 cost vector to pass to vectorizable_ and record afterwards.
7436 (vect_model_reduction_cost): Take cost vector argument and adjust.
7437 (vect_model_induction_cost): Likewise.
7438 (vectorizable_reduction): Likewise.
7439 (vectorizable_induction): Likewise.
7440 (vectorizable_live_operation): Likewise.
7441 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7442 SLP_TREE_NUMBER_OF_VEC_STMTS.
7443 (vect_analyze_slp_cost_1): Remove.
7444 (vect_analyze_slp_cost): Likewise.
7445 (vect_slp_analyze_node_operations): Take visited args and
7446 a target cost vector. Avoid processing already visited stmt sets.
7447 (vect_slp_analyze_operations): Use a local cost vector to gather
7448 costs and register those of non-discarded instances.
7449 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7450 (vect_schedule_slp_instance): Remove copying of
7451 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
7453 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7454 adding cost. Record cost entry location.
7455 (vect_prologue_cost_for_slp_op): Function to compute cost of
7456 a constant or invariant generated for SLP vect in the prologue,
7457 split out from vect_analyze_slp_cost_1.
7458 (vect_model_simple_cost): Make static. Adjust for SLP costing.
7459 (vect_model_promotion_demotion_cost): Likewise.
7460 (vect_model_store_cost): Likewise, make static.
7461 (vect_model_load_cost): Likewise.
7462 (vectorizable_bswap): Add cost vector arg and adjust.
7463 (vectorizable_call): Likewise.
7464 (vectorizable_simd_clone_call): Likewise.
7465 (vectorizable_conversion): Likewise.
7466 (vectorizable_assignment): Likewise.
7467 (vectorizable_shift): Likewise.
7468 (vectorizable_operation): Likewise.
7469 (vectorizable_store): Likewise.
7470 (vectorizable_load): Likewise.
7471 (vectorizable_condition): Likewise.
7472 (vectorizable_comparison): Likewise.
7473 (can_vectorize_live_stmts): Likewise.
7474 (vect_analyze_stmt): Likewise.
7475 (vect_transform_stmt): Adjust calls to vectorizable_*.
7476 * tree-vectorizer.c: Include gimple-pretty-print.h.
7477 (dump_stmt_cost): New function.
7479 2018-05-16 Richard Biener <rguenther@suse.de>
7481 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7482 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7483 * tree-ssa-dse.c: Include tree-ssa-loop.h.
7484 (check_name): New callback.
7485 (dse_classify_store): Track cycles via a visited bitmap of PHI
7486 defs and simplify handling of in-loop and across loop dead stores
7487 and properly fail for loop-variant refs. Handle byte-tracking with
7488 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7491 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
7493 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7494 (vect_get_mask_type_for_stmt): Likewise.
7495 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7497 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
7498 to determine the statement's vector type and the vector type that
7499 should be used for calculating nunits. Deal with cases in which
7500 the type has to be deferred.
7501 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7502 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7503 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7504 (vect_determine_vf_for_stmt): New functions, split out from...
7505 (vect_determine_vectorization_factor): ...here.
7506 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7507 (vect_get_mask_type_for_stmt): New functions, split out from
7508 vect_determine_vectorization_factor.
7510 2018-05-16 Richard Biener <rguenther@suse.de>
7512 * tree-cfg.c (verify_gimple_assign_ternary): Properly
7513 verify the [VEC_]COND_EXPR embedded comparison.
7515 2018-05-15 Martin Sebor <msebor@redhat.com>
7517 PR tree-optimization/85753
7518 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7519 RECORD_TYPE in addition to ARRAY_TYPE.
7521 2018-05-15 Martin Sebor <msebor@redhat.com>
7524 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7526 2018-05-15 Richard Biener <rguenther@suse.de>
7528 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7529 add by_clobber_p one. Change algorithm to collect all defs
7530 representing uses we need to walk and try reducing them to
7531 a single one before failing.
7532 (dse_dom_walker::dse_optimize_stmt): Adjust.
7534 2018-05-13 Mark Wielaard <mark@klomp.org>
7536 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7537 (size_of_loc_descr): Likewise.
7538 (output_loc_operands): Likewise.
7539 (output_loc_operands_raw): Likewise.
7540 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7541 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7542 (hash_loc_operands): Likewise.
7543 (compare_loc_operands): Likewise.
7545 2018-05-14 Mark Wielaard <mark@klomp.org>
7547 * dwarf2out.c (count_index_addrs): New function.
7548 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7550 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7552 PR tree-optimization/83648
7553 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7554 return value as malloc candidate.
7556 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7559 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7560 param as true in call to suggest_attribute.
7562 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
7564 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7565 -mreadonly-in-sdata.
7567 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7569 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7571 (aarch64_crypto_aesd_fused): Likewise.
7573 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
7575 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7576 (movsi_aarch64): Likewise.
7577 (load_pairsi): Likewise.
7578 (load_pairdi): Likewise.
7579 (store_pairsi): Likewise.
7580 (store_pairdi): Likewise.
7581 (load_pairsf): Likewise.
7582 (load_pairdf): Likewise.
7583 (store_pairsf): Likewise.
7584 (store_pairdf): Likewise.
7585 (zero_extend): Likewise.
7586 (trunc): Swap alternatives.
7587 (fcvt_target): Add '?' to prefer w over r.
7589 2018-05-14 Jakub Jelinek <jakub@redhat.com>
7592 * config/i386/i386.md: Disallow non-commutative arithmetics in
7593 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7594 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
7595 in the peephole2 before it.
7597 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
7599 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7600 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7601 (ix86_handle_option): Handle -mcldemote.
7602 * config.gcc: New header.
7603 * config/i386/cldemoteintrin.h: New file.
7604 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7605 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7607 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7608 OPTION_MASK_ISA_CLDEMOTE.
7609 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7610 (ix86_valid_target_attribute_inner_p): Ditto.
7611 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7612 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7613 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7614 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7615 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7617 * config/i386/i386.opt: Add -mcldemote.
7618 * config/i386/x86intrin.h: New header.
7619 * doc/invoke.texi: Add -mcldemote.
7621 2018-05-14 Richard Biener <rguenther@suse.de>
7623 * doc/match-and-simplify.texi: Adjust :s documentation.
7625 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
7627 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7628 intended memcpy size.
7629 (REORDER_45): Likewise.
7631 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
7633 * sort.cc: New file.
7634 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7635 * vec.c (qsort_chk): Use gcc_qsort.
7636 * Makefile.in (OBJS-libcommon): Add sort.o.
7637 (build/sort.o): New target. Use it...
7638 (BUILD_RTL): ... here, and...
7639 (build/gencfn-macros): ... here, and...
7640 (build/genmatch): ... here.
7642 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7643 Chung-Ju Wu <jasonwucj@gmail.com>
7645 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7646 * config/nds32/nds32-graywolf.md: New file.
7647 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7648 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7650 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7651 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7652 * config/nds32/nds32.md (pipeline_model): Add graywolf.
7653 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7654 * config/nds32/pipelines.md: Include n15 settings.
7656 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7657 Chung-Ju Wu <jasonwucj@gmail.com>
7659 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7660 * config/nds32/nds32-n13.md: New file.
7661 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7662 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7664 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7665 * config/nds32/nds32.md (pipeline_model): Add n13.
7666 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7667 * config/nds32/pipelines.md: Include n13 settings.
7669 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7670 Chung-Ju Wu <jasonwucj@gmail.com>
7672 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7673 * config/nds32/nds32-n10.md: New file.
7674 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7675 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7677 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7678 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7679 * config/nds32/nds32.md (pipeline_model): Add n10.
7680 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7681 * config/nds32/pipelines.md: Include n10 settings.
7683 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
7684 Kito Cheng <kito.cheng@gmail.com>
7685 Chung-Ju Wu <jasonwucj@gmail.com>
7687 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7688 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7689 Add enum values for DSP extension instructions.
7690 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7692 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7693 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7695 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7696 * config/nds32/nds32-dspext.md: New file for DSP implementation.
7697 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7698 * config/nds32/nds32-intrinsic.md: Likewise.
7699 * config/nds32/nds32_intrinsic.h: Likewise.
7700 * config/nds32/nds32-md-auxiliary.c: Likewise.
7701 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7702 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7703 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7704 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7705 * config/nds32/nds32-protos.h: New declarations for DSP extension.
7706 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7707 TYPE_DMAC in switch statement.
7708 * config/nds32/nds32.c: New checking and implementation for DSP
7709 extension instructions.
7710 * config/nds32/nds32.h: Likewise.
7711 * config/nds32/nds32.md: Likewise.
7712 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7713 * config/nds32/predicates.md: Implement new predicates for DSP
7716 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7718 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7719 Reformat alternatives and attributes so it is easier to identify
7720 which constraints/attributes go with which instruction.
7721 (mov<mode>_hardfloat32, FMOVE64): Likewise.
7722 (mov<mode>_softfloat32, FMOVE64): Likewise.
7723 (mov<mode>_hardfloat64, FMOVE64): Likewise.
7724 (mov<mode>_softfloat64, FMOVE64): Likewise.
7726 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
7728 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7730 (Basic PowerPC Built-in Functions): The new name of the
7731 subsection previously known as "PowerPC Built-in Functions".
7732 (Basic PowerPC Built-in Functions Available on all Configurations):
7734 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7735 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7736 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7737 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7739 2018-05-11 Martin Jambor <mjambor@suse.cz>
7742 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7745 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7748 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7750 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
7752 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
7753 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
7754 (ix86_handle_option): Handle -mwaitpkg.
7755 * config.gcc: New header.
7756 * config/i386/cpuid.h (bit_WAITPKG): New bit.
7757 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
7758 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
7760 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7761 OPTION_MASK_ISA_WAITPKG.
7762 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
7763 (ix86_option_override_internal): Add PTA_WAITPKG.
7764 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
7765 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
7766 IX86_BUILTIN_TPAUSE.
7767 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
7768 __builtin_ia32_umwait and __builtin_ia32_tpause.
7769 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
7770 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
7771 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
7772 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
7773 UNSPECV_TPAUSE): New.
7774 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
7775 * config/i386/i386.opt: Add -mwaitpkg.
7776 * config/i386/waitpkgintrin.h: New file.
7777 * config/i386/x86intrin.h: New header.
7778 * doc/invoke.texi: Add -mwaitpkg.
7780 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7783 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
7785 (cortex-m0): Use armv6s-m isa.
7786 (cortex-m0plus): Likewise.
7787 (cortex-m1): Likewise.
7788 (cortex-m0.small-multiply): Likewise.
7789 (cortex-m0plus.small-multiply): Likewise.
7790 (cortex-m1.small-multiply): Likewise.
7792 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
7793 Jakub Jelinek <jakub@redhat.com>
7795 PR tree-optimization/85692
7796 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
7797 source permute as well.
7799 2018-05-11 Martin Liska <mliska@suse.cz>
7802 * doc/extend.texi: Document LLVM style format for no_sanitize
7805 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
7807 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
7808 mode_supports_vsx_dform_quad to mode_supports_dq_form.
7809 (mode_supports_vsx_dform_quad): Likewise.
7810 (mode_supports_vmx_dform): Move these functions to be next to the
7811 other mode_supports functions.
7812 (mode_supports_dq_form): Likewise.
7813 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
7814 mode_supports_dq_form.
7815 (reg_offset_addressing_ok_p): Likewise.
7816 (offsettable_ok_by_alignment): Likewise.
7817 (rs6000_legitimate_offset_address_p): Likewise.
7818 (legitimate_lo_sum_address_p): Likewise.
7819 (rs6000_legitimize_address): Likewise.
7820 (rs6000_legitimize_reload_address): Likewise.
7821 (rs6000_secondary_reload_inner): Likewise.
7822 (rs6000_preferred_reload_class): Likewise.
7823 (rs6000_output_move_128bit): Likewise.
7825 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7827 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
7828 Generate SImode target register for null target.
7829 <case IX86_BUILTIN_XGETBV>: Ditto.
7830 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
7831 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
7833 2018-05-10 Carl Love <cel@us.ibm.com>
7835 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7836 dcbtt and dcbtstt if operands[2] is 0.
7838 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7841 * config/i386/sse.md (usadv64qi): New expander.
7843 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
7845 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
7846 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
7847 -maltivec=be support.
7848 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
7849 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
7850 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
7851 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
7852 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
7853 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
7854 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
7855 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
7856 altivec_vsumsws): Adjust.
7857 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
7858 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
7859 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
7861 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
7862 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
7863 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
7864 (altivec_lve<VI_char>x): Delete expand.
7865 (*altivec_lve<VI_char>x_internal): Rename to...
7866 (altivec_lve<VI_char>x): ... this.
7867 (altivec_lvxl_<mode>): Delete expand.
7868 (*altivec_lvxl_<mode>_internal): Rename to ...
7869 (altivec_lvxl_<mode>): ... this.
7870 (altivec_stvxl_<mode>): Delete expand.
7871 (*altivec_stvxl_<mode>_internal): Rename to ...
7872 (altivec_stvxl_<mode>): ... this.
7873 (altivec_stve<VI_char>x): Delete expand.
7874 (*altivec_stve<VI_char>x_internal): Rename to ...
7875 (altivec_stve<VI_char>x): ... this.
7876 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
7877 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
7878 reduc_plus_scal_<mode>): Adjust.
7879 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
7881 (rs6000_cpu_cpp_builtins): Adjust.
7882 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
7883 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
7884 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
7885 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
7886 -maltivec=be support.
7887 (rs6000_split_vec_extract_var): Adjust.
7888 (rs6000_split_v4si_init): Adjust.
7889 (swap_selector_for_mode): Delete.
7890 (altivec_expand_lvx_be, altivec_expand_stvx_be,
7891 altivec_expand_stvex_be): Delete.
7892 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
7893 -maltivec=be support.
7894 (rs6000_gimple_fold_builtin): Ditto.
7895 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
7897 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
7898 (TARGET_DIRECT_MOVE_64BIT): Adjust.
7899 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
7900 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
7901 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
7902 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
7903 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
7904 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
7905 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
7906 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
7907 anonymous split): Adjust.
7908 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
7909 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
7911 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
7913 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
7914 when --with-gxx-include-dir is also specified.
7915 * configure: Regenerate.
7917 2018-05-09 Jim Wilson <jimw@sifive.com>
7920 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
7921 * config/riscv/t-withmultilib: New.
7922 * config/riscv/withmultilib.h: New.
7923 * doc/install.texi: Document RISC-V --with-multilib-list support.
7925 2018-05-09 Richard Biener <rguenther@suse.de>
7927 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
7929 (vect_bb_vectorization_profitable_p): Adjust. Compute
7930 actual scalar cost using the cost vector and the add_stmt_cost
7933 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7935 PR rtl-optimization/85645
7936 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
7937 in the REG_CFA_REGISTER note for LR, don't leave it empty.
7939 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7941 PR rtl-optimization/85645
7942 * shrink-wrap.c (spread_components): Return a boolean saying if
7943 anything was changed.
7944 (try_shrink_wrapping_separate): Iterate spread_components until
7945 nothing changes anymore.
7947 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7949 PR rtl-optimization/85645
7950 * regrename.c (build_def_use): Also kill the chains that include the
7951 destination of a REG_CFA_REGISTER note.
7953 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7955 PR rtl-optimization/85645
7956 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
7957 insn that has a REG_CFA_REGISTER note.
7959 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
7961 * cfgexpand.c (expand_clobber): New function.
7962 (expand_gimple_stmt_1): Use it.
7963 * tree-vect-stmts.c (vect_clobber_variable): New function,
7965 (vectorizable_simd_clone_call): ...here.
7966 (vectorizable_store): Emit a clobber either side of an
7967 IFN_STORE_LANES sequence.
7968 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
7970 2018-05-09 Tom de Vries <tom@codesourcery.com>
7973 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
7974 (define_insn "trap_if_false"): Add exit after trap.
7976 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
7978 PR rtl-optimization/85638
7979 * bb-reorder.c: Include common/common-target.h.
7980 (create_forwarder_block): New function extracted from...
7981 (fix_up_crossing_landing_pad): ...here. Rename into...
7982 (dw2_fix_up_crossing_landing_pad): ...this.
7983 (sjlj_fix_up_crossing_landing_pad): New function.
7984 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
7985 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
7986 from both partitions and exit the loop after one iteration.
7988 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
7991 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7993 (Basic PowerPC Built-in Functions): The new name of the
7994 subsection previously known as "PowerPC Built-in Functions".
7995 (Basic PowerPC Built-in Functions Available on all Configurations):
7997 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7999 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8001 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8003 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8006 2018-05-08 Jim Wilson <jimw@sifive.com>
8008 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8009 (LD_EMUL_SUFFIX): New.
8010 (LINK_SPEC): Use it.
8012 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8014 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8016 (Basic PowerPC Built-in Functions): The new name of the
8017 subsection previously known as "PowerPC Built-in Functions".
8018 (Basic PowerPC Built-in Functions Available on all Configurations):
8020 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8022 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8024 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8026 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8029 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8032 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8033 after cmpelim optimization.
8035 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
8037 * config.gcc: Support "goldmont".
8038 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8039 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8041 * config/i386/i386.c (m_GOLDMONT): Define.
8042 (processor_target_table): Add "goldmont".
8043 (PTA_GOLDMONT): Define.
8044 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8045 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8046 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8047 (fold_builtin_cpu): Add "goldmont".
8048 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8049 (ix86_option_override_internal): Add "goldmont".
8050 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8051 (processor_type): Add PROCESSOR_GOLDMONT.
8052 * config/i386/i386.md: Add CPU "glm".
8053 * config/i386/glm.md: New file.
8054 * config/i386/x86-tune.def: Add m_GOLDMONT.
8055 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8057 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8060 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8062 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8063 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
8064 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
8067 * config/i386/i386.c (ix86_fold_builtin): Handle
8068 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8071 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8072 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8074 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
8077 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8078 (check_arch): Likewise.
8079 (check_fpu): Return the result rather than printing it.
8080 (end arch): Fix operator precedence.
8081 (end cpu): Likewise.
8082 (END): Print the result from check_fpu.
8084 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8085 Alan Hayward <alan.hayward@arm.com>
8086 David Sherwood <david.sherwood@arm.com>
8088 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8089 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8090 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8091 (*fcmuo<mode>_and): New patterns.
8093 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8095 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8096 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8097 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8098 (cmp_op, sve_imm_con): New code attributes.
8099 (SVE_COND_INT_CMP, imm_con): Delete.
8100 (cmp_op): Remove above unspecs from int attribute.
8101 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8103 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
8104 comparison-specific unspecs.
8105 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8106 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8107 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8108 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8109 (*vec_fcm<cmp_op><mode>): Rename to...
8110 (*fcm<cmp_op><mode>): ...this and adjust likewise.
8111 (*vec_fcmuo<mode>): Rename to...
8112 (*fcmuo<mode>): ...this and adjust likewise.
8113 (*pred_fcm<cmp_op><mode>): New pattern.
8114 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8115 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8117 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8119 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8120 (aarch64_emit_sve_predicated_cond): New function.
8121 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8122 (aarch64_emit_unspec_cond_or): Replace with...
8123 (aarch64_emit_sve_or_conds): ...this new function. Use
8124 aarch64_emit_sve_ptrue_op for the individual comparisons and
8125 aarch64_emit_binop to OR them together.
8126 (aarch64_emit_inverted_unspec_cond): Replace with...
8127 (aarch64_emit_sve_inverted_cond): ...this new function. Use
8128 aarch64_emit_sve_ptrue_op for the comparison and
8129 aarch64_emit_unop to invert the result.
8130 (aarch64_expand_sve_vec_cmp_float): Update after the above
8131 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
8133 2018-05-07 Nathan Sidwell <nathan@acm.org>
8135 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8136 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8137 (Backwards Compatibility): Likewise.
8139 2018-05-07 Luis Machado <luis.machado@linaro.org>
8143 2018-05-07 Luis Machado <luis.machado@linaro.org>
8145 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8146 <prefetch_dynamic_strides>: New const bool field.
8147 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8148 prefetch_dynamic_strides.
8149 (exynosm1_prefetch_tune): Likewise.
8150 (thunderxt88_prefetch_tune): Likewise.
8151 (thunderx_prefetch_tune): Likewise.
8152 (thunderx2t99_prefetch_tune): Likewise.
8153 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8155 (aarch64_override_options_internal): Update to set
8156 PARAM_PREFETCH_DYNAMIC_STRIDES.
8157 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8158 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8159 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8160 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8161 prefetch-dynamic-strides setting.
8163 2018-05-07 Luis Machado <luis.machado@linaro.org>
8165 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8166 <minimum_stride>: New const int field.
8167 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8168 minimum_stride field.
8169 (exynosm1_prefetch_tune): Likewise.
8170 (thunderxt88_prefetch_tune): Likewise.
8171 (thunderx_prefetch_tune): Likewise.
8172 (thunderx2t99_prefetch_tune): Likewise.
8173 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8174 (aarch64_override_options_internal): Update to set
8175 PARAM_PREFETCH_MINIMUM_STRIDE.
8176 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8177 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8178 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8179 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8180 stride is constant and is below the minimum stride threshold.
8182 2018-05-07 Luis Machado <luis.machado@linaro.org>
8184 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8187 2018-05-07 Luis Machado <luis.machado@linaro.org>
8189 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8190 <prefetch_dynamic_strides>: New const bool field.
8191 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8192 prefetch_dynamic_strides.
8193 (exynosm1_prefetch_tune): Likewise.
8194 (thunderxt88_prefetch_tune): Likewise.
8195 (thunderx_prefetch_tune): Likewise.
8196 (thunderx2t99_prefetch_tune): Likewise.
8197 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8199 (aarch64_override_options_internal): Update to set
8200 PARAM_PREFETCH_DYNAMIC_STRIDES.
8201 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8202 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8203 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8204 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8205 prefetch-dynamic-strides setting.
8207 2018-05-07 Luis Machado <luis.machado@linaro.org>
8209 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8210 <minimum_stride>: New const int field.
8211 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8212 minimum_stride field.
8213 (exynosm1_prefetch_tune): Likewise.
8214 (thunderxt88_prefetch_tune): Likewise.
8215 (thunderx_prefetch_tune): Likewise.
8216 (thunderx2t99_prefetch_tune): Likewise.
8217 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8218 (aarch64_override_options_internal): Update to set
8219 PARAM_PREFETCH_MINIMUM_STRIDE.
8220 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8221 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8222 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8223 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8224 stride is constant and is below the minimum stride threshold.
8226 2018-05-06 Jakub Jelinek <jakub@redhat.com>
8229 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8230 the type is addressable. Don't force op into register if it has
8233 2018-05-05 Roland McGrath <mcgrathr@google.com>
8236 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8237 any section for which we don't know a specific type it should have,
8238 regardless of name. Previously this was done only for the exact
8239 names ".init_array", ".fini_array", and ".preinit_array".
8240 (default_elf_asm_named_section): Add comment about
8241 relationship with default_section_type_flags and SECTION_NOTYPE.
8242 (get_section): Don't consider it a type conflict if one side has
8243 SECTION_NOTYPE and the other doesn't, as long as neither has the
8244 SECTION_BSS et al used in the default_section_type_flags logic.
8246 2018-05-05 Tom de Vries <tom@codesourcery.com>
8249 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8250 (workaround_barsyncs): New function.
8251 (nvptx_reorg): Use workaround_barsyncs.
8252 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8253 (define_expand "nvptx_membar_cta"): New define_expand.
8254 (define_insn "*nvptx_membar_cta"): New insn.
8256 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
8258 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8259 To improve optimization opportunities.
8260 * builtin-types.def: The new needed builtin types for the above.
8262 2018-05-04 Richard Biener <rguenther@suse.de>
8264 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8265 * gimple-ssa-store-merging.c
8266 (imm_store_chain_info::output_merged_store): Remove redundant create,
8267 release split_store vector contents on failure.
8268 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8269 scalar stmt vector on cache hit.
8271 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
8273 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8275 * config.gcc (powerpc-xilinx-eabi*): Remove.
8276 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8278 (fusion_addis_mem_combo_load): Ditto.
8279 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8281 (rs6000_cpu_cpp_builtins): Ditto.
8282 * config/rs6000/rs6000-linux.c
8283 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8284 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8285 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8287 (rs6000_setup_reg_addr_masks): Ditto.
8288 (rs6000_init_hard_regno_mode_ok): Ditto.
8289 (rs6000_option_override_internal): Ditto.
8290 (legitimate_lo_sum_address_p): Ditto.
8291 (rs6000_legitimize_address): Ditto.
8292 (rs6000_legitimize_reload_address): Ditto.
8293 (rs6000_legitimate_address_p): Ditto.
8294 (abi_v4_pass_in_fpr): Ditto.
8295 (setup_incoming_varargs): Ditto.
8296 (rs6000_gimplify_va_arg): Ditto.
8297 (rs6000_split_multireg_move): Ditto.
8298 (rs6000_savres_strategy): Ditto.
8299 (rs6000_emit_prologue_components): Ditto.
8300 (rs6000_emit_epilogue_components): Ditto.
8301 (rs6000_emit_prologue): Ditto.
8302 (rs6000_emit_epilogue): Ditto.
8303 (rs6000_elf_file_end): Ditto.
8304 (rs6000_function_value): Ditto.
8305 (rs6000_libcall_value): Ditto.
8306 * config/rs6000/rs6000.h: Ditto.
8307 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8308 (TARGET_MINMAX): ... this. New.
8309 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8310 * config/rs6000/rs6000.md: Remove Xilinx FP support.
8311 (*movsi_internal1_single): Delete.
8312 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8313 mfpu=, mxilinx-fpu): Delete.
8314 * config/rs6000/singlefp.h: Delete.
8315 * config/rs6000/sysv4.h: Remove Xilinx FP support.
8316 * config/rs6000/t-rs6000: Ditto.
8317 * config/rs6000/t-xilinx: Delete.
8318 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
8319 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
8320 (VStype_simple): Delete.
8321 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8322 * config/rs6000/xfpu.h: Delete.
8323 * config/rs6000/xfpu.md: Delete.
8324 * config/rs6000/xilinx.h: Delete.
8325 * config/rs6000/xilinx.opt: Delete.
8326 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8327 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8329 2018-05-04 Tom de Vries <tom@codesourcery.com>
8332 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8335 2018-05-04 Richard Biener <rguenther@suse.de>
8338 * tree-complex.c (update_complex_assignment): We are always in SSA form.
8339 (expand_complex_div_wide): Likewise.
8340 (expand_complex_operations_1): Likewise.
8341 (expand_complex_libcall): Preserve EH info of the original stmt.
8342 (tree_lower_complex): Handle removed blocks.
8343 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8344 on complex multiplication and division libcall builtins.
8346 2018-05-04 Richard Biener <rguenther@suse.de>
8349 * fold-const.c (negate_expr_p): Restrict negation of operand
8350 zero of a division to when we know that can happen without
8352 (fold_negate_expr_1): Likewise.
8354 2018-05-04 Jakub Jelinek <jakub@redhat.com>
8357 * real.h (real_nextafter): Declare.
8358 * real.c (real_nextafter): New function.
8359 * fold-const-call.c (fold_const_nextafter): New function.
8360 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8361 CASE_CFN_NEXTTOWARD.
8362 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8363 even when arg1_mode is different from arg0_mode.
8365 2018-05-03 Nathan Sidwell <nathan@acm.org>
8367 * doc/extend.texi (Deprecated Features): Remove
8369 (Backwards Compatibility): Likewise.
8370 * doc/invoke.texi (C++ Language Options): Likewise.
8371 (C++ Dialect Options): Likewise.
8373 2018-05-03 Jakub Jelinek <jakub@redhat.com>
8376 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8377 _mm512_mask_mullox_epi64): New intrinsics.
8379 2018-05-03 Tom de Vries <tom@codesourcery.com>
8382 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8383 dump files): Add offload-tree.
8385 2018-05-03 Richard Biener <rguenther@suse.de>
8387 PR tree-optimization/85615
8388 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8389 to loops not nested in BBs loop father to avoid creating multi-entry
8392 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8394 PR tree-optimization/70291
8395 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8396 arguments. Change return type to tree. Emit libcall as a new
8397 statement rather than replacing existing one when inplace_p is true.
8398 (expand_complex_multiplication_components): New function.
8399 (expand_complex_multiplication): Expand floating-point complex
8400 multiplication using the above.
8401 (expand_complex_division): Rename inner_type parameter to type.
8402 Update expand_complex_libcall call-site.
8403 (expand_complex_operations_1): Update expand_complex_multiplication
8404 and expand_complex_division call-sites.
8406 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8409 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8410 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8411 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8412 the highest significant bit of the shift count mask is clear. In
8413 check whether and[sq]i3 is needed verify that all significant bits
8414 of the shift count other than the highest are set.
8416 2018-05-02 Tom de Vries <tom@codesourcery.com>
8419 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8420 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8421 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8422 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8423 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8424 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8425 __builtin_goacc_parlevel_size.
8427 2018-05-02 Richard Biener <rguenther@suse.de>
8429 PR tree-optimization/85597
8430 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8431 do not use split vect_get_vec_defs call but call vect_get_slp_defs
8434 2018-05-02 Tom de Vries <tom@codesourcery.com>
8437 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8438 dump files): Add ltrans-tree.
8440 2018-05-02 Tom de Vries <tom@codesourcery.com>
8443 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8444 dump files): Add wpa-ipa.
8446 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
8448 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
8449 powerpc*-*-linux*paired* target.
8450 * config/rs6000/750cl.h: Delete.
8451 * config/rs6000/paired.h: Delete.
8452 * config/rs6000/paired.md: Delete.
8453 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8455 * config/rs6000/rs6000-builtin.def: Remove paired float support.
8456 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8457 comment. Remove paired float support.
8458 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8459 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8461 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8462 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8464 * config/rs6000/rs6000.c: Remove paired float support.
8465 (paired_expand_vector_init, paired_expand_vector_move,
8466 paired_emit_vector_compare, paired_emit_vector_cond_expr,
8467 (paired_expand_lv_builtin, paired_expand_stv_builtin,
8468 paired_expand_builtin, paired_expand_predicate_builtin,
8469 paired_init_builtins): Delete.
8470 * config/rs6000/rs6000.h: Remove paired float support.
8471 * config/rs6000/rs6000.md: Remove paired float support.
8472 (move_from_CR_ov_bit): Delete.
8473 * config/rs6000/rs6000.opt (mpaired): Delete.
8474 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8475 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8477 2018-05-02 Richard Biener <rguenther@suse.de>
8480 * gimplify.c (gimplify_save_expr): When in SSA form allow
8481 SAVE_EXPRs to compute to SSA vars.
8483 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8486 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8487 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8488 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8489 clobber operands[2], instead use a new pseudo. Formatting fixes.
8491 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
8493 PR tree-optimization/85586
8494 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8495 exit early for statements in the same group if the accesses are
8498 2018-05-02 Tom de Vries <tom@codesourcery.com>
8501 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8504 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
8506 PR tree-optimization/85143
8507 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8509 2018-05-01 Tom de Vries <tom@codesourcery.com>
8512 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8513 not found" error message.
8515 2018-05-01 Tom de Vries <tom@codesourcery.com>
8518 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8519 * vec.c (test_ordered_remove_if): New function.
8520 (vec_c_tests): Call test_ordered_remove_if.
8521 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8522 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8523 * tree-vect-patterns.c (vect_pattern_recog_1): Use
8524 VEC_ORDERED_REMOVE_IF.
8526 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8528 PR tree-optimization/82665
8529 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8530 pointer subtraction where arguments come from a memchr call.
8532 2018-05-01 Jakub Jelinek <jakub@redhat.com>
8534 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8535 --push-state --as-needed and --pop-state instead of --as-needed and
8536 --no-as-needed if ld supports it.
8537 * configure: Regenerated.
8540 * doc/install.texi2html: Replace _002d with - and _002a with * in
8541 generated html files using sed.
8543 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8546 * gcc-rich-location.c (blank_line_before_p): New function.
8547 (use_new_line): New function.
8548 (gcc_rich_location::add_fixit_insert_formatted): New function.
8549 * gcc-rich-location.h
8550 (gcc_rich_location::add_fixit_insert_formatted): New function.
8552 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8554 * selftest.c (assert_streq): Rename "expected" and "actual" to
8555 "val1" and "val2". Extend NULL-handling to cover both inputs
8556 symmetrically, while still requiring both to be non-NULL for a pass.
8557 * selftest.h (assert_streq): Rename "expected" and "actual" to
8559 (ASSERT_EQ): Likewise.
8560 (ASSERT_EQ_AT): Likewise.
8561 (ASSERT_KNOWN_EQ): Likewise.
8562 (ASSERT_KNOWN_EQ_AT): Likewise.
8563 (ASSERT_NE): Likewise.
8564 (ASSERT_MAYBE_NE): Likewise.
8565 (ASSERT_MAYBE_NE_AT): Likewise.
8566 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
8567 the assertion to pass.
8568 (ASSERT_STREQ_AT): Likewise.
8570 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8572 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8573 interaction with -pie.
8575 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8577 * selftest.h: Fix alphabetization of per-source-file selftest
8580 2018-04-30 Jason Merrill <jason@redhat.com>
8582 PR c++/61982 - dead stores to destroyed objects.
8583 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8586 2018-04-30 Jason Merrill <jason@redhat.com>
8588 * tree.c (build_clobber): New.
8589 * tree.h: Declare it.
8590 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8592 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8594 * diagnostic-show-locus.c (layout::layout): Update for
8595 location_get_source_line returning a char_span.
8596 (struct char_span): Move to input.h.
8597 (struct correction): Update for fields in char_span becoming
8599 (struct source_line): Update for location_get_source_line
8600 returning a char_span.
8601 (layout::print_line): Likewise.
8602 * edit-context.c (edited_file::print_content): Likewise.
8603 (edited_file::print_diff_hunk): Likewise.
8604 (edited_file::print_run_of_changed_lines): Likewise.
8605 (edited_file::get_num_lines): Likewise.
8606 (edited_line::edited_line): Likewise.
8607 * final.c (asm_show_source): Likewise.
8608 * input.c (location_get_source_line): Convert return type
8609 from const char * to char_span, losing the final "line_len"
8611 (dump_location_info): Update for the above.
8612 (get_substring_ranges_for_loc): Likewise. Use a char_span
8613 when handling the literal within the line.
8614 (test_reading_source_line): Update for location_get_source_line
8615 returning a char_span.
8616 * input.h (class char_span): Move here from
8617 diagnostic-show-locus.c, converting from a struct to a class.
8618 Make data members private.
8619 (char_span::operator bool): New.
8620 (char_span::length): New.
8621 (char_span::get_buffer): New.
8622 (char_span::operator[]): New.
8623 (char_span::subspan): Make const.
8624 (char_span::xstrdup): New.
8625 (location_get_source_line): Convert return type from const char *
8626 to char_span, losing the final "line_size" param.
8628 2018-04-30 Jan Hubicka <jh@suse.cz>
8630 * lto-wrapper.c (ltrans_priorities): New static var.
8631 (cmp_priority): New.
8632 (run_gcc): Read priorities and if doing parallel build order
8633 the Makefile by them.
8635 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8637 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8639 2018-04-30 Richard Biener <rguenther@suse.de>
8641 * tree-cfg.c (verify_address): Remove base argument, add
8642 flag whether to check TREE_ADDRESSABLE and do that.
8643 (verify_expr): Remove.
8644 (verify_types_in_gimple_reference): Add pieces from verify_expr.
8645 (verify_gimple_assign_single): Likewise.
8646 (verify_gimple_switch): Likewise.
8647 (verify_expr_location_1): Dereference tp once. Add (disabled)
8648 piece from verify_expr.
8649 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8651 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8653 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8655 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8657 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8658 (small_data_pattern): Likewise.
8659 (arc_rewrite_small_data): Likewise.
8660 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8661 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8662 (get_symbol_alignment): New function.
8663 (legitimate_small_data_address_p): Likewise.
8664 (legitimate_scaled_address): Update, call
8665 legitimate_small_data_address_p.
8666 (output_sdata): New static variable.
8667 (arc_print_operand): Update how we handle small data operands.
8668 (arc_print_operand_address): Likewise.
8669 (arc_legitimate_address_p): Update, use
8670 legitimate_small_data_address_p.
8671 (arc_rewrite_small_data_p): Remove.
8672 (arc_rewrite_small_data_1): Likewise.
8673 (arc_rewrite_small_data): Likewise.
8674 (small_data_pattern): Likewise.
8675 (compact_sda_memory_operand): Update to use
8676 legitimate_small_data_address_p and get_symbol_alignment.
8677 (prepare_move_operands): Don't rewite sdata pattern.
8678 (prepare_extend_operands): Remove.
8679 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8681 (zero_extendqisi2): Likewise.
8682 (zero_extendhisi2): Likewise.
8683 (extendqihi2): Likewise.
8684 (extendqisi2): Likewise.
8685 (extendhisi2): Likewise.
8689 * config/arc/constraints.md (Usd): Change it to memory constraint.
8691 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8693 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8694 as source of std instructions.
8695 * config/arc/arc.md (movsi_insn): Update pattern predicate to
8696 allow 6-bit constants as source for store instructions.
8697 (movdi_insn): Update instruction pattern to allow 6-bit constants
8698 as source for store instructions.
8700 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8702 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8704 2018-04-30 Nathan Sidwell <nathan@acm.org>
8705 Sandra Loosemore <sandra@codesourcery.com>
8707 * dumpfile.c (dump_open): Allow '-' for stdout.
8708 * doc/invoke.texi (Developer Options): Document dump filename
8709 determination early. Document stdin/stdout selection.
8711 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
8713 Microblaze Target: PIC data text relative
8715 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8716 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8718 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
8719 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8720 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8721 New addressing mode for data-text relative position indepenedent code.
8722 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8723 'ADDRESS_SYMBOLIC_TXT_REL'.
8724 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8725 (microblaze_legitimate_pic_operand): Exclude function calls from
8726 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8727 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8729 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8730 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8731 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8732 for 'address + offset'.
8733 (microblaze_expand_prologue): Add new function prologue call for
8735 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8736 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8737 table in case of TARGET_PIC_DATA_TEXT_REL.
8738 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8739 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8740 Add new macros 'UNSPEC_TEXT',
8741 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8742 + exclude function calls from 'UNSPEC_PLT' in case of data text
8744 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8745 new target hook for generating address diff vector tables in case of
8747 * doc/tm.texi : Regenerate.
8748 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8749 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8750 of addr diff vector generation.
8751 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8752 target hook definition.
8753 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
8754 Add default function for generate_pic_addr_diff_vec -> flag_pic.
8755 * doc/invoke.texi (Add new pic option): Add new microblaze pic
8756 option for data text relative.
8758 2018-04-30 Richard Biener <rguenther@suse.de>
8760 * tree-chrec.h (evolution_function_is_constant_p): Remove
8762 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
8764 2018-04-30 Richard Biener <rguenther@suse.de>
8767 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
8769 2018-04-30 Richard Biener <rguenther@suse.de>
8771 PR tree-optimization/28364
8772 PR tree-optimization/85275
8773 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
8774 copying first exit test.
8776 2018-04-28 Mark Wielaard <mark@klomp.org>
8778 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
8780 (dwarf_AT): Handle DW_AT_addr_base.
8781 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
8783 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
8786 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
8787 (*ashl<dwi>3_doubleword_mask_1): Ditto.
8788 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
8789 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
8791 2018-04-28 Richard Biener <rguenther@suse.de>
8793 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
8794 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
8795 to reflect use. Only add interesting stmts.
8797 2018-04-27 Martin Jambor <mjambor@suse.cz>
8800 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
8801 the jump function allows for passing through aggregate values.
8803 2018-04-27 David Malcolm <dmalcolm@redhat.com>
8805 * input.h (in_system_header_at): Convert from macro to inline
8807 (from_macro_expansion_at): Likewise.
8808 (from_macro_definition_at): Likewise.
8810 2018-04-27 Jeff Law <law@redhat.com>
8812 * config.gcc: Mark tile* targets as deprecated/obsolete.
8814 2018-04-27 Richard Biener <rguenther@suse.de>
8816 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
8819 2018-04-27 Richard Biener <rguenther@suse.de>
8821 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
8823 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
8825 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
8826 with Yd constraint. Set "preferred_for_speed" attribute from
8827 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
8829 (*movdi_internal): Ditto.
8830 (movti_interunit splitters): Remove
8831 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
8832 (movdi_interunit splitters): Ditto.
8833 * config/i386/constraints.md (Ye): Remove.
8834 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
8836 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8839 * config/aarch64/constraints.md (Usg): Limit to 31.
8842 2018-04-27 Jakub Jelinek <jakub@redhat.com>
8844 PR tree-optimization/85529
8845 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
8846 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
8847 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
8848 zero extension or masking of the MSB bit.
8849 (optimize_range_tests): Add FIRST_BB argument, pass it through
8850 to optimize_range_tests_var_bound.
8851 (maybe_optimize_range_tests, reassociate_bb): Adjust
8852 optimize_range_tests callers.
8854 2018-04-26 Richard Biener <rguenther@suse.de>
8855 Jakub Jelinek <jakub@redhat.com>
8857 * cgraph.h (symbol_table): Just declare debug method here.
8858 * symtab.c (symbol_table::debug): Define.
8860 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
8862 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
8864 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
8866 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
8867 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
8868 (*movdi_internal): Substitute Yi and Yj constraint with x
8869 and Ym and Yn constraint with y constraint. Update "isa"
8870 attribute and set "preferred_for_speed" attribute from
8871 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
8872 (*movsi_internal): Ditto.
8873 (*movdf_internal): Ditto.
8874 (*movsf_internal): Ditto.
8875 (*zero_extendsidi2): Ditto.
8876 * config/i386/sse.md (vec_set<mode>_0): Ditto.
8877 (sse2_loadld): Ditto.
8878 (*vec_extract<ssevecmodelower>_0): Ditto.
8879 (*vec_extractv4si_0_zext_sse4): Ditto.
8880 (vec_concatv2di): Ditto.
8881 (*vec_dup<mode>): Ditto.
8882 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
8883 * config/i386/constraints.md (Yi): Remove.
8888 2018-04-26 Nathan Sidwell <nathan@acm.org>
8890 * dumpfile.c (dump_open): New.
8891 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
8892 (dump_finish): Detect stdio/stderr by value not name.
8894 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
8896 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
8898 2018-04-26 Tom de Vries <tom@codesourcery.com>
8901 * config/nvptx/nvptx.c (verify_neutering_jumps)
8902 (verify_neutering_labels): New function
8903 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
8905 2018-04-26 Tom de Vries <tom@codesourcery.com>
8908 * config/nvptx/nvptx.c (needs_neutering_p): New function.
8909 (nvptx_single): Use needs_neutering_p to skip over insns that do not
8912 2018-04-26 Richard Biener <rguenther@suse.de>
8913 Tom de Vries <tom@codesourcery.com>
8916 * lto-streamer-out.c (output_function): Fixup loops if required to match
8917 discovery done in the reader.
8919 2018-04-26 Richard Biener <rguenther@suse.de>
8921 PR tree-optimization/85116
8922 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
8923 have a loop exit from the single latch predecessor. Remove
8924 case of header with just condition.
8925 (ch_base::copy_headers): Exclude infinite loops from any
8927 (pass_ch::execute): Record exits.
8929 2018-04-26 Richard Biener <rguenther@suse.de>
8931 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
8932 prologue cost vector and pass it to vect_get_load_cost.
8933 (vect_get_peeling_costs_all_drs): Likewise.
8934 (vect_peeling_hash_get_lowest_cost): Likewise.
8935 (vect_enhance_data_refs_alignment): Likewise.
8937 2018-04-26 Richard Biener <rguenther@suse.de>
8940 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
8941 checking of integer<->pointer conversions.
8942 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
8943 sign-/zero-extending pointer types.
8944 (expand_omp_for_static_chunk): Likewise.
8946 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
8947 Jean Lee <xiaoyur347@gmail.com>
8949 * config/mips/mips.c (mips_asan_shadow_offset): New function.
8950 (TARGET_ASAN_SHADOW_OFFSET): Define.
8951 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
8952 true for -fsanitize=address.
8954 2018-04-25 Mark Wielaard <mark@klomp.org>
8956 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
8959 2018-04-25 Jakub Jelinek <jakub@redhat.com>
8961 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
8962 than "alu", remove explicit "memory" and "imm_disp" attributes.
8963 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
8966 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
8967 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
8968 gen_lowpart_no_emit.
8970 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
8973 * config/i386/i386.c (ix86_expand_builtin): Change memory
8974 operand to XI, extend p0 to Pmode.
8975 * config/i386/i386.md: Change unspec volatile and operand
8976 1 mode to XI, change operand 0 mode to P.
8978 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8980 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
8981 GET_MODE_MASK before any checking.
8982 (nds32_can_use_bset_p): Likewise.
8983 (nds32_can_use_btgl_p): Likewise.
8985 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8987 * config/nds32/nds32-doubleword.md: New define_split pattern for
8988 illegal register number.
8990 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8992 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
8994 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8996 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
8998 2018-04-25 Richard Biener <rguenther@suse.de>
9000 * lto-streamer.h (LTO_major_version): Bump to 8.
9002 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9004 * BASE-VER: Set to 9.0.0.
9006 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
9008 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9009 in __abskf2 and __powikf2.
9011 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9014 * config/aarch64/constraints.md (Usg, Usj): New constraints.
9015 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9016 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9017 Use the above on operand 2. Reindent.
9018 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9020 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9023 * common/config/i386/i386-common.c (ix86_handle_option): Don't
9025 * config/i386/i386.opt (mcet): Removed.
9026 * doc/install.texi: Remove -mcet documentation.
9027 * doc/invoke.texi: Likewise.
9029 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9032 * doc/install.texi: Remove -mcet from bootstrap-cet.
9034 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9037 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9038 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9042 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9043 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9044 containing a CONST_VECTOR.
9046 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
9048 * doc/install.texi: Update newlib dependency for nvptx.
9050 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9053 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9054 instead of INTVAL when shifting x left.
9056 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
9058 PR tree-optimization/85478
9059 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9060 vect_grouped_store_supported for single element vectors.
9062 2018-04-24 Richard Biener <rguenther@suse.de>
9065 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9066 load cost increase to the case of non-constant step.
9068 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9071 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9072 destination if any_malformed_asm.
9074 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
9077 * expr.c (store_field): In the bitfield case, if the value comes from
9078 a function call and is returned in registers by means of a PARALLEL,
9079 do not change the mode of the temporary unless BLKmode and VOIDmode.
9081 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
9083 PR rtl-optimization/85423
9084 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9085 dependencies to debug insns when the previous insn is non-debug.
9087 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9089 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9090 enums into a single definition.
9091 (fls): Fix predicates and printing.
9094 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9096 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9097 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9098 and short u6 immediate.
9099 (check_if_valid_sleep_operand): Remove.
9100 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9102 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9104 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9105 flag_always_save_lp condition.
9106 * config/nds32/nds32.opt (malways-save-lp): New option.
9108 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9110 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9111 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9112 * config/nds32/nds32.h
9113 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9114 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9116 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9118 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9119 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9121 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9122 Chung-Ju Wu <jasonwucj@gmail.com>
9124 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9126 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9127 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9129 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9131 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9133 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9135 * config/nds32/nds32-protos.h (nds32_data_alignment,
9136 nds32_local_alignment): Declare.
9137 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9138 nds32_local_alignment): New functions.
9139 (TARGET_CONSTANT_ALIGNMENT): Define.
9140 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9142 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9144 * config/nds32/nds32.c
9145 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9146 (TARGET_MODES_TIEABLE_P): Likewise.
9148 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9150 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9153 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
9154 Chung-Ju Wu <jasonwucj@gmail.com>
9156 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9157 for unaligned access.
9158 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9160 * config/nds32/nds32-intrinsic.md: Likewise.
9161 * config/nds32/nds32_intrinsic.h: Likewise.
9162 * config/nds32/nds32.h (nds32_builtins): Likewise.
9163 * config/nds32/nds32.opt (munaligned-access): New option.
9164 * config/nds32/nds32.c (nds32_asm_file_start): Display
9165 flag_unaligned_access status.
9167 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9169 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9170 -mno-relax is present.
9171 * config/riscv/linux.h (LINK_SPEC): Ditto.
9173 2018-04-20 Martin Sebor <msebor@redhat.com>
9176 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9178 (gimple_fold_builtin_stxcpy_chk): Same.
9179 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9181 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
9184 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9185 __powikf2 when long double is IEEE 128-bit.
9187 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9189 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9190 step to make sure stack always aligned.
9192 2018-04-20 Carl Love <cel@us.ibm.com>
9195 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9196 size check for arg0.
9198 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
9199 Tom de Vries <tom@codesourcery.com>
9202 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9203 Emit insns for calls too.
9204 (nvptx_find_par): Always look for worker-level predecessor insn.
9205 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
9207 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9208 (nvptx_process_pars): Propagate frames for calls.
9210 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
9213 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9215 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9216 (ix86_handle_option): Don't handle OPT_mibt.
9217 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9219 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9221 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9222 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9223 (ix86_target_macros): Define __CET__ with flag_cf_protection
9224 for -fcf-protection.
9225 * config/i386/i386.c (isa2_opts): Remove -mibt.
9226 * config/i386/i386.h (TARGET_IBT): Removed.
9227 (TARGET_IBT_P): Likewise.
9228 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9229 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9230 * config/i386/i386.opt (mcet): Update help message.
9233 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
9234 -mcet as an alias for -mshstk.
9236 2018-04-20 Richard Biener <rguenther@suse.de>
9239 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9240 complexity by forcing a single use of the multiply operand.
9242 2018-04-20 Martin Jambor <mjambor@suse.cz>
9245 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9246 recursion dependency to only apply to non-clones.
9248 2018-04-20 Martin Jambor <mjambor@suse.cz>
9251 * ipa-cp.c (create_specialized_node): Check that clones of
9252 self-recursive edges exist during IPA-CP.
9254 2018-04-19 Toon Moene <toon@moene.org>
9256 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9259 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9261 PR tree-optimization/85467
9262 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9263 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
9264 VECTOR_CST element to type.
9266 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9269 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9270 * config/i386/i386.md (builtin_setjmp_setup): Removed.
9271 (builtin_longjmp): Likewise.
9272 (save_stack_nonlocal): New pattern.
9273 (restore_stack_nonlocal): Likewise.
9275 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9278 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9279 Replace ASM_OUTPUT_LABEL with fprintf.
9281 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9284 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9285 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9286 * config/i386/i386-c.c (ix86_target_macros_internal): Also
9287 define __IBT__ and __SHSTK__ for -fcf-protection.
9288 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9290 (ix86_trampoline_init): Likewise.
9291 (x86_output_mi_thunk): Likewise.
9292 (ix86_notrack_prefixed_insn_p): Likewise.
9293 (ix86_option_override_internal): Don't disallow -fcf-protection.
9294 * config/i386/i386.md (rdssp<mode>): Also enable for
9296 (incssp<mode>): Likewise.
9297 (nop_endbr): Likewise.
9298 * config/i386/i386.opt (mcet): Change help message to built-in
9302 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9303 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
9304 enable CET built-in functions.
9306 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
9308 * common/config/i386/i386-common.c
9309 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9310 OPTION_MASK_ISA_MOVDIRI_UNSET,
9311 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9312 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9313 * config.gcc (movdirintrin.h): New header.
9314 * config/i386/cpuid.h (bit_MOVDIRI,
9315 bit_MOVDIR64B): New bits.
9316 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9318 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9319 (VOID, PVOID, PCVOID)): New function types.
9320 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9321 __builtin_ia32_directstoreu_u64,
9322 __builtin_ia32_movdir64b): New builtins.
9323 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9324 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9326 (ix86_valid_target_attribute_inner_p): Ditto.
9327 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9328 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9329 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9330 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9331 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9332 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9333 (movdiri<mode>, movdir64b_<mode>): New.
9334 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9335 * config/i386/immintrin.h: Include movdirintrin.h.
9336 * config/i386/movdirintrin.h: New file.
9337 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9339 2018-04-19 Richard Biener <rguenther@suse.de>
9342 * cfg.c (clear_bb_flags): When loop state says we have
9343 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9345 2018-04-19 Richard Biener <rguenther@suse.de>
9347 PR tree-optimization/84737
9348 * tree-vect-data-refs.c (vect_copy_ref_info): New function
9349 copying restrict info.
9350 (vect_setup_realignment): Use it.
9351 * tree-vectorizer.h (vect_copy_ref_info): Declare.
9352 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9353 the first DR to all generated stores.
9354 (vectorizable_load): Likewise for loads.
9356 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9358 PR tree-optimization/85446
9359 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9360 the integral and pointer types to have the same precision.
9362 * doc/install.texi: Document --disable-cet being the default and
9365 2018-04-18 Martin Liska <mliska@suse.cz>
9367 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9370 2018-04-18 Martin Liska <mliska@suse.cz>
9373 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
9376 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9377 arguments if they are comparable.
9379 2018-04-18 Martin Liska <mliska@suse.cz>
9382 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
9385 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9388 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
9391 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9392 ENDBR after calling __morestack.
9394 2018-04-18 David Malcolm <dmalcolm@redhat.com>
9397 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9398 by using gcc_base_ver to generate a gcc_driver_version, and use
9399 it when generating GCC_DRIVER_NAME.
9400 * configure: Regenerate.
9402 2018-04-18 Jakub Jelinek <jakub@redhat.com>
9405 * config.gcc: Obsolete powerpc*-*-*spe*.
9407 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9410 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9411 (stabstr_D): Change type of unum from unsigned int to
9412 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
9415 2018-04-17 Jim Wilson <jimw@sifive.com>
9418 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9419 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9420 Set arg_pointer_offset after using pretend_args_size.
9422 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9424 PR rtl-optimization/85431
9425 * dse.c (record_store): Ignore zero width stores.
9428 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
9429 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9430 __builtin_stack_restore rather than after it.
9431 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9432 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9433 argument instead of virtual_dynamic_stack_rtx.
9435 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
9437 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9439 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9440 Add note to error message to explain internal mapping of overloaded
9441 built-in function name to non-overloaded built-in function name.
9442 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9445 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
9448 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9449 where the inputs overlap with the output.
9451 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9453 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9454 (=v, v) alternative and explicit "memory" attribute.
9455 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
9456 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9458 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9459 "sselog1" type instead of "sselog".
9460 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9461 "sselog". Remove explicit "memory" attribute.
9462 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9463 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9465 (vec_extract_hi_v32hi): Merge all alternatives into one, use
9466 "sselog1" type instead of "sselog". Remove explicit "memory"
9468 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9469 use "sselog1" type instead of "sselog". Remove explicit "memory"
9471 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9472 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9474 (vec_extract_hi_v64qi): Merge all alternatives into one, use
9475 "sselog1" type instead of "sselog". Remove explicit "memory"
9477 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9478 use "sselog1" type instead of "sselog". Remove explicit "memory"
9482 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9485 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9488 2018-04-17 Martin Jambor <mjambor@suse.cz>
9491 * ipa-cp.c (create_specialized_node): Call
9492 expand_all_artificial_thunks if necessary.
9494 2018-04-17 Martin Liska <mliska@suse.cz>
9497 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9498 in message, remote space in between '_G' and '('.
9500 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9503 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9504 avx512f_vmcmp<mode>3<round_saeonly_name>,
9505 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9506 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9507 avx512f_rndscale<mode><round_saeonly_name>,
9508 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9509 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9510 Use %<iptr>2 instead of %2 for -masm=intel.
9511 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9512 avx512f_vcvttss2usi<round_saeonly_name>,
9513 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9515 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9516 avx512f_vcvttsd2usi<round_saeonly_name>,
9517 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9518 Use %q1 instead of %1 for -masm=intel.
9519 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9520 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9521 of %3 for -masm=intel.
9522 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9524 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9526 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9528 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9529 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9531 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9533 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9534 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9535 %g1 and one with %0 and %1.
9536 (avx512er_vmrcp28<mode><round_saeonly_name>,
9537 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9539 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9540 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9541 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9542 of %0 and %{%4%} for -masm=intel.
9543 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9544 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9545 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9546 order of %0 and %{%5%}%{z%} for -masm=intel.
9548 2018-04-17 Jan Hubicka <jh@suse.cz>
9551 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9553 2018-04-17 Martin Liska <mliska@suse.cz>
9556 * multiple_target.c (create_dispatcher_calls): Set apostrophes
9557 for target_clone error message. Make default implementation
9558 clone to be a local declaration.
9559 (separate_attrs): Add new argument and check for an empty
9561 (expand_target_clones): Handle it.
9562 (ipa_target_clone): Make redirection just for target_clones
9565 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
9566 Tom de Vries <tom@codesourcery.com>
9569 * omp-expand.c (expand_oacc_for): Add dummy false branch for
9570 tiled basic blocks without omp continue statements.
9572 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
9575 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9576 vec_extract expression as having side effects to make sure it gets
9579 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
9582 * config/i386/i386.c (get_builtin_code_for_version): Check
9585 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
9588 * gcc/config.gcc: Support "skylake".
9589 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
9591 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
9592 (processor_target_table): Add "skylake".
9593 (ix86_option_override_internal): Add "skylake".
9594 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9595 PROCESSOR_CANNONLAKE.
9596 (get_builtin_code_for_version): Fix priority for
9597 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9598 PROCESSOR_SKYLAKE-AVX512.
9599 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9600 (processor_type): Add PROCESSOR_SKYLAKE.
9602 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
9603 Jason Merrill <jason@redhat.com>
9606 * convert.c (convert_to_integer_1): Use direct recursion for
9607 enumeral types and types with a precision less than the number
9608 of bits in their mode.
9610 2018-04-16 Julia Koval <julia.koval@intel.com>
9613 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9614 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9616 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
9619 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9620 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9621 and -mno-direct-move.
9623 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
9626 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9627 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9628 Ensure negative shifts result in {0}.
9630 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
9632 PR rtl-optimization/79916
9633 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9634 regs (if any) to define how to gnerate SD moves when LRA is in
9637 2018-04-13 Jakub Jelinek <jakub@redhat.com>
9639 PR rtl-optimization/85393
9640 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9641 * except.c (expand_dw2_landing_pad_for_region): Make static.
9642 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9643 a label and unconditional jump to old_bb, rather than
9644 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9647 PR rtl-optimization/85376
9648 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9649 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9650 instead of a specific value.
9652 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9653 Bin Cheng <bin.cheng@arm.com>
9655 PR tree-optimization/82965
9656 PR tree-optimization/83991
9657 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9658 by_profile_only parameter.
9659 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9660 information if the loop was predicted to iterate too many times.
9661 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9663 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9666 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9669 2018-04-13 Martin Liska <mliska@suse.cz>
9670 Jakub Jelinek <jakub@redhat.com>
9673 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9674 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9675 * builtins.c (expand_builtin_memory_copy_args): Use
9676 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9677 handle dest_addr == pc_rtx.
9679 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
9682 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9683 asked to not generate direct moves.
9684 (fix_trunc<mode>si2_stfiwx): Similar.
9685 (fix_trunc<mode>si2_internal): Similar.
9687 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9690 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9691 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9692 lookup if dest in some wider mode is known to be const0_rtx and
9693 if so, record permanent equivalence for it to be ZERO_EXTEND of
9694 the narrower mode destination.
9696 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9698 * lto-streamer-out.c (output_function): Revert 259346.
9699 * omp-expand.c (expand_oacc_for): Likewise.
9701 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
9703 PR rtl-optimization/85354
9704 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9705 * sel-sched.c (sel_global_init): ... here.
9707 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
9710 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9711 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9712 mode for PE-COFF targets.
9713 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9714 (i386_pe_asm_lto_end): Likewise.
9715 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9716 (TARGET_ASM_LTO_END): Likewise.
9717 * config/i386/winnt.c (saved_debug_info_level): New static variable.
9718 (i386_pe_asm_lto_start): New function.
9719 (i386_pe_asm_lto_end): Likewise.
9721 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9722 Richard Biener <rguenther@suse.de>
9725 * lto-streamer-out.c (output_function): Fix CFG loop state before
9727 * omp-expand.c (expand_oacc_for): Handle calls to internal
9728 functions like regular functions.
9730 2018-04-12 Richard Biener <rguenther@suse.de>
9733 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9734 for the early LTO debug to properly generate references to it
9735 during DIE emission. Do not re-use that for the skeleton for
9737 (dwarf2out_early_finish): Likewise.
9739 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9742 * config/i386/sse.md
9743 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9744 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9745 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9746 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9747 and output is a reg, avoid creating invalid lowpart subreg, but
9748 instead split into a 512-bit move. Don't split if not AVX512VL,
9749 input is xmm16+ reg and output is a mem.
9750 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9751 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9752 xmm16+ reg and output is a mem.
9754 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9756 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
9757 also for flag_dwarf2_cfi_asm.
9759 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9761 PR rtl-optimization/85342
9762 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
9763 a bool scalar var inside of the loop instead. Don't try to update
9764 recog_data.operand after failed apply_change_group.
9766 2018-04-12 Tom de Vries <tom@codesourcery.com>
9769 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
9770 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
9771 array with flexible array member as array without given dimension.
9772 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
9773 argument for undefined param to true.
9775 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
9778 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9779 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
9780 from PowerPC section.
9781 * config/rs6000/sysv4.opt (mcall-): Improve help text.
9782 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
9783 help text that is too long.
9784 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
9785 help text that is too long.
9786 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
9787 help text that is too long.
9789 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
9791 * config/alpha/alpha.md (stack_probe_internal): Rename
9792 from "probe_stack". Update all callers.
9794 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9796 PR rtl-optimization/84566
9797 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
9798 sched_macro_fuse_insns.
9800 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9803 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
9804 (compute_block_dependences): ... from here.
9806 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9808 PR tree-optimization/85331
9809 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
9810 from int to HOST_WIDE_INT.
9812 2018-04-11 Martin Jambor <mjambor@suse.cz>
9815 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
9816 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
9817 not the same as the source val.
9818 (cgraph_edge_brings_value_p): New parameter.
9819 (gather_edges_for_value): Pass destination value to
9820 cgraph_edge_brings_value_p.
9821 (perhaps_add_new_callers): Likewise.
9822 (get_info_about_necessary_edges): Likewise and exclude values brought
9823 only by self-recursive edges.
9824 (create_specialized_node): Redirect only clones of self-calling edges.
9825 (+self_recursive_pass_through_p): New function.
9826 (find_more_scalar_values_for_callers_subset): Use it.
9827 (find_aggregate_values_for_callers_subset): Likewise.
9828 (known_aggs_to_agg_replacement_list): Removed.
9829 (decide_whether_version_node): Re-calculate known constants for all
9830 remaining context clones.
9832 2018-04-11 Richard Biener <rguenther@suse.de>
9835 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
9836 from early DWARF output.
9837 (dwarf2out_early_finish): Output line info unconditionally into
9838 early DWARF and add reference to it.
9840 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9843 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
9844 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
9845 other than V2DFmode using iptr mode attribute.
9846 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
9848 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9850 PR rtl-optimization/84659
9851 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
9853 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9856 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
9858 (output_loc_list): Pass address of a dummy size variable even in the
9859 locview handling loop.
9860 (index_location_lists): Add comment on why skip_loc_list_entry can't
9863 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
9866 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
9869 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
9872 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9873 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
9874 and -mstring-compare-inline-limit.
9876 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9879 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
9880 for stack clash protection in a register whenever we need it to be in
9883 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9885 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
9886 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
9888 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9891 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
9893 (mlong-double-): Ditto.
9894 * config/rs6000/sysv4.opt (msdata=): Ditto.
9895 (mtls-size=): Ditto.
9897 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
9899 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9900 erroneous entries for
9901 "vector int vec_ldl (int, long int *)", and
9902 "vector unsigned int vec_ldl (int, unsigned long int *)".
9903 Add comments and entries for
9904 "vector bool char vec_ldl (int, bool char *)",
9905 "vector bool short vec_ldl (int, bool short *)",
9906 "vector bool int vec_ldl (int, bool int *)",
9907 "vector bool long long vec_ldl (int, bool long long *)",
9908 "vector pixel vec_ldl (int, pixel *)",
9909 "vector long long vec_ldl (int, long long *)",
9910 "vector unsigned long long vec_ldl (int, unsigned long long *)".
9911 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
9912 type tree bool_long_long_type_node and correct definition of
9913 bool_V2DI_type_node to make reference to this new type tree.
9914 (rs6000_mangle_type): Replace erroneous reference to
9915 bool_long_type_node with bool_long_long_type_node.
9916 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
9917 comments to emphasize sign distinctions for char and int types and
9918 replace RS6000_BTI_bool_long constant with
9919 RS6000_BTI_bool_long_long constant. Also add comment to restrict
9920 use of RS6000_BTI_pixel.
9921 (bool_long_type_node): Remove this macro definition.
9922 (bool_long_long_type_node): New macro definition
9924 2018-04-10 Jakub Jelinek <jakub@redhat.com>
9926 PR rtl-optimization/85300
9927 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
9928 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
9929 simplify_unary_operation fails.
9931 2018-04-10 Martin Liska <mliska@suse.cz>
9933 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
9934 cgraph_edge and ipa_ref.
9936 2018-04-10 Jakub Jelinek <jakub@redhat.com>
9940 * config/i386/sse.md
9941 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
9942 computation of the VEC_MERGE selector from mask.
9943 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
9944 Fix decoding of the VEC_MERGE selector into mask.
9946 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
9948 PR tree-optimization/85286
9949 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
9951 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
9953 * final.c (final_1): Set insn_last_address as well as
9954 insn_current_address.
9956 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9959 * explow.c (emit_stack_probe): Call validize_mem on memory location
9960 before passing it to gen_probe_stack. Create address operand and
9961 legitimize it for the probe_stack_address case.
9963 2018-04-09 Jan Hubicka <jh@suse.cz>
9966 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
9967 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
9968 * tree.c (free_lang_data_in_type): Fix handling of binfos;
9970 (free_lang_data): Rebuild type inheritance graph.
9972 2018-04-09 Martin Sebor <msebor@redhat.com>
9974 * invoke.texi (-finline-small-functions): Mention other optimization
9976 (-findirect-inlining, -fpartial-inlining): Same.
9977 (-finline-functions-called-once): Same.
9978 (-freorder-blocks-and-partition): Same.
9980 2018-04-09 Jan Hubicka <jh@suse.cz>
9983 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
9984 jumps; choose last target that matches the criteria (i.e.
9985 no partition changes for non-crossing jumps).
9986 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
9987 support for redirecting crossing jumps to non-crossing.
9989 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
9991 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
9992 also for naked functions.
9994 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
9996 * config/arc/arc.md (add_shift): New pattern.
9997 (add_shift2): Likewise.
9998 (sub_shift): Likewise.
9999 (sub_shift_cmp0_noout): Likewise.
10000 (compare_si_ashiftsi): Likewise.
10001 (xbfu_cmp0_noout): New combine pattern.
10002 (xbfu_cmp0"): Likewise.
10003 (movsi_set_cc_insn): Place the predicable variant first.
10004 (commutative_binary_cmp0_noout): Remove clobber.
10005 (commutative_binary_cmp0): New pattern.
10006 (noncommutative_binary_cmp0): Likewise.
10007 (noncommutative_binary_cmp0_noout): Likewise.
10008 (noncommutative_binary_comparison_result_used): Removed.
10009 (rsub_cmp0): New pattern.
10010 (rsub_cmp0_noout): Likewise.
10011 (extzvsi): Changed, keep only meaningful variants.
10012 (SQH, SEZ): New iterators.
10013 (SQH_postfix): New mode attribute.
10014 (SEZ_prefix): New code attribute.
10015 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10016 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10017 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10018 of numerical value.
10019 (noncommutative_operator): Check the availability of barrel
10022 2018-04-09 Richard Biener <rguenther@suse.de>
10024 PR tree-optimization/85284
10025 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10026 Only use the niter constraining form of simple_iv when the exit
10027 is always executed.
10029 2018-04-09 Tom de Vries <tom@codesourcery.com>
10032 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10033 (define_expand "*memory_barrier"): New define_expand.
10034 (define_insn "memory_barrier"): New insn.
10036 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10038 PR rtl-optimization/80463
10039 PR rtl-optimization/83972
10040 PR rtl-optimization/83480
10042 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10043 correct producer for the insn.
10044 (tidy_control_flow): Fixup seqnos in case of debug insns.
10046 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10048 PR rtl-optimization/83913
10050 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10051 different sched-times when merging exprs.
10053 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10055 PR rtl-optimization/83962
10057 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10058 tidy_fallthru_edge and tidy_control_flow.
10060 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10062 PR rtl-optimization/83530
10064 * sel-sched.c (force_next_insn): New global variable.
10065 (remove_insn_for_debug): When force_next_insn is true, also leave only
10066 next insn in the ready list.
10067 (sel_sched_region): When the region wasn't scheduled, make another pass
10068 over it with force_next_insn set to 1.
10070 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10072 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10074 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10075 for interrupt control.
10076 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10077 functions for interrupt control.
10078 * config/nds32/nds32-intrinsic.md: Likewise.
10079 * config/nds32/nds32_intrinsic.h: Likewise.
10080 * config/nds32/nds32.h (nds32_builtins): Likewise.
10082 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10084 * config/nds32/nds32.c (nds32_init_machine_status,
10085 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10086 strict_aligned_p field.
10087 (nds32_expand_to_rtl_hook): New function.
10088 (TARGET_EXPAND_TO_RTL_HOOK): Define.
10089 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10091 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10092 Chung-Ju Wu <jasonwucj@gmail.com>
10094 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10095 * config/nds32/nds32-n7.md: New file.
10096 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10097 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10099 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10100 * config/nds32/nds32.md (pipeline_model): Add n7.
10101 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10102 * config/nds32/pipelines.md: Include n7 settings.
10104 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10105 Chung-Ju Wu <jasonwucj@gmail.com>
10107 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10108 * config/nds32/nds32-e8.md: New file.
10109 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10110 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10112 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10113 * config/nds32/nds32.md (pipeline_model): Add e8.
10114 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10115 * config/nds32/pipelines.md: Include e8 settings.
10117 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10118 Chung-Ju Wu <jasonwucj@gmail.com>
10120 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10121 * config/nds32/nds32-n8.md: New file.
10122 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10123 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10125 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10126 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10127 * config/nds32/nds32.md (pipeline_model): Add n8.
10128 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10129 * config/nds32/pipelines.md: Include n8 settings.
10131 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10132 Chung-Ju Wu <jasonwucj@gmail.com>
10134 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10135 * config/nds32/nds32-n9-2r1w.md: New file.
10136 * config/nds32/nds32-n9-3r2w.md: New file.
10137 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10138 nds32_register_ports): New or modify for cpu n9.
10139 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10141 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10142 * config/nds32/nds32-utils.c: New file.
10143 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10144 TARGET_MUL_SLOW): Define.
10145 * config/nds32/nds32.md (pipeline_model): New attribute.
10146 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10147 New options that support cpu n9.
10148 * config/nds32/pipelines.md: Include n9 settings.
10149 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10151 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10153 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10154 information if necessary.
10155 (output_cond_branch_compare_zero): Likewise.
10156 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10157 (nds32_target_alignment): Refine for alignment.
10158 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10159 (FUNCTION_BOUNDARY): Modify.
10160 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10162 * config/nds32/nds32.opt (malways-align, malign-functions): New.
10164 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10166 * config/nds32/constants.md (unspec_volatile_element): Add values for
10167 TLB operation and data prefetch.
10168 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10169 functions for TLB operation and data prefetch.
10170 * config/nds32/nds32-intrinsic.md: Likewise.
10171 * config/nds32/nds32_intrinsic.h: Likewise.
10172 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10173 (nds32_print_operand): Likewise.
10174 * config/nds32/nds32.h (nds32_builtins): Likewise.
10176 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
10177 Andrew Pinski <pinsika@gcc.gnu.org>
10179 PR middle-end/82976
10180 * match.pd: Use constant_boolean_node of correct type instead of
10181 boolean_true_node or boolean_false_node for simplifying
10182 pointer comparisons to zero.
10184 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10186 PR tree-optimization/80021
10187 * tree.c (verify_type_variant): Make error call in verify_variant_match
10188 translatable and remove final full stop.
10190 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10192 * config/nds32/constants.md (unspec_volatile_element): Add
10193 UNSPEC_VOLATILE_EH_RETURN.
10194 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10195 nds32_output_stack_pop): Support dwarf exception handling process.
10196 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10197 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10198 exception handling process.
10199 (nds32_compute_stack_frame): Likewise.
10200 (nds32_return_addr_rtx): Likewise.
10201 (nds32_initial_elimination_offset): Likewise.
10202 (nds32_expand_prologue): Likewise.
10203 (nds32_expand_epilogue): Likewise.
10204 (nds32_dynamic_chain_address): New function.
10205 * config/nds32/nds32.h (machine_function): Add fields for dwarf
10206 exception handling.
10207 (DYNAMIC_CHAIN_ADDRESS): Define.
10208 (EH_RETURN_DATA_REGNO): Define.
10209 (EH_RETURN_STACKADJ_RTX): Define.
10210 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10211 patterns for dwarf exception handling.
10213 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10215 * config/nds32/nds32.h: Clean up obsolete macros.
10217 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10219 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10220 Add enum values for particular instructions.
10221 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10222 particular intrinsic functions.
10223 * config/nds32/nds32-intrinsic.md: Likewise.
10224 * config/nds32/nds32_intrinsic.h: Likewise.
10225 * config/nds32/nds32.h (nds32_builtins): Likewise.
10226 * config/nds32/nds32.md (type): Add pbsad and pbsada.
10227 (btst, ave): New patterns for particular instructions.
10229 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10231 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10232 Add enum values for atomic load/store and memory sync.
10233 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10235 * config/nds32/nds32-intrinsic.md: Likewise.
10236 * config/nds32/nds32_intrinsic.h: Likewise.
10237 * config/nds32/nds32.h (nds32_builtins): Likewise.
10239 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10241 PR tree-optimization/85257
10242 * fold-const.c (native_encode_vector): If not all elts could fit
10243 and off is -1, return 0 rather than offset.
10244 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10245 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10246 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
10247 adjust buffer in native_interpret_expr call.
10249 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10251 * config/nds32/constants.md (unspec_volatile_element): Add cache
10252 control enum values.
10253 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10254 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10255 * config/nds32/nds32.c (nds32_cctl_names): New.
10256 (nds32_print_operand): Handle cache control register names.
10257 * config/nds32/nds32.h (nds32_builtins): New enum values.
10258 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10260 * config/nds32/nds32.md (type): Add mmu.
10261 * config/nds32/pipelines.md (simple_insn): Add mmu.
10263 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10265 * config/nds32/nds32.md (type): Remove call.
10266 * config/nds32/pipelines.md (simple_insn): Likewise.
10268 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10270 * config/nds32/constants.md (unspec_volatile_element): Add
10271 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10272 UNSPEC_VOLATILE_FMFCFG.
10273 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10274 description for fmfcfg and fmfcsr.
10275 (bdesc_1arg): Add fmtcsr.
10276 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10277 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10278 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10279 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10280 unspec_fmfcfg): New patterns.
10281 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10282 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10283 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10284 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10285 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10286 __nds32__fmfcfg): Define.
10288 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10290 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10291 intrinsic register names.
10292 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10293 intrinsic register enum values and macros.
10295 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10297 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10298 for load/store addressing form.
10299 (nds32_print_operand_address): Likewise.
10301 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
10304 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10305 based on LABEL_REF. Remove useless assertion.
10306 (pic_address_needs_scratch): Fix formatting.
10307 (sparc_legitimize_pic_address): Minor tweaks.
10308 (sparc_delegitimize_address): Adjust assertion accordingly.
10309 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10310 into symbolic_operand.
10311 (movsi_high_pic_label_ref): Likewise.
10312 (movsi_lo_sum_pic_label_ref): Likewise.
10313 (movdi_pic_label_ref): Likewise.
10314 (movdi_high_pic_label_ref): Likewise.
10315 (movdi_lo_sum_pic_label_ref): Likewise.
10317 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
10319 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10320 custom LIB_SPEC setup.
10322 2018-04-06 Ruslan Bukin <br@bsdpad.com>
10323 Kito Cheng <kito.cheng@gmail.com>
10325 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10326 * config/riscv/freebsd.h: New.
10328 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10330 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10331 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10334 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10335 Kito Cheng <kito.cheng@gmail.com>
10337 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10338 nds32_output_call, nds32_symbol_binds_local_p): New functions.
10339 * config/nds32/nds32-protos.h (nds32_output_call,
10340 nds32_output_return): Declare.
10341 * config/nds32/nds32.md: Refine all the call and return patterns.
10343 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10346 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10347 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10349 PR rtl-optimization/84872
10350 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10351 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10352 EDGE_CROSSING edge.
10354 2018-04-06 Tamar Christina <tamar.christina@arm.com>
10356 * expr.c (copy_blkmode_to_reg): Revert 254862.
10357 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10359 2018-04-06 Richard Biener <rguenther@suse.de>
10361 PR middle-end/85244
10362 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10363 after seeing a component reference with an adjacent field. Treat
10364 refs to arrays at struct end of external decls similar to
10365 refs to unconstrained commons.
10367 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10370 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10371 look through SAVE_EXPRs with non-side-effects argument. Adjust
10373 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10376 2018-04-06 Richard Biener <rguenther@suse.de>
10378 PR middle-end/85180
10379 * alias.c (find_base_term): New wrapper around find_base_term
10380 unwinding CSELIB_VAL_PTR changes.
10381 (find_base_term): Do not restore CSELIB_VAL_PTR during the
10384 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10386 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10388 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10389 constant definitions.
10390 ("nop"): lr 0,0 -> nopr r0
10391 ("nop_lr0", "nop_lr1"): New insn definitions.
10393 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10395 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10396 NDS32_V3PUSH_AVAILABLE_P macro.
10398 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
10399 Chung-Ju Wu <jasonwucj@gmail.com>
10401 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10402 (nds32*-*-*): Add float and fpu_config into supported_defaults.
10403 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10404 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10405 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10406 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10407 * config/nds32/constraints.md: New constraints and checking for hard
10408 float configuration.
10409 * config/nds32/iterators.md: New mode iterator and attribute for hard
10410 float configuration.
10411 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10413 * config/nds32/nds32-fpu.md: New file.
10414 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10415 deal with hard float code generation.
10416 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10418 (abi_type, float_reg_number): New enum type.
10419 * config/nds32/nds32-predicates.c: New predicates for hard float.
10420 * config/nds32/nds32-protos.h: Declare functions for hard float.
10421 * config/nds32/nds32.c: Implementation for hard float configuration.
10422 * config/nds32/nds32.h: Definitions for hard float configuration.
10423 * config/nds32/nds32.md: Include hard float machine description and
10424 modify patterns for hard float configuration.
10425 * config/nds32/nds32.opt: New options for hard float configuration.
10426 * config/nds32/predicates.md: New predicates for hard float
10429 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10431 * common/config/nds32/nds32-common.c
10432 (nds32_option_optimization_table): Enable -mreleax-hint by default.
10434 2018-04-05 Jakub Jelinek <jakub@redhat.com>
10436 PR middle-end/85195
10437 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10438 CONSTRUCTOR_ELT (ctor, ...)->value.
10440 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
10443 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10445 2018-04-05 Tom de Vries <tom@codesourcery.com>
10448 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10451 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10452 Kito Cheng <kito.cheng@gmail.com>
10454 * config/nds32/constraints.md (U33): Fine-tune checking condition.
10455 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10456 * config/nds32/nds32.h (nds32_16bit_address_type): Add
10457 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10459 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10460 Kito Cheng <kito.cheng@gmail.com>
10462 * config/nds32/constraints.md (Ufe): New memory constraint.
10463 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10464 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10465 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10467 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10468 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10470 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10472 * config/nds32/nds32.md: Use optimize_size in the condition for
10473 alu-shift instructions.
10475 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10477 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10479 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10481 * config/nds32/nds32.md (negsi2): Refine pattern.
10483 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10484 Chung-Ju Wu <jasonwucj@gmail.com>
10486 * config/nds32/iterators.md (shift_rotate): New code iterator.
10487 (shift): New code attribute.
10488 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10489 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10490 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10491 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10492 bit-wise operations.
10493 (andsi3, *andsi3): Ditto.
10494 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10495 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10496 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10497 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10498 nds32_ior_operand, nds32_xor_operand): New predicates.
10500 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10502 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10503 (addsi3, subsi3): ... this.
10505 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10507 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10509 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10511 * config/nds32/nds32.md: Adjust indention.
10513 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10515 * config/nds32/nds32.md (feature): New attribute.
10517 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10519 * config/nds32/nds32.md (subtype): New attribute.
10521 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
10524 * config/arm/arm-builtins.c (arm_expand_builtin): Change
10525 expansion to perform a bitwise AND of the argument followed by a
10526 boolean negation of the result.
10528 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
10530 PR rtl-optimization/84878
10531 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10532 the basic block. Assert the use reference is not artificial and that
10533 it has an associated insn.
10535 2018-04-04 Michael Matz <matz@suse.de>
10537 * builtins.c (compute_objsize): Pass correct operand
10538 to array_at_struct_end_p.
10540 2018-04-04 Richard Biener <rguenther@suse.de>
10543 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10544 from contexts for DINFO_LEVEL_TERSE and below.
10546 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10548 * config/nds32/nds32-doubleword.md (move_<mode>): Require
10549 resiter_operand condition.
10550 * config/nds32/nds32.md (*move<mode>): Ditto.
10552 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10553 Monk Chiang <sh.chiang04@gmail.com>
10555 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10557 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10559 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10561 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10562 Kito Cheng <kito.cheng@gmail.com>
10564 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10565 nds32_cond_code_str, output_cond_branch,
10566 output_cond_branch_compare_zero, nds32_expand_cbranch,
10567 nds32_expand_cstore, nds32_expand_movcc,
10568 nds32_output_cbranchsi4_equality_zero,
10569 nds32_output_cbranchsi4_equality_reg,
10570 nds32_output_cbranchsi4_equality_reg_or_const_int,
10571 nds32_output_cbranchsi4_greater_less_zero: New functions.
10572 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10573 nds32_expand_cstore, nds32_expand_movcc,
10574 nds32_output_cbranchsi4_equality_zero,
10575 nds32_output_cbranchsi4_equality_reg,
10576 nds32_output_cbranchsi4_equality_reg_or_const_int,
10577 nds32_output_cbranchsi4_greater_less_zero): Declare.
10578 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10579 nds32_rimm11s_operand): New predicates.
10580 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10581 * config/nds32/nds32.md: Rewrite all the branch and conditional move
10584 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10586 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10587 * config/nds32/nds32.md: Ditto.
10588 * config/nds32/pipelines.md: Ditto.
10590 2018-04-04 Richard Biener <rguenther@suse.de>
10592 PR tree-optimization/85168
10593 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10594 propagating abnormals.
10596 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10598 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10600 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10601 Kito Cheng <kito.cheng@gmail.com>
10603 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10604 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10605 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10606 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10607 * config/nds32/nds32.md (sibcall_internal): New.
10608 (sibcall_register): Remove.
10609 (sibcall_immediate): Remove.
10610 (sibcall_value_internal): New.
10611 (sibcall_value_register): Remove.
10612 (sibcall_value_immediate): Remove.
10613 * config/nds32/predicates.md (nds32_general_register_operand): New.
10614 (nds32_call_address_operand): New.
10616 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10618 PR rtl-optimization/85167
10619 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10620 bb_defs if *split_p, instead preinitialize it to NULL.
10622 PR tree-optimization/85156
10623 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10624 evaluating the argument multiple times.
10626 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
10628 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10630 (_mm_cvtpd_ps): Likewise.
10631 (_mm_cvttpd_epi32): Likewise.
10632 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10633 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10634 vector, pixel, and bool following altivec.h include.
10636 2018-04-03 Martin Sebor <msebor@redhat.com>
10638 * doc/extend.texi (Common Function Attributes): Clarify.
10639 (const attribute): Likewise.
10640 (pure attribute): Likewise.
10642 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10645 * config/i386/i386.c (ix86_expand_vector_set): Use
10646 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
10648 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
10650 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10651 instructions when changing rounding bits to preserve precision bits
10652 in the x87 control word.
10654 2018-04-03 Martin Liska <mliska@suse.cz>
10656 PR tree-optimization/82491
10657 * rtl.h (strip_offset_and_add): Replace += suboffset with
10658 poly_uint64 () + suboffset.
10660 2018-03-29 Martin Liska <mliska@suse.cz>
10661 Martin Jambor <mjambor@suse.cz>
10664 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10665 param_type is not an integral or pointer type.
10667 2018-04-03 Richard Biener <rguenther@suse.de>
10669 * sese.h (recompute_all_dominators): Remove.
10671 2018-04-02 Martin Sebor <msebor@redhat.com>
10673 * doc/invoke.texi (-Wrestrict): Fix typos.
10675 2018-04-02 Jim Wilson <jimw@sifive.com>
10677 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10678 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10679 (<optab>di3, <optab>si3_extend): Likewise.
10680 (<optab>si3_mask, <optab>si3_mask_1): New.
10681 (<optab>di3_mask, <optab>di3_mask_1): New.
10682 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10683 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10684 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10686 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
10688 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10691 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
10693 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10694 (nds32_canonicalize_comparison): New function.
10696 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10697 Kito Cheng <kito.cheng@gmail.com>
10698 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10700 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10701 * config/nds32/constants.md (unspec_volatile_element): Add
10702 UNSPEC_VOLATILE_RELAX_GROUP.
10703 * config/nds32/nds32-relax-opt.c: New file.
10704 * config/nds32/nds32-predicates.c
10705 (nds32_symbol_load_store_p): New function.
10706 * config/nds32/nds32-protos.h
10707 (nds32_symbol_load_store_p): Declare function.
10708 (make_pass_nds32_relax_opt): Declare new rtl pass function.
10709 * config/nds32/nds32.c
10710 (nds32_register_pass): New function to register pass.
10711 (nds32_register_passes): New function to register passes.
10712 * config/nds32/nds32.md (relax_group): New pattern.
10713 * config/nds32/nds32.opt (mrelax-hint): New option.
10714 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10716 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
10718 * config/nds32/t-nds32: Modify files dependency.
10720 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10722 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10723 (PROFILE_HOOK): Define its implementation.
10725 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10727 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10728 type and 32-bit size.
10730 2018-04-01 Jakub Jelinek <jakub@redhat.com>
10732 PR middle-end/85090
10733 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10734 (V_128_256): New mode iterator.
10735 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10736 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10737 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10739 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10740 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10742 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
10745 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10746 NaN inputs correctly.
10748 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
10751 * config/rs6000/vsx.md (??r): New mode attribute.
10752 (*vsx_mov<mode>_64bit): Use it.
10753 (*vsx_mov<mode>_32bit): Likewise.
10755 2018-03-30 Martin Sebor <msebor@redhat.com>
10757 PR tree-optimization/84818
10758 * builtins.c (check_access): Use warning_n.
10760 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10763 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
10765 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
10768 2018-03-30 Julia Koval <julia.koval@intel.com>
10771 * x86-tune.def (movx, partial_reg_dependency): Enable for
10774 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
10776 PR inline-asm/84985
10777 * lra-constraints.c (process_alt_operands): Move setting
10778 this_alternative_matches below.
10780 2018-03-29 Martin Liska <mliska@suse.cz>
10783 * doc/invoke.texi: Document how LTO works with debug info.
10784 Describe auto-load support of binutils. Mention 'x86-64'
10785 as valid option value of -march option.
10787 2018-03-29 Jakub Jelinek <jakub@redhat.com>
10789 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
10792 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
10793 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
10794 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
10797 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10800 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
10801 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
10802 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
10803 for RS6000_BTM_POWERPC64.
10804 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
10805 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
10806 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
10809 (DIVDEU): Likewise.
10811 2018-03-28 Carl Love <cel@us.ibm.com>
10814 2017-09-27 Carl Love <cel@us.ibm.com>
10816 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10817 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10818 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10821 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10823 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
10824 instead of __vector bool.
10825 (_mm_max_pu8): Likewise.
10826 (_mm_min_pi16): Likewise.
10828 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10831 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
10832 (DIVWEUO): Likewise.
10833 (DIVDEO): Likewise.
10834 (DIVDEUO): Likewise.
10835 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
10836 DIVWEUO and DIVDEUO.
10837 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
10838 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
10839 (div_extend): Likewise.
10840 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
10842 (__builtin_divweuo): Likewise.
10843 (__builtin_divdeo): Likewise.
10844 (__builtin_divdeuo): Likewise.
10846 2018-03-28 Jakub Jelinek <jakub@redhat.com>
10849 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
10850 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
10852 PR tree-optimization/82004
10853 * gimple-match-head.c (optimize_pow_to_exp): New function.
10854 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
10855 Don't fold to exp if optimize_pow_to_exp is false.
10857 2018-03-28 Martin Liska <mliska@suse.cz>
10860 * calls.c (initialize_argument_information): Fix trailing space.
10861 * common.opt: Fix typo and provide better explanation for
10862 -fsanitize-coverage option.
10863 * config/i386/i386.opt: Fix typo.
10865 2018-03-28 Jakub Jelinek <jakub@redhat.com>
10866 Martin Liska <mliska@suse.cz>
10869 * gimplify.c (asan_poison_variable): Don't do the check for
10870 gimplify_omp_ctxp here.
10871 (gimplify_decl_expr): Do it here.
10872 (gimplify_target_expr): Likewise.
10874 2018-03-28 Martin Liska <mliska@suse.cz>
10877 * config/i386/i386.c (ix86_function_arg_advance): Do not call
10878 chkp_type_bounds_count if MPX is not enabled.
10880 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
10882 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
10884 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
10887 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
10888 function to create the function decl for complex long double
10889 multiply and divide for -mabi=ieeelongdouble.
10890 (init_float128_ieee): Call it.
10892 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
10895 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
10896 -fcf-protection=branch -mibt.
10897 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
10899 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10902 * config/arm/arm.c (arm_valid_symbolic_address): Handle
10903 arm_word_relocations.
10905 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
10908 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
10909 extern array declarations.
10911 2018-03-27 Richard Biener <rguenther@suse.de>
10913 PR middle-end/84067
10914 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
10915 explicit single_use checks.
10917 2018-03-27 Richard Biener <rguenther@suse.de>
10919 PR tree-optimization/85082
10920 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
10923 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10925 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
10926 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
10927 Turn on fasynchronous-unwind-tables and funwind-tables.
10929 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
10932 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
10933 (*bmi_blsr_<mode>_ccz): Ditto.
10935 2018-03-26 Tom de Vries <tom@codesourcery.com>
10937 PR tree-optimization/85063
10938 * omp-general.c (offloading_function_p): New function. Factor out
10940 * omp-offload.c (pass_omp_target_link::gate): ... here.
10941 * omp-general.h (offloading_function_p): Declare.
10942 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
10943 with attribute omp declare target for offloading functions.
10945 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
10947 PR tree-optimization/84005
10948 * tree-data-ref.h (get_base_for_alignment): Declare.
10949 * tree-data-ref.c (get_base_for_alignment_1): New function.
10950 (get_base_for_alignment): Likewise.
10951 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
10952 get_base_for_alignment to find a suitable base object, instead
10953 of always using drb->base_address.
10955 2018-03-23 Jakub Jelinek <jakub@redhat.com>
10957 PR inline-asm/85022
10958 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
10959 known size by default.
10961 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
10963 PR inline-asm/85030
10964 * lra-constraints.c (process_alt_operands): Don't match BLKmode
10965 and non BLKmode operands.
10967 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10970 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
10971 Clean up attributes.
10973 2018-03-23 Richard Biener <rguenther@suse.de>
10976 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
10977 we are going to emit early debug for LTO.
10979 2018-03-23 Jakub Jelinek <jakub@redhat.com>
10981 PR inline-asm/85034
10982 * function.c (match_asm_constraints_1): Don't optimize if input
10983 doesn't satisfy general_operand predicate for output's mode.
10985 PR inline-asm/85022
10986 * alias.c (write_dependence_p): Don't require for x_canonicalized
10987 non-VOIDmode if x has VOIDmode.
10990 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
10991 just don't try to optimize it rather than assert it never happens.
10993 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10995 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
10996 macro expansions for definition of ST_INTERNAL_<mode> and
10997 LD_INTERNAL_<mode> builtins.
10998 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11000 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11002 (altivec_expand_st_builtin): Likewise.
11003 (altivec_expand_builtin): Remove calls to deleted functions.
11004 (rs6000_address_for_altivec): Delete this function.
11005 * config/rs6000/vector.md: Remove expands for
11006 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11008 2018-03-22 Sudakshina Das <sudi.das@arm.com>
11011 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11012 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11013 re-computing once computed.
11014 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11015 (arm_init_machine_status): Initialize
11016 machine->static_chain_stack_bytes.
11018 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11021 * doc/extend.texi: Add four new prototypes for vec_ld.
11022 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11023 definitions for more logical presentation.
11024 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11025 entries for V1TI variants of __builtin_altivec_ld builtin.
11026 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11027 handling of V1TI variant of LVX icode pattern.
11028 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11029 (rs6000_gimple_fold_builtin): Likewise.
11030 (altivec_init_builtins): Add code to define
11031 __builtin_altivec_lvx_v1ti function.
11033 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11035 PR inline-asm/84941
11036 * function.c (match_asm_constraints_1): Don't do the optimization
11037 if input isn't a REG, SUBREG, MEM or constant.
11039 2018-03-22 Tom de Vries <tom@codesourcery.com>
11041 PR tree-optimization/84956
11042 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11043 bb_has_abnormal_pred.
11045 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11048 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11049 DECL_INITIAL (decl) to decl at the end.
11050 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11051 adjust the comment.
11053 2018-03-21 Joseph Myers <joseph@codesourcery.com>
11055 * doc/extend.texi (__builtin_tgmath): Document when complex
11056 integer types are treated as _Complex _Float64.
11058 2018-03-21 Tom de Vries <tom@codesourcery.com>
11060 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11062 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11064 PR tree-optimization/84960
11065 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11066 if it is ENTRY block, move them into single succ of ENTRY in that case.
11068 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
11070 PR tree-optimization/84811
11071 * poly-int.h (poly_span_traits): Remove the T3 parameter and
11072 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11073 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11074 (known_subrange_p): Update accordingly. Cast each value involved
11075 in the size comparison, rather than casting the result of the
11078 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11080 PR tree-optimization/84982
11081 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11082 by flipping the least significant bit rather than all bits from
11083 bitpos to bitpos + bitsize - 1.
11085 2018-03-21 Nathan Sidwell <nathan@acm.org>
11087 * doc/extend.texi (Deprecated Features): Remove mention of
11088 long-deleted deprecations.
11090 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11093 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11094 * configure: Regenerate.
11096 2018-03-21 Tom de Vries <tom@codesourcery.com>
11098 PR tree-optimization/83126
11099 * tree-parloops.c (num_phis): New function.
11100 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11102 2018-03-21 Nathan Sidwell <nathan@acm.org>
11104 * doc/extend.texi (Deprecated Features): Update deprecated flags,
11105 mention anon-struct/union members and trailing attributes.
11107 2018-03-21 Bin Cheng <bin.cheng@arm.com>
11109 PR tree-optimization/84969
11110 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11111 builtin memset partitions if they set different rhs values.
11113 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11115 PR rtl-optimization/84989
11116 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11117 VEC_DUPLICATE with scalar result mode.
11119 2018-03-21 Martin Liska <mliska@suse.cz>
11122 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11123 not intended return statement.
11125 2018-03-21 Martin Liska <mliska@suse.cz>
11128 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11129 (chkp_find_bound_slots_1): Limit number of iterations.
11131 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
11134 * Minor grammar fixes for x86 options.
11136 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11139 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11140 holding REG_CFA_RESTORE notes, instead turn them into a USE.
11142 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
11145 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11146 (altivec_lvx_<mode>_1op): Likewise.
11147 (altivec_stvx_<mode>_2op): Likewise.
11148 (altivec_stvx_<mode>_1op): Likewise.
11149 (altivec_lvx_<VM2:mode>): New define_expand.
11150 (altivec_stvx_<VM2:mode>): Likewise.
11151 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11152 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11153 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11154 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11155 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11156 (rs6000_gen_lvx): Likewise.
11157 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11158 (altivec_expand_stv_builtin): Likewise.
11159 (altivec_expand_builtin): Likewise.
11160 * config/rs6000/vector.md: Likewise.
11162 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11165 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11168 2018-03-20 Richard Biener <rguenther@suse.de>
11171 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11172 sign-conversions as zero, fall back to standard scalar_stmt
11175 2018-03-20 Martin Liska <mliska@suse.cz>
11178 * predict.c (rebuild_frequencies): Handle case when we have
11179 PROFILE_ABSENT, but flag_guess_branch_prob is false.
11181 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11184 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11185 flag_section_anchors.
11186 * varasm.c (use_blocks_for_decl_p): Remove hack for
11187 dw2_force_const_mem.
11190 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11192 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
11193 be created, use lowpart_subreg of operands[0] rather than operands[0]
11195 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11196 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11197 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11198 and n constraint instead of aarch64_shift_imm_di and Usd.
11199 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11200 (*aarch64_<optab>_reg_minus<mode>3): ... this.
11202 2018-03-20 Sudakshina Das <sudi.das@arm.com>
11205 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11206 to favor GPR over NEON registers.
11207 (<shift>di3_neon): Likewise.
11209 2018-03-20 Tom de Vries <tom@codesourcery.com>
11212 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11213 (nvptx_process_pars): Emit bar.sync asap and alap.
11215 2018-03-20 Tom de Vries <tom@codesourcery.com>
11218 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11219 seen_label if seen_label is already set.
11221 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11224 * config/i386/i386.c (fold_builtin_cpu): For features above 31
11225 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11226 Use 1U instead of 1. Formatting fixes.
11229 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11230 instead of TREE_TYPE (s1) for the return value.
11232 2018-03-19 Jakub Jelinek <jakub@redhat.com>
11234 PR tree-optimization/84946
11235 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11236 bitsize + bitsize in poly_uint64 rather than poly_int64.
11239 * dwarf2asm.c: Include fold-const.c.
11240 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11241 of decl rather than decl itself.
11243 PR rtl-optimization/84643
11244 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11246 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
11249 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11250 calling assemble_variable.
11252 2018-03-19 Sudakshina Das <sudi.das@arm.com>
11255 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11256 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11258 2018-03-19 Jim Wilson <jimw@sifive.com>
11261 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11262 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11263 (riscv_first_stack_step): Likewise.
11264 (riscv_option_override): Use STACK_BOUNDARY instead of
11265 MIN_STACK_BOUNDARY.
11266 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11267 MIN_STACK_BOUNDARY.
11268 (BIGGEST_ALIGNMENT): Set to 128.
11269 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11270 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11273 2018-03-19 Richard Biener <rguenther@suse.de>
11275 PR tree-optimization/84933
11276 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11277 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11279 2018-03-19 Richard Biener <rguenther@suse.de>
11281 PR tree-optimization/84859
11282 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11283 (cond_if_else_store_replacement): Perform sinking operation on
11284 single-store BBs regardless of MAX_STORES_TO_SINK setting.
11285 Generalize what a BB with a single eligible store is.
11287 2018-03-19 Richard Biener <rguenther@suse.de>
11289 PR tree-optimization/84929
11290 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11291 chrec_is_positive against non-chrec arg.
11293 2018-03-19 Tamar Christina <tamar.christina@arm.com>
11296 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11298 2018-03-18 Martin Liska <mliska@suse.cz>
11300 PR rtl-optimization/84635
11301 * regrename.c (build_def_use): Use matches_mode only when
11304 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
11306 PR tree-optimization/84913
11307 * tree-vect-loop.c (vectorizable_reduction): Don't try to
11308 vectorize chains of COND_EXPRs.
11310 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11312 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11314 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11316 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11318 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11320 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11322 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11323 Kito Cheng <kito.cheng@gmail.com>
11325 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11326 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11327 (nds32_adjust_reg_alloc_order): New function.
11328 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11330 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
11332 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11333 nds32_print_operand, nds32_print_operand_address): Use
11334 HOST_WIDE_INT_PRINT_DEC instead.
11336 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11338 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11340 2018-03-17 Jakub Jelinek <jakub@redhat.com>
11343 * config/i386/i386.c (initial_ix86_tune_features,
11344 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11345 unsigned long long.
11346 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11347 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11348 rather than 1u << ix86_tune. Formatting fix.
11349 (ix86_option_override_internal): Change ix86_arch_mask from
11350 unsigned int to unsigned HOST_WIDE_INT, initialize to
11351 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11352 (ix86_function_specific_restore): Likewise.
11354 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11357 * postreload.c (reload_combine_recognize_pattern): Perform
11358 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11359 truncate_int_for_mode the result for the destination's mode.
11362 * hsa-gen.c (mem_type_for_type): Fix comment typo.
11363 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11365 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11368 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
11371 * lra-assigns.c (lra_split_hard_reg_for): Don't use
11372 regno_allocno_class_array and sorted_pseudos.
11373 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11374 insns where regno is used.
11376 2018-03-16 Martin Liska <mliska@suse.cz>
11379 * multiple_target.c (create_dispatcher_calls): Redirect
11380 reference in the symbol table.
11382 2018-03-16 Martin Liska <mliska@suse.cz>
11385 * multiple_target.c (create_dispatcher_calls): Redirect also
11388 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11392 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11393 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11394 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11396 2018-03-16 Julia Koval <julia.koval@intel.com>
11398 * doc/invoke.texi (Skylake Server): Add CLWB.
11399 Cannonlake): Remove CLWB.
11401 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11403 PR tree-optimization/84841
11404 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11406 (FLOAT_ONE_CONST_TYPE): Define.
11407 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11408 (sort_by_operand_rank): Put entries with higher constant_type last
11409 rather than first to match comments.
11411 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
11413 * config/nios2/nios2.md (movsi_internal): Fix thinko in
11416 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11419 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11420 check and use address of target always.
11422 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
11425 * config/i386/i386.c (indirect_thunk_needed): Update comments.
11426 (indirect_thunk_bnd_needed): Likewise.
11427 (indirect_thunks_used): Likewise.
11428 (indirect_thunks_bnd_used): Likewise.
11429 (indirect_return_needed): New.
11430 (indirect_return_bnd_needed): Likewise.
11431 (output_indirect_thunk_function): Add a bool argument for
11433 (output_indirect_thunk_function): Don't generate alias for
11434 function return thunk.
11435 (ix86_code_end): Call output_indirect_thunk_function to generate
11436 function return thunks.
11437 (ix86_output_function_return): Set indirect_return_bnd_needed
11438 and indirect_return_needed instead of indirect_thunk_bnd_needed
11439 and indirect_thunk_needed.
11441 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
11443 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11444 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11445 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11447 2018-03-15 David Malcolm <dmalcolm@redhat.com>
11448 Paul Hua <paul.hua.gm@gmail.com>
11451 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11453 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
11455 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11456 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11457 resp. SFmode cases.
11459 2018-03-15 Tamar Christina <tamar.christina@arm.com>
11462 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11463 instead of GET_MODE_SIZE when comparing Units.
11465 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11468 * varasm.c (hash_section): Return an unchangeble hash value
11469 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11470 Return !aarch64_can_use_per_function_literal_pools_p ().
11472 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11475 * optabs.c (emit_conditional_move): Pass address of cmode's copy
11476 rather than address of cmode as last argument to prepare_cmp_insn.
11478 2018-03-15 Julia Koval <julia.koval@intel.com>
11480 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11481 F_AVX512VNNI, F_AVX512BITALG): New.
11483 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
11486 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
11487 insn for floating-point loads and stores.
11489 2018-03-14 Carl Love <cel@us.ibm.com>
11491 * config/rs6000/rs6000-c.c: Add macro definitions for
11492 ALTIVEC_BUILTIN_VEC_PERMXOR.
11493 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11494 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11495 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11496 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11498 * config/doc/extend.texi: Add prototypes for vec_permxor.
11500 2018-03-14 David Malcolm <dmalcolm@redhat.com>
11503 * diagnostic-show-locus.c (class layout_point): Convert m_line
11504 from int to linenum_type.
11505 (line_span::comparator): Use linenum "compare" function when
11506 comparing line numbers.
11507 (test_line_span): New function.
11508 (layout_range::contains_point): Convert param "row" from int to
11510 (layout_range::intersects_line_p): Likewise.
11511 (layout::will_show_line_p): Likewise.
11512 (layout::print_source_line): Likewise.
11513 (layout::should_print_annotation_line_p): Likewise.
11514 (layout::print_annotation_line): Likewise.
11515 (layout::print_leading_fixits): Likewise.
11516 (layout::annotation_line_showed_range_p): Likewise.
11517 (struct line_corrections): Likewise for field m_row.
11518 (line_corrections::line_corrections): Likewise for param "row".
11519 (layout::print_trailing_fixits): Likewise.
11520 (layout::get_state_at_point): Likewise.
11521 (layout::get_x_bound_for_row): Likewise.
11522 (layout::print_line): Likewise.
11523 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11524 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11525 * input.c (selftest::test_linenum_comparisons): New function.
11526 (selftest::input_c_tests): Call it.
11527 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11528 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11529 * selftest.h (ASSERT_GT): New macro.
11530 (ASSERT_GT_AT): New macro.
11531 (ASSERT_LT): New macro.
11532 (ASSERT_LT_AT): New macro.
11534 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
11536 PR rtl-optimization/84780
11537 * combine.c (distribute_links): Don't make a link based on pc_rtx.
11539 2018-03-14 Martin Liska <mliska@suse.cz>
11541 * tree.c (record_node_allocation_statistics): Use
11542 get_stats_node_kind.
11543 (get_stats_node_kind): New function extracted from
11544 record_node_allocation_statistics.
11545 (free_node): Use get_stats_node_kind.
11547 2018-03-14 Richard Biener <rguenther@suse.de>
11549 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11550 that the value-set of ANTIC_IN doesn't grow.
11553 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11555 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11556 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11558 2018-03-14 Julia Koval <julia.koval@intel.com>
11560 * config.gcc (icelake-client, icelake-server): New.
11562 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11563 (initial_ix86_arch_features): Ditto.
11564 (PTA_SKYLAKE): Add SGX.
11565 (PTA_ICELAKE): Remove.
11566 (PTA_ICELAKE_CLIENT): New.
11567 (PTA_ICELAKE_SERVER): New.
11568 (ix86_option_override_internal): Split up icelake on icelake client and
11570 (get_builtin_code_for_version): Ditto.
11571 (fold_builtin_cpu): Ditto.
11572 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11573 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11574 * config/i386/i386.h (processor_type): Ditto.
11575 * doc/invoke.texi: Ditto.
11577 2018-03-14 Jakub Jelinek <jakub@redhat.com>
11580 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11581 INTEGER_CST offset, add it together with bitpos / 8 and
11582 sign extend based on POINTER_SIZE.
11586 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
11589 * config/i386/constraints.md (Yc): New register constraint.
11590 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11591 Use Yc constraint for alternative 2 of operand 0. Remove
11592 preferred_for_speed attribute.
11594 2018-03-14 Richard Biener <rguenther@suse.de>
11596 PR tree-optimization/84830
11597 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11598 with the old one to avoid oscillations.
11600 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
11603 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11605 (assign_by_spills): Return a flag of reload assignment failure.
11606 Do not process the reload assignment failures. Do not spill other
11607 reload pseudos if they has the same reg class. Update n if
11609 (lra_assign): Add a return arg. Set up from the result of
11610 assign_by_spills call.
11611 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11612 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11613 usage_insns if it is not NULL.
11614 (spill_hard_reg_in_range): New function.
11615 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11616 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11617 function prototypes.
11618 (lra_assign): Change prototype.
11619 * lra.c (lra): Add code to deal with fails by splitting hard reg
11622 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
11624 * config/riscv/riscv.opt (mrelax): New option.
11625 * config/riscv/riscv.c (riscv_file_start): Emit ".option
11626 "norelax" when riscv_mrelax is disabled.
11627 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11629 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11632 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11633 reassociation for int modes.
11635 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11637 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11638 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11640 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11641 * config/aarch64/aarch64-sve.md
11642 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11643 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11644 (*extend<mode><Vwide>2): Rename to...
11645 (aarch64_sve_extend<mode><Vwide>2): ...this.
11646 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11647 renaming the old pattern to...
11648 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
11650 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11651 define_expand, renaming the old pattern to...
11652 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11653 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11654 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11655 account when deciding which SVE instruction the optab should use.
11656 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11658 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11660 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11661 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11662 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11663 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11664 (tlsdesc_small_<mode>): Turn a define_expand and use
11665 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
11666 (tlsdesc_small_advsimd_<mode>): ...this.
11667 (tlsdesc_small_sve_<mode>): New pattern.
11669 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11671 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11672 (UNSPEC_UMUL_HIGHPART): New constants.
11673 (MUL_HIGHPART): New int iteraor.
11674 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11675 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11677 (*<su>mul<mode>3_highpart): New define_insn.
11679 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11682 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11685 2018-03-13 Martin Liska <mliska@suse.cz>
11688 * (sem_item_optimizer::sem_item_optimizer): Initialize new
11690 (sem_item_optimizer::~sem_item_optimizer): Release it.
11691 (sem_item_optimizer::merge_classes): Register variable aliases.
11692 (sem_item_optimizer::fixup_pt_set): New function.
11693 (sem_item_optimizer::fixup_points_to_sets): Likewise.
11694 * ipa-icf.h: Declare new variables and functions.
11696 2018-03-13 Jakub Jelinek <jakub@redhat.com>
11698 PR middle-end/84834
11699 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11700 integer_pow2p@2 and test integer_pow2p in condition.
11701 (A < 0 ? C : 0): Similarly for @1.
11703 PR middle-end/84831
11704 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11705 characters starting at p contain '\0' character, don't look beyond
11709 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11710 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11713 * reg-stack.c (change_stack): Change update_end var from int to
11714 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11715 also call set_block_for_insn on the newly added insns and rescan.
11718 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11719 on the last operand.
11722 * tree.c (stabilize_reference_1): Return save_expr (e) for
11723 STATEMENT_LIST even if it doesn't have side-effects.
11725 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
11727 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11729 2018-03-12 Renlin Li <renlin.li@arm.com>
11731 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11732 aarch64_output_scalar_simd_mov_immediate.
11734 2018-03-12 Martin Sebor <msebor@redhat.com>
11736 PR tree-optimization/83456
11737 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11738 for perfectly overlapping calls to memcpy.
11739 (gimple_fold_builtin_memory_chk): Same.
11740 (gimple_fold_builtin_strcpy): Handle no-warning.
11741 (gimple_fold_builtin_stxcpy_chk): Same.
11742 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11744 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11746 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11747 parameter. Use it for SFmode.
11748 (rs6000_function_arg_advance_1): Adjust.
11749 (rs6000_function_arg): Adjust.
11750 (rs6000_gimplify_va_arg): Pass false for that new parameter.
11752 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11754 PR rtl-optimization/84169
11755 PR rtl-optimization/84780
11756 * combine.c (can_combine_p): Check for a 2-insn combination whether
11757 the destination register is used between the two insns, too.
11759 2018-03-12 Richard Biener <rguenther@suse.de>
11761 PR tree-optimization/84803
11762 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
11763 for refs DR analysis didn't process.
11765 2018-03-12 Richard Biener <rguenther@suse.de>
11767 PR tree-optimization/84777
11768 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
11769 force-vectorize loops ignore whether we are optimizing for size.
11771 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
11773 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
11774 (TARGET_MD_ASM_ADJUST): Define.
11776 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
11777 Kito Cheng <kito.cheng@gmail.com>
11778 Chung-Ju Wu <jasonwucj@gmail.com>
11780 * config/nds32/nds32.c (nds32_compute_stack_frame,
11781 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
11782 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
11783 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
11784 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
11785 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
11786 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
11787 * config/nds32/nds32.md (prologue, epilogue): Use macro
11788 NDS32_V3PUSH_AVAILABLE_P to do checking.
11790 2018-03-11 Jakub Jelinek <jakub@redhat.com>
11793 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
11794 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
11795 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
11796 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
11797 addition of most attributes on !orig_type_die or the attribute not
11798 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
11800 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11801 Chung-Ju Wu <jasonwucj@gmail.com>
11803 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
11804 __NDS32_VH__ macro.
11805 * config/nds32/nds32.opt (mvh): New option.
11807 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11808 Chung-Ju Wu <jasonwucj@gmail.com>
11810 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
11812 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
11813 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
11816 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11817 Chung-Ju Wu <jasonwucj@gmail.com>
11819 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
11821 * config/nds32/nds32-multiple.md (strlensi): New pattern.
11822 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
11824 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
11825 Kito Cheng <kito.cheng@gmail.com>
11826 Chung-Ju Wu <jasonwucj@gmail.com>
11828 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
11829 UNSPEC_FFMISM and UNSPEC_FLMISM.
11830 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
11831 for ffb, ffmism and flmism.
11832 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
11833 (unspec_ffmism): Ditto.
11834 (unspec_flmism): Ditto.
11835 (nds32_expand_builtin_impl): Check if string extension is available.
11836 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
11837 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
11839 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
11842 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
11845 * lra-assigns.c (assign_by_spills): Return a flag of reload
11846 assignment failure. Do not process the reload assignment
11847 failures. Do not spill other reload pseudos if they has the same
11849 (lra_assign): Add a return arg. Set up from the result of
11850 assign_by_spills call.
11851 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11852 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11853 usage_insns if it is not NULL.
11854 (spill_hard_reg_in_range): New function.
11855 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11856 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11857 function prototypes.
11858 (lra_assign): Change prototype.
11859 * lra.c (lra): Add code to deal with fails by splitting hard reg
11862 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
11865 * config/i386/i386.opt: Replace Enforcment with Enforcement.
11867 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
11870 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
11871 (dw_val_node): Add val_symbolic_view.
11872 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
11873 (symview_upper_bound): New.
11874 (new_line_info_table): Initialize symviews_since_reset.
11875 (dwarf2out_source_line): Count symviews_since_reset and set
11876 symview_upper_bound.
11877 (dw_val_equal_p): Handle symview.
11878 (add_AT_symview): New.
11879 (print_dw_val): Handle symview.
11880 (attr_checksum, attr_checksum_ordered): Likewise.
11881 (same_dw_val_p, size_of_die): Likewise.
11882 (value_format, output_die): Likewise.
11883 (add_high_low_attributes): Use add_AT_symview for entry_view.
11884 (dwarf2out_finish): Reset symview_upper_bound, clear
11887 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
11890 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
11891 Add strict argument and use it.
11892 (rs6000_split_multireg_move): Update for new strict argument.
11893 (mem_operand_gpr): Disallow all non-offsettable addresses.
11894 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
11896 2018-03-09 Jakub Jelinek <jakub@redhat.com>
11899 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
11900 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
11901 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
11904 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
11905 decl, use remap_type if we want to use the type.
11907 2018-03-09 Martin Sebor <msebor@redhat.com>
11909 PR tree-optimization/84526
11910 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11912 (builtin_access::generic_overlap): Be prepared to handle non-array
11915 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
11917 PR rtl-optimization/84682
11918 * lra-constraints.c (process_address_1): Check is_address flag
11919 for address constraints.
11920 (process_alt_operands): Likewise.
11921 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
11922 preprocess_constraints.
11923 * recog.h (preprocess_constraints): Add oploc parameter.
11925 * recog.c (preprocess_constraints): Test address_operand for
11926 CT_ADDRESS constraints.
11928 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
11931 * lra-assigns.c (assign_by_spills): Return a flag of reload
11932 assignment failure. Do not process the reload assignment
11933 failures. Do not spill other reload pseudos if they has the same
11935 (lra_assign): Add a return arg. Set up from the result of
11936 assign_by_spills call.
11937 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11938 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11939 usage_insns if it is not NULL.
11940 (spill_hard_reg_in_range): New function.
11941 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11942 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11943 function prototypes.
11944 (lra_assign): Change prototype.
11945 * lra.c (lra): Add code to deal with fails by splitting hard reg
11948 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11951 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
11952 Accept complain bool parameter. Only emit errors if it is true.
11953 (arm_parse_cpu_option_name): Likewise.
11954 (arm_target_thumb_only): Adjust callers of the above.
11955 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
11956 prototype to take a default true bool parameter.
11957 (arm_parse_arch_option_name): Likewise.
11959 2018-03-09 David Malcolm <dmalcolm@redhat.com>
11960 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11964 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
11965 * configure: Regenerate.
11966 * configure.ac ("linker --version-script option"): New.
11967 ("linker soname option"): New.
11969 2018-03-09 Richard Biener <rguenther@suse.de>
11971 PR tree-optimization/84775
11972 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
11973 immediate uses of predicate stmts and mark them modified.
11976 PR tree-optimization/84178
11977 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11979 (version_loop_for_if_conversion): Delay update_ssa call.
11980 (tree_if_conversion): Delay update_ssa until after predicate
11983 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
11986 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
11987 when the function accesses prior frames.
11989 2018-03-08 Jakub Jelinek <jakub@redhat.com>
11992 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
11993 gen_llsym, otherwise call maybe_gen_llsym.
11995 PR inline-asm/84742
11996 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
11997 has ',' character inside of it.
11999 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12002 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12003 as clobbering CC_REGNUM.
12005 2018-03-08 Richard Biener <rguenther@suse.de>
12007 PR middle-end/84552
12008 * tree-scalar-evolution.c: Include tree-into-ssa.h.
12009 (follow_copies_to_constant): Do not follow SSA names registered
12012 2018-03-08 Richard Biener <rguenther@suse.de>
12014 PR tree-optimization/84178
12015 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12017 (version_loop_for_if_conversion): Delay update_ssa call.
12018 (tree_if_conversion): Delay update_ssa until after predicate
12021 2018-03-08 David Malcolm <dmalcolm@redhat.com>
12023 PR tree-optimization/84178
12024 * tree-if-conv.c (release_bb_predicate): Remove the
12025 the assertion that the stmts have NULL use_ops.
12026 Discard the statements, asserting that they haven't
12027 yet been added to a BB.
12029 2018-03-08 Richard Biener <rguenther@suse.de>
12031 PR tree-optimization/84746
12032 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12033 (phi_translate): Pass in destination ANTIC_OUT set.
12034 (phi_translate_1): Likewise. For a simplified result lookup
12035 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12036 (phi_translate_set): Adjust.
12037 (do_pre_regular_insertion): Likewise.
12038 (do_pre_partial_partial_insertion): Likewise.
12040 2018-03-08 Martin Liska <mliska@suse.cz>
12042 PR gcov-profile/84735
12043 * doc/gcov.texi: Document usage of profile files.
12044 * gcov-io.h: Document changes in the format.
12046 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
12050 * dwarf2out.c (struct dw_line_info_table): Update comments for
12052 (FORCE_RESET_NEXT_VIEW): New.
12053 (FORCE_RESETTING_VIEW_P): New.
12054 (RESETTING_VIEW_P): Check for -1 too.
12055 (ZERO_VIEW_P): Likewise.
12056 (new_line_info_table): Force-reset next view.
12057 (dwarf2out_begin_function): Likewise.
12058 (dwarf2out_source_line): Simplify zero_view_p initialization.
12059 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12060 view directly. Omit view when omitting .loc at line 0.
12062 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12064 PR tree-optimization/84740
12065 * tree-switch-conversion.c (process_switch): Call build_constructors
12066 only if info.phi_count is non-zero.
12068 PR tree-optimization/84739
12069 * tree-tailcall.c (find_tail_calls): Check call arguments against
12070 DECL_ARGUMENTS (current_function_decl) rather than
12071 DECL_ARGUMENTS (func) when checking for tail recursion.
12073 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12075 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12076 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12077 Volker Reichelt's entry and add entries for people that perform
12078 GCC fuzzy testing and report numerous bugs.
12080 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
12083 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12084 readonly data in sdata, if that is disabled.
12085 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12086 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12087 -mreadonly-in-sdata option.
12089 2018-03-07 Martin Sebor <msebor@redhat.com>
12091 PR tree-optimization/84468
12092 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12093 basic block when looking for nul assignment.
12095 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
12098 * except.h (output_function_exception_table): Adjust prototype.
12099 * except.c (output_function_exception_table): Remove FNNAME parameter
12100 and add SECTION parameter. Ouput one part of the table at a time.
12101 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12102 the first part of the exception table and emit unwind directives.
12103 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12104 (i386_pe_seh_cold_init): Likewise.
12105 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12106 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12107 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12108 (ix86_output_call_insn): Emit a nop in one more case for SEH.
12109 * config/i386/winnt.c: Include except.h.
12110 (struct seh_frame_state): Add reg_offset, after_prologue and
12111 in_cold_section fields.
12112 (i386_pe_seh_end_prologue): Set seh->after_prologue.
12113 (i386_pe_seh_cold_init): New function.
12114 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12115 to seh->in_cold_section.
12116 (seh_emit_push): Record the offset of the push.
12117 (seh_emit_save): Record the offet of the save.
12118 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12119 Test seh->after_prologue to disregard the epilogue.
12120 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12121 (i386_pe_end_cold_function): New function.
12123 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12126 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12127 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12130 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12132 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12133 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12135 PR middle-end/84723
12136 * multiple_target.c: Include tree-inline.h and intl.h.
12137 (expand_target_clones): Diagnose and fail if node->definition and
12138 !tree_versionable_function_p (node->decl).
12140 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
12142 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12144 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12145 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12146 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12148 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12151 * combine.c (try_combine): Use reg_or_subregno instead of handling
12152 just paradoxical SUBREGs and REGs.
12154 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
12156 * config/arc/arc.c (arc_finalize_pic): Remove function.
12157 (arc_must_save_register): We use single base PIC register, remove
12158 checks to save/restore the PIC register.
12159 (arc_expand_prologue): Likewise.
12160 * config/arc/arc-protos.h (arc_set_default_type_attributes):
12162 (arc_verify_short): Likewise.
12163 (arc_attr_type): Likewise.
12164 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12165 (walk_stores): Likewise.
12166 (arc_address_cost): Make it static.
12167 (arc_verify_short): Likewise.
12168 (branch_dest): Likewise.
12169 (arc_attr_type): Likewise.
12170 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12171 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12172 (arc_final_prescan_insn): Remove inserting the nops due to
12173 hardware hazards. It is done in reorg step.
12174 (insn_length_variant_t): Remove.
12175 (insn_length_parameters_t): Likewise.
12176 (arc_insn_length_parameters): Likewise.
12177 (arc_get_insn_variants): Likewise.
12178 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12180 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12182 PR inline-asm/84683
12183 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12186 PR tree-optimization/84687
12187 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12189 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12191 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12193 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12194 Rename to ppc_speculation_barrier.
12195 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12196 __builtin_ppc_speculation_barrier.
12198 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12201 * combine.c (combine_simplify_rtx): Don't try to simplify if
12202 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12205 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
12207 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12208 to 32 bytes when compiling for POWER9.
12210 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12213 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12214 regparm >= 3 with no arg reg available also for calls with
12215 flag_force_indirect_call. Pass decl to ix86_function_regparm.
12218 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12220 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
12222 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
12225 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12227 2018-03-05 Richard Biener <rguenther@suse.de>
12229 PR tree-optimization/84486
12230 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12231 When inserting a __builtin_assume_aligned call set the LHS
12232 SSA name alignment info accordingly.
12234 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
12236 PR tree-optimization/84114
12237 * config/aarch64/aarch64.c (aarch64_reassociation_width)
12238 Avoid reassociation of FLOAT_MODE addition.
12240 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
12242 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12243 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12244 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12245 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12246 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12247 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12248 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12250 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12251 __builtin_ia32_wbinvd): New builtins.
12252 (SPECIAL_ARGS2): New.
12253 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12254 (SPECIAL_ARGS2): New.
12255 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12256 (ix86_valid_target_attribute_inner_p): Ditto.
12257 (ix86_init_mmx_sse_builtins): Add special_args2.
12258 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12259 TARGET_WBNOINVD_P): New.
12260 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12261 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12262 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12263 * config/i386/immintrin.h (_wbinvd): New intrinsic.
12264 * config/i386/pconfigintrin.h: New file.
12265 * config/i386/wbnoinvdintrin.h: Ditto.
12266 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12268 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12270 2018-03-05 Richard Biener <rguenther@suse.de>
12272 PR tree-optimization/84670
12273 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12275 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12276 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12277 (compute_antic_aux): Only assert the number of values in ANTIC_IN
12278 doesn't grow if all successors (recursively) were visited at least
12281 2018-03-05 Richard Biener <rguenther@suse.de>
12283 PR tree-optimization/84650
12284 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12285 if executed in the loop pipeline.
12287 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
12289 * doc/configfiles.texi (Configuration Files): Move info about
12290 conditionalizing $target-protos.h to...
12291 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
12292 differs from $target-protos.h.
12294 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
12295 Chung-Ju Wu <jasonwucj@gmail.com>
12297 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12298 * config/nds32/nds32-multiple.md (setmemsi): Define.
12299 * config/nds32/nds32-memory-manipulation.c
12300 (nds32_gen_dup_4_byte_to_word_value): New.
12301 (emit_setmem_word_loop): New.
12302 (emit_setmem_byte_loop): New.
12303 (nds32_expand_setmem_loop): New.
12304 (nds32_expand_setmem_loop_v3m): New.
12305 (nds32_expand_setmem_unroll): New.
12306 (nds32_expand_setmem): New.
12308 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12309 Chung-Ju Wu <jasonwucj@gmail.com>
12311 * config/nds32/nds32-memory-manipulation.c
12312 (nds32_emit_load_store): New.
12313 (nds32_emit_post_inc_load_store): New.
12314 (nds32_emit_mem_move): New.
12315 (nds32_emit_mem_move_block): New.
12316 (nds32_expand_movmemsi_loop_unknown_size): New.
12317 (nds32_expand_movmemsi_loop_known_size): New.
12318 (nds32_expand_movmemsi_loop): New.
12319 (nds32_expand_movmemsi_unroll): New.
12320 (nds32_expand_movmemqi): Rename ...
12321 (nds32_expand_movmemsi): ... to this.
12322 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12323 (movmemsi): ... to this.
12324 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12325 (nds32_expand_movmemsi): ... to this.
12327 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12328 Monk Chiang <sh.chiang04@gmail.com>
12329 Chung-Ju Wu <jasonwucj@gmail.com>
12331 * config/nds32/nds32-protos.h
12332 (nds32_expand_load_multiple): New arguments.
12333 (nds32_expand_store_multiple): Ditto.
12334 (nds32_valid_multiple_load_store): Rename ...
12335 (nds32_valid_multiple_load_store_p): ... to this.
12336 * config/nds32/nds32-memory-manipulation.c
12337 (nds32_expand_load_multiple): Refine implementation.
12338 (nds32_expand_store_multiple): Ditto.
12339 * config/nds32/nds32-multiple.md
12340 (load_multiple): Update nds32_expand_load_multiple interface.
12341 (store_multiple): Update nds32_expand_store_multiple interface.
12342 * config/nds32/nds32-predicates.c
12343 (nds32_valid_multiple_load_store): Rename ...
12344 (nds32_valid_multiple_load_store_p): ... to this and refine
12346 * config/nds32/predicates.md
12347 (nds32_load_multiple_and_update_address_operation): New predicate.
12348 (nds32_store_multiple_and_update_address_operation): New predicate.
12350 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12351 Chung-Ju Wu <jasonwucj@gmail.com>
12353 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12354 (combo): New attribute.
12355 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12357 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
12359 * config/nds32/nds32.opt: Change -mcmodel= default value.
12361 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
12362 Monk Chiang <sh.chiang04@gmail.com>
12363 Chung-Ju Wu <jasonwucj@gmail.com>
12365 * config/nds32/constants.md (unspec_element): New enum.
12366 * config/nds32/constraints.md (Umw): New constraint.
12367 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12368 * config/nds32/nds32-intrinsic.md: Likewise.
12369 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12370 (nds32_valid_smw_lwm_base_p): New.
12371 (nds32_output_smw_single_word): New.
12372 (nds32_output_lmw_single_word): New.
12373 (nds32_expand_unaligned_load): New.
12374 (nds32_expand_unaligned_store): New.
12375 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12376 (nds32_output_smw_single_word): Declare.
12377 (nds32_output_lmw_single_word): Declare.
12378 (nds32_expand_unaligned_load): Declare.
12379 (nds32_expand_unaligned_store): Declare.
12380 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12381 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12382 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12383 NDS32_BUILTIN_UASTORE_DW.
12384 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12387 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
12388 Kito Cheng <kito.cheng@gmail.com>
12389 Chung-Ju Wu <jasonwucj@gmail.com>
12391 * config/nds32/nds32-intrinsic.c
12392 (nds32_expand_builtin_null_ftype_reg): Delete.
12393 (nds32_expand_builtin_reg_ftype_imm): Ditto.
12394 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12395 (nds32_read_argument): New.
12396 (nds32_legitimize_target): Ditto.
12397 (nds32_legitimize_argument): Ditto.
12398 (nds32_check_constant_argument): Ditto.
12399 (nds32_expand_unop_builtin): Ditto.
12400 (nds32_expand_unopimm_builtin): Ditto.
12401 (nds32_expand_binop_builtin): Ditto.
12402 (nds32_builtin_decl_impl): Ditto.
12403 (builtin_description): Ditto.
12404 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12405 (nds32_init_builtins_impl): Ditto.
12406 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12407 (nds32_builtin_decl): New.
12408 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12409 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12411 2018-03-02 Jeff Law <law@redhat.com>
12413 * reorg.c (stop_search_p): Handle DEBUG_INSN.
12414 (redundant_insn, fill_simple_delay_slots): Likewise.
12415 (fill_slots_from_thread): Likewise.
12416 * resource.c (mark_referenced_resources): Likewise.
12417 (mark_set_resources, find_dead_or_set_registers): Likewise.
12419 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12421 * substring-locations.h (format_warning_va): Formatting fix for
12422 ATTRIBUTE_GCC_DIAG.
12423 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12425 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12426 * substring-locations.c: Include intl.h.
12427 (format_warning_va): Turned into small wrapper around
12428 format_warning_n_va, renamed to ...
12429 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12430 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12432 (format_warning_at_substring_n): New function.
12433 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12434 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
12435 format_warning_at_substring with just a shorter name instead of
12436 const function pointer.
12437 (fmtwarn_n): New function.
12438 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12439 appropriate, get rid of all the fmtstr temporaries, move conditionals
12440 with G_() wrapped string literals directly into fmtwarn arguments,
12441 cast dir.len to (int), formatting fixes.
12443 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
12445 * doc/invoke.texi: Remove "Cilk Plus" references.
12447 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12448 Richard Biener <rguenther@suse.de>
12451 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12452 for error or warning attributes if CALL_FROM_THUNK_P is set.
12455 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12458 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12459 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12462 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12463 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12465 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12466 instead of -1U in last predictors element's probability member.
12468 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12471 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12472 arguments if they are comparable.
12474 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12476 PR tree-optimization/84634
12477 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12478 masks and masked_loop_p with a single loop_masks, making sure it's
12479 null for bb vectorization.
12481 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12483 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12484 (vect_analyze_data_ref_access): Use loop->safe_len rather than
12485 loop->force_vectorize to check whether there is no alias.
12487 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12490 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12492 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12494 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12495 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12496 instead of a loop around prev_real_insn.
12497 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12500 PR inline-asm/84625
12501 * config/i386/i386.c (ix86_print_operand): Use conditional
12502 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12505 2018-03-02 Richard Biener <rguenther@suse.de>
12507 PR tree-optimization/84427
12508 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12509 (bitmap_set_subtract_values): Rewrite to handle multiple
12512 (prune_clobbered_mems): Likewise.
12513 (phi_translate): Take edge instead of pred/phiblock.
12514 (phi_translate_1): Likewise.
12515 (phi_translate_set): Likewise. Insert all translated
12516 exprs for a value into the set, keeping possibly multiple
12517 expressions per value.
12518 (compute_antic_aux): Adjust for phi_translate changes.
12519 When intersecting union the expressions and prune those
12520 not in the final value set, keeping possibly multiple
12521 expressions per value. Do not use value-insertion
12522 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12523 all expressions. Add verification that the value-sets
12524 only shrink during iteration.
12525 (compute_partial_antic_aux): Adjust for the phi_translate changes.
12526 (do_pre_regular_insertion): Likewise.
12527 (do_pre_partial_partial_insertion): Likewise.
12529 2018-03-02 Richard Biener <rguenther@suse.de>
12532 * config/darwin.c (saved_debug_info_level): New static global.
12533 (darwin_asm_lto_start): Disable debug info generation for LTO out.
12534 (darwin_asm_lto_end): Restore debug info generation settings.
12536 2018-03-01 Martin Liska <mliska@suse.cz>
12539 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12540 volatile arguments.
12542 2018-03-01 Richard Biener <rguenther@suse.de>
12545 * dwarf2out.c (gen_variable_die): Properly handle late VLA
12546 type annotation with LTO when debug was disabled at compile-time.
12548 2018-03-01 Matthew Fortune <mfortune@gmail.com>
12550 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12552 (mips_final_postscan_insn): Likewise.
12554 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
12556 PR rtl-optimization/84528
12557 * alias.c (init_alias_target): Add commentary.
12558 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12559 a unique base value if the frame pointer is not eliminated
12560 to the stack pointer.
12562 2018-03-01 Tom de Vries <tom@codesourcery.com>
12564 PR rtl-optimization/83327
12565 * lra-int.h (hard_regs_spilled_into): Declare.
12566 * lra.c (hard_regs_spilled_into): Define.
12567 (init_reg_info): Init hard_regs_spilled_into.
12568 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12569 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12570 (process_bb_lives): Handle hard_regs_spilled_into.
12571 (lra_create_live_ranges_1): Before doing liveness propagation, clear
12572 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12574 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
12576 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12577 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12578 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12579 * config/rs6000/aix72.h: New file.
12581 2018-02-28 Jakub Jelinek <jakub@redhat.com>
12583 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12584 instead of warning_at with conditional singular and plural messages
12588 * stor-layout.c (update_alignment_for_field): For
12589 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12590 && !DECL_PACKED (field), do the alignment update, just use
12591 only desired_align instead of MAX (type_align, desired_align)
12593 (place_field): Don't do known_align < desired_align handling
12594 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12595 is non-NULL, instead do it after rli->prev_field handling and
12596 only if not within a bitfield word. For DECL_PACKED (field)
12597 use type_align of BITS_PER_UNIT.
12599 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
12601 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12602 superfluous parentheses and trailing spaces.
12604 2018-02-28 Richard Biener <rguenther@suse.de>
12606 PR tree-optimization/84584
12607 * graphite-scop-detection.c (scop_detection::add_scop): Discard
12608 SCoPs with fake exit edge.
12610 2018-02-28 Martin Liska <mliska@suse.cz>
12613 * timevar.c (timer::print): Fix format to properly print 100%
12616 2018-02-28 Richard Biener <rguenther@suse.de>
12618 PR middle-end/84607
12619 * genmatch.c (capture_info::walk_match): Do not mark
12620 captured expressions without operands as expr_p given
12621 they act more like predicates and should be subject to
12622 "lost tail" side-effect preserving.
12624 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
12626 PR rtl-optimization/81611
12627 * auto-inc-dec.c (attempt_change): Move dead note from
12628 mem_insn if it's the next use of regno
12629 (find_address): Take address use of reg holding
12630 non-incremented value. Add parm to limit search to the named
12632 (merge_in_block): Attempt to use a mem insn that is the next
12633 use of the original regno.
12635 2018-02-27 Martin Sebor <msebor@redhat.com>
12638 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
12639 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
12641 2018-02-27 Martin Sebor <msebor@redhat.com>
12643 PR translation/84207
12644 * diagnostic-core.h (warning_n, error_n, inform_n): Change
12645 n argument to unsigned HOST_WIDE_INT.
12646 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12647 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
12648 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12649 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12651 2018-02-27 Richard Biener <rguenther@suse.de>
12653 PR tree-optimization/84512
12654 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12655 Do not use the estimate returned from record_stmt_cost for
12656 the scalar iteration cost but sum properly using add_stmt_cost.
12658 2018-02-27 Richard Biener <rguenther@suse.de>
12660 PR tree-optimization/84466
12661 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12662 Adjust last change to less strictly validate use operands.
12664 2018-02-27 Martin Liska <mliska@suse.cz>
12666 PR gcov-profile/84548
12667 * gcov.c (process_file): Allow partial overlap and consider it
12668 also as group functions.
12669 (output_lines): Properly calculate range of lines for a group.
12671 2018-02-27 Martin Liska <mliska@suse.cz>
12673 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12674 'ggc' suffixes. Change first column width.
12675 (timer::print): Fix formatting of the column.
12677 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
12679 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12680 preserve inline entry blocks for the sake of debug inline
12681 entry point markers alone.
12682 (remove_unused_locals): Suggest in comments a better place to
12683 force the preservation of inline entry blocks that are
12684 otherwise unused, but do not preserve them.
12686 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12688 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12690 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12693 * config/i386/constraints.md (Bs): Replace
12694 ix86_indirect_branch_register with
12695 TARGET_INDIRECT_BRANCH_REGISTER.
12697 * config/i386/i386.md (indirect_jump): Likewise.
12698 (tablejump): Likewise.
12699 (*sibcall_memory): Likewise.
12700 (*sibcall_value_memory): Likewise.
12701 Peepholes of indirect call and jump via memory: Likewise.
12702 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12703 (*sibcall_value_GOT_32): Likewise.
12704 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12705 (GOT_memory_operand): Likewise.
12706 (call_insn_operand): Likewise.
12707 (sibcall_insn_operand): Likewise.
12708 (GOT32_symbol_operand): Likewise.
12709 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12711 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12713 PR rtl-optimization/83496
12714 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12715 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
12716 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12717 redundant insn, if any.
12718 (relax_delay_slots): Likewise.
12719 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12721 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
12723 PR tree-optimization/83965
12724 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12725 that grouped statements are part of a reduction chain. Return
12726 true if the statement is not marked as a reduction itself but
12727 is part of a group.
12728 (vect_recog_dot_prod_pattern): Don't check whether the statement
12729 is part of a group here.
12730 (vect_recog_sad_pattern): Likewise.
12731 (vect_recog_widen_sum_pattern): Likewise.
12733 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12736 * final.c (rest_of_clean_state): Also look for calls inside sequences.
12738 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12741 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12743 (ix86_output_indirect_function_return): New prototype.
12744 (ix86_split_simple_return_pop_internal): Likewise.
12745 * config/i386/i386.c (indirect_return_via_cx): New.
12746 (indirect_return_via_cx_bnd): Likewise.
12747 (indirect_thunk_name): Handle return va CX_REG.
12748 (output_indirect_thunk_function): Create alias for
12749 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12750 (ix86_output_indirect_jmp): Remove the bool argument.
12751 (ix86_output_indirect_function_return): New function.
12752 (ix86_split_simple_return_pop_internal): Likewise.
12753 * config/i386/i386.md (*indirect_jump): Don't pass false
12754 to ix86_output_indirect_jmp.
12755 (*tablejump_1): Likewise.
12756 (simple_return_pop_internal): Change it to define_insn_and_split.
12757 Call ix86_split_simple_return_pop_internal to split it for
12758 -mfunction-return=.
12759 (simple_return_indirect_internal): Call
12760 ix86_output_indirect_function_return instead of
12761 ix86_output_indirect_jmp.
12763 2018-02-26 Jakub Jelinek <jakub@redhat.com>
12766 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
12767 memset and value initialization afterwards.
12769 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
12771 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
12773 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12776 * common/config/aarch64/aarch64-common.c
12777 (aarch_option_optimization_table[]): Switch
12778 off fomit-frame-pointer
12780 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12781 Chung-Ju Wu <jasonwucj@gmail.com>
12783 * config/nds32/nds32-multiple.md (load_multiple): Disallow
12785 (store_multiple): Ditto.
12787 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12789 * config.gcc: Add --with-cpu support for nds32 target.
12790 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
12791 * config/nds32/nds32.opt: Add -mcpu= option.
12793 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
12795 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
12796 isel=yes): Warn for these deprecated options.
12798 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
12800 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
12801 ISA_2_5_MASKS_EMBEDDED.
12803 2018-02-23 Jakub Jelinek <jakub@redhat.com>
12805 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
12806 p->max as pointers rather than using iterative_hash_expr.
12808 2018-02-23 Carl Love <cel@us.ibm.com>
12810 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
12811 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
12813 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
12814 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
12815 P8V_BUILTIN_VEC_VUNSIGNED2.
12817 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
12820 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
12821 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
12823 * lra-constraints.c (curr_insn_transform): Set up
12824 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
12826 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
12827 * lra-eliminations.c (spill_pseudos): Ditto.
12828 (process_insn_for_elimination): Ditto.
12829 * lra-lives.c (reg_early_clobber_p): Use the new macros.
12830 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
12831 LRA_NON_CLOBBERED_ALT.
12833 2018-02-22 Martin Sebor <msebor@redhat.com>
12835 PR tree-optimization/84480
12836 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
12837 to maybe_diag_stxncpy_trunc. Call it.
12838 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
12839 from gimple_fold_builtin_strcpy. Print inlining stack.
12840 (handle_builtin_stxncpy): Print inlining stack.
12841 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
12843 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
12846 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
12847 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
12848 and -fcheck-pointer-bounds are used together.
12849 (indirect_thunk_prefix): New enum.
12850 (indirect_thunk_need_prefix): New function.
12851 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
12852 "_nt" instead of "_bnd" for NOTRACK prefix.
12853 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
12854 (output_indirect_thunk_function): Likewise.
12856 (ix86_code_end): Update output_indirect_thunk_function calls.
12857 (ix86_output_indirect_branch_via_reg): Replace
12858 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
12859 (ix86_output_indirect_branch_via_push): Likewise.
12860 (ix86_output_function_return): Likewise.
12861 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
12862 incompatible with -fcf-protection=branch and
12863 -fcheck-pointer-bounds.
12865 2018-02-22 Steve Ellcey <sellcey@cavium.com>
12868 * config/aarch64/aarch64.c (aarch64_print_address_internal):
12869 Change gcc_assert call to output_operand_lossage.
12871 2018-02-22 Steve Ellcey <sellcey@cavium.com>
12873 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
12875 2018-02-22 DJ Delorie <dj@redhat.com>
12876 Sebastian Perta <sebastian.perta@renesas.com>
12877 Oleg Endo <olegendo@gcc.gnu.org>
12879 * config/rx/rx.c (rx_rtx_costs): New function.
12880 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
12882 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
12884 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
12886 2018-02-22 Martin Liska <mliska@suse.cz>
12889 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
12890 Add "native" as a possible value.
12892 2018-02-22 Martin Liska <mliska@suse.cz>
12895 * config/i386/i386.c (ix86_option_override_internal):
12896 Add "native" as a possible value for -march and -mtune.
12898 2018-02-22 Jakub Jelinek <jakub@redhat.com>
12901 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
12902 to all type variants.
12904 PR tree-optimization/84503
12905 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
12906 width as info->bitpos + info->bitsize - start.
12907 (merged_store_group::merge_overlapping): Simplify width computation.
12908 (check_no_overlap): New function.
12909 (imm_store_chain_info::try_coalesce_bswap): Compute expected
12910 start + width and last_order of the group, fail if check_no_overlap
12912 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
12913 to group if check_no_overlap fails.
12915 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
12917 * config/rs6000/altivec.md: Delete contraint arguments to
12918 define_expand, define_split, and define_peephole2, and in
12919 define_insn_and_split if always unused.
12920 * config/rs6000/darwin.md: Ditto.
12921 * config/rs6000/dfp.md: Ditto.
12922 * config/rs6000/rs6000.md: Ditto.
12923 * config/rs6000/sync.md: Ditto.
12924 * config/rs6000/vector.md: Ditto.
12925 * config/rs6000/vsx.md: Ditto.
12927 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
12929 * config/rs6000/altivec.md: Write output control strings as braced
12930 blocks instead of double-quoted strings.
12931 * config/rs6000/darwin.md: Ditto.
12932 * config/rs6000/rs6000.md: Ditto.
12933 * config/rs6000/vector.md: Ditto.
12934 * config/rs6000/vsx.md: Ditto.
12936 2018-02-21 Jason Merrill <jason@redhat.com>
12938 PR c++/84314 - ICE with templates and fastcall attribute.
12939 * attribs.c (build_type_attribute_qual_variant): Remove assert.
12941 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
12943 * ipa-cp.c (determine_versionability): Fix comment typos.
12945 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
12948 * ipa-cp.c (determine_versionability): Do not version functions caling
12951 2018-02-21 Martin Liska <mliska@suse.cz>
12954 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
12955 Add "native" as a possible value.
12956 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
12957 the macro when native cpu detection is available.
12959 2018-02-21 Martin Liska <mliska@suse.cz>
12962 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
12963 Add "native" as a possible value.
12964 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
12965 when native cpu detection is available.
12967 2018-02-21 Jakub Jelinek <jakub@redhat.com>
12968 Martin Sebor <msebor@redhat.com>
12970 PR tree-optimization/84478
12971 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
12973 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
12974 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
12975 support which is conservatively correct, for 2 only stay conservative
12976 for maxlen. Formatting and comment capitalization fixes. Add STRICT
12977 argument to the 2 argument get_range_strlen, adjust 6 arg
12978 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
12980 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
12981 (gimple_fold_builtin_strlen): Pass true as last argument to
12984 2018-02-20 Martin Sebor <msebor@redhat.com>
12986 PR middle-end/84095
12987 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
12988 (builtin_memref::set_base_and_offset): Same. Handle inner references.
12989 (builtin_memref::builtin_memref): Factor out parts into
12990 set_base_and_offset and call it.
12992 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
12994 PR middle-end/84406
12995 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
12996 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
12997 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
12998 search at the associated MODE_INT.
13000 2018-02-20 Jeff Law <law@redhat.com>
13002 PR middle-end/82123
13003 PR tree-optimization/81592
13004 PR middle-end/79257
13005 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13006 for range data rather than using global data.
13007 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13008 range data rather than using global data.
13009 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13010 pass it to children as needed.
13011 (struct directive::fmtresult): Similarly.
13012 (struct directive::set_width): Similarly.
13013 (struct directive::set_precision): Similarly.
13014 (format_integer, format_directive, parse_directive): Similarly.
13015 (format_none): Accept unnamed vr_values parameter.
13016 (format_percent, format_floating, format_character): Similarly.
13017 (format_string, format_plain): Similarly.
13018 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13019 the EVRP range analyzer for range data rather than using global data.
13020 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13021 gimple-ssa-evrp-analyze.h
13022 (class sprintf_dom_walker): Add after_dom_children member function.
13023 Add evrp_range_analyzer member.
13024 (sprintf_dom_walker::before_dom_children): Call into the EVRP
13025 range analyzer as needed.
13026 (sprintf_dom_walker::after_dom_children): New member function.
13027 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13029 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13030 (evrp_range_analyzer::pop_to_marker): Likewise.
13032 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13034 PR tree-optimization/84419
13035 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13036 with the required type if its current type is compatible but
13039 2018-02-20 Jakub Jelinek <jakub@redhat.com>
13041 PR middle-end/82004
13042 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13043 after vectorization.
13045 2018-02-20 Martin Liska <mliska@suse.cz>
13048 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13049 possible values if we don't have a hint.
13051 2018-02-20 Martin Liska <mliska@suse.cz>
13055 * final.c (shorten_branches): Build align_tab array with one
13057 * opts.c (finish_options): Add alignment option limit check.
13058 (MAX_CODE_ALIGN): Likewise.
13059 (MAX_CODE_ALIGN_VALUE): Likewise.
13060 * doc/invoke.texi: Document maximum allowed option value for
13061 all -falign-* options.
13063 2018-02-19 Jakub Jelinek <jakub@redhat.com>
13066 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13067 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13068 * var-tracking.c (emit_note_insn_var_location): Remove all references
13069 to NOTE_INSN_CALL_ARG_LOCATION.
13070 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13071 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13072 Use copy_rtx_if_shared.
13073 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13074 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13075 (dwarf2out_var_location): Remove handling of
13076 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13078 * final.c (final_scan_insn): Remove all references to
13079 NOTE_INSN_CALL_ARG_LOCATION.
13080 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
13081 before dumping final insns.
13082 * except.c (emit_note_eh_region_end): Remove all references to
13083 NOTE_INSN_CALL_ARG_LOCATION.
13084 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13085 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13086 * config/arc/arc.c (hwloop_optimize): Likewise.
13087 * config/arm/arm.c (create_fix_barrier): Likewise.
13088 * config/s390/s390.c (s390_chunkify_start): Likewise.
13089 * config/sh/sh.c (find_barrier): Likewise.
13090 * config/i386/i386.c (rest_of_insert_endbranch,
13091 ix86_seh_fixup_eh_fallthru): Likewise.
13092 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13093 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13094 * config/frv/frv.c (frv_function_prologue): Likewise.
13095 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
13097 (note_outside_basic_block_p): Remove all references to
13098 NOTE_INSN_CALL_ARG_LOCATION.
13099 * gengtype.c (adjust_field_rtx_def): Likewise.
13100 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13102 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13103 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13106 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13109 PR tree-optimization/84452
13110 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13111 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13114 2018-02-19 Martin Liska <mliska@suse.cz>
13117 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13119 2018-02-19 Martin Liska <mliska@suse.cz>
13120 Richard Sandiford <richard.sandiford@linaro.org>
13122 PR tree-optimization/82491
13123 * gimple-fold.c (get_base_constructor): Make earlier bail out
13126 2018-02-19 Carl Love <cel@us.ibm.com>
13128 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13129 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13131 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13132 P8V_BUILTIN_VEC_NEG.
13134 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
13136 * config/rl78/rl78.md (movdf): New define expand.
13138 2018-02-19 Martin Liska <mliska@suse.cz>
13141 * doc/invoke.texi: Fix typo.
13142 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13144 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
13146 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13147 handle rs6000_single_float and rs6000_double_float specially for
13150 2018-02-16 Jeff Law <law@redhat.com>
13152 * config/rx/rx.c (add_pop_cfi_notes): New function.;
13153 (pop_regs): Use it.
13155 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13158 * ipa-inline.c (inline_small_functions): Fix a typo.
13160 2018-02-16 Nathan Sidwell <nathan@acm.org>
13162 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13164 2018-02-16 Carl Love <cel@us.ibm.com>
13166 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13167 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13168 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13169 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13170 expansion to P8V_BUILTIN_VEC_FLOAT2.
13172 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
13174 PR rtl-optimization/70023
13175 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13176 src_regno into account.
13178 2018-02-16 Carl Love <cel@us.ibm.com>
13180 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13181 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13182 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13183 * config/rs6000/rs6000.c: Remove case statements for
13184 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13185 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13186 and P9V_BUILTIN_VEC_VINSERT4B.
13187 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13188 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13189 * config/rs6000/vsx.md:
13190 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13193 2018-02-16 Carl Love <cel@us.ibm.com>
13195 * config/rs6000/altivec.h: Add builtin names vec_extract4b
13197 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13199 * config/rs6000/rs6000-c.c: Add the definitions for
13200 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13201 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13202 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13203 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
13204 definition for insert4b and define insn *insert3b_internal.
13205 * doc/extend.texi: Add documentation for vec_extract4b.
13207 2018-02-16 Nathan Sidwell <nathan@acm.org>
13209 * doc/extend.texi (Backwards Compatibility): Mention friend
13210 injection. Note for-scope is deprecated.
13211 * doc/invoke.texi (-ffriend-injection): Deprecate.
13213 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
13215 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13216 that moved to I2, also allow destinations that are a paradoxical
13217 subreg (instead of a normal reg).
13219 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
13222 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13225 2018-02-16 Richard Biener <rguenther@suse.de>
13227 PR tree-optimization/84037
13228 PR tree-optimization/84016
13230 * config/i386/i386.c (ix86_builtin_vectorization_cost):
13231 Adjust vec_construct for the fact we need additional higher latency
13232 128bit inserts for AVX256 and AVX512 vector builds.
13233 (ix86_add_stmt_cost): Scale vector construction cost for
13236 2018-02-16 Richard Biener <rguenther@suse.de>
13238 PR tree-optimization/84417
13239 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13240 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13241 (non_rewritable_lvalue_p): Likewise, use poly-ints.
13243 2018-02-16 Martin Liska <mliska@suse.cz>
13246 * internal-fn.def (ASAN_CHECK): Set proper flags.
13247 (ASAN_MARK): Likewise.
13249 2018-02-16 Julia Koval <julia.koval@intel.com>
13251 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13252 from PTA_CANNONLAKE.
13254 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13257 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13258 Use ++iter rather than iter++ for std::list iterators.
13259 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
13260 defer deleting them until all nodes in the forest are processed. Do
13261 free even leaf nodes. Change to_process into auto_vec.
13264 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13265 * vec.h (vec_default_construct): Use memset instead of placement new
13266 if BROKEN_VALUE_INITIALIZATION is defined.
13267 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13268 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13271 PR rtl-optimization/83723
13272 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13273 * lra.c (lra_substitute_pseudo): Likewise. If true, use
13274 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
13276 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13278 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13280 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
13282 PR rtl-optimization/81443
13283 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13284 from inner REGs to paradoxical SUBREGs.
13286 2018-02-16 Richard Biener <rguenther@suse.de>
13288 PR tree-optimization/84399
13289 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13290 For operands we can analyze at their definition make sure we can
13291 analyze them at each use as well.
13293 2018-02-16 Richard Biener <rguenther@suse.de>
13295 PR tree-optimization/84190
13296 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13297 volatile accesses if the decl isn't volatile.
13299 2018-02-15 Jason Merrill <jason@redhat.com>
13301 PR c++/84314 - ICE with templates and fastcall attribute.
13302 * attribs.c (build_type_attribute_qual_variant): Don't clobber
13303 TYPE_CANONICAL on an existing type.
13305 2018-02-15 Jakub Jelinek <jakub@redhat.com>
13307 PR tree-optimization/84383
13308 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13309 dstoff nor call operand_equal_p if dstbase is NULL.
13311 PR tree-optimization/84334
13312 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13313 also a CONSTANT_CLASS_P, punt.
13315 2018-02-14 Jim Wilson <jimw@sifive.com>
13317 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13318 first SMALL_OPERAND check. New local min_second_step. Move assert
13319 to where locals are set. Add TARGET_RVC support.
13320 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13322 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
13324 * doc/invoke.texi: Correct -Wformat-overflow code sample.
13326 2018-02-14 Martin Sebor <msebor@redhat.com>
13328 PR tree-optimization/83698
13329 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13330 arrays constrain the offset range to their bounds.
13331 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13332 (builtin_access::overlap): Avoid setting the size of overlap if it's
13334 (maybe_diag_overlap): Also consider arrays when deciding what values
13335 of offsets to include in diagnostics.
13337 2018-02-14 Martin Sebor <msebor@redhat.com>
13340 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13341 that correspond to the kind of a declaration.
13343 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
13346 * config/pa/pa.md: Load address of PIC label using the linkage table
13347 if the label is nonlocal.
13349 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
13351 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13352 warning message if user requests -maltivec=be.
13353 * doc/invoke.texi: Document deprecation of -maltivec=be.
13355 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
13358 * config/rs6000/rs6000-c.c: Update definitions for
13359 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13360 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13362 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13365 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13366 add _get_ssp intrinsics. Remove argument from
13367 __builtin_ia32_rdssp[d|q].
13368 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13369 * config/i386/i386-builtin.def: Remove argument from
13370 __builtin_ia32_rdssp[d|q].
13371 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13372 ix86_expand_special_args_builtin for _rdssp[d|q].
13373 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13374 Clear register before usage.
13375 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13376 Add documentation for new _get_ssp and _inc_ssp intrinsics.
13378 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
13380 PR tree-optimization/84357
13381 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13382 operand 1 of an ARRAY_REF too.
13384 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
13387 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13388 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13390 (set_of_reg): New struct.
13391 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13392 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13393 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13395 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13396 Split into bitclr, bitset, bitinvert patterns if appropriate.
13397 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13398 use rx_fuse_in_memory_bitop.
13399 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13400 to named insn, correct maximum insn length.
13402 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
13405 * machmode.def: Define a complex mode for PARTIAL_INT.
13406 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13408 * doc/rtl.texi: Document CSPImode.
13409 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13411 (msp430_hard_regno_nregs_with_padding): Likewise.
13413 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
13416 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13418 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
13420 PR rtl-optimization/84169
13421 * combine.c (try_combine): New variable split_i2i3. Set it to true if
13422 we generated a parallel as new i3 and we split that to new i2 and i3
13423 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
13424 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
13425 those to i2, not i1. Partially rewrite this scan code.
13427 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13430 * stor-layout.c (place_field): For variable length fields, adjust
13431 offset_align afterwards not just based on the field's alignment,
13432 but also on the size.
13434 PR middle-end/84309
13435 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13436 of exps and logs in the use_exp2 case.
13438 2018-02-13 Jeff Law <law@redhat.com>
13440 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13441 entry for "vector".
13443 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13446 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
13450 * common.opt (gas-loc-support, gas-locview-support): New.
13451 (ginline-points, ginternal-reset-location-views): New.
13452 * doc/invoke.texi: Document them. Use @itemx where intended.
13453 (gvariable-location-views): Adjust.
13454 * target.def (reset_location_view): New.
13455 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13456 (TARGET_RESET_LOCATION_VIEW): New.
13457 * doc/tm.texi: Rebuilt.
13458 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13459 (dwarf2out_default_as_locview_support): New.
13460 (output_asm_line_debug_info): Use option variables.
13461 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13462 (output_loc_list): Likewise.
13463 (add_high_low_attributes): Check option variables.
13464 Don't output entry view attribute in strict mode.
13465 (gen_inlined_subroutine_die): Check option variables.
13466 (dwarf2out_inline_entry): Likewise.
13467 (init_sections_and_labels): Likewise.
13468 (dwarf2out_early_finish): Likewise.
13469 (maybe_reset_location_view): New, from...
13470 (dwarf2out_var_location): ... here. Call it.
13471 * debug.h (dwarf2out_default_as_loc_support): Declare.
13472 (dwarf2out_default_as_locview_support): Declare.
13473 * hooks.c (hook_int_rtx_insn_0): New.
13474 * hooks.h (hook_int_rtx_insn_0): Declare.
13475 * toplev.c (process_options): Take -gas-loc-support and
13476 -gas-locview-support from dwarf2out. Enable
13477 -gvariable-location-views by default only with locview
13478 assembler support. Enable -ginternal-reset-location-views by
13479 default only if the target defines the corresponding hook.
13480 Enable -ginline-points by default if location views are
13481 enabled; force it disabled if statement frontiers are
13483 * tree-inline.c (expand_call_inline): Check option variables.
13484 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13486 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
13488 PR tree-optimization/84321
13489 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13490 handling. Also check whether the anti-range contains any values
13491 that satisfy the mask; switch to a VR_RANGE if not.
13493 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
13496 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13498 2018-02-13 Martin Jambor <mjambor@suse.cz>
13501 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13502 of call statements, also set location of a load to a temporary.
13504 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
13506 * config/rl78/rl78.c (add_vector_labels): New function.
13507 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13508 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13509 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13510 which checks that no arguments are passed.
13511 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13512 * doc/extend.texi: Documentation for the new attribute.
13514 2018-02-13 Andreas Schwab <schwab@suse.de>
13516 * config/riscv/linux.h (CPP_SPEC): Define.
13518 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13521 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13522 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13523 OPTION_MASK_ISA_AES as first argument to def_builtin_const
13524 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13525 instead of OPTION_MASK_ISA_PCLMUL as first argument to
13526 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13527 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13528 temporarily for AES and PCLMUL builtins.
13530 PR tree-optimization/84339
13531 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13532 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13535 PR middle-end/84309
13536 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13537 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13538 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13540 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13542 * omp-simd-clone.h: New file.
13543 * omp-simd-clone.c: Include omp-simd-clone.h.
13544 (expand_simd_clones): No longer static.
13545 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13546 cgraph.h and omp-simd-clone.h.
13547 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13548 (vect_recog_widen_shift_pattern): Formatting fix.
13549 (vect_pattern_recog_1): Don't check optab for calls.
13552 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13553 operands[2] into a REG before using gen_lowpart on it.
13555 2018-02-12 Jeff Law <law@redhat.com>
13558 * config/sh/sh.c (find_barrier): Consider a sibling call
13561 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13562 successfully back substituting a reg.
13564 2018-02-12 Richard Biener <rguenther@suse.de>
13566 PR tree-optimization/84037
13567 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13568 parameter, move visited init to caller.
13569 (vect_slp_analyze_operations): Separate cost from validity
13570 check, initialize visited once for all instances.
13571 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13573 * tree-vect-stmts.c (vect_model_simple_cost): Make early
13575 (vect_model_promotion_demotion_cost): Likewise.
13576 (vectorizable_bswap): Guard cost modeling with !slp_node
13577 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13579 (vectorizable_call): Likewise.
13580 (vectorizable_conversion): Likewise.
13581 (vectorizable_assignment): Likewise.
13582 (vectorizable_shift): Likewise.
13583 (vectorizable_operation): Likewise.
13584 (vectorizable_store): Likewise.
13585 (vectorizable_load): Likewise.
13586 (vectorizable_condition): Likewise.
13587 (vectorizable_comparison): Likewise.
13589 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
13592 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13593 (ASAN_MARK): Fix fnspec to account for return value, change pointer
13594 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13596 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13598 PR middle-end/83665
13599 * params.def (inline-min-speedup): Increase from 8 to 15.
13600 (max-inline-insns-auto): Decrease from 40 to 30.
13601 * ipa-split.c (consider_split): Add some buffer for function to
13602 be considered inlining candidate.
13603 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13606 2018-02-12 Richard Biener <rguenther@suse.de>
13608 PR tree-optimization/84037
13609 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13610 matched stmts if we cannot swap the non-matched ones.
13612 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13614 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13615 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13616 _mm_maskz_scalef_round_ss): New intrinsics.
13617 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13618 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13619 __builtin_ia32_scalefss_round): Remove.
13620 (__builtin_ia32_scalefsd_mask_round,
13621 __builtin_ia32_scalefss_mask_round): New intrinsics.
13622 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13623 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13624 ((match_operand:VF_128 2 "<round_nimm_predicate>"
13625 "<round_constraint>")): Changed to ...
13626 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13627 "<round_scalar_constraint>")): ... this.
13628 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13629 %0, %1, %2<round_op3>}"): Changed to ...
13630 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13631 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13632 %2<round_scalar_mask_op3>}"): ... this.
13633 * config/i386/subst.md (round_scalar_nimm_predicate): New.
13635 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13637 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13638 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13639 (_mm_maskz_sqrt_round_ss): New intrinsics.
13640 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13641 (__builtin_ia32_sqrtsd_mask_round)
13642 (__builtin_ia32_sqrtss_mask_round): New builtins.
13643 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13644 (__builtin_ia32_sqrtss_round): Remove.
13645 (__builtin_ia32_sqrtsd_mask_round)
13646 (__builtin_ia32_sqrtss_mask_round): New builtins.
13647 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13648 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13649 ((match_operand:VF_128 1 "vector_operand"
13650 "xBm,<round_constraint>")): Changed to ...
13651 ((match_operand:VF_128 1 "vector_operand"
13652 "xBm,<round_scalar_constraint>")): ... this.
13653 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13654 %0, %2, %<iptr>1<round_op3>}): Changed to ...
13655 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13656 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13657 %<iptr>1<round_scalar_mask_op3>}): ... this.
13658 ((set_attr "prefix" "<round_prefix>")): Changed to ...
13659 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13661 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
13664 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13665 Cast vec_cmpeq result to correct type.
13666 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13667 Cast vec_cmpgt result to correct type.
13669 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
13671 * final.c (final_scan_insn_1): Renamed from...
13672 (final_scan_insn): ... this. New wrapper, to recover
13673 seen from the outermost call in recursive ones.
13674 * config/sparc/sparc.c (output_return): Drop seen from call.
13675 (output_sibcall): Likewise.
13676 * config/visium/visium.c (output_branch): Likewise.
13678 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
13680 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13683 2018-02-10 Alan Modra <amodra@gmail.com>
13686 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13687 Specify LR as an input.
13689 2018-02-10 Jakub Jelinek <jakub@redhat.com>
13692 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13693 remove_member_access_dummy_vars): New functions.
13694 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13695 lower_omp_1, execute_lower_omp): Use them.
13697 PR rtl-optimization/84308
13698 * shrink-wrap.c (spread_components): Release todo vector.
13700 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
13702 PR rtl-optimization/57193
13703 * ira-color.c (struct allocno_color_data): Add member
13704 conflict_allocno_hard_prefs.
13705 (update_conflict_allocno_hard_prefs): New.
13706 (bucket_allocno_compare_func): Add a preference based on
13707 conflict_allocno_hard_prefs.
13708 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13709 (color_allocnos): Remove a dead code. Initiate
13710 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
13712 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13715 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13716 constraint from =wa to wa. Avoid a subreg on the output operand,
13717 instead use a pseudo and subreg it in a move.
13718 (p9_xxbrd_<mode>): Changed to ...
13719 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13720 (p9_xxbrd_v2df): New expander.
13721 (p9_xxbrw_<mode>): Changed to ...
13722 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13723 (p9_xxbrw_v4sf): New expander.
13725 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13727 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13729 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
13732 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13733 multiply in 32-bit mode.
13734 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13735 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13738 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13740 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13741 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13742 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13743 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13745 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
13748 * dwarf2out.c (is_trivial_indirect_ref): New function.
13749 (dwarf2out_late_global_decl): Do not generate a location
13750 attribute for variables that have a non-trivial DECL_VALUE_EXPR
13751 and that are not defined in the current unit.
13753 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13755 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
13756 instead of a libcall for UNORDERED.
13758 2018-02-09 Tamar Christina <tamar.christina@arm.com>
13761 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
13762 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
13764 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13767 * config/s390/s390.c (s390_set_current_function): Invoke
13768 s390_indirect_branch_settings also if fndecl didn't change.
13770 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13772 * config/rs6000/rs6000.md (blockage): Set length to zero.
13774 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13776 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
13778 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13781 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
13782 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
13786 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
13787 PARALLEL incoming that failed vt_get_decl_and_offset check.
13789 PR middle-end/84237
13790 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
13791 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
13793 (get_variable_section): For decls in named .bss* sections pass true as
13794 second argument to bss_initializer_p.
13796 2018-02-09 Marek Polacek <polacek@redhat.com>
13797 Jakub Jelinek <jakub@redhat.com>
13800 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
13801 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
13802 Sync some changes from cxx_fold_indirect_ref.
13804 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13806 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
13808 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
13809 (BLOCK_INLINE_ENTRY_LABEL): New.
13810 (dwarf2out_var_location): Disregard inline entry markers.
13811 (inline_entry_data): New struct.
13812 (inline_entry_data_hasher): New hashtable type.
13813 (inline_entry_data_hasher::hash): New.
13814 (inline_entry_data_hasher::equal): New.
13815 (inline_entry_data_table): New variable.
13816 (add_high_low_attributes): Add DW_AT_entry_pc and
13817 DW_AT_GNU_entry_view attributes if a pending entry is found
13818 in inline_entry_data_table. Add old entry_pc attribute only
13819 if debug nonbinding markers are disabled.
13820 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
13821 markers are enabled.
13822 (block_within_block_p, dwarf2out_inline_entry): New.
13823 (dwarf2out_finish): Check that no entries remained in
13824 inline_entry_data_table.
13825 * final.c (reemit_insn_block_notes): Handle inline entry notes.
13826 (final_scan_insn, notice_source_line): Likewise.
13827 (rest_of_clean_state): Skip inline entry markers.
13828 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
13830 * gimple.c (gimple_build_debug_inline_entry): New.
13831 * gimple.h (enum gimple_debug_subcode): Add
13832 GIMPLE_DEBUG_INLINE_ENTRY.
13833 (gimple_build_debug_inline_entry): Declare.
13834 (gimple_debug_inline_entry_p): New.
13835 (gimple_debug_nonbind_marker_p): Adjust.
13836 * insn-notes.def (INLINE_ENTRY): New.
13837 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
13838 inline entry marker notes.
13839 (print_insn): Likewise.
13840 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
13841 (INSN_DEBUG_MARKER_KIND): Likewise.
13842 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
13843 * tree-inline.c (expand_call_inline): Build and insert
13844 debug_inline_entry stmt.
13845 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
13846 inline entry blocks early, if nonbind markers are enabled.
13847 (dump_scope_block): Dump fragment info.
13848 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
13849 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
13850 (gimple_build_debug_inline_entry): New.
13851 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
13852 Enable/disable inline entry points too.
13853 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
13854 (DEBUG_INSN): Describe inline entry markers.
13856 * common.opt (gvariable-location-views): New.
13857 (gvariable-location-views=incompat5): New.
13858 * config.in: Rebuilt.
13859 * configure: Rebuilt.
13860 * configure.ac: Test assembler for view support.
13861 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
13862 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
13863 * dwarf2out.c (var_loc_view): New typedef.
13864 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
13865 (dwarf2out_locviews_in_attribute): New.
13866 (dwarf2out_locviews_in_loclist): New.
13867 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
13868 (enum dw_line_info_opcode): Add LI_adv_address.
13869 (struct dw_line_info_table): Add view.
13870 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
13871 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
13872 (zero_view_p): New variable.
13873 (ZERO_VIEW_P): New macro.
13874 (output_asm_line_debug_info): New.
13875 (struct var_loc_node): Add view.
13876 (add_AT_view_list, AT_loc_list): New.
13877 (add_var_loc_to_decl): Add view param. Test it against last.
13878 (new_loc_list): Add view params. Record them.
13879 (AT_loc_list_ptr): Handle loc and view lists.
13880 (view_list_to_loc_list_val_node): New.
13881 (print_dw_val): Handle dw_val_class_view_list.
13882 (size_of_die): Likewise.
13883 (value_format): Likewise.
13884 (loc_list_has_views): New.
13885 (gen_llsym): Set vl_symbol too.
13886 (maybe_gen_llsym, skip_loc_list_entry): New.
13887 (dwarf2out_maybe_output_loclist_view_pair): New.
13888 (output_loc_list): Output view list or entries too.
13889 (output_view_list_offset): New.
13890 (output_die): Handle dw_val_class_view_list.
13891 (output_dwarf_version): New.
13892 (output_compilation_unit_header): Use it.
13893 (output_skeleton_debug_sections): Likewise.
13894 (output_rnglists, output_line_info): Likewise.
13895 (output_pubnames, output_aranges): Update version comments.
13896 (output_one_line_info_table): Output view numbers in asm comments.
13897 (dw_loc_list): Determine current endview, pass it to new_loc_list.
13898 Call maybe_gen_llsym.
13899 (loc_list_from_tree_1): Adjust.
13900 (add_AT_location_description): Create view list attribute if
13901 needed, check it's absent otherwise.
13902 (convert_cfa_to_fb_loc_list): Adjust.
13903 (maybe_emit_file): Call output_asm_line_debug_info for test.
13904 (dwarf2out_var_location): Reset views as needed. Precompute
13905 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
13906 attribute. Set view.
13907 (new_line_info_table): Reset next view.
13908 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
13909 (dwarf2out_source_line): Likewise. Output view resets and labels to
13910 the assembler, or select appropriate line info opcodes.
13911 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
13912 (optimize_string_length): Catch it. Adjust.
13913 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
13914 dw_val_class_view_list, and remove it if no longer needed.
13915 (hash_loc_list): Hash view numbers.
13916 (loc_list_hasher::equal): Compare them.
13917 (optimize_location_lists): Check whether a view list symbol is
13918 needed, and whether the locview attribute is present, and
13919 whether they match. Remove the locview attribute if no longer
13921 (index_location_lists): Call skip_loc_list_entry for test.
13922 (dwarf2out_finish): Call output_asm_line_debug_info for test.
13923 Use output_dwarf_version.
13924 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
13925 (struct dw_val_node): Add val_view_list.
13926 * final.c (SEEN_NEXT_VIEW): New.
13927 (set_next_view_needed): New.
13928 (clear_next_view_needed): New.
13929 (maybe_output_next_view): New.
13930 (final_start_function): Rename to...
13931 (final_start_function_1): ... this. Take pointer to FIRST,
13932 add SEEN parameter. Emit param bindings in the initial view.
13933 (final_start_function): Reintroduce SEEN-less interface.
13934 (final): Rename to...
13935 (final_1): ... this. Take SEEN parameter. Output final pending
13936 next view at the end.
13937 (final): Reintroduce seen-less interface.
13938 (final_scan_insn): Output pending next view before switching
13939 sections or ending a block. Mark the next view as needed when
13940 outputting variable locations. Notify debug backend of section
13941 changes, and of location view changes.
13942 (rest_of_handle_final): Adjust.
13943 * toplev.c (process_options): Autodetect value for debug variable
13944 location views option. Warn on incompat5 without -gdwarf-5.
13945 * doc/invoke.texi (gvariable-location-views): New.
13946 (gvariable-location-views=incompat5): New.
13947 (gno-variable-location-views): New.
13949 2018-02-08 David Malcolm <dmalcolm@redhat.com>
13951 PR tree-optimization/84136
13952 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
13953 that the result of find_edge is non-NULL.
13955 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
13958 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
13959 storing integer register in SImode. Fix cost of 256 and 512
13960 byte aligned SSE register store.
13962 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
13964 * config/i386/i386.c (ix86_multiplication_cost): Fix
13965 multiplication cost for TARGET_AVX512DQ.
13967 2018-02-08 Marek Polacek <polacek@redhat.com>
13969 PR tree-optimization/84238
13970 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
13973 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13975 PR tree-optimization/84265
13976 * tree-vect-stmts.c (vectorizable_store): Don't treat
13977 VMAT_CONTIGUOUS accesses as grouped.
13978 (vectorizable_load): Likewise.
13980 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13982 PR tree-optimization/81635
13983 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
13984 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
13985 (test_round_for_mask): New functions.
13986 (wide_int_cc_tests): Call test_round_for_mask.
13987 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
13988 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
13989 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
13990 range returned by get_range_info.
13992 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13995 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
13996 * symtab.c: Include builtins.h
13997 (symtab_node::output_to_lto_symbol_table_p): Move here
13998 from lto-streamer-out.c:output_symbol_p.
13999 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14000 (output_symbol_p): Move all logic to symtab.c
14001 (produce_symtab): Update.
14003 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14005 * config/s390/s390-opts.h (enum indirect_branch): Define.
14006 * config/s390/s390-protos.h (s390_return_addr_from_memory)
14007 (s390_indirect_branch_via_thunk)
14008 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14009 (enum s390_indirect_branch_type): Define.
14010 * config/s390/s390.c (struct s390_frame_layout, struct
14011 machine_function): Remove.
14012 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14013 (indirect_branch_table_label_no, indirect_branch_table_name):
14015 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14016 (enum s390_indirect_branch_option): Define.
14017 (s390_return_addr_from_memory): New function.
14018 (s390_handle_string_attribute): New function.
14019 (s390_attribute_table): Add new attribute handler.
14020 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14021 (s390_indirect_branch_via_thunk): New function.
14022 (s390_indirect_branch_via_inline_thunk): New function.
14023 (s390_function_ok_for_sibcall): When jumping via thunk disallow
14024 sibling call optimization for non z10 compiles.
14025 (s390_emit_call): Force indirect branch target to be a single
14026 register. Add r1 clobber for non-z10 compiles.
14027 (s390_emit_epilogue): Emit return jump via return_use expander.
14028 (s390_reorg): Handle JUMP_INSNs as execute targets.
14029 (s390_option_override_internal): Perform validity checks for the
14030 new command line options.
14031 (s390_indirect_branch_attrvalue): New function.
14032 (s390_indirect_branch_settings): New function.
14033 (s390_set_current_function): Invoke s390_indirect_branch_settings.
14034 (s390_output_indirect_thunk_function): New function.
14035 (s390_code_end): Implement target hook.
14036 (s390_case_values_threshold): Implement target hook.
14037 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14039 * config/s390/s390.h (struct s390_frame_layout)
14040 (struct machine_function): Move here from s390.c.
14041 (TARGET_INDIRECT_BRANCH_NOBP_RET)
14042 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14043 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14044 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14045 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14046 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14047 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14048 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14049 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14050 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14051 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14052 (mnemonic attribute): Add values which aren't recognized
14054 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14055 pattern for branch conversion. Fix mnemonic attribute.
14056 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14057 indirect branch via thunk if requested.
14058 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14059 ("*indirect_jump"): Disable for branch conversion using out of
14061 ("indirect_jump_via_thunk<mode>_z10")
14062 ("indirect_jump_via_thunk<mode>")
14063 ("indirect_jump_via_inlinethunk<mode>_z10")
14064 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14065 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14066 ("casesi_jump_via_inlinethunk<mode>_z10")
14067 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14068 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14069 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14070 ("*indirect2_jump"): Disable for branch conversion.
14071 ("casesi_jump"): Turn into expander and expand patterns for branch
14073 ("return_use"): New expander.
14074 ("*return"): Emit return via thunk and rename it to ...
14075 ("*return<mode>"): ... this one.
14076 * config/s390/s390.opt: Add new options and and enum for the
14079 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14081 * lra-constraints.c (match_reload): Unconditionally use
14082 gen_lowpart_SUBREG, rather than selecting between that
14083 and equivalent gen_rtx_SUBREG code.
14085 2018-02-08 Richard Biener <rguenther@suse.de>
14087 PR tree-optimization/84233
14088 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14089 changed flag instead of boguously re-using phi_inserted.
14091 2018-02-08 Martin Jambor <mjambor@suse.cz>
14093 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14094 static local variables.
14096 2018-02-08 Richard Biener <rguenther@suse.de>
14098 PR tree-optimization/84278
14099 * tree-vect-stmts.c (vectorizable_store): When looking for
14100 smaller vector types to perform grouped strided loads/stores
14101 make sure the mode is supported by the target.
14102 (vectorizable_load): Likewise.
14104 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14106 * config/aarch64/aarch64.c (aarch64_components_for_bb):
14107 Increase LDP/STP opportunities by adding adjacent callee-saves.
14109 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14111 PR rtl-optimization/84068
14112 PR rtl-optimization/83459
14113 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14115 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
14117 PR tree-optimization/84224
14118 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14119 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14120 non-zero arguments.
14122 2018-02-07 Iain Sandoe <iain@codesourcery.com>
14125 * config/rs6000/altivec.md (*restore_world): Remove LR use.
14126 * config/rs6000/predicates.md (restore_world_operation): Adjust op
14127 count, remove one USE.
14129 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
14131 * doc/install.texi (Configuration): Document the
14132 --with-long-double-format={ibm,ieee} PowerPC configuration
14136 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14137 Convert from define_expand to be define_insn_and_split. Rework
14138 float/double/_Float128 conversions to QI/HI/SImode to work with
14139 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
14140 conversions to QI/HImode types did a store and then a load to
14141 truncate the value. For conversions to VSX registers, don't split
14142 the insn, instead emit the code directly. Use the code iterator
14143 any_fix to combine signed and unsigned conversions.
14144 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14145 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14146 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14147 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14148 (fix_<mode>di2_hw): Likewise.
14149 (fixuns_<mode>di2_hw): Likewise.
14150 (fix_<mode>si2_hw): Likewise.
14151 (fixuns_<mode>si2_hw): Likewise.
14152 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14153 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14154 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14155 fix<uns>_trunc<SFDF:mode>si2_p8.
14156 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14157 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14158 (fix<uns>_<mode>_mem): Likewise.
14159 (fctiw<u>z_<mode>_mem): Likewise.
14160 (fix<uns>_<mode>_mem): Likewise.
14161 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14162 the register allocator from doing a direct move to the GPRs to do
14163 a store, and instead use the ISA 3.0 store byte/half-word from
14164 vector register instruction. For IEEE 128-bit floating point,
14165 also optimize stores of 32-bit ints.
14166 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14168 2018-02-07 Alan Hayward <alan.hayward@arm.com>
14170 * genextract.c (push_pathstr_operand): New function to support
14172 (walk_rtx): Call push_pathstr_operand.
14173 (print_path): Support [a-zA-Z].
14175 2018-02-07 Richard Biener <rguenther@suse.de>
14177 PR tree-optimization/84037
14178 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14179 (cse_and_gimplify_to_preheader): Declare.
14180 (vect_get_place_in_interleaving_chain): Likewise.
14181 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14183 (_loop_vec_info::~_loop_vec_info): Delete it.
14184 (cse_and_gimplify_to_preheader): New function.
14185 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14186 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14187 (vectorizable_load): Likewise. For grouped stores always base
14188 the IV on the first element.
14189 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14190 condition before gimplifying.
14192 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14194 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14195 *DIV_EXPR and *MOD_EXPR.
14197 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
14200 * config/i386/i386.c (ix86_option_override_internal): Mask out
14201 the CF_SET bit when checking -fcf-protection.
14203 2018-02-07 Tom de Vries <tom@codesourcery.com>
14206 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14209 2018-02-07 Richard Biener <rguenther@suse.de>
14211 PR tree-optimization/84204
14212 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14215 PR tree-optimization/84205
14216 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14217 special-case isl_ast_op_zdiv_r.
14219 PR tree-optimization/84223
14220 * graphite-scop-detection.c (gather_bbs::before_dom_children):
14221 Only add conditions from within the region.
14222 (gather_bbs::after_dom_children): Adjust.
14224 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
14227 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14228 * config/avr/avr.md: Only post-reload split REG-REG moves if
14229 either register is GENERAL_REG_P.
14231 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14233 PR tree-optimization/84235
14234 * tree-ssa-scopedtables.c
14235 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14236 if the subtraction is performed in floating point type where NaNs are
14237 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14238 build 1. Formatting fix.
14240 2018-02-06 Jakub Jelinek <jakub@redhat.com>
14243 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14244 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14245 and skip it regardless of bb boundaries. Use CALL_P macro,
14246 don't test INSN_P (insn) together with CALL_P or JUMP_P check
14247 unnecessarily, formatting fix.
14249 2018-02-06 Michael Collison <michael.collison@arm.com>
14251 * config/arm/thumb2.md:
14252 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14253 (*thumb_mov_notscc): Ditto.
14255 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
14258 * config/rs6000/rs6000.md (su code attribute): Use "u" for
14259 unsigned_fix, not "s".
14261 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14263 * configure.ac (gcc_fn_eh_frame_ro): New function.
14264 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14265 correct .eh_frame permissions.
14266 * configure: Regenerate.
14268 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
14270 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14271 irrelevant options.
14273 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14275 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14276 Display warning message for -mno-speculate-indirect-jumps.
14278 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
14280 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14282 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14284 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
14286 PR tree-optimization/84225
14287 * tree-eh.c (find_trapping_overflow): Only call
14288 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14290 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14293 * config/i386/i386.c: Reimplement the check of possible options
14294 -mibt/-mshstk conbination. Change error messages.
14295 * doc/invoke.texi: Fix a typo: remove extra '='.
14297 2018-02-06 Marek Polacek <polacek@redhat.com>
14299 PR tree-optimization/84228
14300 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14302 2018-02-06 Tamar Christina <tamar.christina@arm.com>
14305 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14306 emitted arch directives.
14307 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14308 __ARM_FEATURE_COPROC before changing architectures.
14310 2018-02-06 Richard Biener <rguenther@suse.de>
14312 * config/i386/i386.c (print_reg): Fix typo.
14313 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14315 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
14317 * configure: Regenerate.
14319 2018-02-05 Martin Sebor <msebor@redhat.com>
14321 PR tree-optimization/83369
14322 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14325 2018-02-05 Martin Liska <mliska@suse.cz>
14327 * doc/invoke.texi: Cherry-pick upstream r323995.
14329 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
14331 * ira.c (ira_init_register_move_cost): Adjust comment.
14333 2018-02-05 Martin Liska <mliska@suse.cz>
14335 PR gcov-profile/84137
14336 * doc/gcov.texi: Fix typo in documentation.
14338 2018-02-05 Martin Liska <mliska@suse.cz>
14340 PR gcov-profile/83879
14341 * doc/gcov.texi: Document necessity of --dynamic-list-data when
14342 using dlopen functionality.
14344 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
14346 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14347 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14348 _mm_maskz_range_ss, _mm_mask_range_round_ss,
14349 _mm_maskz_range_round_ss): New intrinsics.
14350 (__builtin_ia32_rangesd128_round)
14351 (__builtin_ia32_rangess128_round): Remove.
14352 (__builtin_ia32_rangesd128_mask_round,
14353 __builtin_ia32_rangess128_mask_round): New builtins.
14354 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14355 __builtin_ia32_rangess128_round): Remove.
14356 (__builtin_ia32_rangesd128_mask_round,
14357 __builtin_ia32_rangess128_mask_round): New builtins.
14358 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14359 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14360 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14361 "<round_saeonly_constraint>")): Changed to ...
14362 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14363 "<round_saeonly_scalar_constraint>")): ... this.
14364 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14365 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14366 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14367 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14368 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14370 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
14372 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14374 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14375 Remove all values except native, 8540 and 8548.
14377 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
14379 * config/i386/i386.c (ix86_output_function_return): Pass
14380 INVALID_REGNUM, instead of -1, as invalid register number to
14381 indirect_thunk_name and output_indirect_thunk.
14383 2018-02-02 Julia Koval <julia.koval@intel.com>
14385 * config.gcc: Add -march=icelake.
14386 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14387 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14388 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14389 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14390 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14391 (processor_target_table): Add icelake.
14392 (ix86_option_override_internal): Handle new PTAs.
14393 (get_builtin_code_for_version): Handle icelake.
14394 (M_INTEL_COREI7_ICELAKE): New.
14395 (fold_builtin_cpu): Handle icelake.
14396 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14397 * doc/invoke.texi: Add -march=icelake.
14399 2018-02-02 Julia Koval <julia.koval@intel.com>
14401 * config/i386/i386.c (ix86_option_override_internal): Change flags type
14402 to wide_int_bitmask.
14403 * wide-int-bitmask.h: New.
14405 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14408 * config/i386/i386.md: Replace Pmode with word_mode in
14409 builtin_setjmp_setup and builtin_longjmp to support x32.
14411 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
14415 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14417 (rs6000_supported_cpu_names): New static variable.
14418 (linux_cpu_translation_table): Likewise.
14419 (elf_platform) <cpu>: Define new static variable and use it.
14420 Translate kernel AT_PLATFORM name to canonical name if needed.
14421 Error if platform name is unknown.
14423 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
14426 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14428 2018-02-01 Jeff Law <law@redhat.com>
14431 * config/i386/i386.c (release_scratch_register_on_entry): Add new
14432 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
14433 the scratch if RELEASE_VIA_POP is false.
14434 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14435 If we have to save a temporary register, decrement SIZE appropriately.
14436 Pass new arguments to release_scratch_register_on_entry.
14437 (ix86_adjust_stack_and_probe): Likewise.
14438 (ix86_emit_probe_stack_range): Pass new arguments to
14439 release_scratch_register_on_entry.
14441 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
14443 PR rtl-optimization/84157
14444 * combine.c (change_zero_ext): Use REG_P predicate in
14445 front of HARD_REGISTER_P predicate.
14447 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
14449 * config/avr/avr.c (avr_option_override): Move disabling of
14450 -fdelete-null-pointer-checks to...
14451 * common/config/avr/avr-common.c (avr_option_optimization_table):
14454 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14456 PR tree-optimization/81635
14457 * tree-data-ref.c (split_constant_offset_1): For types that
14458 wrap on overflow, try to use range info to prove that wrapping
14461 2018-02-01 Renlin Li <renlin.li@arm.com>
14464 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14465 TAILCALL_ADDR_REGS.
14466 (aarch64_register_move_cost): Likewise.
14467 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14468 TAILCALL_ADDR_REGS.
14469 (REG_CLASS_NAMES): Likewise.
14470 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14471 TAILCALL_ADDR_REGS. Remove IP registers.
14472 * config/aarch64/aarch64.md (Ucs): Update register constraint.
14474 2018-02-01 Richard Biener <rguenther@suse.de>
14476 * domwalk.h (dom_walker::dom_walker): Add additional constructor
14477 for specifying RPO order and allow NULL for that.
14478 * domwalk.c (dom_walker::dom_walker): Likewise.
14479 (dom_walker::walk): Handle NULL RPO order.
14480 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14482 (rewrite_update_dom_walker): Likewise.
14483 (mark_def_dom_walker): Likewise.
14485 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14487 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14488 (aarch64_maybe_expand_sve_subreg_move): Declare.
14489 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14490 * config/aarch64/predicates.md (aarch64_any_register_operand): New
14492 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14493 that are semantically a reverse operation.
14494 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14495 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14496 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14498 (aarch64_can_change_mode_class): For big-endian, forbid changes
14499 between two SVE modes if they have different element sizes.
14501 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14503 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14504 the TImode handling for big-endian targets.
14506 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14508 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14509 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
14511 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14512 Remove BSWAP handing for big-endian targets and use the form of
14513 LD1RQ appropariate for the mode.
14515 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14517 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14518 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14519 duplicated element.
14521 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14524 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14525 check for operands that need to go through aarch64_sve_reload_be.
14527 2018-02-01 Jakub Jelinek <jakub@redhat.com>
14529 PR tree-optimization/81661
14530 PR tree-optimization/84117
14531 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14532 * tree-eh.c: Include gimplify.h.
14533 (find_trapping_overflow, replace_trapping_overflow,
14534 rewrite_to_non_trapping_overflow): New functions.
14535 * tree-vect-loop.c: Include tree-eh.h.
14536 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14537 * tree-data-ref.c: Include tree-eh.h.
14538 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14540 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
14542 PR rtl-optimization/84123
14543 * combine.c (change_zero_ext): Check if hard register satisfies
14544 can_change_dest_mode before calling gen_lowpart_SUBREG.
14546 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
14549 * ira.c (ira_init_register_move_cost): Remove assert.
14551 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14553 PR rtl-optimization/84071
14554 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14555 * doc/tm.texi: Regenerate.
14557 2018-01-31 Richard Biener <rguenther@suse.de>
14559 PR tree-optimization/84132
14560 * tree-data-ref.c (analyze_miv_subscript): Properly
14561 check whether evolution_function_is_affine_multivariate_p
14562 before calling gcd_of_steps_may_divide_p.
14564 2018-01-31 Julia Koval <julia.koval@intel.com>
14567 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14568 * config/i386/i386.md (rdpid_rex64) New.
14569 (rdpid): Make 32bit only.
14571 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
14574 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14575 an IDENTIFIER_NODE for FUNCTION_TYPE's.
14577 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14580 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14582 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14584 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14586 PR rtl-optimization/84071
14587 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14588 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14590 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14592 * config/arc/arc.c (arc_handle_aux_attribute): New function.
14593 (arc_attribute_table): Add 'aux' attribute.
14594 (arc_in_small_data_p): Consider aux like variables.
14595 (arc_is_aux_reg_p): New function.
14596 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14597 (arc_get_aux_arg): New function.
14598 (prepare_move_operands): Handle aux-register access.
14599 (arc_handle_aux_attribute): New function.
14600 * doc/extend.texi (ARC Variable attributes): Add subsection.
14602 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14604 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14605 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14606 (arc_attribute_table): Add 'uncached' attribute.
14607 (arc_print_operand): Print '.di' flag for uncached memory
14609 (arc_in_small_data_p): Do not consider for small data the uncached
14611 (arc_is_uncached_mem_p): New function.
14612 * config/arc/predicates.md (compact_store_memory_operand): Check
14613 for uncached memory accesses.
14614 (nonvol_nonimm_operand): Likewise.
14615 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
14617 2018-01-31 Jakub Jelinek <jakub@redhat.com>
14620 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14621 falign-loops=): Add Optimization flag.
14623 2018-01-30 Jeff Law <law@redhat.com>
14626 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14627 INT_REGISTERS_SAVED. Check it prior to calling
14628 get_scratch_register_on_entry.
14629 (ix86_adjust_stack_and_probe): Similarly.
14630 (ix86_emit_probe_stack_range): Similarly.
14631 (ix86_expand_prologue): Corresponding changes.
14633 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14636 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14637 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14639 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
14642 * lra-constraints.c (curr_insn_transform): Process AND in the
14645 2018-01-30 Jakub Jelinek <jakub@redhat.com>
14647 PR rtl-optimization/83986
14648 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14649 dependence against last_pending_memory_flush in addition to
14650 pending_jump_insns.
14652 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
14654 PR tree-optimization/81611
14655 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14658 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14661 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14664 2018-01-30 Richard Biener <rguenther@suse.de>
14665 Jakub Jelinek <jakub@redhat.com>
14667 PR tree-optimization/84111
14668 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14669 inner loops added during recursion, as they don't have up-to-date
14672 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14675 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14676 (can_inline_edge_by_limits_p): ... here.
14677 (can_early_inline_edge_p, check_callers,
14678 update_caller_keys, update_callee_keys, recursive_inlining,
14679 add_new_edges_to_heap, speculation_useful_p,
14680 inline_small_functions,
14681 inline_small_functions, flatten_function,
14682 inline_to_all_callers_1): Update.
14684 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14686 * profile-count.c (profile_count::combine_with_ipa_count): Handle
14689 2018-01-30 Richard Biener <rguenther@suse.de>
14691 PR tree-optimization/83008
14692 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14693 invariant and constant vector uses in stmts when they need
14694 more than one stmt.
14696 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14699 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14700 * configure: Regenerate.
14702 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14704 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14706 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14707 Use gen_rtx_REG rather than gen_lowpart.
14709 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14711 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14712 rather than 0 when creating partial subregs.
14714 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14716 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14719 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
14722 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14723 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14724 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14725 flags. This restores the settings used before the 2017-07-24.
14726 Turning off pre increment/decrement/modify allows IVOPTS to
14727 optimize DF/SF loops where the index is an int.
14729 2018-01-29 Richard Biener <rguenther@suse.de>
14730 Kelvin Nilsen <kelvin@gcc.gnu.org>
14733 * tree-vect-stmts.c (vectorizable_call): Don't call
14734 targetm.vectorize_builtin_md_vectorized_function if callee is
14737 2018-01-22 Carl Love <cel@us.ibm.com>
14739 * doc/extend.tex: Fix typo in second arg in
14740 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14742 2018-01-29 Richard Biener <rguenther@suse.de>
14744 PR tree-optimization/84086
14745 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14746 (flush_ssaname_freelist): When SSA names were released reset
14747 the SCEV hash table.
14749 2018-01-29 Richard Biener <rguenther@suse.de>
14751 PR tree-optimization/84057
14752 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
14753 removed paths when removing edges.
14755 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
14757 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
14758 -mfunction-return=@var{choice}.
14760 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
14762 PR diagnostic/84034
14763 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
14764 Handle CR like TAB.
14765 (layout::print_source_line): Likewise.
14766 (test_get_line_width_without_trailing_whitespace): Add test cases.
14768 2018-01-27 Jakub Jelinek <jakub@redhat.com>
14770 PR middle-end/84040
14771 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
14774 2018-01-26 Jim Wilson <jimw@sifive.com>
14776 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
14778 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
14781 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14783 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
14784 and CMP + SUB-immediate -> SUBS.
14786 2018-01-26 Martin Sebor <msebor@redhat.com>
14788 PR tree-optimization/83896
14789 * tree-ssa-strlen.c (get_string_len): Rename...
14790 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
14791 Avoid assuming length is constant.
14792 (handle_char_store): Use HOST_WIDE_INT for string length.
14794 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
14797 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
14798 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
14800 2018-01-26 Richard Biener <rguenther@suse.de>
14802 PR rtl-optimization/84003
14803 * dse.c (record_store): Only record redundant stores when
14804 the earlier store aliases at least all accesses the later one does.
14806 2018-01-26 Jakub Jelinek <jakub@redhat.com>
14808 PR rtl-optimization/83985
14809 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
14810 REG_CFA_RESTORE insns.
14811 (delete_unmarked_insns): Don't ignore separate shrink wrapping
14812 REG_CFA_RESTORE insns here.
14815 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
14816 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
14818 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14820 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
14821 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
14822 (arc_init): Likewise.
14823 (arc_override_options): Likewise.
14824 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
14826 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
14828 * config/arc/arc.h (TARGET_DBNZ): Define.
14829 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
14830 properly set the tune attribute.
14831 (dbnz): Use TARGET_DBNZ guard.
14832 * config/arc/arc.opt (mtune): Add core3 option.
14834 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14836 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
14837 recognize new pic like addresses.
14838 (arc_delegitimize_address): Clean up.
14840 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14842 * config/arc/arc-arches.def: Option mrf16 valid for all
14844 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
14845 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
14846 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
14847 * config/arc/arc-tables.opt: Regenerate.
14848 * config/arc/arc.c (arc_conditional_register_usage): Handle
14849 reduced register file case.
14850 (arc_file_start): Set must have build attributes.
14851 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
14852 mrf16 option value.
14853 * config/arc/arc.opt (mrf16): Add new option.
14854 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
14855 * config/arc/genmultilib.awk: Handle new mrf16 option.
14856 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
14857 * config/arc/t-multilib: Regenerate.
14858 * doc/invoke.texi (ARC Options): Document mrf16 option.
14860 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14862 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
14863 * config/arc/arc.c (arc_handle_secure_attribute): New function.
14864 (arc_attribute_table): Add 'secure_call' attribute.
14865 (arc_print_operand): Print secure call operand.
14866 (arc_function_ok_for_sibcall): Don't optimize tail calls when
14868 (arc_is_secure_call_p): New function. * config/arc/arc.md
14869 (call_i): Add support for sjli instruction.
14870 (call_value_i): Likewise.
14871 * config/arc/constraints.md (Csc): New constraint.
14873 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14874 John Eric Martin <John.Martin@emmicro-us.com>
14876 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
14877 * config/arc/arc.c (_arc_jli_section): New struct.
14878 (arc_jli_section): New type.
14879 (rc_jli_sections): New static variable.
14880 (arc_handle_jli_attribute): New function.
14881 (arc_attribute_table): Add jli_always and jli_fixed attribute.
14882 (arc_file_end): New function.
14883 (TARGET_ASM_FILE_END): Define.
14884 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
14885 (arc_add_jli_section): New function.
14886 (jli_call_scan): Likewise.
14887 (arc_reorg): Call jli_call_scan.
14888 (arc_output_addsi): Remove 'S' from printing asm operand.
14889 (arc_is_jli_call_p): New function.
14890 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
14892 (movhi_insn): Likewise.
14893 (movsi_insn): Likewise.
14894 (movsi_set_cc_insn): Likewise.
14895 (loadqi_update): Likewise.
14896 (load_zeroextendqisi_update): Likewise.
14897 (load_signextendqisi_update): Likewise.
14898 (loadhi_update): Likewise.
14899 (load_zeroextendhisi_update): Likewise.
14900 (load_signextendhisi_update): Likewise.
14901 (loadsi_update): Likewise.
14902 (loadsf_update): Likewise.
14903 (movsicc_insn): Likewise.
14904 (bset_insn): Likewise.
14905 (bxor_insn): Likewise.
14906 (bclr_insn): Likewise.
14907 (bmsk_insn): Likewise.
14908 (bicsi3_insn): Likewise.
14909 (cmpsi_cc_c_insn): Likewise.
14910 (movsi_ne): Likewise.
14911 (movsi_cond_exec): Likewise.
14912 (clrsbsi2): Likewise.
14913 (norm_f): Likewise.
14923 (call_i): Remove 'S' asm letter, add jli instruction.
14924 (call_value_i): Likewise.
14925 * config/arc/arc.op (mjli-always): New option.
14926 * config/arc/constraints.md (Cji): New constraint.
14927 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
14929 (subsf3_fpx): Likewise.
14930 (mulsf3_fpx): Likewise.
14931 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
14933 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
14934 function attrbutes.
14935 * doc/invoke.texi (ARC): Document mjli-always option.
14937 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
14939 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
14940 avoid addition with 0 and use incw and decw where possible.
14942 2018-01-26 Richard Biener <rguenther@suse.de>
14944 PR tree-optimization/81082
14945 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
14946 association if it requires casting to unsigned.
14947 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
14948 from fold_plusminus_mult_expr to catch important cases late when
14949 range info is available.
14951 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14953 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
14954 * configure.ac (hidden_linkonce): New test.
14955 * configure: Regenerate.
14956 * config.in: Regenerate.
14958 2018-01-26 Julia Koval <julia.koval@intel.com>
14960 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
14961 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
14962 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
14963 _mm_mask_bitshuffle_epi64_mask): Fix type.
14964 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
14965 USI_FTYPE_V4DI_V4DI_USI): Remove.
14966 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
14967 __builtin_ia32_vpshufbitqmb256_mask,
14968 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
14969 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
14970 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
14972 2018-01-26 Alan Modra <amodra@gmail.com>
14975 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
14976 UNSPEC_VBPERMQ. Sort other unspecs.
14978 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
14980 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
14982 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
14984 PR middle-end/83055
14985 * predict.c (drop_profile): Do not push/pop cfun; update also
14987 (handle_missing_profiles): Fix logic looking for zero profiles.
14989 2018-01-25 Jakub Jelinek <jakub@redhat.com>
14991 PR middle-end/83977
14992 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
14993 on functions with #pragma omp declare simd or functions with simd
14995 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
14996 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
14997 Remove trailing \n from warning_at calls.
14999 2018-01-25 Tom de Vries <tom@codesourcery.com>
15002 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15003 for neutered workers.
15005 2018-01-24 Joseph Myers <joseph@codesourcery.com>
15008 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15009 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15011 2018-01-24 Jeff Law <law@redhat.com>
15014 * i386.c (get_probe_interval): Move to earlier point.
15015 (ix86_compute_frame_layout): If -fstack-clash-protection and
15016 the frame is larger than the probe interval, then use pushes
15017 to save registers rather than reg->mem moves.
15018 (ix86_expand_prologue): Remove conditional for int_registers_saved
15021 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
15024 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15025 min/max for never referenced object.
15027 2018-01-24 Jakub Jelinek <jakub@redhat.com>
15029 PR middle-end/83977
15030 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15032 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15033 attributes from DECL_ATTRIBUTES (decl) without affecting
15034 DECL_ATTRIBUTES (current_function_decl).
15035 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15036 functions with non-NULL DECL_ABSTRACT_ORIGIN.
15038 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
15040 PR tree-optimization/83979
15041 * fold-const.c (fold_comparison): Use constant_boolean_node
15042 instead of boolean_{true,false}_node.
15044 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
15046 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15049 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15051 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15052 Simplify the clause that sets the length attribute.
15053 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15054 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15055 clause that sets the length attribute.
15056 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15058 2018-01-24 Tom de Vries <tom@codesourcery.com>
15061 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15062 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15063 Add strict parameter.
15064 (prevent_branch_around_nothing): Insert dummy insn between branch to
15065 label and label with no ptx insn inbetween.
15066 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15068 2018-01-24 Tom de Vries <tom@codesourcery.com>
15071 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15072 for neutered threads in warp.
15073 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15075 2018-01-24 Richard Biener <rguenther@suse.de>
15077 PR tree-optimization/83176
15078 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15081 2018-01-24 Richard Biener <rguenther@suse.de>
15083 PR tree-optimization/82819
15084 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15085 code generating pluses that are no-ops in the target precision.
15087 2018-01-24 Richard Biener <rguenther@suse.de>
15089 PR middle-end/84000
15090 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15092 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15094 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15095 to merge probabilities.
15096 * predict.c (probably_never_executed): Also mark as cold functions
15097 with global 0 profile and guessed local profile.
15098 * profile-count.c (profile_probability::combine_with_count): New
15100 * profile-count.h (profile_probability::operator*,
15101 profile_probability::operator*=, profile_probability::operator/,
15102 profile_probability::operator/=): Reduce precision to adjusted
15103 and set value to guessed on contradictory divisions.
15104 (profile_probability::combine_with_freq): Remove.
15105 (profile_probability::combine_wiht_count): Declare.
15106 (profile_count::force_nonzero):: Set to adjusted.
15107 (profile_count::probability_in):: Set quality to adjusted.
15108 * tree-ssa-tail-merge.c (replace_block_by): Use
15109 combine_with_count.
15111 2018-01-23 Andrew Waterman <andrew@sifive.com>
15112 Jim Wilson <jimw@sifive.com>
15114 * config/riscv/riscv.c (riscv_stack_boundary): New.
15115 (riscv_option_override): Set riscv_stack_boundary. Handle
15116 riscv_preferred_stack_boundary_arg.
15117 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15118 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15119 (STACK_BOUNDARY): Set to riscv_stack_boundary.
15120 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15121 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15122 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15124 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
15127 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15128 of struct ix86_frame.
15129 (ix86_expand_epilogue): Likewise. Add a local variable for
15130 the reg_save_offset field in struct ix86_frame.
15132 2018-01-23 Bin Cheng <bin.cheng@arm.com>
15134 PR tree-optimization/82604
15135 * tree-loop-distribution.c (enum partition_kind): New enum item
15136 PKIND_PARTIAL_MEMSET.
15137 (partition_builtin_p): Support above new enum item.
15138 (generate_code_for_partition): Ditto.
15139 (compute_access_range): Differentiate cases that equality can be
15140 proven at all loops, the innermost loops or no loops.
15141 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15142 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
15143 (finalize_partitions, distribute_loop): Don't fuse partition of
15144 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15145 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15146 parloop is enabled.
15148 2018-01-23 Martin Liska <mliska@suse.cz>
15150 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15151 order to ignore the predictor.
15152 (PRED_POLYMORPHIC_CALL): Likewise.
15153 (PRED_RECURSIVE_CALL): Likewise.
15155 2018-01-23 Martin Liska <mliska@suse.cz>
15157 * tree-profile.c (tree_profiling): Print function header to
15158 aware reader which function we are working on.
15159 * value-prof.c (gimple_find_values_to_profile): Do not print
15160 not interesting value histograms.
15162 2018-01-23 Martin Liska <mliska@suse.cz>
15164 * profile-count.h (enum profile_quality): Add
15165 profile_uninitialized as the first value. Do not number values
15166 as they are zero based.
15167 (profile_count::verify): Update sanity check.
15168 (profile_probability::verify): Likewise.
15170 2018-01-23 Nathan Sidwell <nathan@acm.org>
15172 * doc/invoke.texi (ffor-scope): Deprecate.
15174 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15176 PR tree-optimization/83510
15177 * domwalk.c (set_all_edges_as_executable): New function.
15178 (dom_walker::dom_walker): Convert bool param
15179 "skip_unreachable_blocks" to enum reachability. Move setup of
15180 edge flags to set_all_edges_as_executable and only do it when
15181 reachability is REACHABLE_BLOCKS.
15182 * domwalk.h (enum dom_walker::reachability): New enum.
15183 (dom_walker::dom_walker): Convert bool param
15184 "skip_unreachable_blocks" to enum reachability.
15185 (set_all_edges_as_executable): New decl.
15186 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
15187 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15189 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15190 but converting true to REACHABLE_BLOCKS.
15191 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15193 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15194 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15195 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15197 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15198 if check_all_array_refs will be called.
15200 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15202 * tree.c (selftest::test_location_wrappers): Add more test
15205 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15207 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15208 (selftest::test_bit_in_range): Likewise.
15210 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15213 * doc/sourcebuild.texi (vect_float): Say that the selector
15214 only describes the situation when -funsafe-math-optimizations is on.
15215 (vect_float_strict): Document.
15217 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15219 PR tree-optimization/83965
15220 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15221 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15222 instead of checking only for a reduction.
15223 (vect_recog_widen_sum_pattern): Likewise.
15225 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15227 * predict.c (probably_never_executed): Only use precise profile info.
15228 (compute_function_frequency): Skip after inlining hack since we now
15229 have quality checking.
15231 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15233 * profile-count.h (profile_probability::very_unlikely,
15234 profile_probability::unlikely, profile_probability::even): Set
15235 precision to guessed.
15237 2018-01-23 Richard Biener <rguenther@suse.de>
15239 PR tree-optimization/83963
15240 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15241 Properly terminate dominator walk when crossing the exit edge not
15242 when visiting its source block.
15244 2018-01-23 Jakub Jelinek <jakub@redhat.com>
15247 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15248 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15250 2018-01-22 Jakub Jelinek <jakub@redhat.com>
15252 PR tree-optimization/83957
15253 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
15254 semicolon after for body surrounded by braces.
15256 PR tree-optimization/83081
15257 * profile-count.h (profile_probability::split): New method.
15258 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15259 Use profile_probability::split.
15260 (do_compare_rtx_and_jump): Fix adjustment of probabilities
15261 when splitting a single conditional jump into 2.
15263 2018-01-22 David Malcolm <dmalcolm@redhat.com>
15265 PR tree-optimization/69452
15266 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15269 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15271 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15272 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15273 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15275 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15277 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15279 * config/rl78/rl78.md (movdi): New define_expand.
15280 * config/rl78/rl78.c (rl78_split_movdi): New function.
15282 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
15285 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15287 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15288 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15289 128-bit to produce an UNSPEC move to get the double word with the
15290 signbit and then a shift directly to do signbit.
15291 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15292 implementation with a new version that just does either a direct
15293 move or a regular move. Move memory interface to separate insns.
15294 Move insns so they are next to the expander.
15295 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15296 with signbit move. Split big and little endian case.
15297 (signbit<mode>2_dm_mem_le): Likewise.
15298 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15299 (signbit<mode>2_dm2): Likewise.
15301 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15303 * config/rl78/rl78.md (anddi3): New define_expand.
15305 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15307 * config/rl78/rl78.md (umindi3): New define_expand.
15309 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15311 * config/rl78/rl78.md (smindi3): New define_expand.
15313 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15315 * config/rl78/rl78.md (smaxdi3): New define_expand.
15317 2018-01-22 Carl Love <cel@us.ibm.com>
15319 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15320 LVX_V1TI): Add macro expansion.
15321 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15322 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15323 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15324 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15325 Change check to determine if the instruction is a byte reversing
15326 entry. Fix typo in comment.
15327 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15328 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15329 Add def_builtin calls for new builtins.
15330 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15331 Add define_insn expansion.
15333 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15335 * config/rl78/rl78.md (umaxdi3): New define_expand.
15337 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15339 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15340 for non-QImode registers.
15342 2018-01-22 Richard Biener <rguenther@suse.de>
15344 PR tree-optimization/83963
15345 * graphite-scop-detection.c (scop_detection::get_sese): Delay
15346 including the loop exit block.
15347 (scop_detection::merge_sese): Likewise.
15348 (scop_detection::add_scop): Do it here instead.
15350 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15352 * doc/sourcebuild.texi (arm_softfloat): Document.
15354 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
15357 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15358 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15359 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15361 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15362 David Edelsohn <dje.gcc@gmail.com>
15365 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15366 Change "crset eq" to "crset 2".
15367 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15368 (*call_indirect_aix<mode>_nospec): Likewise.
15369 (*call_value_indirect_aix<mode>_nospec): Likewise.
15370 (*call_indirect_elfv2<mode>_nospec): Likewise.
15371 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15372 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15373 change assembly output from . to $.
15374 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15375 (indirect_jump<mode>_nospec): Change assembly output from . to $.
15376 (*tablejump<mode>_internal1_nospec): Likewise.
15378 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
15381 * config/sh/sh_optimize_sett_clrt.cc:
15382 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15384 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
15386 PR tree-optimization/83940
15387 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15388 offset_dt to vect_constant_def rather than vect_unknown_def_type.
15389 (vect_check_load_store_mask): Add a mask_dt_out parameter and
15390 use it to pass back the definition type.
15391 (vect_check_store_rhs): Likewise rhs_dt_out.
15392 (vect_build_gather_load_calls): Add a mask_dt argument and use
15393 it instead of a call to vect_is_simple_use.
15394 (vectorizable_store): Update calls to vect_check_load_store_mask
15395 and vect_check_store_rhs. Use the dt returned by the latter instead
15396 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
15397 instead of calls to vect_is_simple_use. Pass the scalar rather
15398 than the vector operand to vect_is_simple_use when handling
15399 second and subsequent copies of an rhs value.
15400 (vectorizable_load): Update calls to vect_check_load_store_mask
15401 and vect_build_gather_load_calls. Use the cached mask_dt and
15402 gs_info.offset_dt instead of calls to vect_is_simple_use.
15404 2018-01-20 Jakub Jelinek <jakub@redhat.com>
15406 PR middle-end/83945
15407 * tree-emutls.c: Include gimplify.h.
15408 (lower_emutls_2): New function.
15409 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15410 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15411 it before further processing.
15414 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15415 UINTVAL (trueop1) instead of INTVAL (op1).
15417 2018-01-19 Jakub Jelinek <jakub@redhat.com>
15421 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15422 INCOMING_FRAME_SP_OFFSET if not defined.
15423 (scan_trace): Add ENTRY argument. If true and
15424 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15425 emit a note to adjust the CFA offset.
15426 (create_cfi_notes): Adjust scan_trace callers.
15427 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15428 INCOMING_FRAME_SP_OFFSET in the CIE.
15429 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15430 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15432 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15433 * doc/tm.texi: Regenerated.
15435 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15437 PR rtl-optimization/83147
15438 * lra-constraints.c (remove_inheritance_pseudos): Use
15439 lra_substitute_pseudo_within_insn.
15441 2018-01-19 Tom de Vries <tom@codesourcery.com>
15442 Cesar Philippidis <cesar@codesourcery.com>
15445 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15447 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
15450 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15451 spaces for function labels.
15453 2018-01-19 Martin Liska <mliska@suse.cz>
15455 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15456 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15457 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15458 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15459 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15460 (PRED_CONST_RETURN): Change from 69 to 65.
15461 (PRED_NULL_RETURN): Change from 91 to 71.
15462 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15463 (PRED_LOOP_GUARD): Change from 66 to 73.
15465 2018-01-19 Martin Liska <mliska@suse.cz>
15467 * predict.c (predict_insn_def): Add new assert.
15468 (struct branch_predictor): Change type to signed integer.
15469 (test_prediction_value_range): Amend test to cover
15470 PROB_UNINITIALIZED.
15471 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15472 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15473 (PRED_LOOP_ITERATIONS_MAX): Likewise.
15474 (PRED_LOOP_IV_COMPARE): Likewise.
15475 * predict.h (PROB_UNINITIALIZED): Define new constant.
15477 2018-01-19 Martin Liska <mliska@suse.cz>
15479 * predict.c (dump_prediction): Add new format for
15480 analyze_brprob.py script which is enabled with -details
15482 * profile-count.h (precise_p): New function.
15484 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15486 PR tree-optimization/83922
15487 * tree-vect-loop.c (vect_verify_full_masking): Return false if
15488 there are no statements that need masking.
15489 (vect_active_double_reduction_p): New function.
15490 (vect_analyze_loop_operations): Use it when handling phis that
15491 are not in the loop header.
15493 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15495 PR tree-optimization/83914
15496 * tree-vect-loop.c (vectorizable_induction): Don't convert
15497 init_expr or apply the peeling adjustment for inductions
15498 that are nested within the vectorized loop.
15500 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15502 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15505 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15509 * function.h (gimplify_parameters): Add gimple_seq * argument.
15510 * function.c: Include gimple.h and options.h.
15511 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15512 for the added local temporaries if needed.
15513 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15514 if there are any parameter cleanups, wrap whole body into a
15515 try/finally with the cleanups.
15517 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
15520 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15521 Use GET_MODE_CLASS for scalar floating point.
15523 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15527 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15528 Fix call of call_cgraph_insertion_hooks.
15530 2018-01-18 Martin Sebor <msebor@redhat.com>
15532 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15534 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15537 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15540 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
15543 * common.opt: (-ffile-prefix-map): New option.
15544 * opts.c (common_handle_option): Defer it.
15545 * opts-global.c (handle_common_deferred_options): Handle it.
15546 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15547 * file-prefix-map.h: New file.
15548 (remap_debug_filename, add_debug_prefix_map): ...here.
15549 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15550 * final.c (debug_prefix_map, add_debug_prefix_map
15551 remap_debug_filename): Move to...
15552 * file-prefix-map.c: New file.
15553 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15554 generalize, get rid of alloca(), use strrchr() instead of strchr().
15555 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15556 Implement in terms of add_prefix_map().
15557 (remap_macro_filename, remap_debug_filename): Implement in term of
15559 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15560 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15561 * dbxout.c: Include file-prefix-map.h.
15562 * varasm.c: Likewise.
15563 * vmsdbgout.c: Likewise.
15564 * xcoffout.c: Likewise.
15565 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15566 * doc/cppopts.texi (-fmacro-prefix-map): Document.
15567 * doc/invoke.texi (-ffile-prefix-map): Document.
15568 (-fdebug-prefix-map): Update description.
15570 2018-01-18 Martin Liska <mliska@suse.cz>
15572 * config/i386/i386.c (indirect_thunk_name): Document that also
15574 (output_indirect_thunk): Document why both instructions
15575 (pause and lfence) are generated.
15577 2018-01-18 Richard Biener <rguenther@suse.de>
15579 PR tree-optimization/83887
15580 * graphite-scop-detection.c
15581 (scop_detection::get_nearest_dom_with_single_entry): Remove.
15582 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15583 (scop_detection::merge_sese): Re-implement with a flood-fill
15584 algorithm that properly finds a SESE region if it exists.
15586 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15589 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15590 pointer_diff optimizations use view_convert instead of convert.
15592 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15594 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15595 Generate different code for -mno-speculate-indirect-jumps.
15596 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15597 (*call_indirect_aix<mode>): Disable for
15598 -mno-speculate-indirect-jumps.
15599 (*call_indirect_aix<mode>_nospec): New define_insn.
15600 (*call_value_indirect_aix<mode>): Disable for
15601 -mno-speculate-indirect-jumps.
15602 (*call_value_indirect_aix<mode>_nospec): New define_insn.
15603 (*sibcall_nonlocal_sysv<mode>): Generate different code for
15604 -mno-speculate-indirect-jumps.
15605 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15607 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15609 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15610 long double type, set the flags for noting the default long double
15611 type, even if we don't pass or return a long double type.
15613 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
15616 * ipa-inline.c (flatten_function): Do not overwrite final inlining
15619 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
15621 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15622 support for merge[hl].
15623 (fold_mergehl_helper): New helper function.
15624 (tree-vector-builder.h): New #include for tree_vector_builder usage.
15625 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15626 (altivec_vmrglw_direct): Add xxmrglw insn.
15628 2018-01-17 Andrew Waterman <andrew@sifive.com>
15630 * config/riscv/riscv.c (riscv_conditional_register_usage): If
15631 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15633 2018-01-17 David Malcolm <dmalcolm@redhat.com>
15636 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15637 call the lto_location_cache before reading the
15638 DECL_SOURCE_LOCATION of the types.
15640 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
15641 Richard Sandiford <richard.sandiford@linaro.org>
15643 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15644 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15645 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15646 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15647 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15649 * config/aarch64/constraints.md (aarch64_movti_operand):
15651 * config/aarch64/predicates.md (Uti): Add new constraint.
15653 2018-01-17 Carl Love <cel@us.ibm.com>
15655 * config/rs6000/vsx.md (define_expand xl_len_r,
15656 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15657 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15659 (define_expand, define_insn): Move the shift left from the
15660 define_insn to the define_expand for lxvl and stxvl instructions.
15661 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15662 and XL_LEN_R definitions to PURE.
15664 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
15666 * config/i386/i386.c (indirect_thunk_name): Declare regno
15667 as unsigned int. Compare regno with INVALID_REGNUM.
15668 (output_indirect_thunk): Ditto.
15669 (output_indirect_thunk_function): Ditto.
15670 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
15671 in the call to output_indirect_thunk_function.
15673 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
15675 PR middle-end/83884
15676 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15677 rather than the size of inner_type to determine the stack slot size
15678 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15680 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
15683 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15686 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
15688 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15689 endian Linux systems to optionally enable multilibs for selecting
15690 the long double type if the user configured an explicit type.
15691 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15692 have no long double multilibs if not defined.
15693 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15694 warn if the user used -mabi={ieee,ibm}longdouble and we built
15695 multilibs for long double.
15696 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15697 appropriate multilib option.
15698 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15700 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15701 for building long double multilibs.
15702 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15704 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
15706 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15709 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15711 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15714 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15717 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15720 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15722 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15723 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15725 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
15727 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15728 different rtl trees depending on TARGET_64BIT.
15729 (rs6000_gen_lvx): Likewise.
15731 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15733 * config/visium/visium.md (nop): Tweak comment.
15734 (hazard_nop): Likewise.
15736 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15738 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15739 -mspeculate-indirect-jumps.
15740 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15741 for -mno-speculate-indirect-jumps.
15742 (*call_indirect_elfv2<mode>_nospec): New define_insn.
15743 (*call_value_indirect_elfv2<mode>): Disable for
15744 -mno-speculate-indirect-jumps.
15745 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15746 (indirect_jump): Emit different RTL for
15747 -mno-speculate-indirect-jumps.
15748 (*indirect_jump<mode>): Disable for
15749 -mno-speculate-indirect-jumps.
15750 (*indirect_jump<mode>_nospec): New define_insn.
15751 (tablejump): Emit different RTL for
15752 -mno-speculate-indirect-jumps.
15753 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
15754 (tablejumpsi_nospec): New define_expand.
15755 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
15756 (tablejumpdi_nospec): New define_expand.
15757 (*tablejump<mode>_internal1): Disable for
15758 -mno-speculate-indirect-jumps.
15759 (*tablejump<mode>_internal1_nospec): New define_insn.
15760 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
15763 2018-01-16 Artyom Skrobov tyomitch@gmail.com
15765 * caller-save.c (insert_save): Drop unnecessary parameter. All
15768 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15769 Richard Biener <rguenth@suse.de>
15772 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
15773 return early, inline manually is_gimple_sizepos. Make sure if we
15774 call gimplify_expr we don't end up with a gimple constant.
15775 * tree.c (variably_modified_type_p): Don't return true for
15776 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
15777 * gimplify.h (is_gimple_sizepos): Remove.
15779 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15781 PR tree-optimization/83857
15782 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
15783 vectorizable_live_operation for pure SLP statements.
15784 (vectorizable_live_operation): Handle PHIs.
15786 2018-01-16 Richard Biener <rguenther@suse.de>
15788 PR tree-optimization/83867
15789 * tree-vect-stmts.c (vect_transform_stmt): Precompute
15790 nested_in_vect_loop_p since the scalar stmt may get invalidated.
15792 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15795 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
15796 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
15797 If off is not INTEGER_CST, issue a may not be aligned warning
15798 rather than isn't aligned. Use isn%'t rather than isn't.
15799 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
15801 <case MULT_EXPR>: Improve the case when bottom and one of the
15802 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
15803 operand, in that case check if the other operand is multiple of
15804 bottom divided by the INTEGER_CST operand.
15806 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15809 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
15810 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
15811 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
15812 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
15813 * config/pa/pa.c (pa_function_arg_advance): Likewise.
15814 (pa_function_arg, pa_arg_partial_bytes): Likewise.
15815 (pa_function_arg_size): New function.
15817 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15819 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
15820 in a separate statement.
15822 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15824 PR tree-optimization/83847
15825 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
15826 group gathers and scatters.
15828 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15830 PR rtl-optimization/86620
15831 * params.def (max-sched-ready-insns): Bump minimum value to 1.
15833 PR rtl-optimization/83213
15834 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
15835 to last if both are JUMP_INSNs.
15837 PR tree-optimization/83843
15838 * gimple-ssa-store-merging.c
15839 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
15840 store_immediate_info for bswap/nop orig_stores.
15842 2018-01-15 Andrew Waterman <andrew@sifive.com>
15844 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
15846 <UDIV>: Increase cost if !TARGET_DIV.
15848 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
15850 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
15851 (define_attr "cr_logical_3op"): New.
15852 (cceq_ior_compare): Adjust.
15853 (cceq_ior_compare_complement): Adjust.
15854 (*cceq_rev_compare): Adjust.
15855 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
15856 (is_cracked_insn): Adjust.
15857 (insn_must_be_first_in_group): Adjust.
15858 * config/rs6000/40x.md: Adjust.
15859 * config/rs6000/440.md: Adjust.
15860 * config/rs6000/476.md: Adjust.
15861 * config/rs6000/601.md: Adjust.
15862 * config/rs6000/603.md: Adjust.
15863 * config/rs6000/6xx.md: Adjust.
15864 * config/rs6000/7450.md: Adjust.
15865 * config/rs6000/7xx.md: Adjust.
15866 * config/rs6000/8540.md: Adjust.
15867 * config/rs6000/cell.md: Adjust.
15868 * config/rs6000/e300c2c3.md: Adjust.
15869 * config/rs6000/e500mc.md: Adjust.
15870 * config/rs6000/e500mc64.md: Adjust.
15871 * config/rs6000/e5500.md: Adjust.
15872 * config/rs6000/e6500.md: Adjust.
15873 * config/rs6000/mpc.md: Adjust.
15874 * config/rs6000/power4.md: Adjust.
15875 * config/rs6000/power5.md: Adjust.
15876 * config/rs6000/power6.md: Adjust.
15877 * config/rs6000/power7.md: Adjust.
15878 * config/rs6000/power8.md: Adjust.
15879 * config/rs6000/power9.md: Adjust.
15880 * config/rs6000/rs64.md: Adjust.
15881 * config/rs6000/titan.md: Adjust.
15883 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15885 * config/i386/predicates.md (indirect_branch_operand): Rewrite
15886 ix86_indirect_branch_register logic.
15888 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15890 * config/i386/constraints.md (Bs): Update
15891 ix86_indirect_branch_register check. Don't check
15892 ix86_indirect_branch_register with GOT_memory_operand.
15894 * config/i386/predicates.md (GOT_memory_operand): Don't check
15895 ix86_indirect_branch_register here.
15896 (GOT32_symbol_operand): Likewise.
15898 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15900 * config/i386/predicates.md (constant_call_address_operand):
15901 Rewrite ix86_indirect_branch_register logic.
15902 (sibcall_insn_operand): Likewise.
15904 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15906 * config/i386/constraints.md (Bs): Replace
15907 ix86_indirect_branch_thunk_register with
15908 ix86_indirect_branch_register.
15910 * config/i386/i386.md (indirect_jump): Likewise.
15911 (tablejump): Likewise.
15912 (*sibcall_memory): Likewise.
15913 (*sibcall_value_memory): Likewise.
15914 Peepholes of indirect call and jump via memory: Likewise.
15915 * config/i386/i386.opt: Likewise.
15916 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15917 (GOT_memory_operand): Likewise.
15918 (call_insn_operand): Likewise.
15919 (sibcall_insn_operand): Likewise.
15920 (GOT32_symbol_operand): Likewise.
15922 2018-01-15 Jakub Jelinek <jakub@redhat.com>
15924 PR middle-end/83837
15925 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
15926 type rather than type addr's type points to.
15927 (expand_omp_atomic_mutex): Likewise.
15928 (expand_omp_atomic): Likewise.
15930 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15933 * config/i386/i386.c (output_indirect_thunk_function): Use
15934 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
15935 for __x86_return_thunk.
15937 2018-01-15 Richard Biener <rguenther@suse.de>
15939 PR middle-end/83850
15940 * expmed.c (extract_bit_field_1): Fix typo.
15942 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15945 * config/arm/iterators.md (VF): New mode iterator.
15946 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
15947 Remove integer-related logic from pattern.
15948 (neon_vabd<mode>_3): Likewise.
15950 2018-01-15 Jakub Jelinek <jakub@redhat.com>
15952 PR middle-end/82694
15953 * common.opt (fstrict-overflow): No longer an alias.
15954 (fwrapv-pointer): New option.
15955 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
15956 also for pointer types based on flag_wrapv_pointer.
15957 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
15958 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
15959 opts->x_flag_wrapv got set.
15960 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
15961 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
15962 POINTER_TYPE_OVERFLOW_UNDEFINED.
15963 * match.pd: Likewise in address comparison pattern.
15964 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
15966 2018-01-15 Richard Biener <rguenther@suse.de>
15969 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
15970 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
15971 Reset type names to their identifier if their TYPE_DECL doesn't
15972 have linkage (and thus is used for ODR and devirt).
15973 (save_debug_info_for_decl): Remove.
15974 (save_debug_info_for_type): Likewise.
15975 (add_tree_to_fld_list): Adjust.
15976 * tree-pretty-print.c (dump_generic_node): Make dumping of
15977 type names more robust.
15979 2018-01-15 Richard Biener <rguenther@suse.de>
15981 * BASE-VER: Bump to 8.0.1.
15983 2018-01-14 Martin Sebor <msebor@redhat.com>
15986 * builtins.c (check_access): Avoid warning when the no-warning bit
15989 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
15991 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
15992 * ira-color (allocno_hard_regs_compare): Likewise.
15994 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
15997 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
15998 Use .pushsection/.popsection.
16000 2018-01-14 Martin Sebor <msebor@redhat.com>
16003 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16005 2018-01-14 Jakub Jelinek <jakub@redhat.com>
16007 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16008 entry from extra_headers.
16009 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16010 extra_headers, make the list bitwise identical to the i?86-*-* one.
16012 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16014 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16015 -mcmodel=large with -mindirect-branch=thunk,
16016 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16017 -mfunction-return=thunk-extern.
16018 * doc/invoke.texi: Document -mcmodel=large is incompatible with
16019 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16020 -mfunction-return=thunk and -mfunction-return=thunk-extern.
16022 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16024 * config/i386/i386.c (print_reg): Print the name of the full
16025 integer register without '%'.
16026 (ix86_print_operand): Handle 'V'.
16027 * doc/extend.texi: Document 'V' modifier.
16029 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16031 * config/i386/constraints.md (Bs): Disallow memory operand for
16032 -mindirect-branch-register.
16034 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16035 (GOT_memory_operand): Likewise.
16036 (call_insn_operand): Likewise.
16037 (sibcall_insn_operand): Likewise.
16038 (GOT32_symbol_operand): Likewise.
16039 * config/i386/i386.md (indirect_jump): Call convert_memory_address
16040 for -mindirect-branch-register.
16041 (tablejump): Likewise.
16042 (*sibcall_memory): Likewise.
16043 (*sibcall_value_memory): Likewise.
16044 Disallow peepholes of indirect call and jump via memory for
16045 -mindirect-branch-register.
16046 (*call_pop): Replace m with Bw.
16047 (*call_value_pop): Likewise.
16048 (*sibcall_pop_memory): Replace m with Bs.
16049 * config/i386/i386.opt (mindirect-branch-register): New option.
16050 * doc/invoke.texi: Document -mindirect-branch-register option.
16052 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16054 * config/i386/i386-protos.h (ix86_output_function_return): New.
16055 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16056 set function_return_type.
16057 (indirect_thunk_name): Add ret_p to indicate thunk for function
16059 (output_indirect_thunk_function): Pass false to
16060 indirect_thunk_name.
16061 (ix86_output_indirect_branch_via_reg): Likewise.
16062 (ix86_output_indirect_branch_via_push): Likewise.
16063 (output_indirect_thunk_function): Create alias for function
16064 return thunk if regno < 0.
16065 (ix86_output_function_return): New function.
16066 (ix86_handle_fndecl_attribute): Handle function_return.
16067 (ix86_attribute_table): Add function_return.
16068 * config/i386/i386.h (machine_function): Add
16069 function_return_type.
16070 * config/i386/i386.md (simple_return_internal): Use
16071 ix86_output_function_return.
16072 (simple_return_internal_long): Likewise.
16073 * config/i386/i386.opt (mfunction-return=): New option.
16074 (indirect_branch): Mention -mfunction-return=.
16075 * doc/extend.texi: Document function_return function attribute.
16076 * doc/invoke.texi: Document -mfunction-return= option.
16078 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16080 * config/i386/i386-opts.h (indirect_branch): New.
16081 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16082 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16083 with local indirect jump when converting indirect call and jump.
16084 (ix86_set_indirect_branch_type): New.
16085 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16086 (indirectlabelno): New.
16087 (indirect_thunk_needed): Likewise.
16088 (indirect_thunk_bnd_needed): Likewise.
16089 (indirect_thunks_used): Likewise.
16090 (indirect_thunks_bnd_used): Likewise.
16091 (INDIRECT_LABEL): Likewise.
16092 (indirect_thunk_name): Likewise.
16093 (output_indirect_thunk): Likewise.
16094 (output_indirect_thunk_function): Likewise.
16095 (ix86_output_indirect_branch_via_reg): Likewise.
16096 (ix86_output_indirect_branch_via_push): Likewise.
16097 (ix86_output_indirect_branch): Likewise.
16098 (ix86_output_indirect_jmp): Likewise.
16099 (ix86_code_end): Call output_indirect_thunk_function if needed.
16100 (ix86_output_call_insn): Call ix86_output_indirect_branch if
16102 (ix86_handle_fndecl_attribute): Handle indirect_branch.
16103 (ix86_attribute_table): Add indirect_branch.
16104 * config/i386/i386.h (machine_function): Add indirect_branch_type
16105 and has_local_indirect_jump.
16106 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16108 (tablejump): Likewise.
16109 (*indirect_jump): Use ix86_output_indirect_jmp.
16110 (*tablejump_1): Likewise.
16111 (simple_return_indirect_internal): Likewise.
16112 * config/i386/i386.opt (mindirect-branch=): New option.
16113 (indirect_branch): New.
16116 (thunk-inline): Likewise.
16117 (thunk-extern): Likewise.
16118 * doc/extend.texi: Document indirect_branch function attribute.
16119 * doc/invoke.texi: Document -mindirect-branch= option.
16121 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
16124 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16126 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
16128 * ipa-inline.c (want_inline_small_function_p): Return false if
16129 inlining has already failed with CIF_FINAL_ERROR.
16130 (update_caller_keys): Call want_inline_small_function_p before
16132 (update_callee_keys): Likewise.
16134 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
16136 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16138 (rs6000_quadword_masked_address_p): Likewise.
16139 (quad_aligned_load_p): Likewise.
16140 (quad_aligned_store_p): Likewise.
16141 (const_load_sequence_p): Add comment to describe the outer-most loop.
16142 (mimic_memory_attributes_and_flags): New function.
16143 (rs6000_gen_stvx): Likewise.
16144 (replace_swapped_aligned_store): Likewise.
16145 (rs6000_gen_lvx): Likewise.
16146 (replace_swapped_aligned_load): Likewise.
16147 (replace_swapped_load_constant): Capitalize argument name in
16148 comment describing this function.
16149 (rs6000_analyze_swaps): Add a third pass to search for vector loads
16150 and stores that access quad-word aligned addresses and replace
16151 with stvx or lvx instructions when appropriate.
16152 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16153 New function prototype.
16154 (rs6000_quadword_masked_address_p): Likewise.
16155 (rs6000_gen_lvx): Likewise.
16156 (rs6000_gen_stvx): Likewise.
16157 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16158 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16159 when memory address is aligned.
16160 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16161 this split to select lvx instruction when memory address is aligned.
16162 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16163 instruction when memory address is aligned.
16164 (*vsx_le_perm_load_v16qi): Likewise.
16165 (four unnamed splitters): Modify to select the stvx instruction
16166 when memory is aligned.
16168 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
16170 * predict.c (determine_unlikely_bbs): Handle correctly BBs
16171 which appears in the queue multiple times.
16173 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16174 Alan Hayward <alan.hayward@arm.com>
16175 David Sherwood <david.sherwood@arm.com>
16177 * tree-vectorizer.h (vec_lower_bound): New structure.
16178 (_loop_vec_info): Add check_nonzero and lower_bounds.
16179 (LOOP_VINFO_CHECK_NONZERO): New macro.
16180 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16181 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16182 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16183 fields. Make seg_len the distance travelled, not including the
16185 (dr_direction_indicator): Declare.
16186 (dr_zero_step_indicator): Likewise.
16187 (dr_known_forward_stride_p): Likewise.
16188 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16190 (runtime_alias_check_p): Allow runtime alias checks with
16192 (operator ==): Compare access_size and align.
16193 (prune_runtime_alias_test_list): Rework for new distinction between
16194 the access_size and seg_len.
16195 (create_intersect_range_checks_index): Likewise. Cope with polynomial
16197 (get_segment_min_max): New function.
16198 (create_intersect_range_checks): Use it.
16199 (dr_step_indicator): New function.
16200 (dr_direction_indicator): Likewise.
16201 (dr_zero_step_indicator): Likewise.
16202 (dr_known_forward_stride_p): Likewise.
16203 * tree-loop-distribution.c (data_ref_segment_size): Return
16204 DR_STEP * (niters - 1).
16205 (compute_alias_check_pairs): Update call to the dr_with_seg_len
16207 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16208 (vect_preserves_scalar_order_p): New function, split out from...
16209 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
16210 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16211 (vect_vfa_access_size): New function.
16212 (vect_vfa_align): Likewise.
16213 (vect_compile_time_alias): Take access_size_a and access_b arguments.
16214 (dump_lower_bound): New function.
16215 (vect_check_lower_bound): Likewise.
16216 (vect_small_gap_p): Likewise.
16217 (vectorizable_with_step_bound_p): Likewise.
16218 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16219 depencies if the vectorization factor is 1. Convert the checks
16220 for nonzero steps into checks on the bounds of DR_STEP. Try using
16221 a bunds check for variable steps if the minimum required step is
16222 relatively small. Update calls to the dr_with_seg_len
16223 constructor and to vect_compile_time_alias.
16224 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16226 (vect_loop_versioning): Call it.
16227 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16229 (vect_estimate_min_profitable_iters): Account for any bounds checks.
16231 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16232 Alan Hayward <alan.hayward@arm.com>
16233 David Sherwood <david.sherwood@arm.com>
16235 * doc/sourcebuild.texi (vect_scatter_store): Document.
16236 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16238 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16240 * genopinit.c (main): Add supports_vec_scatter_store and
16241 supports_vec_scatter_store_cached to target_optabs.
16242 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16243 IFN_MASK_SCATTER_STORE.
16244 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16246 * internal-fn.h (internal_store_fn_p): Declare.
16247 (internal_fn_stored_value_index): Likewise.
16248 * internal-fn.c (scatter_store_direct): New macro.
16249 (expand_scatter_store_optab_fn): New function.
16250 (direct_scatter_store_optab_supported_p): New macro.
16251 (internal_store_fn_p): New function.
16252 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16253 IFN_MASK_SCATTER_STORE.
16254 (internal_fn_mask_index): Likewise.
16255 (internal_fn_stored_value_index): New function.
16256 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16257 for scatter stores.
16258 * optabs-query.h (supports_vec_scatter_store_p): Declare.
16259 * optabs-query.c (supports_vec_scatter_store_p): New function.
16260 * tree-vectorizer.h (vect_get_store_rhs): Declare.
16261 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16262 true for scatter stores.
16263 (vect_gather_scatter_fn_p): Handle scatter stores too.
16264 (vect_check_gather_scatter): Consider using scatter stores if
16265 supports_vec_scatter_store_p.
16266 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16267 scatter stores too.
16268 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16269 internal_fn_stored_value_index.
16270 (check_load_store_masking): Handle scatter stores too.
16271 (vect_get_store_rhs): Make public.
16272 (vectorizable_call): Use internal_store_fn_p.
16273 (vectorizable_store): Handle scatter store internal functions.
16274 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16275 when deciding whether the end of the group has been reached.
16276 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16277 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16278 (mask_scatter_store<mode>): New insns.
16280 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16281 Alan Hayward <alan.hayward@arm.com>
16282 David Sherwood <david.sherwood@arm.com>
16284 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16285 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16286 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16288 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16289 Use vect_truncate_gather_scatter_offset if we can't treat the
16290 operation as a normal gather load or scatter store.
16291 (get_group_load_store_type): Take the gather_scatter_info
16292 as argument. Try using a gather load or scatter store for
16293 single-element groups.
16294 (get_load_store_type): Update calls to get_group_load_store_type
16295 and vect_use_strided_gather_scatters_p.
16297 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16298 Alan Hayward <alan.hayward@arm.com>
16299 David Sherwood <david.sherwood@arm.com>
16301 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16302 optional tree argument.
16303 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16305 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16306 but continue to use the current value as a fallback.
16307 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16308 to compare the updates.
16309 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16310 (get_load_store_type): Use it when handling a strided access.
16311 (vect_get_strided_load_store_ops): New function.
16312 (vect_get_data_ptr_increment): Likewise.
16313 (vectorizable_load): Handle strided gather loads. Always pass
16314 a step to vect_create_data_ref_ptr and bump_vector_ptr.
16316 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16317 Alan Hayward <alan.hayward@arm.com>
16318 David Sherwood <david.sherwood@arm.com>
16320 * doc/md.texi (gather_load@var{m}): Document.
16321 (mask_gather_load@var{m}): Likewise.
16322 * genopinit.c (main): Add supports_vec_gather_load and
16323 supports_vec_gather_load_cached to target_optabs.
16324 * optabs-tree.c (init_tree_optimization_optabs): Use
16325 ggc_cleared_alloc to allocate target_optabs.
16326 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16327 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16329 * internal-fn.h (internal_load_fn_p): Declare.
16330 (internal_gather_scatter_fn_p): Likewise.
16331 (internal_fn_mask_index): Likewise.
16332 (internal_gather_scatter_fn_supported_p): Likewise.
16333 * internal-fn.c (gather_load_direct): New macro.
16334 (expand_gather_load_optab_fn): New function.
16335 (direct_gather_load_optab_supported_p): New macro.
16336 (direct_internal_fn_optab): New function.
16337 (internal_load_fn_p): Likewise.
16338 (internal_gather_scatter_fn_p): Likewise.
16339 (internal_fn_mask_index): Likewise.
16340 (internal_gather_scatter_fn_supported_p): Likewise.
16341 * optabs-query.c (supports_at_least_one_mode_p): New function.
16342 (supports_vec_gather_load_p): Likewise.
16343 * optabs-query.h (supports_vec_gather_load_p): Declare.
16344 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16345 and memory_type field.
16346 (NUM_PATTERNS): Bump to 15.
16347 * tree-vect-data-refs.c: Include internal-fn.h.
16348 (vect_gather_scatter_fn_p): New function.
16349 (vect_describe_gather_scatter_call): Likewise.
16350 (vect_check_gather_scatter): Try using internal functions for
16351 gather loads. Recognize existing calls to a gather load function.
16352 (vect_analyze_data_refs): Consider using gather loads if
16353 supports_vec_gather_load_p.
16354 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16355 (vect_get_gather_scatter_offset_type): Likewise.
16356 (vect_convert_mask_for_vectype): Likewise.
16357 (vect_add_conversion_to_patterm): Likewise.
16358 (vect_try_gather_scatter_pattern): Likewise.
16359 (vect_recog_gather_scatter_pattern): New pattern recognizer.
16360 (vect_vect_recog_func_ptrs): Add it.
16361 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16362 internal_fn_mask_index and internal_gather_scatter_fn_p.
16363 (check_load_store_masking): Take the gather_scatter_info as an
16364 argument and handle gather loads.
16365 (vect_get_gather_scatter_ops): New function.
16366 (vectorizable_call): Check internal_load_fn_p.
16367 (vectorizable_load): Likewise. Handle gather load internal
16369 (vectorizable_store): Update call to check_load_store_masking.
16370 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16371 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16372 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16373 (aarch64_gather_scale_operand_d): New predicates.
16374 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16375 (mask_gather_load<mode>): New insns.
16377 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16378 Alan Hayward <alan.hayward@arm.com>
16379 David Sherwood <david.sherwood@arm.com>
16381 * optabs.def (fold_left_plus_optab): New optab.
16382 * doc/md.texi (fold_left_plus_@var{m}): Document.
16383 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16384 * internal-fn.c (fold_left_direct): Define.
16385 (expand_fold_left_optab_fn): Likewise.
16386 (direct_fold_left_optab_supported_p): Likewise.
16387 * fold-const-call.c (fold_const_fold_left): New function.
16388 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16389 * tree-parloops.c (valid_reduction_p): New function.
16390 (gather_scalar_reductions): Use it.
16391 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16392 (vect_finish_replace_stmt): Declare.
16393 * tree-vect-loop.c (fold_left_reduction_fn): New function.
16394 (needs_fold_left_reduction_p): New function, split out from...
16395 (vect_is_simple_reduction): ...here. Accept reductions that
16396 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16397 (vect_force_simple_reduction): Also store the reduction type in
16398 the assignment's STMT_VINFO_REDUC_TYPE.
16399 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16400 (merge_with_identity): New function.
16401 (vect_expand_fold_left): Likewise.
16402 (vectorize_fold_left_reduction): Likewise.
16403 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
16404 scalar phi in place for it. Check for target support and reject
16405 cases that would reassociate the operation. Defer the transform
16406 phase to vectorize_fold_left_reduction.
16407 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16408 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16409 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16411 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16413 * tree-if-conv.c (predicate_mem_writes): Remove redundant
16414 call to ifc_temp_var.
16416 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16417 Alan Hayward <alan.hayward@arm.com>
16418 David Sherwood <david.sherwood@arm.com>
16420 * target.def (legitimize_address_displacement): Take the original
16421 offset as a poly_int.
16422 * targhooks.h (default_legitimize_address_displacement): Update
16424 * targhooks.c (default_legitimize_address_displacement): Likewise.
16425 * doc/tm.texi: Regenerate.
16426 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16427 as an argument, moving assert of ad->disp == ad->disp_term to...
16428 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
16429 Try calling targetm.legitimize_address_displacement before expanding
16430 the address rather than afterwards, and adjust for the new interface.
16431 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16432 Match the new hook interface. Handle SVE addresses.
16433 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16434 new hook interface.
16436 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16438 * Makefile.in (OBJS): Add early-remat.o.
16439 * target.def (select_early_remat_modes): New hook.
16440 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16441 * doc/tm.texi: Regenerate.
16442 * targhooks.h (default_select_early_remat_modes): Declare.
16443 * targhooks.c (default_select_early_remat_modes): New function.
16444 * timevar.def (TV_EARLY_REMAT): New timevar.
16445 * passes.def (pass_early_remat): New pass.
16446 * tree-pass.h (make_pass_early_remat): Declare.
16447 * early-remat.c: New file.
16448 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16450 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16452 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16453 Alan Hayward <alan.hayward@arm.com>
16454 David Sherwood <david.sherwood@arm.com>
16456 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16457 vfm1 with a bound_epilog parameter.
16458 (vect_do_peeling): Update calls accordingly, and move the prologue
16459 call earlier in the function. Treat the base bound_epilog as 0 for
16460 fully-masked loops and retain vf - 1 for other loops. Add 1 to
16461 this base when peeling for gaps.
16462 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16463 with fully-masked loops.
16464 (vect_estimate_min_profitable_iters): Handle the single peeled
16465 iteration in that case.
16467 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16468 Alan Hayward <alan.hayward@arm.com>
16469 David Sherwood <david.sherwood@arm.com>
16471 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16472 single-element interleaving even if the size is not a power of 2.
16473 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16474 accesses for single-element interleaving if the group size is
16477 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16478 Alan Hayward <alan.hayward@arm.com>
16479 David Sherwood <david.sherwood@arm.com>
16481 * doc/md.texi (fold_extract_last_@var{m}): Document.
16482 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16483 * optabs.def (fold_extract_last_optab): New optab.
16484 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16485 * internal-fn.c (fold_extract_direct): New macro.
16486 (expand_fold_extract_optab_fn): Likewise.
16487 (direct_fold_extract_optab_supported_p): Likewise.
16488 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16489 * tree-vect-loop.c (vect_model_reduction_cost): Handle
16490 EXTRACT_LAST_REDUCTION.
16491 (get_initial_def_for_reduction): Do not create an initial vector
16492 for EXTRACT_LAST_REDUCTION reductions.
16493 (vectorizable_reduction): Leave the scalar phi in place for
16494 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
16495 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
16496 epilogue code for EXTRACT_LAST_REDUCTION and defer the
16497 transform phase to vectorizable_condition.
16498 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16500 (vect_finish_stmt_generation): ...here.
16501 (vect_finish_replace_stmt): New function.
16502 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16503 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16505 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
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 * doc/md.texi (extract_last_@var{m}): Document.
16512 * optabs.def (extract_last_optab): New optab.
16513 * internal-fn.def (EXTRACT_LAST): New internal function.
16514 * internal-fn.c (cond_unary_direct): New macro.
16515 (expand_cond_unary_optab_fn): Likewise.
16516 (direct_cond_unary_optab_supported_p): Likewise.
16517 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16518 loops using EXTRACT_LAST.
16519 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16520 (extract_last_<mode>): ...this optab.
16521 (vec_extract<mode><Vel>): Update accordingly.
16523 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16524 Alan Hayward <alan.hayward@arm.com>
16525 David Sherwood <david.sherwood@arm.com>
16527 * target.def (empty_mask_is_expensive): New hook.
16528 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16529 * doc/tm.texi: Regenerate.
16530 * targhooks.h (default_empty_mask_is_expensive): Declare.
16531 * targhooks.c (default_empty_mask_is_expensive): New function.
16532 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16533 if the target says that empty masks are expensive.
16534 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16536 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16538 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16539 Alan Hayward <alan.hayward@arm.com>
16540 David Sherwood <david.sherwood@arm.com>
16542 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16543 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16544 (vect_use_loop_mask_for_alignment_p): New function.
16545 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16546 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16547 niters_skip argument. Make sure that the first niters_skip elements
16548 of the first iteration are inactive.
16549 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16550 Update call to vect_set_loop_masks_directly.
16551 (get_misalign_in_elems): New function, split out from...
16552 (vect_gen_prolog_loop_niters): ...here.
16553 (vect_update_init_of_dr): Take a code argument that specifies whether
16554 the adjustment should be added or subtracted.
16555 (vect_update_init_of_drs): Likewise.
16556 (vect_prepare_for_masked_peels): New function.
16557 (vect_do_peeling): Skip prologue peeling if we're using a mask
16558 instead. Update call to vect_update_inits_of_drs.
16559 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16561 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16562 alignment. Do not include the number of peeled iterations in
16563 the minimum threshold in that case.
16564 (vectorizable_induction): Adjust the start value down by
16565 LOOP_VINFO_MASK_SKIP_NITERS iterations.
16566 (vect_transform_loop): Call vect_prepare_for_masked_peels.
16567 Take the number of skipped iterations into account when calculating
16569 * tree-vect-stmts.c (vect_gen_while_not): New function.
16571 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16572 Alan Hayward <alan.hayward@arm.com>
16573 David Sherwood <david.sherwood@arm.com>
16575 * doc/sourcebuild.texi (vect_fully_masked): Document.
16576 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16577 default value to 0.
16578 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16580 (vect_analyze_loop_2): ...here. Don't check the vectorization
16581 factor against the number of loop iterations if the loop is
16584 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16585 Alan Hayward <alan.hayward@arm.com>
16586 David Sherwood <david.sherwood@arm.com>
16588 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16589 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16590 (dump_groups): Update accordingly.
16591 (iv_use::mem_type): New member variable.
16592 (address_p): New function.
16593 (record_use): Add a mem_type argument and initialize the new
16595 (record_group_use): Add a mem_type argument. Use address_p.
16596 Remove obsolete null checks of base_object. Update call to record_use.
16597 (find_interesting_uses_op): Update call to record_group_use.
16598 (find_interesting_uses_cond): Likewise.
16599 (find_interesting_uses_address): Likewise.
16600 (get_mem_type_for_internal_fn): New function.
16601 (find_address_like_use): Likewise.
16602 (find_interesting_uses_stmt): Try find_address_like_use before
16603 calling find_interesting_uses_op.
16604 (addr_offset_valid_p): Use the iv mem_type field as the type
16605 of the addressed memory.
16606 (add_autoinc_candidates): Likewise.
16607 (get_address_cost): Likewise.
16608 (split_small_address_groups_p): Use address_p.
16609 (split_address_groups): Likewise.
16610 (add_iv_candidate_for_use): Likewise.
16611 (autoinc_possible_for_pair): Likewise.
16612 (rewrite_groups): Likewise.
16613 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16614 (determine_group_iv_cost): Update after split of USE_ADDRESS.
16615 (get_alias_ptr_type_for_ptr_address): New function.
16616 (rewrite_use_address): Rewrite address uses in calls that were
16617 identified by find_address_like_use.
16619 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16620 Alan Hayward <alan.hayward@arm.com>
16621 David Sherwood <david.sherwood@arm.com>
16623 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16625 * gimple-expr.h (is_gimple_addressable: Likewise.
16626 * gimple-expr.c (is_gimple_address): Likewise.
16627 * internal-fn.c (expand_call_mem_ref): New function.
16628 (expand_mask_load_optab_fn): Use it.
16629 (expand_mask_store_optab_fn): Likewise.
16631 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16632 Alan Hayward <alan.hayward@arm.com>
16633 David Sherwood <david.sherwood@arm.com>
16635 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16636 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16637 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16638 (cond_umax@var{mode}): Document.
16639 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16640 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16641 (cond_umin_optab, cond_umax_optab): New optabs.
16642 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16643 (COND_IOR, COND_XOR): New internal functions.
16644 * internal-fn.h (get_conditional_internal_fn): Declare.
16645 * internal-fn.c (cond_binary_direct): New macro.
16646 (expand_cond_binary_optab_fn): Likewise.
16647 (direct_cond_binary_optab_supported_p): Likewise.
16648 (get_conditional_internal_fn): New function.
16649 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16650 Cope with reduction statements that are vectorized as calls rather
16652 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16653 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16654 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16655 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16656 (UNSPEC_COND_EOR): New unspecs.
16657 (optab): Add mappings for them.
16658 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16659 (sve_int_op, sve_fp_op): New int attributes.
16661 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16662 Alan Hayward <alan.hayward@arm.com>
16663 David Sherwood <david.sherwood@arm.com>
16665 * optabs.def (while_ult_optab): New optab.
16666 * doc/md.texi (while_ult@var{m}@var{n}): Document.
16667 * internal-fn.def (WHILE_ULT): New internal function.
16668 * internal-fn.h (direct_internal_fn_supported_p): New override
16669 that takes two types as argument.
16670 * internal-fn.c (while_direct): New macro.
16671 (expand_while_optab_fn): New function.
16672 (convert_optab_supported_p): Likewise.
16673 (direct_while_optab_supported_p): New macro.
16674 * wide-int.h (wi::udiv_ceil): New function.
16675 * tree-vectorizer.h (rgroup_masks): New structure.
16676 (vec_loop_masks): New typedef.
16677 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16678 and fully_masked_p.
16679 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16680 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16681 (vect_max_vf): New function.
16682 (slpeel_make_loop_iterate_ntimes): Delete.
16683 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16684 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16685 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16686 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16687 internal-fn.h, stor-layout.h and optabs-query.h.
16688 (vect_set_loop_mask): New function.
16689 (add_preheader_seq): Likewise.
16690 (add_header_seq): Likewise.
16691 (interleave_supported_p): Likewise.
16692 (vect_maybe_permute_loop_masks): Likewise.
16693 (vect_set_loop_masks_directly): Likewise.
16694 (vect_set_loop_condition_masked): Likewise.
16695 (vect_set_loop_condition_unmasked): New function, split out from
16696 slpeel_make_loop_iterate_ntimes.
16697 (slpeel_make_loop_iterate_ntimes): Rename to..
16698 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
16699 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16700 (vect_do_peeling): Update call accordingly.
16701 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16703 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16704 mask_compare_type, can_fully_mask_p and fully_masked_p.
16705 (release_vec_loop_masks): New function.
16706 (_loop_vec_info): Use it to free the loop masks.
16707 (can_produce_all_loop_masks_p): New function.
16708 (vect_get_max_nscalars_per_iter): Likewise.
16709 (vect_verify_full_masking): Likewise.
16710 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16711 retries, and free the mask rgroups before retrying. Check loop-wide
16712 reasons for disallowing fully-masked loops. Make the final decision
16713 about whether use a fully-masked loop or not.
16714 (vect_estimate_min_profitable_iters): Do not assume that peeling
16715 for the number of iterations will be needed for fully-masked loops.
16716 (vectorizable_reduction): Disable fully-masked loops.
16717 (vectorizable_live_operation): Likewise.
16718 (vect_halve_mask_nunits): New function.
16719 (vect_double_mask_nunits): Likewise.
16720 (vect_record_loop_mask): Likewise.
16721 (vect_get_loop_mask): Likewise.
16722 (vect_transform_loop): Handle the case in which the final loop
16723 iteration might handle a partial vector. Call vect_set_loop_condition
16724 instead of slpeel_make_loop_iterate_ntimes.
16725 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16726 (check_load_store_masking): New function.
16727 (prepare_load_store_mask): Likewise.
16728 (vectorizable_store): Handle fully-masked loops.
16729 (vectorizable_load): Likewise.
16730 (supportable_widening_operation): Use vect_halve_mask_nunits for
16732 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16733 (vect_gen_while): New function.
16734 * config/aarch64/aarch64.md (umax<mode>3): New expander.
16735 (aarch64_uqdec<mode>): New insn.
16737 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16738 Alan Hayward <alan.hayward@arm.com>
16739 David Sherwood <david.sherwood@arm.com>
16741 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16742 (reduc_xor_scal_optab): New optabs.
16743 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16744 (reduc_xor_scal_@var{m}): Document.
16745 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16746 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16747 internal functions.
16748 * fold-const-call.c (fold_const_call): Handle them.
16749 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16750 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16751 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16752 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
16753 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
16754 (UNSPEC_XORV): New unspecs.
16755 (optab): Add entries for them.
16756 (BITWISEV): New int iterator.
16757 (bit_reduc_op): New int attributes.
16759 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16760 Alan Hayward <alan.hayward@arm.com>
16761 David Sherwood <david.sherwood@arm.com>
16763 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
16764 * internal-fn.def (VEC_SHL_INSERT): New internal function.
16765 * optabs.def (vec_shl_insert_optab): New optab.
16766 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
16767 (duplicate_and_interleave): Likewise.
16768 * tree-vect-loop.c: Include internal-fn.h.
16769 (neutral_op_for_slp_reduction): New function, split out from
16770 get_initial_defs_for_reduction.
16771 (get_initial_def_for_reduction): Handle option 2 for variable-length
16772 vectors by loading the neutral value into a vector and then shifting
16773 the initial value into element 0.
16774 (get_initial_defs_for_reduction): Replace the code argument with
16775 the neutral value calculated by neutral_op_for_slp_reduction.
16776 Use gimple_build_vector for constant-length vectors.
16777 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
16778 but the first group_size elements have a neutral value.
16779 Use duplicate_and_interleave otherwise.
16780 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
16781 Update call to get_initial_defs_for_reduction. Handle SLP
16782 reductions for variable-length vectors by creating one vector
16783 result for each scalar result, with the elements associated
16784 with other scalar results stubbed out with the neutral value.
16785 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
16786 Require IFN_VEC_SHL_INSERT for double reductions on
16787 variable-length vectors, or SLP reductions that have
16788 a neutral value. Require can_duplicate_and_interleave_p
16789 support for variable-length unchained SLP reductions if there
16790 is no neutral value, such as for MIN/MAX reductions. Also require
16791 the number of vector elements to be a multiple of the number of
16792 SLP statements when doing variable-length unchained SLP reductions.
16793 Update call to vect_create_epilog_for_reduction.
16794 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
16795 and remove initial values.
16796 (duplicate_and_interleave): Make public.
16797 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
16798 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
16800 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16801 Alan Hayward <alan.hayward@arm.com>
16802 David Sherwood <david.sherwood@arm.com>
16804 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
16805 (can_duplicate_and_interleave_p): New function.
16806 (vect_get_and_check_slp_defs): Take the vector of statements
16807 rather than just the current one. Remove excess parentheses.
16808 Restriction rejectinon of vect_constant_def and vect_external_def
16809 for variable-length vectors to boolean types, or types for which
16810 can_duplicate_and_interleave_p is false.
16811 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
16812 (duplicate_and_interleave): New function.
16813 (vect_get_constant_vectors): Use gimple_build_vector for
16814 constant-length vectors and suitable variable-length constant
16815 vectors. Use duplicate_and_interleave for other variable-length
16816 vectors. Don't defer the update when inserting new statements.
16818 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16819 Alan Hayward <alan.hayward@arm.com>
16820 David Sherwood <david.sherwood@arm.com>
16822 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
16823 min_profitable_iters doesn't go negative.
16825 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16826 Alan Hayward <alan.hayward@arm.com>
16827 David Sherwood <david.sherwood@arm.com>
16829 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
16830 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
16831 * optabs.def (vec_mask_load_lanes_optab): New optab.
16832 (vec_mask_store_lanes_optab): Likewise.
16833 * internal-fn.def (MASK_LOAD_LANES): New internal function.
16834 (MASK_STORE_LANES): Likewise.
16835 * internal-fn.c (mask_load_lanes_direct): New macro.
16836 (mask_store_lanes_direct): Likewise.
16837 (expand_mask_load_optab_fn): Handle masked operations.
16838 (expand_mask_load_lanes_optab_fn): New macro.
16839 (expand_mask_store_optab_fn): Handle masked operations.
16840 (expand_mask_store_lanes_optab_fn): New macro.
16841 (direct_mask_load_lanes_optab_supported_p): Likewise.
16842 (direct_mask_store_lanes_optab_supported_p): Likewise.
16843 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
16845 (vect_load_lanes_supported): Likewise.
16846 * tree-vect-data-refs.c (strip_conversion): New function.
16847 (can_group_stmts_p): Likewise.
16848 (vect_analyze_data_ref_accesses): Use it instead of checking
16849 for a pair of assignments.
16850 (vect_store_lanes_supported): Take a masked_p parameter.
16851 (vect_load_lanes_supported): Likewise.
16852 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
16853 vect_store_lanes_supported and vect_load_lanes_supported.
16854 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
16855 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
16856 parameter. Don't allow gaps for masked accesses.
16857 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
16858 and vect_load_lanes_supported.
16859 (get_load_store_type): Take a masked_p parameter and update
16860 call to get_group_load_store_type.
16861 (vectorizable_store): Update call to get_load_store_type.
16862 Handle IFN_MASK_STORE_LANES.
16863 (vectorizable_load): Update call to get_load_store_type.
16864 Handle IFN_MASK_LOAD_LANES.
16866 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16867 Alan Hayward <alan.hayward@arm.com>
16868 David Sherwood <david.sherwood@arm.com>
16870 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
16872 * config/aarch64/aarch64-protos.h
16873 (aarch64_sve_struct_memory_operand_p): Declare.
16874 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
16875 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
16876 (VPRED, vpred): Handle SVE structure modes.
16877 * config/aarch64/constraints.md (Utx): New constraint.
16878 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
16879 (aarch64_sve_struct_nonimmediate_operand): New predicates.
16880 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
16881 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
16882 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
16883 structure modes. Split into pieces after RA.
16884 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
16885 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
16887 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
16888 SVE structure modes.
16889 (aarch64_classify_address): Likewise.
16890 (sizetochar): Move earlier in file.
16891 (aarch64_print_operand): Handle SVE register lists.
16892 (aarch64_array_mode): New function.
16893 (aarch64_sve_struct_memory_operand_p): Likewise.
16894 (TARGET_ARRAY_MODE): Redefine.
16896 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16897 Alan Hayward <alan.hayward@arm.com>
16898 David Sherwood <david.sherwood@arm.com>
16900 * target.def (array_mode): New target hook.
16901 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
16902 * doc/tm.texi: Regenerate.
16903 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
16904 * hooks.c (hook_optmode_mode_uhwi_none): New function.
16905 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
16906 targetm.array_mode.
16907 * stor-layout.c (mode_for_array): Likewise. Support polynomial
16910 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16911 Alan Hayward <alan.hayward@arm.com>
16912 David Sherwood <david.sherwood@arm.com>
16914 * fold-const.c (fold_binary_loc): Check the argument types
16915 rather than the result type when testing for a vector operation.
16917 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16919 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
16920 * doc/tm.texi: Regenerate.
16922 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16923 Alan Hayward <alan.hayward@arm.com>
16924 David Sherwood <david.sherwood@arm.com>
16926 * doc/invoke.texi (-msve-vector-bits=): Document new option.
16927 (sve): Document new AArch64 extension.
16928 * doc/md.texi (w): Extend the description of the AArch64
16929 constraint to include SVE vectors.
16930 (Upl, Upa): Document new AArch64 predicate constraints.
16931 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
16933 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
16934 (msve-vector-bits=): New option.
16935 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
16936 SVE when these are disabled.
16937 (sve): New extension.
16938 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
16939 modes. Adjust their number of units based on aarch64_sve_vg.
16940 (MAX_BITSIZE_MODE_ANY_MODE): Define.
16941 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
16942 aarch64_addr_query_type.
16943 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
16944 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
16945 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
16946 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
16947 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
16948 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
16949 (aarch64_simd_imm_zero_p): Delete.
16950 (aarch64_check_zero_based_sve_index_immediate): Declare.
16951 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16952 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16953 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16954 (aarch64_sve_float_mul_immediate_p): Likewise.
16955 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16956 rather than an rtx.
16957 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
16958 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
16959 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
16960 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
16961 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
16962 (aarch64_regmode_natural_size): Likewise.
16963 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
16964 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
16966 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
16967 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
16968 for VG and the SVE predicate registers.
16969 (V_ALIASES): Add a "z"-prefixed alias.
16970 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
16971 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
16972 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
16973 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
16974 (REG_CLASS_NAMES): Add entries for them.
16975 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
16976 and the predicate registers.
16977 (aarch64_sve_vg): Declare.
16978 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
16979 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
16980 (REGMODE_NATURAL_SIZE): Define.
16981 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
16983 * config/aarch64/aarch64.c: Include cfgrtl.h.
16984 (simd_immediate_info): Add a constructor for series vectors,
16985 and an associated step field.
16986 (aarch64_sve_vg): New variable.
16987 (aarch64_dbx_register_number): Handle VG and the predicate registers.
16988 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
16989 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
16990 (VEC_ANY_DATA, VEC_STRUCT): New constants.
16991 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
16992 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
16993 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
16994 (aarch64_get_mask_mode): New functions.
16995 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
16996 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
16997 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
16998 predicate modes and predicate registers. Explicitly restrict
16999 GPRs to modes of 16 bytes or smaller. Only allow FP registers
17000 to store a vector mode if it is recognized by
17001 aarch64_classify_vector_mode.
17002 (aarch64_regmode_natural_size): New function.
17003 (aarch64_hard_regno_caller_save_mode): Return the original mode
17005 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17006 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17007 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17008 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17010 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
17011 does not overlap dest if the function is frame-related. Handle
17013 (aarch64_split_add_offset): New function.
17014 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17015 them aarch64_add_offset.
17016 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17017 and update call to aarch64_sub_sp.
17018 (aarch64_add_cfa_expression): New function.
17019 (aarch64_expand_prologue): Pass extra temporary registers to the
17020 functions above. Handle the case in which we need to emit new
17021 DW_CFA_expressions for registers that were originally saved
17022 relative to the stack pointer, but now have to be expressed
17023 relative to the frame pointer.
17024 (aarch64_output_mi_thunk): Pass extra temporary registers to the
17026 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
17027 IP0 and IP1 values for SVE frames.
17028 (aarch64_expand_vec_series): New function.
17029 (aarch64_expand_sve_widened_duplicate): Likewise.
17030 (aarch64_expand_sve_const_vector): Likewise.
17031 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17032 Handle SVE constants. Use emit_move_insn to move a force_const_mem
17033 into the register, rather than emitting a SET directly.
17034 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17035 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17036 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17037 (offset_9bit_signed_scaled_p): New functions.
17038 (aarch64_replicate_bitmask_imm): New function.
17039 (aarch64_bitmask_imm): Use it.
17040 (aarch64_cannot_force_const_mem): Reject expressions involving
17041 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
17042 (aarch64_classify_index): Handle SVE indices, by requiring
17043 a plain register index with a scale that matches the element size.
17044 (aarch64_classify_address): Handle SVE addresses. Assert that
17045 the mode of the address is VOIDmode or an integer mode.
17046 Update call to aarch64_classify_symbol.
17047 (aarch64_classify_symbolic_expression): Update call to
17048 aarch64_classify_symbol.
17049 (aarch64_const_vec_all_in_range_p): New function.
17050 (aarch64_print_vector_float_operand): Likewise.
17051 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
17052 "vN" for FP registers with SVE modes. Handle (const ...) vectors
17053 and the FP immediates 1.0 and 0.5.
17054 (aarch64_print_address_internal): Handle SVE addresses.
17055 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17056 (aarch64_regno_regclass): Handle predicate registers.
17057 (aarch64_secondary_reload): Handle big-endian reloads of SVE
17059 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17060 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17061 (aarch64_convert_sve_vector_bits): New function.
17062 (aarch64_override_options): Use it to handle -msve-vector-bits=.
17063 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17064 rather than an rtx.
17065 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17066 Handle SVE vector and predicate modes. Accept VL-based constants
17067 that need only one temporary register, and VL offsets that require
17068 no temporary registers.
17069 (aarch64_conditional_register_usage): Mark the predicate registers
17070 as fixed if SVE isn't available.
17071 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17072 Return true for SVE vector and predicate modes.
17073 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17074 rather than an unsigned int. Handle SVE modes.
17075 (aarch64_preferred_simd_mode): Update call accordingly. Handle
17077 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17079 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17080 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17081 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17082 (aarch64_sve_float_mul_immediate_p): New functions.
17083 (aarch64_sve_valid_immediate): New function.
17084 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17085 Explicitly reject structure modes. Check for INDEX constants.
17086 Handle PTRUE and PFALSE constants.
17087 (aarch64_check_zero_based_sve_index_immediate): New function.
17088 (aarch64_simd_imm_zero_p): Delete.
17089 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17090 vector modes. Accept constants in the range of CNT[BHWD].
17091 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17092 ask for an Advanced SIMD mode.
17093 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17094 (aarch64_simd_vector_alignment): Handle SVE predicates.
17095 (aarch64_vectorize_preferred_vector_alignment): New function.
17096 (aarch64_simd_vector_alignment_reachable): Use it instead of
17098 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17099 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17101 (MAX_VECT_LEN): Delete.
17102 (expand_vec_perm_d): Add a vec_flags field.
17103 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17104 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17105 (aarch64_evpc_ext): Don't apply a big-endian lane correction
17107 (aarch64_evpc_rev): Rename to...
17108 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
17109 (aarch64_evpc_rev_global): New function.
17110 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17111 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17113 (aarch64_evpc_sve_tbl): New function.
17114 (aarch64_expand_vec_perm_const_1): Update after rename of
17115 aarch64_evpc_rev. Handle SVE permutes too, trying
17116 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17117 than aarch64_evpc_tbl.
17118 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17119 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17120 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17121 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17122 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17123 (aarch64_expand_sve_vcond): New functions.
17124 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17125 of aarch64_vector_mode_p.
17126 (aarch64_dwarf_poly_indeterminate_value): New function.
17127 (aarch64_compute_pressure_classes): Likewise.
17128 (aarch64_can_change_mode_class): Likewise.
17129 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17130 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17131 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17132 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17133 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17134 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17135 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17136 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17138 (Dn, Dl, Dr): Accept const as well as const_vector.
17139 (Dz): Likewise. Compare against CONST0_RTX.
17140 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17141 of "vector" where appropriate.
17142 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17143 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17144 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17145 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17146 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17147 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17148 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17149 (v_int_equiv): Extend to SVE modes.
17150 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17152 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17153 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17154 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17155 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17156 (SVE_COND_FP_CMP): New int iterators.
17157 (perm_hilo): Handle the new unpack unspecs.
17158 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17160 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17161 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17162 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17163 (aarch64_equality_operator, aarch64_constant_vector_operand)
17164 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17165 (aarch64_sve_nonimmediate_operand): Likewise.
17166 (aarch64_sve_general_operand): Likewise.
17167 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17168 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17169 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17170 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17171 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17172 (aarch64_sve_float_arith_immediate): Likewise.
17173 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17174 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17175 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17176 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17177 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17178 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17179 (aarch64_sve_float_arith_operand): Likewise.
17180 (aarch64_sve_float_arith_with_sub_operand): Likewise.
17181 (aarch64_sve_float_mul_operand): Likewise.
17182 (aarch64_sve_vec_perm_operand): Likewise.
17183 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17184 (aarch64_mov_operand): Accept const_poly_int and const_vector.
17185 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17186 as well as const_vector.
17187 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17188 in file. Use CONST0_RTX and CONSTM1_RTX.
17189 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
17190 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17191 Use aarch64_simd_imm_zero.
17192 * config/aarch64/aarch64-sve.md: New file.
17193 * config/aarch64/aarch64.md: Include it.
17194 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17195 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17196 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17197 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17198 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17199 (sve): New attribute.
17200 (enabled): Disable instructions with the sve attribute unless
17202 (movqi, movhi): Pass CONST_POLY_INT operaneds through
17203 aarch64_expand_mov_immediate.
17204 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17205 CNT[BHSD] immediates.
17206 (movti): Split CONST_POLY_INT moves into two halves.
17207 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17208 Split additions that need a temporary here if the destination
17209 is the stack pointer.
17210 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17211 (*add<mode>3_poly_1): New instruction.
17212 (set_clobber_cc): New expander.
17214 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17216 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17217 parameter and use it instead of GET_MODE_SIZE (innermode). Use
17218 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17219 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17220 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
17221 Change innermode from fixed_mode_size to machine_mode.
17222 (simplify_subreg): Update call accordingly. Handle a constant-sized
17223 subreg of a variable-length CONST_VECTOR.
17225 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17226 Alan Hayward <alan.hayward@arm.com>
17227 David Sherwood <david.sherwood@arm.com>
17229 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17230 (add_offset_to_base): New function, split out from...
17231 (create_mem_ref): ...here. When handling a scale other than 1,
17232 check first whether the address is valid without the offset.
17233 Add it into the base if so, leaving the index and scale as-is.
17235 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17238 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17239 fold_for_warn before checking if arg2 is INTEGER_CST.
17241 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
17243 * config/rs6000/predicates.md (load_multiple_operation): Delete.
17244 (store_multiple_operation): Delete.
17245 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17246 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17247 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17248 guarded by TARGET_STRING.
17249 (rs6000_output_load_multiple): Delete.
17250 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17251 OPTION_MASK_STRING / TARGET_STRING handling.
17252 (print_operand) <'N', 'O'>: Add comment that these are unused now.
17253 (const rs6000_opt_masks) <"string">: Change mask to 0.
17254 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17255 (MASK_STRING): Delete.
17256 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17258 (load_multiple): Delete.
17265 (store_multiple): Delete.
17272 (movmemsi_8reg): Delete.
17273 (corresponding unnamed define_insn): Delete.
17274 (movmemsi_6reg): Delete.
17275 (corresponding unnamed define_insn): Delete.
17276 (movmemsi_4reg): Delete.
17277 (corresponding unnamed define_insn): Delete.
17278 (movmemsi_2reg): Delete.
17279 (corresponding unnamed define_insn): Delete.
17280 (movmemsi_1reg): Delete.
17281 (corresponding unnamed define_insn): Delete.
17282 * config/rs6000/rs6000.opt (mno-string): New.
17283 (mstring): Replace by deprecation warning stub.
17284 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17286 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17288 * regrename.c (regrename_do_replace): If replacing the same
17289 reg multiple times, try to reuse last created gen_raw_REG.
17292 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17293 main to workaround a bug in GDB.
17295 2018-01-12 Tom de Vries <tom@codesourcery.com>
17298 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17300 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
17302 PR rtl-optimization/80481
17303 * ira-color.c (get_cap_member): New function.
17304 (allocnos_conflict_by_live_ranges_p): Use it.
17305 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17306 (setup_slot_coalesced_allocno_live_ranges): Ditto.
17308 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
17311 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17312 (*saddl_se_1): Ditto.
17313 (*ssubsi_1): Ditto.
17314 (*ssubl_se_1): Ditto.
17316 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17318 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17319 rather than wi::to_widest for DR_INITs.
17320 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17321 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17322 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17324 (vect_analyze_group_access_1): Note that here.
17326 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17328 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17329 polynomial type sizes.
17331 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17333 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17334 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17335 (gimple_add_tmp_var): Likewise.
17337 2018-01-12 Martin Liska <mliska@suse.cz>
17339 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17340 (gimple_alloc_sizes): Likewise.
17341 (dump_gimple_statistics): Use PRIu64 in printf format.
17342 * gimple.h: Change uint64_t to int.
17344 2018-01-12 Martin Liska <mliska@suse.cz>
17346 * tree-core.h: Use uint64_t instead of int.
17347 * tree.c (tree_node_counts): Likewise.
17348 (tree_node_sizes): Likewise.
17349 (dump_tree_statistics): Use PRIu64 in printf format.
17351 2018-01-12 Martin Liska <mliska@suse.cz>
17353 * Makefile.in: As qsort_chk is implemented in vec.c, add
17354 vec.o to linkage of gencfn-macros.
17355 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17356 passing the info to record_node_allocation_statistics.
17357 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17359 * ggc-common.c (struct ggc_usage): Add operator== and use
17360 it in operator< and compare function.
17361 * mem-stats.h (struct mem_usage): Likewise.
17362 * vec.c (struct vec_usage): Remove operator< and compare
17363 function. Can be simply inherited.
17365 2018-01-12 Martin Jambor <mjambor@suse.cz>
17368 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17369 * tree-ssa-math-opts.c: Include domwalk.h.
17370 (convert_mult_to_fma_1): New function.
17371 (fma_transformation_info): New type.
17372 (fma_deferring_state): Likewise.
17373 (cancel_fma_deferring): New function.
17374 (result_of_phi): Likewise.
17375 (last_fma_candidate_feeds_initial_phi): Likewise.
17376 (convert_mult_to_fma): Added deferring logic, split actual
17377 transformation to convert_mult_to_fma_1.
17378 (math_opts_dom_walker): New type.
17379 (math_opts_dom_walker::after_dom_children): New method, body moved
17380 here from pass_optimize_widening_mul::execute, added deferring logic
17382 (pass_optimize_widening_mul::execute): Moved most of code to
17383 math_opts_dom_walker::after_dom_children.
17384 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17385 * config/i386/i386.c (ix86_option_override_internal): Added
17386 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17388 2018-01-12 Richard Biener <rguenther@suse.de>
17391 * dwarf2out.c (gen_variable_die): Do not reset old_die for
17392 inline instance vars.
17394 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
17397 * config/rx/rx.c (rx_is_restricted_memory_address):
17398 Handle SUBREG case.
17400 2018-01-12 Richard Biener <rguenther@suse.de>
17402 PR tree-optimization/80846
17403 * target.def (split_reduction): New target hook.
17404 * targhooks.c (default_split_reduction): New function.
17405 * targhooks.h (default_split_reduction): Declare.
17406 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17407 target requests first reduce vectors by combining low and high
17409 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17410 (get_vectype_for_scalar_type_and_size): Export.
17411 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17412 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17413 * doc/tm.texi: Regenerate.
17414 * config/i386/i386.c (ix86_split_reduction): Implement
17415 TARGET_VECTORIZE_SPLIT_REDUCTION.
17417 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17420 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17421 in PIC mode except for TARGET_VXWORKS_RTP.
17422 * config/sparc/sparc.c: Include cfgrtl.h.
17423 (TARGET_INIT_PIC_REG): Define.
17424 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17425 (sparc_pic_register_p): New predicate.
17426 (sparc_legitimate_address_p): Use it.
17427 (sparc_legitimize_pic_address): Likewise.
17428 (sparc_delegitimize_address): Likewise.
17429 (sparc_mode_dependent_address_p): Likewise.
17430 (gen_load_pcrel_sym): Remove 4th parameter.
17431 (load_got_register): Adjust call to above. Remove obsolete stuff.
17432 (sparc_expand_prologue): Do not call load_got_register here.
17433 (sparc_flat_expand_prologue): Likewise.
17434 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17435 (sparc_use_pseudo_pic_reg): New function.
17436 (sparc_init_pic_reg): Likewise.
17437 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17438 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17440 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
17442 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17443 Add item for branch_cost.
17445 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17447 PR rtl-optimization/83565
17448 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17449 not extend the result to a larger mode for rotate operations.
17450 (num_sign_bit_copies1): Likewise.
17452 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17455 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17457 Use values-Xc.o for -pedantic.
17458 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17460 2018-01-12 Martin Liska <mliska@suse.cz>
17463 * ipa-devirt.c (final_warning_record::grow_type_warnings):
17465 (possible_polymorphic_call_targets): Use it.
17466 (ipa_devirt): Likewise.
17468 2018-01-12 Martin Liska <mliska@suse.cz>
17470 * profile-count.h (enum profile_quality): Use 0 as invalid
17471 enum value of profile_quality.
17473 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
17475 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17476 -mext-string options.
17478 2018-01-12 Richard Biener <rguenther@suse.de>
17480 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17481 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17482 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17484 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17486 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17488 * configure.ac (--with-long-double-format): Add support for the
17489 configuration option to change the default long double format on
17491 * config.gcc (powerpc*-linux*-*): Likewise.
17492 * configure: Regenerate.
17493 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17494 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17495 used without modification.
17497 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17499 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17500 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17501 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17502 MISC_BUILTIN_SPEC_BARRIER.
17503 (rs6000_init_builtins): Likewise.
17504 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17506 (speculation_barrier): New define_insn.
17507 * doc/extend.texi: Document __builtin_speculation_barrier.
17509 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17512 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17513 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17514 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17516 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
17517 integral modes instead of "ss" and "sd".
17518 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17519 vectors with 32-bit and 64-bit elements.
17520 (vecdupssescalarmodesuffix): New mode attribute.
17521 (vec_dup<mode>): Use it.
17523 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
17526 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17527 frame if argument is passed on stack.
17529 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17532 * ree.c (combine_reaching_defs): Optimize also
17533 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17534 reg2=any_extend(exp); reg1=reg2;, formatting fix.
17536 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17538 PR middle-end/83189
17539 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17541 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17543 PR middle-end/83718
17544 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17545 after they are computed.
17547 2018-01-11 Bin Cheng <bin.cheng@arm.com>
17549 PR tree-optimization/83695
17550 * gimple-loop-linterchange.cc
17551 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17552 reset cached scev information after interchange.
17553 (pass_linterchange::execute): Remove call to scev_reset_htab.
17555 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17557 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17558 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17559 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17560 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17561 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17562 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17563 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17564 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17565 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17566 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17567 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17568 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17569 (V_lane_reg): Likewise.
17570 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17572 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17573 (vfmal_lane_low<mode>_intrinsic,
17574 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17575 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17576 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17577 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17578 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17579 vfmsl_lane_high<mode>_intrinsic): New define_insns.
17581 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17583 * config/arm/arm-cpus.in (fp16fml): New feature.
17584 (ALL_SIMD): Add fp16fml.
17585 (armv8.2-a): Add fp16fml as an option.
17586 (armv8.3-a): Likewise.
17587 (armv8.4-a): Add fp16fml as part of fp16.
17588 * config/arm/arm.h (TARGET_FP16FML): Define.
17589 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17591 * config/arm/arm-modes.def (V2HF): Define.
17592 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17593 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17594 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17595 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17596 vfmsl_low, vfmsl_high): New set of builtins.
17597 * config/arm/iterators.md (PLUSMINUS): New code iterator.
17598 (vfml_op): New code attribute.
17599 (VFMLHALVES): New int iterator.
17600 (VFML, VFMLSEL): New mode attributes.
17601 (V_reg): Define mapping for V2HF.
17602 (V_hi, V_lo): New mode attributes.
17603 (VF_constraint): Likewise.
17604 (vfml_half, vfml_half_selector): New int attributes.
17605 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17607 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17608 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17610 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17611 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17612 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17613 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
17615 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17616 Document new effective target and option set.
17618 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17620 * config/arm/arm-cpus.in (armv8_4): New feature.
17621 (ARMv8_4a): New fgroup.
17622 (armv8.4-a): New arch.
17623 * config/arm/arm-tables.opt: Regenerate.
17624 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17625 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17626 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17627 Add matching rules for -march=armv8.4-a and extensions.
17628 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17630 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
17633 * config/rx/rx.md (BW): New mode attribute.
17634 (sync_lock_test_and_setsi): Add mode suffix to insn output.
17636 2018-01-11 Richard Biener <rguenther@suse.de>
17638 PR tree-optimization/83435
17639 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17640 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17641 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17643 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17644 Alan Hayward <alan.hayward@arm.com>
17645 David Sherwood <david.sherwood@arm.com>
17647 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17649 (aarch64_classify_address): Initialize it. Track polynomial offsets.
17650 (aarch64_print_address_internal): Use it to check for a zero offset.
17652 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17653 Alan Hayward <alan.hayward@arm.com>
17654 David Sherwood <david.sherwood@arm.com>
17656 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17657 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17658 Return a poly_int64 rather than a HOST_WIDE_INT.
17659 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17660 rather than a HOST_WIDE_INT.
17661 * config/aarch64/aarch64.h (aarch64_frame): Protect with
17662 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
17663 hard_fp_offset, frame_size, initial_adjust, callee_offset and
17664 final_offset from HOST_WIDE_INT to poly_int64.
17665 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17666 to_constant when getting the number of units in an Advanced SIMD
17668 (aarch64_builtin_vectorized_function): Check for a constant number
17670 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17672 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17673 attribute instead of GET_MODE_NUNITS.
17674 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17675 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17676 GET_MODE_SIZE for fixed-size registers.
17677 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17678 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17679 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17680 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17681 (aarch64_print_operand, aarch64_print_address_internal)
17682 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17683 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17684 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17685 Handle polynomial GET_MODE_SIZE.
17686 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
17687 wider than SImode without modification.
17688 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17689 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17690 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17691 passing and returning SVE modes.
17692 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17693 rather than GEN_INT.
17694 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17695 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17696 (aarch64_allocate_and_probe_stack_space): Likewise.
17697 (aarch64_layout_frame): Cope with polynomial offsets.
17698 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17699 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
17700 polynomial offsets.
17701 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17702 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17703 poly_int64 rather than a HOST_WIDE_INT.
17704 (aarch64_get_separate_components, aarch64_process_components)
17705 (aarch64_expand_prologue, aarch64_expand_epilogue)
17706 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17707 (aarch64_anchor_offset): New function, split out from...
17708 (aarch64_legitimize_address): ...here.
17709 (aarch64_builtin_vectorization_cost): Handle polynomial
17710 TYPE_VECTOR_SUBPARTS.
17711 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17713 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17714 number of elements from the PARALLEL rather than the mode.
17715 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17716 rather than GET_MODE_BITSIZE.
17717 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17718 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17719 (aarch64_expand_vec_perm_const_1): Handle polynomial
17720 d->perm.length () and d->perm elements.
17721 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
17722 Apply to_constant to d->perm elements.
17723 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17724 polynomial CONST_VECTOR_NUNITS.
17725 (aarch64_move_pointer): Take amount as a poly_int64 rather
17727 (aarch64_progress_pointer): Avoid temporary variable.
17728 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17729 the mode attribute instead of GET_MODE.
17731 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17732 Alan Hayward <alan.hayward@arm.com>
17733 David Sherwood <david.sherwood@arm.com>
17735 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17736 x exists before using it.
17737 (aarch64_add_constant_internal): Rename to...
17738 (aarch64_add_offset_1): ...this. Replace regnum with separate
17739 src and dest rtxes. Handle the case in which they're different,
17740 including when the offset is zero. Replace scratchreg with an rtx.
17741 Use 2 additions if there is no spare register into which we can
17742 move a 16-bit constant.
17743 (aarch64_add_constant): Delete.
17744 (aarch64_add_offset): Replace reg with separate src and dest
17745 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
17746 Use aarch64_add_offset_1.
17747 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17748 an rtx rather than an int. Take the delta as a poly_int64
17749 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
17750 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17751 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17752 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
17753 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
17754 and aarch64_add_sp.
17755 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
17756 aarch64_add_constant.
17758 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17760 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17761 Use scalar_float_mode.
17763 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17765 * config/aarch64/aarch64-simd.md
17766 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
17767 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
17768 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
17769 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
17770 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
17771 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
17772 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
17773 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
17774 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
17775 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
17777 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17780 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
17781 targ_options->x_arm_arch_string is non NULL.
17783 2018-01-11 Tamar Christina <tamar.christina@arm.com>
17785 * config/aarch64/aarch64.h
17786 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
17788 2018-01-11 Sudakshina Das <sudi.das@arm.com>
17791 * expmed.c (emit_store_flag_force): Swap if const op0
17792 and change VOIDmode to mode of op0.
17794 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17796 PR rtl-optimization/83761
17797 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
17798 than bytes to mode_for_size.
17800 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17802 PR middle-end/83189
17803 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
17804 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
17807 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17809 PR middle-end/83575
17810 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
17811 when in layout mode.
17812 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
17813 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
17816 2018-01-10 Michael Collison <michael.collison@arm.com>
17818 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
17819 * config/aarch64/aarch64-option-extension.def: Add
17820 AARCH64_OPT_EXTENSION of 'fp16fml'.
17821 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17822 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
17823 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
17824 * config/aarch64/constraints.md (Ui7): New constraint.
17825 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
17826 (VFMLA_SEL_W): Ditto.
17829 (VFMLA16_LOW): New int iterator.
17830 (VFMLA16_HIGH): Ditto.
17831 (UNSPEC_FMLAL): New unspec.
17832 (UNSPEC_FMLSL): Ditto.
17833 (UNSPEC_FMLAL2): Ditto.
17834 (UNSPEC_FMLSL2): Ditto.
17835 (f16mac): New code attribute.
17836 * config/aarch64/aarch64-simd-builtins.def
17837 (aarch64_fmlal_lowv2sf): Ditto.
17838 (aarch64_fmlsl_lowv2sf): Ditto.
17839 (aarch64_fmlalq_lowv4sf): Ditto.
17840 (aarch64_fmlslq_lowv4sf): Ditto.
17841 (aarch64_fmlal_highv2sf): Ditto.
17842 (aarch64_fmlsl_highv2sf): Ditto.
17843 (aarch64_fmlalq_highv4sf): Ditto.
17844 (aarch64_fmlslq_highv4sf): Ditto.
17845 (aarch64_fmlal_lane_lowv2sf): Ditto.
17846 (aarch64_fmlsl_lane_lowv2sf): Ditto.
17847 (aarch64_fmlal_laneq_lowv2sf): Ditto.
17848 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
17849 (aarch64_fmlalq_lane_lowv4sf): Ditto.
17850 (aarch64_fmlsl_lane_lowv4sf): Ditto.
17851 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
17852 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
17853 (aarch64_fmlal_lane_highv2sf): Ditto.
17854 (aarch64_fmlsl_lane_highv2sf): Ditto.
17855 (aarch64_fmlal_laneq_highv2sf): Ditto.
17856 (aarch64_fmlsl_laneq_highv2sf): Ditto.
17857 (aarch64_fmlalq_lane_highv4sf): Ditto.
17858 (aarch64_fmlsl_lane_highv4sf): Ditto.
17859 (aarch64_fmlalq_laneq_highv4sf): Ditto.
17860 (aarch64_fmlsl_laneq_highv4sf): Ditto.
17861 * config/aarch64/aarch64-simd.md:
17862 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
17863 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17864 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
17865 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17866 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
17867 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
17868 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
17869 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
17870 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
17871 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
17872 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
17873 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
17874 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
17875 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
17876 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
17877 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
17878 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
17879 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
17880 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
17881 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
17882 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
17883 (vfmlsl_low_u32): Ditto.
17884 (vfmlalq_low_u32): Ditto.
17885 (vfmlslq_low_u32): Ditto.
17886 (vfmlal_high_u32): Ditto.
17887 (vfmlsl_high_u32): Ditto.
17888 (vfmlalq_high_u32): Ditto.
17889 (vfmlslq_high_u32): Ditto.
17890 (vfmlal_lane_low_u32): Ditto.
17891 (vfmlsl_lane_low_u32): Ditto.
17892 (vfmlal_laneq_low_u32): Ditto.
17893 (vfmlsl_laneq_low_u32): Ditto.
17894 (vfmlalq_lane_low_u32): Ditto.
17895 (vfmlslq_lane_low_u32): Ditto.
17896 (vfmlalq_laneq_low_u32): Ditto.
17897 (vfmlslq_laneq_low_u32): Ditto.
17898 (vfmlal_lane_high_u32): Ditto.
17899 (vfmlsl_lane_high_u32): Ditto.
17900 (vfmlal_laneq_high_u32): Ditto.
17901 (vfmlsl_laneq_high_u32): Ditto.
17902 (vfmlalq_lane_high_u32): Ditto.
17903 (vfmlslq_lane_high_u32): Ditto.
17904 (vfmlalq_laneq_high_u32): Ditto.
17905 (vfmlslq_laneq_high_u32): Ditto.
17906 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
17907 (AARCH64_FL_FOR_ARCH8_4): New.
17908 (AARCH64_ISA_F16FML): New ISA flag.
17909 (TARGET_F16FML): New feature flag for fp16fml.
17910 (doc/invoke.texi): Document new fp16fml option.
17912 2018-01-10 Michael Collison <michael.collison@arm.com>
17914 * config/aarch64/aarch64-builtins.c:
17915 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
17916 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17917 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
17918 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
17919 (AARCH64_ISA_SHA3): New ISA flag.
17920 (TARGET_SHA3): New feature flag for sha3.
17921 * config/aarch64/iterators.md (sha512_op): New int attribute.
17922 (CRYPTO_SHA512): New int iterator.
17923 (UNSPEC_SHA512H): New unspec.
17924 (UNSPEC_SHA512H2): Ditto.
17925 (UNSPEC_SHA512SU0): Ditto.
17926 (UNSPEC_SHA512SU1): Ditto.
17927 * config/aarch64/aarch64-simd-builtins.def
17928 (aarch64_crypto_sha512hqv2di): New builtin.
17929 (aarch64_crypto_sha512h2qv2di): Ditto.
17930 (aarch64_crypto_sha512su0qv2di): Ditto.
17931 (aarch64_crypto_sha512su1qv2di): Ditto.
17932 (aarch64_eor3qv8hi): Ditto.
17933 (aarch64_rax1qv2di): Ditto.
17934 (aarch64_xarqv2di): Ditto.
17935 (aarch64_bcaxqv8hi): Ditto.
17936 * config/aarch64/aarch64-simd.md:
17937 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
17938 (aarch64_crypto_sha512su0qv2di): Ditto.
17939 (aarch64_crypto_sha512su1qv2di): Ditto.
17940 (aarch64_eor3qv8hi): Ditto.
17941 (aarch64_rax1qv2di): Ditto.
17942 (aarch64_xarqv2di): Ditto.
17943 (aarch64_bcaxqv8hi): Ditto.
17944 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
17945 (vsha512h2q_u64): Ditto.
17946 (vsha512su0q_u64): Ditto.
17947 (vsha512su1q_u64): Ditto.
17948 (veor3q_u16): Ditto.
17949 (vrax1q_u64): Ditto.
17950 (vxarq_u64): Ditto.
17951 (vbcaxq_u16): Ditto.
17952 * config/arm/types.md (crypto_sha512): New type attribute.
17953 (crypto_sha3): Ditto.
17954 (doc/invoke.texi): Document new sha3 option.
17956 2018-01-10 Michael Collison <michael.collison@arm.com>
17958 * config/aarch64/aarch64-builtins.c:
17959 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
17960 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17961 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
17962 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
17963 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
17964 (AARCH64_ISA_SM4): New ISA flag.
17965 (TARGET_SM4): New feature flag for sm4.
17966 * config/aarch64/aarch64-simd-builtins.def
17967 (aarch64_sm3ss1qv4si): Ditto.
17968 (aarch64_sm3tt1aq4si): Ditto.
17969 (aarch64_sm3tt1bq4si): Ditto.
17970 (aarch64_sm3tt2aq4si): Ditto.
17971 (aarch64_sm3tt2bq4si): Ditto.
17972 (aarch64_sm3partw1qv4si): Ditto.
17973 (aarch64_sm3partw2qv4si): Ditto.
17974 (aarch64_sm4eqv4si): Ditto.
17975 (aarch64_sm4ekeyqv4si): Ditto.
17976 * config/aarch64/aarch64-simd.md:
17977 (aarch64_sm3ss1qv4si): Ditto.
17978 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
17979 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
17980 (aarch64_sm4eqv4si): Ditto.
17981 (aarch64_sm4ekeyqv4si): Ditto.
17982 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
17983 (sm3part_op): Ditto.
17984 (CRYPTO_SM3TT): Ditto.
17985 (CRYPTO_SM3PART): Ditto.
17986 (UNSPEC_SM3SS1): New unspec.
17987 (UNSPEC_SM3TT1A): Ditto.
17988 (UNSPEC_SM3TT1B): Ditto.
17989 (UNSPEC_SM3TT2A): Ditto.
17990 (UNSPEC_SM3TT2B): Ditto.
17991 (UNSPEC_SM3PARTW1): Ditto.
17992 (UNSPEC_SM3PARTW2): Ditto.
17993 (UNSPEC_SM4E): Ditto.
17994 (UNSPEC_SM4EKEY): Ditto.
17995 * config/aarch64/constraints.md (Ui2): New constraint.
17996 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
17997 * config/arm/types.md (crypto_sm3): New type attribute.
17998 (crypto_sm4): Ditto.
17999 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18000 (vsm3tt1aq_u32): Ditto.
18001 (vsm3tt1bq_u32): Ditto.
18002 (vsm3tt2aq_u32): Ditto.
18003 (vsm3tt2bq_u32): Ditto.
18004 (vsm3partw1q_u32): Ditto.
18005 (vsm3partw2q_u32): Ditto.
18006 (vsm4eq_u32): Ditto.
18007 (vsm4ekeyq_u32): Ditto.
18008 (doc/invoke.texi): Document new sm4 option.
18010 2018-01-10 Michael Collison <michael.collison@arm.com>
18012 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18013 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18014 (AARCH64_FL_FOR_ARCH8_4): New.
18015 (AARCH64_FL_V8_4): New flag.
18016 (doc/invoke.texi): Document new armv8.4-a option.
18018 2018-01-10 Michael Collison <michael.collison@arm.com>
18020 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18021 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18022 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18023 * config/aarch64/aarch64-option-extension.def: Add
18024 AARCH64_OPT_EXTENSION of 'sha2'.
18025 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18026 (crypto): Disable sha2 and aes if crypto disabled.
18027 (crypto): Enable aes and sha2 if enabled.
18028 (simd): Disable sha2 and aes if simd disabled.
18029 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18031 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18032 (TARGET_SHA2): New feature flag for sha2.
18033 (TARGET_AES): New feature flag for aes.
18034 * config/aarch64/aarch64-simd.md:
18035 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18036 conditional on TARGET_AES.
18037 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18038 (aarch64_crypto_sha1hsi): Make pattern conditional
18040 (aarch64_crypto_sha1hv4si): Ditto.
18041 (aarch64_be_crypto_sha1hv4si): Ditto.
18042 (aarch64_crypto_sha1su1v4si): Ditto.
18043 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18044 (aarch64_crypto_sha1su0v4si): Ditto.
18045 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18046 (aarch64_crypto_sha256su0v4si): Ditto.
18047 (aarch64_crypto_sha256su1v4si): Ditto.
18048 (doc/invoke.texi): Document new aes and sha2 options.
18050 2018-01-10 Martin Sebor <msebor@redhat.com>
18052 PR tree-optimization/83781
18053 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18056 2018-01-11 Martin Sebor <msebor@gmail.com>
18057 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18059 PR tree-optimization/83501
18060 PR tree-optimization/81703
18062 * tree-ssa-strlen.c (get_string_cst): Rename...
18063 (get_string_len): ...to this. Handle global constants.
18064 (handle_char_store): Adjust.
18066 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
18067 Jim Wilson <jimw@sifive.com>
18069 * config/riscv/riscv-protos.h (riscv_output_return): New.
18070 * config/riscv/riscv.c (struct machine_function): New naked_p field.
18071 (riscv_attribute_table, riscv_output_return),
18072 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18073 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18074 (riscv_compute_frame_info): Only compute frame->mask if not a naked
18076 (riscv_expand_prologue): Add early return for naked function.
18077 (riscv_expand_epilogue): Likewise.
18078 (riscv_function_ok_for_sibcall): Return false for naked function.
18079 (riscv_set_current_function): New.
18080 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18081 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18082 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18083 * doc/extend.texi (RISC-V Function Attributes): New.
18085 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18087 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18088 check for 128-bit long double before checking TCmode.
18089 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18090 128-bit long doubles before checking TFmode or TCmode.
18091 (FLOAT128_IBM_P): Likewise.
18093 2018-01-10 Martin Sebor <msebor@redhat.com>
18095 PR tree-optimization/83671
18096 * builtins.c (c_strlen): Unconditionally return zero for the empty
18098 Use -Warray-bounds for warnings.
18099 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18100 for non-constant array indices with COMPONENT_REF, arrays of
18101 arrays, and pointers to arrays.
18102 (gimple_fold_builtin_strlen): Determine and set length range for
18103 non-constant character arrays.
18105 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
18107 PR middle-end/81897
18108 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18111 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
18113 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18115 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18118 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18119 VECTOR_MEM_ALTIVEC_OR_VSX_P.
18120 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18121 indexed_or_indirect_operand predicate.
18122 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18123 (*vsx_le_perm_load_v8hi): Likewise.
18124 (*vsx_le_perm_load_v16qi): Likewise.
18125 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18126 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18127 (*vsx_le_perm_store_v8hi): Likewise.
18128 (*vsx_le_perm_store_v16qi): Likewise.
18129 (eight unnamed splitters): Likewise.
18131 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18133 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18134 * config/rs6000/emmintrin.h: Likewise.
18135 * config/rs6000/mmintrin.h: Likewise.
18136 * config/rs6000/xmmintrin.h: Likewise.
18138 2018-01-10 David Malcolm <dmalcolm@redhat.com>
18141 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18143 * tree.c (tree_nop_conversion): Return true for location wrapper
18145 (maybe_wrap_with_location): New function.
18146 (selftest::check_strip_nops): New function.
18147 (selftest::test_location_wrappers): New function.
18148 (selftest::tree_c_tests): Call it.
18149 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18150 (maybe_wrap_with_location): New decl.
18151 (EXPR_LOCATION_WRAPPER_P): New macro.
18152 (location_wrapper_p): New inline function.
18153 (tree_strip_any_location_wrapper): New inline function.
18155 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
18158 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18159 stack_realign_offset for the largest alignment of stack slot
18161 (ix86_find_max_used_stack_alignment): New function.
18162 (ix86_finalize_stack_frame_flags): Use it. Set
18163 max_used_stack_alignment if we don't realign stack.
18164 * config/i386/i386.h (machine_function): Add
18165 max_used_stack_alignment.
18167 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
18169 * config/arm/arm.opt (-mbranch-cost): New option.
18170 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18173 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
18176 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18177 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18179 2018-01-10 Richard Biener <rguenther@suse.de>
18182 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18183 early out so it also covers the case where we have a non-NULL
18186 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18188 PR tree-optimization/83753
18189 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18190 for non-strided grouped accesses if the number of elements is 1.
18192 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18195 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18196 * i386.h (TARGET_USE_GATHER): Define.
18197 * x86-tune.def (X86_TUNE_USE_GATHER): New.
18199 2018-01-10 Martin Liska <mliska@suse.cz>
18202 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18203 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18205 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18206 CLEANUP_NO_PARTITIONING is not set.
18208 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18210 * doc/rtl.texi: Remove documentation of (const ...) wrappers
18211 for vectors, as a partial revert of r254296.
18212 * rtl.h (const_vec_p): Delete.
18213 (const_vec_duplicate_p): Don't test for vector CONSTs.
18214 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18215 * expmed.c (make_tree): Likewise.
18218 * common.md (E, F): Use CONSTANT_P instead of checking for
18220 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18221 checking for CONST_VECTOR.
18223 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18225 PR middle-end/83575
18226 * predict.c (force_edge_cold): Handle in more sane way edges
18227 with no prediction.
18229 2018-01-09 Carl Love <cel@us.ibm.com>
18231 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18233 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18234 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18235 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18236 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
18237 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18238 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
18239 * config/rs6000/rs6000-protos.h: Add extern defition for
18240 rs6000_generate_float2_double_code.
18241 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18243 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18244 (float2_v2df): Add define_expand.
18246 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
18249 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18250 op_mode in the force_to_mode call.
18252 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18254 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18255 instead of checking each element individually.
18256 (aarch64_evpc_uzp): Likewise.
18257 (aarch64_evpc_zip): Likewise.
18258 (aarch64_evpc_ext): Likewise.
18259 (aarch64_evpc_rev): Likewise.
18260 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18261 instead of checking each element individually. Return true without
18263 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18264 whether all selected elements come from the same input, instead of
18265 checking each element individually. Remove calls to gen_rtx_REG,
18266 start_sequence and end_sequence and instead assert that no rtl is
18269 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18271 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18272 order of HIGH and CONST checks.
18274 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18276 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18277 if the destination isn't an SSA_NAME.
18279 2018-01-09 Richard Biener <rguenther@suse.de>
18281 PR tree-optimization/83668
18282 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18284 (canonicalize_loop_form): ... here, renamed from ...
18285 (canonicalize_loop_closed_ssa_form): ... this and amended to
18286 swap successor edges for loop exit blocks to make us use
18287 the RPO order we need for initial schedule generation.
18289 2018-01-09 Joseph Myers <joseph@codesourcery.com>
18291 PR tree-optimization/64811
18292 * match.pd: When optimizing comparisons with Inf, avoid
18293 introducing or losing exceptions from comparisons with NaN.
18295 2018-01-09 Martin Liska <mliska@suse.cz>
18298 * asan.c (shadow_mem_size): Add gcc_assert.
18300 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
18302 Don't save registers in main().
18305 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18306 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18307 * config/avr/avr.c (avr_set_current_function): Don't error if
18308 naked, OS_task or OS_main are specified at the same time.
18309 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18311 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18313 * common/config/avr/avr-common.c (avr_option_optimization_table):
18314 Switch on -mmain-is-OS_task for optimizing compilations.
18316 2018-01-09 Richard Biener <rguenther@suse.de>
18318 PR tree-optimization/83572
18319 * graphite.c: Include cfganal.h.
18320 (graphite_transform_loops): Connect infinite loops to exit
18321 and remove fake edges at the end.
18323 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18325 * ipa-inline.c (edge_badness): Revert accidental checkin.
18327 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18330 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18331 symbols; not inline clones.
18333 2018-01-09 Jakub Jelinek <jakub@redhat.com>
18336 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18337 hard registers. Formatting fixes.
18339 PR preprocessor/83722
18340 * gcc.c (try_generate_repro): Pass
18341 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18342 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18345 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
18346 Kito Cheng <kito.cheng@gmail.com>
18348 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18349 (riscv_leaf_function_p): Delete.
18350 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18352 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18354 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18356 (do_ifelse): New function.
18357 (do_isel): New function.
18358 (do_sub3): New function.
18359 (do_add3): New function.
18360 (do_load_mask_compare): New function.
18361 (do_overlap_load_compare): New function.
18362 (expand_compare_loop): New function.
18363 (expand_block_compare): Call expand_compare_loop() when appropriate.
18364 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18365 option description.
18366 (-mblock-compare-inline-loop-limit): New option.
18368 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18371 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18372 Reverse order of second and third operands in first alternative.
18373 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18374 of first and second elements in UNSPEC_VPERMR vector.
18375 (altivec_expand_vec_perm_le): Likewise.
18377 2018-01-08 Jeff Law <law@redhat.com>
18379 PR rtl-optimizatin/81308
18380 * tree-switch-conversion.c (cfg_altered): New file scoped static.
18381 (process_switch): If group_case_labels makes a change, then set
18383 (pass_convert_switch::execute): If a switch is converted, then
18384 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
18386 PR rtl-optimization/81308
18387 * recog.c (split_all_insns): Conditionally cleanup the CFG after
18390 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
18392 PR target/83663 - Revert r255946
18393 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18394 generation for cases where splatting a value is not useful.
18395 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18396 across a vec_duplicate and a paradoxical subreg forming a vector
18397 mode to a vec_concat.
18399 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18401 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18402 -march=armv8.3-a variants.
18403 * config/arm/t-multilib: Likewise.
18404 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
18406 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18408 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18410 (cceq_ior_compare_complement): Give it a name so I can use it, and
18411 change boolean_or_operator predicate to boolean_operator so it can
18412 be used to generate a crand.
18413 (eqne): New code iterator.
18414 (bd/bd_neg): New code_attrs.
18415 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18416 a single define_insn.
18417 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18418 decrement (bdnzt/bdnzf/bdzt/bdzf).
18419 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18420 with the new names of the branch decrement patterns, and added the
18421 names of the branch decrement conditional patterns.
18423 2018-01-08 Richard Biener <rguenther@suse.de>
18425 PR tree-optimization/83563
18426 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18429 2018-01-08 Richard Biener <rguenther@suse.de>
18431 PR middle-end/83713
18432 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18434 2018-01-08 Richard Biener <rguenther@suse.de>
18436 PR tree-optimization/83685
18437 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18438 references to abnormals.
18440 2018-01-08 Richard Biener <rguenther@suse.de>
18443 * dwarf2out.c (output_indirect_strings): Handle empty
18444 skeleton_debug_str_hash.
18445 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18447 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18449 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18450 (emit_store_direct): Likewise.
18451 (arc_trampoline_adjust_address): Likewise.
18452 (arc_asm_trampoline_template): New function.
18453 (arc_initialize_trampoline): Use asm_trampoline_template.
18454 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18455 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18456 * config/arc/arc.md (flush_icache): Delete pattern.
18458 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18460 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18461 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18464 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18467 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18468 by not USED_FOR_TARGET.
18469 (make_pass_resolve_sw_modes): Likewise.
18471 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18473 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18476 2018-01-08 Richard Biener <rguenther@suse.de>
18478 PR middle-end/83580
18479 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18481 2018-01-08 Richard Biener <rguenther@suse.de>
18483 PR middle-end/83517
18484 * match.pd ((t * 2) / 2) -> t): Add missing :c.
18486 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
18488 PR middle-end/81897
18489 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18490 basic blocks with a small number of successors.
18491 (convert_control_dep_chain_into_preds): Improve handling of
18493 (dump_predicates): Split apart into...
18494 (dump_pred_chain): ...here...
18495 (dump_pred_info): ...and here.
18496 (can_one_predicate_be_invalidated_p): Add debugging printfs.
18497 (can_chain_union_be_invalidated_p): Improve check for invalidation
18499 (uninit_uses_cannot_happen): Avoid unnecessary if
18500 convert_control_dep_chain_into_preds yielded nothing.
18502 2018-01-06 Martin Sebor <msebor@redhat.com>
18504 PR tree-optimization/83640
18505 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18506 subtracting negative offset from size.
18507 (builtin_access::overlap): Adjust offset bounds of the access to fall
18508 within the size of the object if possible.
18510 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
18512 PR rtl-optimization/83699
18513 * expmed.c (extract_bit_field_1): Restrict the vector usage of
18514 extract_bit_field_as_subreg to cases in which the extracted
18515 value is also a vector.
18517 * lra-constraints.c (process_alt_operands): Test for the equivalence
18518 substitutions when detecting a possible reload cycle.
18520 2018-01-06 Jakub Jelinek <jakub@redhat.com>
18523 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18524 by default if flag_selective_schedling{,2}. Formatting fixes.
18526 PR rtl-optimization/83682
18527 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18528 if it has non-VECTOR_MODE element mode.
18529 (vec_duplicate_p): Likewise.
18531 PR middle-end/83694
18532 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18533 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18535 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18538 * config/i386/i386-builtin.def
18539 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18540 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18541 Require also OPTION_MASK_ISA_AVX512F in addition to
18542 OPTION_MASK_ISA_GFNI.
18543 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18544 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18545 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18546 to OPTION_MASK_ISA_GFNI.
18547 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18548 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18549 OPTION_MASK_ISA_AVX512BW.
18550 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18551 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18552 addition to OPTION_MASK_ISA_GFNI.
18553 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18554 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18555 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18556 to OPTION_MASK_ISA_GFNI.
18557 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18558 a requirement for all ISAs rather than any of them with a few
18560 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18562 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18563 bitmasks to be enabled with 3 exceptions, instead of requiring any
18564 enabled ISA with lots of exceptions.
18565 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18566 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18567 Change avx512bw in isa attribute to avx512f.
18568 * config/i386/sgxintrin.h: Add license boilerplate.
18569 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
18570 to __AVX512F__ and __AVX512VL to __AVX512VL__.
18571 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18572 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18574 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18575 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18576 temporarily sse2 rather than sse if not enabled already.
18579 * config/i386/sse.md (VI248_VLBW): Rename to ...
18580 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
18581 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18582 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18583 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18584 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18585 mode iterator instead of VI248_VLBW.
18587 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
18589 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18590 (record_modified): Skip clobbers; add debug output.
18591 (param_change_prob): Use sreal frequencies.
18593 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18595 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18596 punt for user-aligned variables.
18598 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18600 * tree-chrec.c (chrec_contains_symbols): Return true for
18603 2018-01-05 Sudakshina Das <sudi.das@arm.com>
18606 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18607 of (x|y) == x for BICS pattern.
18609 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18611 PR tree-optimization/83605
18612 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18613 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18616 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
18618 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18619 * config/epiphany/rtems.h: New file.
18621 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18622 Uros Bizjak <ubizjak@gmail.com>
18625 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18626 QIreg_operand instead of register_operand predicate.
18627 * config/i386/i386.c (ix86_rop_should_change_byte_p,
18628 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18629 comments instead of -fmitigate[-_]rop.
18631 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18634 * cgraphunit.c (symbol_table::compile): Switch to text_section
18635 before calling assembly_start debug hook.
18636 * run-rtl-passes.c (run_rtl_passes): Likewise.
18639 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18641 * tree-vrp.c (extract_range_from_binary_expr_1): Check
18642 range_int_cst_p rather than !symbolic_range_p before calling
18643 extract_range_from_multiplicative_op_1.
18645 2018-01-04 Jeff Law <law@redhat.com>
18647 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18648 redundant test in assertion.
18650 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18652 * doc/rtl.texi: Document machine_mode wrapper classes.
18654 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18656 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18657 using tree_to_uhwi.
18659 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18661 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18662 the VEC_PERM_EXPR fold to fail.
18664 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18667 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18668 to switched_sections.
18670 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18673 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18674 test for d.testing.
18676 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
18679 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18680 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18682 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18685 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18686 is BLKmode and bitpos not zero or mode change is needed.
18688 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18691 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18694 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
18697 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18698 instead of MULT rtx. Update all corresponding splitters.
18699 (*saddl_se): Ditto.
18700 (*ssub<modesuffix>): Ditto.
18701 (*ssubl_se): Ditto.
18702 (*cmp_sadd_di): Update split patterns.
18703 (*cmp_sadd_si): Ditto.
18704 (*cmp_sadd_sidi): Ditto.
18705 (*cmp_ssub_di): Ditto.
18706 (*cmp_ssub_si): Ditto.
18707 (*cmp_ssub_sidi): Ditto.
18708 * config/alpha/predicates.md (const23_operand): New predicate.
18709 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18710 Look for ASHIFT, not MULT inner operand.
18711 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18713 2018-01-04 Martin Liska <mliska@suse.cz>
18715 PR gcov-profile/83669
18716 * gcov.c (output_intermediate_file): Add version to intermediate
18718 * doc/gcov.texi: Document new field 'version' in intermediate
18719 file format. Fix location of '-k' option of gcov command.
18721 2018-01-04 Martin Liska <mliska@suse.cz>
18724 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18726 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18728 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18730 2018-01-03 Martin Sebor <msebor@redhat.com>
18732 PR tree-optimization/83655
18733 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18734 checking calls with invalid arguments.
18736 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18738 * tree-vect-stmts.c (vect_get_store_rhs): New function.
18739 (vectorizable_mask_load_store): Delete.
18740 (vectorizable_call): Return false for masked loads and stores.
18741 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
18742 instead of gimple_assign_rhs1.
18743 (vectorizable_load): Handle IFN_MASK_LOAD.
18744 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18746 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18748 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18750 (vectorizable_mask_load_store): ...here.
18751 (vectorizable_load): ...and here.
18753 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18755 * tree-vect-stmts.c (vect_build_all_ones_mask)
18756 (vect_build_zero_merge_argument): New functions, split out from...
18757 (vectorizable_load): ...here.
18759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18761 * tree-vect-stmts.c (vect_check_store_rhs): New function,
18763 (vectorizable_mask_load_store): ...here.
18764 (vectorizable_store): ...and here.
18766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18768 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
18770 (vectorizable_mask_load_store): ...here.
18772 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18774 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
18775 (vect_model_store_cost): Take a vec_load_store_type instead of a
18777 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
18778 (vect_model_store_cost): Take a vec_load_store_type instead of a
18780 (vectorizable_mask_load_store): Update accordingly.
18781 (vectorizable_store): Likewise.
18782 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
18784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18786 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
18787 IFN_MASK_LOAD calls here rather than...
18788 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
18790 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18791 Alan Hayward <alan.hayward@arm.com>
18792 David Sherwood <david.sherwood@arm.com>
18794 * expmed.c (extract_bit_field_1): For vector extracts,
18795 fall back to extract_bit_field_as_subreg if vec_extract
18798 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18799 Alan Hayward <alan.hayward@arm.com>
18800 David Sherwood <david.sherwood@arm.com>
18802 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
18803 they are variable or constant sized.
18804 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
18805 slots for constant-sized data.
18807 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18808 Alan Hayward <alan.hayward@arm.com>
18809 David Sherwood <david.sherwood@arm.com>
18811 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
18812 handling COND_EXPRs with boolean comparisons, try to find a better
18813 basis for the mask type than the boolean itself.
18815 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18817 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
18818 is calculated and how it can be overridden.
18819 * genmodes.c (max_bitsize_mode_any_mode): New variable.
18820 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
18822 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
18825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18826 Alan Hayward <alan.hayward@arm.com>
18827 David Sherwood <david.sherwood@arm.com>
18829 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
18830 Remove the mode argument.
18831 (aarch64_simd_valid_immediate): Remove the mode and inverse
18833 * config/aarch64/iterators.md (bitsize): New iterator.
18834 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
18835 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
18836 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
18837 aarch64_simd_valid_immediate.
18838 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
18839 (aarch64_reg_or_bic_imm): Likewise.
18840 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
18841 with an insn_type enum and msl with a modifier_type enum.
18842 Replace element_width with a scalar_mode. Change the shift
18843 to unsigned int. Add constructors for scalar_float_mode and
18844 scalar_int_mode elements.
18845 (aarch64_vect_float_const_representable_p): Delete.
18846 (aarch64_can_const_movi_rtx_p)
18847 (aarch64_simd_scalar_immediate_valid_for_move)
18848 (aarch64_simd_make_constant): Update call to
18849 aarch64_simd_valid_immediate.
18850 (aarch64_advsimd_valid_immediate_hs): New function.
18851 (aarch64_advsimd_valid_immediate): Likewise.
18852 (aarch64_simd_valid_immediate): Remove mode and inverse
18853 arguments. Rewrite to use the above. Use const_vec_duplicate_p
18854 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
18855 and aarch64_float_const_representable_p on the result.
18856 (aarch64_output_simd_mov_immediate): Remove mode argument.
18857 Update call to aarch64_simd_valid_immediate and use of
18858 simd_immediate_info.
18859 (aarch64_output_scalar_simd_mov_immediate): Update call
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 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
18867 (mode_nunits): Likewise CONST_MODE_NUNITS.
18868 * machmode.def (ADJUST_NUNITS): Document.
18869 * genmodes.c (mode_data::need_nunits_adj): New field.
18870 (blank_mode): Update accordingly.
18871 (adj_nunits): New variable.
18872 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
18874 (emit_mode_size_inline): Set need_bytesize_adj for all modes
18875 listed in adj_nunits.
18876 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
18877 listed in adj_nunits. Don't emit case statements for such modes.
18878 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
18879 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
18880 nothing if adj_nunits is nonnull.
18881 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
18882 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
18883 (emit_mode_fbit): Update use of print_maybe_const_decl.
18884 (emit_move_size): Likewise. Treat the array as non-const
18886 (emit_mode_adjustments): Handle adj_nunits.
18888 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18890 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
18891 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
18892 (VECTOR_MODES): Use it.
18893 (make_vector_modes): Take the prefix as an argument.
18895 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18896 Alan Hayward <alan.hayward@arm.com>
18897 David Sherwood <david.sherwood@arm.com>
18899 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
18900 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
18901 for MODE_VECTOR_BOOL.
18902 * machmode.def (VECTOR_BOOL_MODE): Document.
18903 * genmodes.c (VECTOR_BOOL_MODE): New macro.
18904 (make_vector_bool_mode): New function.
18905 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
18907 * lto-streamer-in.c (lto_input_mode_table): Likewise.
18908 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
18910 * stor-layout.c (int_mode_for_mode): Likewise.
18911 * tree.c (build_vector_type_for_mode): Likewise.
18912 * varasm.c (output_constant_pool_2): Likewise.
18913 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
18914 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
18915 for MODE_VECTOR_BOOL.
18916 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
18917 of mode class checks.
18918 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
18919 instead of a list of mode class checks.
18920 (expand_vector_scalar_condition): Likewise.
18921 (type_for_widest_vector_mode): Handle BImode as an inner mode.
18923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18924 Alan Hayward <alan.hayward@arm.com>
18925 David Sherwood <david.sherwood@arm.com>
18927 * machmode.h (mode_size): Change from unsigned short to
18929 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
18930 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18931 or if measurement_type is not polynomial.
18932 (fixed_size_mode::includes_p): Check for constant-sized modes.
18933 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
18934 return a poly_uint16 rather than an unsigned short.
18935 (emit_mode_size): Change the type of mode_size from unsigned short
18936 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
18937 (emit_mode_adjustments): Cope with polynomial vector sizes.
18938 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18940 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18942 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
18943 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
18944 * caller-save.c (setup_save_areas): Likewise.
18945 (replace_reg_with_saved_mem): Likewise.
18946 * calls.c (emit_library_call_value_1): Likewise.
18947 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
18948 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
18949 (gen_lowpart_for_combine): Likewise.
18950 * convert.c (convert_to_integer_1): Likewise.
18951 * cse.c (equiv_constant, cse_insn): Likewise.
18952 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
18953 (cselib_subst_to_values): Likewise.
18954 * dce.c (word_dce_process_block): Likewise.
18955 * df-problems.c (df_word_lr_mark_ref): Likewise.
18956 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
18957 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
18958 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
18959 (rtl_for_decl_location): Likewise.
18960 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
18961 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
18962 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
18963 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
18964 (expand_expr_real_1): Likewise.
18965 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
18966 (pad_below): Likewise.
18967 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18968 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
18969 * ira.c (get_subreg_tracking_sizes): Likewise.
18970 * ira-build.c (ira_create_allocno_objects): Likewise.
18971 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
18972 (ira_sort_regnos_for_alter_reg): Likewise.
18973 * ira-costs.c (record_operand_costs): Likewise.
18974 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
18975 (resolve_simple_move): Likewise.
18976 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
18977 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
18978 (lra_constraints): Likewise.
18979 (CONST_POOL_OK_P): Reject variable-sized modes.
18980 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
18981 (add_pseudo_to_slot, lra_spill): Likewise.
18982 * omp-low.c (omp_clause_aligned_alignment): Likewise.
18983 * optabs-query.c (get_best_extraction_insn): Likewise.
18984 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18985 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
18986 (expand_mult_highpart, valid_multiword_target_p): Likewise.
18987 * recog.c (offsettable_address_addr_space_p): Likewise.
18988 * regcprop.c (maybe_mode_change): Likewise.
18989 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
18990 * regrename.c (build_def_use): Likewise.
18991 * regstat.c (dump_reg_info): Likewise.
18992 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
18993 (find_reloads, find_reloads_subreg_address): Likewise.
18994 * reload1.c (eliminate_regs_1): Likewise.
18995 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
18996 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
18997 (simplify_binary_operation_1, simplify_subreg): Likewise.
18998 * targhooks.c (default_function_arg_padding): Likewise.
18999 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19000 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19001 (verify_gimple_assign_ternary): Likewise.
19002 * tree-inline.c (estimate_move_cost): Likewise.
19003 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19004 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19005 (get_address_cost_ainc): Likewise.
19006 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19007 (vect_supportable_dr_alignment): Likewise.
19008 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19009 (vectorizable_reduction): Likewise.
19010 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19011 (vectorizable_operation, vectorizable_load): Likewise.
19012 * tree.c (build_same_sized_truth_vector_type): Likewise.
19013 * valtrack.c (cleanup_auto_inc_dec): Likewise.
19014 * var-tracking.c (emit_note_insn_var_location): Likewise.
19015 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19016 (ADDR_VEC_ALIGN): Likewise.
19018 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19019 Alan Hayward <alan.hayward@arm.com>
19020 David Sherwood <david.sherwood@arm.com>
19022 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19024 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19025 or if measurement_type is polynomial.
19026 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19027 * combine.c (make_extraction): Likewise.
19028 * dse.c (find_shift_sequence): Likewise.
19029 * dwarf2out.c (mem_loc_descriptor): Likewise.
19030 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19031 (extract_bit_field, extract_low_bits): Likewise.
19032 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19033 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19034 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19035 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19036 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19037 * reload.c (find_reloads): Likewise.
19038 * reload1.c (alter_reg): Likewise.
19039 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19040 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19041 * tree-if-conv.c (predicate_mem_writes): Likewise.
19042 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19043 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19044 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19045 * valtrack.c (dead_debug_insert_temp): Likewise.
19046 * varasm.c (mergeable_constant_section): Likewise.
19047 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19050 Alan Hayward <alan.hayward@arm.com>
19051 David Sherwood <david.sherwood@arm.com>
19053 * expr.c (expand_assignment): Cope with polynomial mode sizes
19054 when assigning to a CONCAT.
19056 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19057 Alan Hayward <alan.hayward@arm.com>
19058 David Sherwood <david.sherwood@arm.com>
19060 * machmode.h (mode_precision): Change from unsigned short to
19062 (mode_to_precision): Return a poly_uint16 rather than an unsigned
19064 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19065 or if measurement_type is not polynomial.
19066 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
19067 in which the mode is already known to be a scalar_int_mode.
19068 * genmodes.c (emit_mode_precision): Change the type of mode_precision
19069 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
19071 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19072 for GET_MODE_PRECISION.
19073 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19074 for GET_MODE_PRECISION.
19075 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19077 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19078 (expand_field_assignment, make_extraction): Likewise.
19079 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19080 (get_last_value): Likewise.
19081 * convert.c (convert_to_integer_1): Likewise.
19082 * cse.c (cse_insn): Likewise.
19083 * expr.c (expand_expr_real_1): Likewise.
19084 * lra-constraints.c (simplify_operand_subreg): Likewise.
19085 * optabs-query.c (can_atomic_load_p): Likewise.
19086 * optabs.c (expand_atomic_load): Likewise.
19087 (expand_atomic_store): Likewise.
19088 * ree.c (combine_reaching_defs): Likewise.
19089 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19090 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19091 * tree.h (type_has_mode_precision_p): Likewise.
19092 * ubsan.c (instrument_si_overflow): Likewise.
19094 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19095 Alan Hayward <alan.hayward@arm.com>
19096 David Sherwood <david.sherwood@arm.com>
19098 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19099 polynomial numbers of units.
19100 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19101 (valid_vector_subparts_p): New function.
19102 (build_vector_type): Remove temporary shim and take the number
19103 of units as a poly_uint64 rather than an int.
19104 (build_opaque_vector_type): Take the number of units as a
19105 poly_uint64 rather than an int.
19106 * tree.c (build_vector_from_ctor): Handle polynomial
19107 TYPE_VECTOR_SUBPARTS.
19108 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19109 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19110 (build_vector_from_val): If the number of units is variable,
19111 use build_vec_duplicate_cst for constant operands and
19112 VEC_DUPLICATE_EXPR otherwise.
19113 (make_vector_type): Remove temporary is_constant ().
19114 (build_vector_type, build_opaque_vector_type): Take the number of
19115 units as a poly_uint64 rather than an int.
19116 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19118 * cfgexpand.c (expand_debug_expr): Likewise.
19119 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19120 (store_constructor, expand_expr_real_1): Likewise.
19121 (const_scalar_mask_from_tree): Likewise.
19122 * fold-const-call.c (fold_const_reduction): Likewise.
19123 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19124 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19125 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19126 (fold_relational_const): Likewise.
19127 (native_interpret_vector): Likewise. Change the size from an
19128 int to an unsigned int.
19129 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19130 TYPE_VECTOR_SUBPARTS.
19131 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19132 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19133 duplicating a non-constant operand into a variable-length vector.
19134 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19135 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19136 * ipa-icf.c (sem_variable::equals): Likewise.
19137 * match.pd: Likewise.
19138 * omp-simd-clone.c (simd_clone_subparts): Likewise.
19139 * print-tree.c (print_node): Likewise.
19140 * stor-layout.c (layout_type): Likewise.
19141 * targhooks.c (default_builtin_vectorization_cost): Likewise.
19142 * tree-cfg.c (verify_gimple_comparison): Likewise.
19143 (verify_gimple_assign_binary): Likewise.
19144 (verify_gimple_assign_ternary): Likewise.
19145 (verify_gimple_assign_single): Likewise.
19146 * tree-pretty-print.c (dump_generic_node): Likewise.
19147 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19148 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19149 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19150 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19151 (vect_shift_permute_load_chain): Likewise.
19152 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19153 (expand_vector_condition, optimize_vector_constructor): Likewise.
19154 (lower_vec_perm, get_compute_type): Likewise.
19155 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19156 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19157 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19158 (vect_recog_mask_conversion_pattern): Likewise.
19159 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19160 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19161 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19162 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19163 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19164 (vectorizable_shift, vectorizable_operation, vectorizable_store)
19165 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19166 (supportable_widening_operation): Likewise.
19167 (supportable_narrowing_operation): Likewise.
19168 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19170 * varasm.c (output_constant): Likewise.
19172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19173 Alan Hayward <alan.hayward@arm.com>
19174 David Sherwood <david.sherwood@arm.com>
19176 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19177 so that both the length == 3 and length != 3 cases set up their
19178 own permute vectors. Add comments explaining why we know the
19179 number of elements is constant.
19180 (vect_permute_load_chain): Likewise.
19182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19183 Alan Hayward <alan.hayward@arm.com>
19184 David Sherwood <david.sherwood@arm.com>
19186 * machmode.h (mode_nunits): Change from unsigned char to
19188 (ONLY_FIXED_SIZE_MODES): New macro.
19189 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19190 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19191 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19193 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19194 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19195 or if measurement_type is not polynomial.
19196 * genmodes.c (ZERO_COEFFS): New macro.
19197 (emit_mode_nunits_inline): Make mode_nunits_inline return a
19199 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19200 Use ZERO_COEFFS when emitting initializers.
19201 * data-streamer.h (bp_pack_poly_value): New function.
19202 (bp_unpack_poly_value): Likewise.
19203 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19204 for GET_MODE_NUNITS.
19205 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19206 for GET_MODE_NUNITS.
19207 * tree.c (make_vector_type): Remove temporary shim and make
19208 the real function take the number of units as a poly_uint64
19209 rather than an int.
19210 (build_vector_type_for_mode): Handle polynomial nunits.
19211 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19212 * emit-rtl.c (const_vec_series_p_1): Likewise.
19213 (gen_rtx_CONST_VECTOR): Likewise.
19214 * fold-const.c (test_vec_duplicate_folding): Likewise.
19215 * genrecog.c (validate_pattern): Likewise.
19216 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19217 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19218 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19219 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19220 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19221 * rtlanal.c (subreg_get_info): Likewise.
19222 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19223 (vect_grouped_load_supported): Likewise.
19224 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19225 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19226 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19227 (simplify_const_unary_operation, simplify_binary_operation_1)
19228 (simplify_const_binary_operation, simplify_ternary_operation)
19229 (test_vector_ops_duplicate, test_vector_ops): Likewise.
19230 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19231 instead of CONST_VECTOR_NUNITS.
19232 * varasm.c (output_constant_pool_2): Likewise.
19233 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19234 explicit-encoded elements in the XVEC for variable-length vectors.
19236 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19238 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19241 Alan Hayward <alan.hayward@arm.com>
19242 David Sherwood <david.sherwood@arm.com>
19244 * coretypes.h (fixed_size_mode): Declare.
19245 (fixed_size_mode_pod): New typedef.
19246 * builtins.h (target_builtins::x_apply_args_mode)
19247 (target_builtins::x_apply_result_mode): Change type to
19248 fixed_size_mode_pod.
19249 * builtins.c (apply_args_size, apply_result_size, result_vector)
19250 (expand_builtin_apply_args_1, expand_builtin_apply)
19251 (expand_builtin_return): Update accordingly.
19253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19255 * cse.c (hash_rtx_cb): Hash only the encoded elements.
19256 * cselib.c (cselib_hash_rtx): Likewise.
19257 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19258 CONST_VECTOR encoding.
19260 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19261 Jeff Law <law@redhat.com>
19264 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19265 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19266 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19267 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19270 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19271 explicitly probe *sp in a noreturn function if there were any callee
19272 register saves or frame pointer is needed.
19274 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19277 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19278 BLKmode for ternary, binary or unary expressions.
19281 * var-tracking.c (delete_vta_debug_insn): New inline function.
19282 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19283 insns from get_insns () to NULL instead of each bb separately.
19284 Use delete_vta_debug_insn. No longer static.
19285 (vt_debug_insns_local, variable_tracking_main_1): Adjust
19286 delete_vta_debug_insns callers.
19287 * rtl.h (delete_vta_debug_insns): Declare.
19288 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19289 instead of variable_tracking_main.
19291 2018-01-03 Martin Sebor <msebor@redhat.com>
19293 PR tree-optimization/83603
19294 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19295 arguments past the endof the argument list in functions declared
19296 without a prototype.
19297 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19298 Avoid checking when arguments are null.
19300 2018-01-03 Martin Sebor <msebor@redhat.com>
19303 * doc/extend.texi (attribute const): Fix a typo.
19304 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19305 issuing -Wsuggest-attribute for void functions.
19307 2018-01-03 Martin Sebor <msebor@redhat.com>
19309 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19310 offset_int::from instead of wide_int::to_shwi.
19311 (maybe_diag_overlap): Remove assertion.
19312 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19313 * gimple-ssa-sprintf.c (format_directive): Same.
19314 (parse_directive): Same.
19315 (sprintf_dom_walker::compute_format_length): Same.
19316 (try_substitute_return_value): Same.
19318 2018-01-03 Jeff Law <law@redhat.com>
19320 PR middle-end/83654
19321 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19322 non-constant residual for zero at runtime and avoid probing in
19323 that case. Reorganize code for trailing problem to mirror handling
19326 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19328 PR tree-optimization/83501
19329 * tree-ssa-strlen.c (get_string_cst): New.
19330 (handle_char_store): Call get_string_cst.
19332 2018-01-03 Martin Liska <mliska@suse.cz>
19334 PR tree-optimization/83593
19335 * tree-ssa-strlen.c: Include tree-cfg.h.
19336 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19337 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19338 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19340 (strlen_dom_walker::before_dom_children): Call
19341 gimple_purge_dead_eh_edges. Dump tranformation with details
19343 (strlen_dom_walker::before_dom_children): Update call by adding
19344 new argument cleanup_eh.
19345 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19347 2018-01-03 Martin Liska <mliska@suse.cz>
19350 * cif-code.def (VARIADIC_THUNK): New enum value.
19351 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19354 2018-01-03 Jan Beulich <jbeulich@suse.com>
19356 * sse.md (mov<mode>_internal): Tighten condition for when to use
19357 vmovdqu<ssescalarsize> for TI and OI modes.
19359 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19361 Update copyright years.
19363 2018-01-03 Martin Liska <mliska@suse.cz>
19366 * ipa-visibility.c (function_and_variable_visibility): Skip
19367 functions with noipa attribure.
19369 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19371 * gcc.c (process_command): Update copyright notice dates.
19372 * gcov-dump.c (print_version): Ditto.
19373 * gcov.c (print_version): Ditto.
19374 * gcov-tool.c (print_version): Ditto.
19375 * gengtype.c (create_file): Ditto.
19376 * doc/cpp.texi: Bump @copying's copyright year.
19377 * doc/cppinternals.texi: Ditto.
19378 * doc/gcc.texi: Ditto.
19379 * doc/gccint.texi: Ditto.
19380 * doc/gcov.texi: Ditto.
19381 * doc/install.texi: Ditto.
19382 * doc/invoke.texi: Ditto.
19384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19386 * vector-builder.h (vector_builder::m_full_nelts): Change from
19387 unsigned int to poly_uint64.
19388 (vector_builder::full_nelts): Update prototype accordingly.
19389 (vector_builder::new_vector): Likewise.
19390 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19391 (vector_builder::operator ==): Likewise.
19392 (vector_builder::finalize): Likewise.
19393 * int-vector-builder.h (int_vector_builder::int_vector_builder):
19394 Take the number of elements as a poly_uint64 rather than an
19396 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19397 from unsigned int to poly_uint64.
19398 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19399 (vec_perm_indices::new_vector): Likewise.
19400 (vec_perm_indices::length): Likewise.
19401 (vec_perm_indices::nelts_per_input): Likewise.
19402 (vec_perm_indices::input_nelts): Likewise.
19403 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19404 number of elements per input as a poly_uint64 rather than an
19405 unsigned int. Use the original encoding for variable-length
19406 vectors, rather than clamping each individual element.
19407 For the second and subsequent elements in each pattern,
19408 clamp the step and base before clamping their sum.
19409 (vec_perm_indices::series_p): Handle polynomial element counts.
19410 (vec_perm_indices::all_in_range_p): Likewise.
19411 (vec_perm_indices_to_tree): Likewise.
19412 (vec_perm_indices_to_rtx): Likewise.
19413 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19414 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19415 (tree_vector_builder::new_binary_operation): Handle polynomial
19416 element counts. Return false if we need to know the number
19417 of elements at compile time.
19418 * fold-const.c (fold_vec_perm): Punt if the number of elements
19419 isn't known at compile time.
19421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19423 * vec-perm-indices.h (vec_perm_builder): Change element type
19424 from HOST_WIDE_INT to poly_int64.
19425 (vec_perm_indices::element_type): Update accordingly.
19426 (vec_perm_indices::clamp): Handle polynomial element_types.
19427 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19428 (vec_perm_indices::all_in_range_p): Likewise.
19429 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19431 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19432 polynomial vec_perm_indices element types.
19433 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19434 * fold-const.c (fold_vec_perm): Likewise.
19435 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19436 * tree-vect-generic.c (lower_vec_perm): Likewise.
19437 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19438 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19439 element type to HOST_WIDE_INT.
19441 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19442 Alan Hayward <alan.hayward@arm.com>
19443 David Sherwood <david.sherwood@arm.com>
19445 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19446 rather than an int. Use plus_constant.
19447 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19448 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19450 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19451 Alan Hayward <alan.hayward@arm.com>
19452 David Sherwood <david.sherwood@arm.com>
19454 * calls.c (emit_call_1, expand_call): Change struct_value_size from
19455 a HOST_WIDE_INT to a poly_int64.
19457 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19458 Alan Hayward <alan.hayward@arm.com>
19459 David Sherwood <david.sherwood@arm.com>
19461 * calls.c (load_register_parameters): Cope with polynomial
19462 mode sizes. Require a constant size for BLKmode parameters
19463 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
19464 forces a parameter to be padded at the lsb end in order to
19465 fill a complete number of words, require the parameter size
19466 to be ordered wrt UNITS_PER_WORD.
19468 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19469 Alan Hayward <alan.hayward@arm.com>
19470 David Sherwood <david.sherwood@arm.com>
19472 * reload1.c (spill_stack_slot_width): Change element type
19473 from unsigned int to poly_uint64_pod.
19474 (alter_reg): Treat mode sizes as polynomial.
19476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19477 Alan Hayward <alan.hayward@arm.com>
19478 David Sherwood <david.sherwood@arm.com>
19480 * reload.c (complex_word_subreg_p): New function.
19481 (reload_inner_reg_of_subreg, push_reload): Use it.
19483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19484 Alan Hayward <alan.hayward@arm.com>
19485 David Sherwood <david.sherwood@arm.com>
19487 * lra-constraints.c (process_alt_operands): Reject matched
19488 operands whose sizes aren't ordered.
19489 (match_reload): Refer to this check here.
19491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19492 Alan Hayward <alan.hayward@arm.com>
19493 David Sherwood <david.sherwood@arm.com>
19495 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19496 that the mode size is in the set {1, 2, 4, 8, 16}.
19498 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19499 Alan Hayward <alan.hayward@arm.com>
19500 David Sherwood <david.sherwood@arm.com>
19502 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19503 Use plus_constant instead of gen_rtx_PLUS.
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 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19510 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19511 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19512 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19513 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19514 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19515 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19516 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19517 * config/i386/i386.c (ix86_push_rounding): ...this new function.
19518 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19520 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19521 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19522 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19523 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19524 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19525 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19526 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19527 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19528 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19529 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19531 * expr.c (emit_move_resolve_push): Treat the input and result
19532 of PUSH_ROUNDING as a poly_int64.
19533 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19534 (emit_push_insn): Likewise.
19535 * lra-eliminations.c (mark_not_eliminable): Likewise.
19536 * recog.c (push_operand): Likewise.
19537 * reload1.c (elimination_effects): Likewise.
19538 * rtlanal.c (nonzero_bits1): Likewise.
19539 * calls.c (store_one_arg): Likewise. Require the padding to be
19540 known at compile time.
19542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19543 Alan Hayward <alan.hayward@arm.com>
19544 David Sherwood <david.sherwood@arm.com>
19546 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19547 Use plus_constant instead of gen_rtx_PLUS.
19549 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19550 Alan Hayward <alan.hayward@arm.com>
19551 David Sherwood <david.sherwood@arm.com>
19553 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19554 rather than an int.
19556 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19557 Alan Hayward <alan.hayward@arm.com>
19558 David Sherwood <david.sherwood@arm.com>
19560 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19561 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19562 via stack temporaries. Treat the mode size as polynomial too.
19564 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19565 Alan Hayward <alan.hayward@arm.com>
19566 David Sherwood <david.sherwood@arm.com>
19568 * expr.c (expand_expr_real_2): When handling conversions involving
19569 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19570 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
19571 as a poly_uint64 too.
19573 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19574 Alan Hayward <alan.hayward@arm.com>
19575 David Sherwood <david.sherwood@arm.com>
19577 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19580 Alan Hayward <alan.hayward@arm.com>
19581 David Sherwood <david.sherwood@arm.com>
19583 * combine.c (can_change_dest_mode): Handle polynomial
19584 REGMODE_NATURAL_SIZE.
19585 * expmed.c (store_bit_field_1): Likewise.
19586 * expr.c (store_constructor): Likewise.
19587 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19588 and polynomial REGMODE_NATURAL_SIZE.
19589 (gen_lowpart_common): Likewise.
19590 * reginfo.c (record_subregs_of_mode): Likewise.
19591 * rtlanal.c (read_modify_subreg_p): Likewise.
19593 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19594 Alan Hayward <alan.hayward@arm.com>
19595 David Sherwood <david.sherwood@arm.com>
19597 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19598 numbers of elements.
19600 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19601 Alan Hayward <alan.hayward@arm.com>
19602 David Sherwood <david.sherwood@arm.com>
19604 * match.pd: Cope with polynomial numbers of vector elements.
19606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19607 Alan Hayward <alan.hayward@arm.com>
19608 David Sherwood <david.sherwood@arm.com>
19610 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19611 in a POINTER_PLUS_EXPR.
19613 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19614 Alan Hayward <alan.hayward@arm.com>
19615 David Sherwood <david.sherwood@arm.com>
19617 * omp-simd-clone.c (simd_clone_subparts): New function.
19618 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19619 (ipa_simd_modify_function_body): Likewise.
19621 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19622 Alan Hayward <alan.hayward@arm.com>
19623 David Sherwood <david.sherwood@arm.com>
19625 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19626 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19627 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19628 (expand_vector_condition, vector_element): Likewise.
19629 (subparts_gt): New function.
19630 (get_compute_type): Use subparts_gt.
19631 (count_type_subparts): Delete.
19632 (expand_vector_operations_1): Use subparts_gt instead of
19633 count_type_subparts.
19635 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19636 Alan Hayward <alan.hayward@arm.com>
19637 David Sherwood <david.sherwood@arm.com>
19639 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19640 (vect_compile_time_alias): ...this new function. Do the calculation
19641 on poly_ints rather than trees.
19642 (vect_prune_runtime_alias_test_list): Update call accordingly.
19644 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19645 Alan Hayward <alan.hayward@arm.com>
19646 David Sherwood <david.sherwood@arm.com>
19648 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19650 (vect_schedule_slp_instance): Likewise.
19652 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19653 Alan Hayward <alan.hayward@arm.com>
19654 David Sherwood <david.sherwood@arm.com>
19656 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19657 constant and extern definitions for variable-length vectors.
19658 (vect_get_constant_vectors): Note that the number of units
19659 is known to be constant.
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 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19666 of units as polynomial. Choose between WIDE and NARROW based
19669 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19670 Alan Hayward <alan.hayward@arm.com>
19671 David Sherwood <david.sherwood@arm.com>
19673 * tree-vect-stmts.c (simd_clone_subparts): New function.
19674 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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-stmts.c (vectorizable_call): Treat the number of
19681 vectors as polynomial. Use build_index_vector for
19682 IFN_GOMP_SIMD_LANE.
19684 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19685 Alan Hayward <alan.hayward@arm.com>
19686 David Sherwood <david.sherwood@arm.com>
19688 * tree-vect-stmts.c (get_load_store_type): Treat the number of
19689 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19690 for variable-length vectors.
19691 (vectorizable_mask_load_store): Treat the number of units as
19692 polynomial, asserting that it is constant if the condition has
19693 already been enforced.
19694 (vectorizable_store, vectorizable_load): Likewise.
19696 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19697 Alan Hayward <alan.hayward@arm.com>
19698 David Sherwood <david.sherwood@arm.com>
19700 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19701 of units as polynomial. Punt if we can't tell at compile time
19702 which vector contains the final result.
19704 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19705 Alan Hayward <alan.hayward@arm.com>
19706 David Sherwood <david.sherwood@arm.com>
19708 * tree-vect-loop.c (vectorizable_induction): Treat the number
19709 of units as polynomial. Punt on SLP inductions. Use an integer
19710 VEC_SERIES_EXPR for variable-length integer reductions. Use a
19711 cast of such a series for variable-length floating-point
19714 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19715 Alan Hayward <alan.hayward@arm.com>
19716 David Sherwood <david.sherwood@arm.com>
19718 * tree.h (build_index_vector): Declare.
19719 * tree.c (build_index_vector): New function.
19720 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19721 of units as polynomial, forcibly converting it to a constant if
19722 vectorizable_reduction has already enforced the condition.
19723 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
19724 to create a {1,2,3,...} vector.
19725 (vectorizable_reduction): Treat the number of units as polynomial.
19726 Choose vectype_in based on the largest scalar element size rather
19727 than the smallest number of units. Enforce the restrictions
19730 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19731 Alan Hayward <alan.hayward@arm.com>
19732 David Sherwood <david.sherwood@arm.com>
19734 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19735 number of units as polynomial.
19737 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19738 Alan Hayward <alan.hayward@arm.com>
19739 David Sherwood <david.sherwood@arm.com>
19741 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19742 * target.def (autovectorize_vector_sizes): Return the vector sizes
19743 by pointer, using vector_sizes rather than a bitmask.
19744 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19745 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19746 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19748 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19749 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19750 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19751 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19752 * omp-general.c (omp_max_vf): Likewise.
19753 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19754 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
19755 * tree-vect-loop.c (vect_analyze_loop): Likewise.
19756 * tree-vect-slp.c (vect_slp_bb): Likewise.
19757 * doc/tm.texi: Regenerate.
19758 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
19760 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
19761 the vector size as a poly_uint64 rather than an unsigned int.
19762 (current_vector_size): Change from an unsigned int to a poly_uint64.
19763 (get_vectype_for_scalar_type): Update accordingly.
19764 * tree.h (build_truth_vector_type): Take the size and number of
19765 units as a poly_uint64 rather than an unsigned int.
19766 (build_vector_type): Add a temporary overload that takes
19767 the number of units as a poly_uint64 rather than an unsigned int.
19768 * tree.c (make_vector_type): Likewise.
19769 (build_truth_vector_type): Take the number of units as a poly_uint64
19770 rather than an unsigned int.
19772 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19773 Alan Hayward <alan.hayward@arm.com>
19774 David Sherwood <david.sherwood@arm.com>
19776 * target.def (get_mask_mode): Take the number of units and length
19777 as poly_uint64s rather than unsigned ints.
19778 * targhooks.h (default_get_mask_mode): Update accordingly.
19779 * targhooks.c (default_get_mask_mode): Likewise.
19780 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
19781 * doc/tm.texi: Regenerate.
19783 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19784 Alan Hayward <alan.hayward@arm.com>
19785 David Sherwood <david.sherwood@arm.com>
19787 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
19788 * omp-general.c (omp_max_vf): Likewise.
19789 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
19790 (expand_omp_simd): Handle polynomial safelen.
19791 * omp-low.c (omplow_simd_context): Add a default constructor.
19792 (omplow_simd_context::max_vf): Change from int to poly_uint64.
19793 (lower_rec_simd_input_clauses): Update accordingly.
19794 (lower_rec_input_clauses): Likewise.
19796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19797 Alan Hayward <alan.hayward@arm.com>
19798 David Sherwood <david.sherwood@arm.com>
19800 * tree-vectorizer.h (vect_nunits_for_cost): New function.
19801 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
19802 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
19803 (vect_analyze_slp_cost): Likewise.
19804 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
19805 (vect_model_load_cost): Likewise.
19807 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19808 Alan Hayward <alan.hayward@arm.com>
19809 David Sherwood <david.sherwood@arm.com>
19811 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
19812 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
19813 from an unsigned int * to a poly_uint64_pod *.
19814 (calculate_unrolling_factor): New function.
19815 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
19817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19818 Alan Hayward <alan.hayward@arm.com>
19819 David Sherwood <david.sherwood@arm.com>
19821 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
19822 from an unsigned int to a poly_uint64.
19823 (_loop_vec_info::slp_unrolling_factor): Likewise.
19824 (_loop_vec_info::vectorization_factor): Change from an int
19826 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
19827 (vect_get_num_vectors): New function.
19828 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
19829 (vect_get_num_copies): Use vect_get_num_vectors.
19830 (vect_analyze_data_ref_dependences): Change max_vf from an int *
19831 to an unsigned int *.
19832 (vect_analyze_data_refs): Change min_vf from an int * to a
19834 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19835 than an unsigned HOST_WIDE_INT.
19836 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
19837 (vect_analyze_data_ref_dependence): Change max_vf from an int *
19838 to an unsigned int *.
19839 (vect_analyze_data_ref_dependences): Likewise.
19840 (vect_compute_data_ref_alignment): Handle polynomial vf.
19841 (vect_enhance_data_refs_alignment): Likewise.
19842 (vect_prune_runtime_alias_test_list): Likewise.
19843 (vect_shift_permute_load_chain): Likewise.
19844 (vect_supportable_dr_alignment): Likewise.
19845 (dependence_distance_ge_vf): Take the vectorization factor as a
19846 poly_uint64 rather than an unsigned HOST_WIDE_INT.
19847 (vect_analyze_data_refs): Change min_vf from an int * to a
19849 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
19850 vfm1 as a poly_uint64 rather than an int. Make the same change
19851 for the returned bound_scalar.
19852 (vect_gen_vector_loop_niters): Handle polynomial vf.
19853 (vect_do_peeling): Likewise. Update call to
19854 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
19855 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
19857 * tree-vect-loop.c (vect_determine_vectorization_factor)
19858 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
19859 (vect_get_known_peeling_cost): Likewise.
19860 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
19861 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
19862 (vect_transform_loop): Likewise. Use the lowest possible VF when
19863 updating the upper bounds of the loop.
19864 (vect_min_worthwhile_factor): Make static. Return an unsigned int
19865 rather than an int.
19866 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
19867 polynomial unroll factors.
19868 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
19869 (vect_make_slp_decision): Likewise.
19870 (vect_supported_load_permutation_p): Likewise, and polynomial
19872 (vect_analyze_slp_cost): Handle polynomial vf.
19873 (vect_slp_analyze_node_operations): Likewise.
19874 (vect_slp_analyze_bb_1): Likewise.
19875 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19876 than an unsigned HOST_WIDE_INT.
19877 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
19878 (vectorizable_load): Handle polynomial vf.
19879 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
19881 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
19883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19884 Alan Hayward <alan.hayward@arm.com>
19885 David Sherwood <david.sherwood@arm.com>
19887 * match.pd: Handle bit operations involving three constants
19888 and try to fold one pair.
19890 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19892 * tree-vect-loop-manip.c: Include gimple-fold.h.
19893 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
19894 niters_maybe_zero parameters. Handle other cases besides a step of 1.
19895 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
19896 Add a path that uses a step of VF instead of 1, but disable it
19898 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
19899 and niters_no_overflow parameters. Update calls to
19900 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
19901 Create a new SSA name if the latter choses to use a ste other
19902 than zero, and return it via niters_vector_mult_vf_var.
19903 * tree-vect-loop.c (vect_transform_loop): Update calls to
19904 vect_do_peeling, vect_gen_vector_loop_niters and
19905 slpeel_make_loop_iterate_ntimes.
19906 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
19907 (vect_gen_vector_loop_niters): Update declarations after above changes.
19909 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
19911 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
19912 128-bit round to integer instructions.
19913 (ceil<mode>2): Likewise.
19914 (btrunc<mode>2): Likewise.
19915 (round<mode>2): Likewise.
19917 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19919 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
19920 unaligned VSX load/store on P8/P9.
19921 (expand_block_clear): Allow the use of unaligned VSX
19922 load/store on P8/P9.
19924 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19926 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
19928 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
19929 swap associated with both a load and a store.
19931 2018-01-02 Andrew Waterman <andrew@sifive.com>
19933 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
19934 * config/riscv/riscv.md (clear_cache): Use it.
19936 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
19938 * web.c: Remove out-of-date comment.
19940 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19942 * expr.c (fixup_args_size_notes): Check that any existing
19943 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
19944 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
19945 (emit_single_push_insn): ...here.
19947 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19949 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
19950 (const_vector_encoded_nelts): New function.
19951 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
19952 (const_vector_int_elt, const_vector_elt): Declare.
19953 * emit-rtl.c (const_vector_int_elt_1): New function.
19954 (const_vector_elt): Likewise.
19955 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
19956 of CONST_VECTOR_ELT.
19958 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19960 * expr.c: Include rtx-vector-builder.h.
19961 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
19962 directly on the tree encoding.
19963 (const_vector_from_tree): Likewise.
19964 * optabs.c: Include rtx-vector-builder.h.
19965 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
19966 sequence of "u" values.
19967 * vec-perm-indices.c: Include rtx-vector-builder.h.
19968 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
19969 directly on the vec_perm_indices encoding.
19971 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19973 * doc/rtl.texi (const_vector): Describe new encoding scheme.
19974 * Makefile.in (OBJS): Add rtx-vector-builder.o.
19975 * rtx-vector-builder.h: New file.
19976 * rtx-vector-builder.c: Likewise.
19977 * rtl.h (rtx_def::u2): Add a const_vector field.
19978 (CONST_VECTOR_NPATTERNS): New macro.
19979 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
19980 (CONST_VECTOR_DUPLICATE_P): Likewise.
19981 (CONST_VECTOR_STEPPED_P): Likewise.
19982 (CONST_VECTOR_ENCODED_ELT): Likewise.
19983 (const_vec_duplicate_p): Check for a duplicated vector encoding.
19984 (unwrap_const_vec_duplicate): Likewise.
19985 (const_vec_series_p): Check for a non-duplicated vector encoding.
19986 Say that the function only returns true for integer vectors.
19987 * emit-rtl.c: Include rtx-vector-builder.h.
19988 (gen_const_vec_duplicate_1): Delete.
19989 (gen_const_vector): Call gen_const_vec_duplicate instead of
19990 gen_const_vec_duplicate_1.
19991 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
19992 (gen_const_vec_duplicate): Use rtx_vector_builder.
19993 (gen_const_vec_series): Likewise.
19994 (gen_rtx_CONST_VECTOR): Likewise.
19995 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
19996 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19997 Build a new vector rather than modifying a CONST_VECTOR in-place.
19998 (handle_special_swappables): Update call accordingly.
19999 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20000 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20001 Build a new vector rather than modifying a CONST_VECTOR in-place.
20002 (handle_special_swappables): Update call accordingly.
20004 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20006 * simplify-rtx.c (simplify_const_binary_operation): Use
20007 CONST_VECTOR_ELT instead of XVECEXP.
20009 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20011 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20012 the selector elements to be different from the data elements
20013 if the selector is a VECTOR_CST.
20014 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20015 ssizetype for the selector.
20017 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20019 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20020 before testing each element individually.
20021 * tree-vect-generic.c (lower_vec_perm): Likewise.
20023 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20025 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20026 * selftest-run-tests.c (selftest::run_tests): Call it.
20027 * vector-builder.h (vector_builder::operator ==): New function.
20028 (vector_builder::operator !=): Likewise.
20029 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20030 (vec_perm_indices::all_from_input_p): New function.
20031 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20032 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20033 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20034 instead of reading the VECTOR_CST directly. Detect whether both
20035 vector inputs are the same before constructing the vec_perm_indices,
20036 and update the number of inputs argument accordingly. Use the
20037 utility functions added above. Only construct sel2 if we need to.
20039 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20041 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20042 the broadcast of the low byte.
20043 (expand_mult_highpart): Use an explicit encoding for the permutes.
20044 * optabs-query.c (can_mult_highpart_p): Likewise.
20045 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20046 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20047 (vectorizable_bswap): Likewise.
20048 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20049 explicit encoding for the power-of-2 permutes.
20050 (vect_permute_store_chain): Likewise.
20051 (vect_grouped_load_supported): Likewise.
20052 (vect_permute_load_chain): Likewise.
20054 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20056 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20057 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20058 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20059 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20060 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20061 (vect_gen_perm_mask_any): Likewise.
20063 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20065 * int-vector-builder.h: New file.
20066 * vec-perm-indices.h: Include int-vector-builder.h.
20067 (vec_perm_indices): Redefine as an int_vector_builder.
20068 (auto_vec_perm_indices): Delete.
20069 (vec_perm_builder): Redefine as a stand-alone class.
20070 (vec_perm_indices::vec_perm_indices): New function.
20071 (vec_perm_indices::clamp): Likewise.
20072 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20073 (vec_perm_indices::new_vector): New function.
20074 (vec_perm_indices::new_expanded_vector): Update for new
20075 vec_perm_indices class.
20076 (vec_perm_indices::rotate_inputs): New function.
20077 (vec_perm_indices::all_in_range_p): Operate directly on the
20078 encoded form, without computing elided elements.
20079 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20080 encoding. Update for new vec_perm_indices class.
20081 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20082 the given vec_perm_builder.
20083 (expand_vec_perm_var): Update vec_perm_builder constructor.
20084 (expand_mult_highpart): Use vec_perm_builder instead of
20085 auto_vec_perm_indices.
20086 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20087 vec_perm_indices instead of auto_vec_perm_indices. Use a single
20088 or double series encoding as appropriate.
20089 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20090 vec_perm_indices instead of auto_vec_perm_indices.
20091 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20092 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20093 (vect_permute_store_chain): Likewise.
20094 (vect_grouped_load_supported): Likewise.
20095 (vect_permute_load_chain): Likewise.
20096 (vect_shift_permute_load_chain): Likewise.
20097 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20098 (vect_transform_slp_perm_load): Likewise.
20099 (vect_schedule_slp_instance): Likewise.
20100 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20101 (vectorizable_mask_load_store): Likewise.
20102 (vectorizable_bswap): Likewise.
20103 (vectorizable_store): Likewise.
20104 (vectorizable_load): Likewise.
20105 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20106 vec_perm_indices instead of auto_vec_perm_indices. Use
20107 tree_to_vec_perm_builder to read the vector from a tree.
20108 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20109 vec_perm_builder instead of a vec_perm_indices.
20110 (have_whole_vector_shift): Use vec_perm_builder and
20111 vec_perm_indices instead of auto_vec_perm_indices. Leave the
20112 truncation to calc_vec_perm_mask_for_shift.
20113 (vect_create_epilog_for_reduction): Likewise.
20114 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20115 from auto_vec_perm_indices to vec_perm_indices.
20116 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20117 instead of changing individual elements.
20118 (aarch64_vectorize_vec_perm_const): Use new_vector to install
20119 the vector in d.perm.
20120 * config/arm/arm.c (expand_vec_perm_d::perm): Change
20121 from auto_vec_perm_indices to vec_perm_indices.
20122 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20123 instead of changing individual elements.
20124 (arm_vectorize_vec_perm_const): Use new_vector to install
20125 the vector in d.perm.
20126 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20127 Update vec_perm_builder constructor.
20128 (rs6000_expand_interleave): Likewise.
20129 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20130 (rs6000_expand_interleave): Likewise.
20132 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20134 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20135 to qimode could truncate the indices.
20136 * optabs.c (expand_vec_perm_var): Likewise.
20138 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20140 * Makefile.in (OBJS): Add vec-perm-indices.o.
20141 * vec-perm-indices.h: New file.
20142 * vec-perm-indices.c: Likewise.
20143 * target.h (vec_perm_indices): Replace with a forward class
20145 (auto_vec_perm_indices): Move to vec-perm-indices.h.
20146 * optabs.h: Include vec-perm-indices.h.
20147 (expand_vec_perm): Delete.
20148 (selector_fits_mode_p, expand_vec_perm_var): Declare.
20149 (expand_vec_perm_const): Declare.
20150 * target.def (vec_perm_const_ok): Replace with...
20151 (vec_perm_const): ...this new hook.
20152 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20153 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20154 * doc/tm.texi: Regenerate.
20155 * optabs.def (vec_perm_const): Delete.
20156 * doc/md.texi (vec_perm_const): Likewise.
20157 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20158 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20159 expand_vec_perm for constant permutation vectors. Assert that
20160 the mode of variable permutation vectors is the integer equivalent
20161 of the mode that is being permuted.
20162 * optabs-query.h (selector_fits_mode_p): Declare.
20163 * optabs-query.c: Include vec-perm-indices.h.
20164 (selector_fits_mode_p): New function.
20165 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20166 is defined, instead of checking whether the vec_perm_const_optab
20167 exists. Use targetm.vectorize.vec_perm_const instead of
20168 targetm.vectorize.vec_perm_const_ok. Check whether the indices
20169 fit in the vector mode before using a variable permute.
20170 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20171 vec_perm_indices instead of an rtx.
20172 (expand_vec_perm): Replace with...
20173 (expand_vec_perm_const): ...this new function. Take the selector
20174 as a vec_perm_indices rather than an rtx. Also take the mode of
20175 the selector. Update call to shift_amt_for_vec_perm_mask.
20176 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20177 Use vec_perm_indices::new_expanded_vector to expand the original
20178 selector into bytes. Check whether the indices fit in the vector
20179 mode before using a variable permute.
20180 (expand_vec_perm_var): Make global.
20181 (expand_mult_highpart): Use expand_vec_perm_const.
20182 * fold-const.c: Includes vec-perm-indices.h.
20183 * tree-ssa-forwprop.c: Likewise.
20184 * tree-vect-data-refs.c: Likewise.
20185 * tree-vect-generic.c: Likewise.
20186 * tree-vect-loop.c: Likewise.
20187 * tree-vect-slp.c: Likewise.
20188 * tree-vect-stmts.c: Likewise.
20189 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20191 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20192 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20193 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20194 (aarch64_vectorize_vec_perm_const): ...this new function.
20195 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20196 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20197 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20198 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20199 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20200 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20201 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20203 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
20204 check for NEON modes.
20205 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20206 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20207 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20208 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20210 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
20211 the old VEC_PERM_CONST conditions.
20212 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20213 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20214 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20215 (ia64_vectorize_vec_perm_const_ok): Merge into...
20216 (ia64_vectorize_vec_perm_const): ...this new function.
20217 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20218 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20219 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20220 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20221 * config/mips/mips.c (mips_expand_vec_perm_const)
20222 (mips_vectorize_vec_perm_const_ok): Merge into...
20223 (mips_vectorize_vec_perm_const): ...this new function.
20224 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20225 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20226 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20227 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20228 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20229 (rs6000_expand_vec_perm_const): Delete.
20230 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20232 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20233 (altivec_expand_vec_perm_const_le): Take each operand individually.
20234 Operate on constant selectors rather than rtxes.
20235 (altivec_expand_vec_perm_const): Likewise. Update call to
20236 altivec_expand_vec_perm_const_le.
20237 (rs6000_expand_vec_perm_const): Delete.
20238 (rs6000_vectorize_vec_perm_const_ok): Delete.
20239 (rs6000_vectorize_vec_perm_const): New function.
20240 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20241 an element count and rtx array.
20242 (rs6000_expand_extract_even): Update call accordingly.
20243 (rs6000_expand_interleave): Likewise.
20244 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20245 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20246 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20247 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20248 (rs6000_expand_vec_perm_const): Delete.
20249 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20250 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20251 (altivec_expand_vec_perm_const_le): Take each operand individually.
20252 Operate on constant selectors rather than rtxes.
20253 (altivec_expand_vec_perm_const): Likewise. Update call to
20254 altivec_expand_vec_perm_const_le.
20255 (rs6000_expand_vec_perm_const): Delete.
20256 (rs6000_vectorize_vec_perm_const_ok): Delete.
20257 (rs6000_vectorize_vec_perm_const): New function. Remove stray
20258 reference to the SPE evmerge intructions.
20259 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20260 an element count and rtx array.
20261 (rs6000_expand_extract_even): Update call accordingly.
20262 (rs6000_expand_interleave): Likewise.
20263 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20264 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20266 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20268 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20270 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20271 vector mode and that that mode matches the mode of the data
20273 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20274 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
20275 directly using expand_vec_perm_1 when forcing selectors into
20277 (expand_vec_perm_var): New function, split out from expand_vec_perm.
20279 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20281 * optabs-query.h (can_vec_perm_p): Delete.
20282 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20283 * optabs-query.c (can_vec_perm_p): Split into...
20284 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20285 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20286 particular selector is valid.
20287 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20288 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20289 (vect_grouped_load_supported): Likewise.
20290 (vect_shift_permute_load_chain): Likewise.
20291 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20292 (vect_transform_slp_perm_load): Likewise.
20293 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20294 (vectorizable_bswap): Likewise.
20295 (vect_gen_perm_mask_checked): Likewise.
20296 * fold-const.c (fold_ternary_loc): Likewise. Don't take
20297 implementations of variable permutation vectors into account
20298 when deciding which selector to use.
20299 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20300 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20301 with a false third argument.
20302 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20303 to test whether the constant selector is valid and can_vec_perm_var_p
20304 to test whether a variable selector is valid.
20306 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20308 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20309 * optabs-query.c (can_vec_perm_p): Likewise.
20310 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20311 instead of vec_perm_indices.
20312 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20313 (vect_gen_perm_mask_checked): Likewise,
20314 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20315 (vect_gen_perm_mask_checked): Likewise,
20317 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20319 * optabs-query.h (qimode_for_vec_perm): Declare.
20320 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20321 (qimode_for_vec_perm): ...this new function.
20322 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20324 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20326 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20327 does not have a conditional at the top.
20329 2018-01-02 Richard Biener <rguenther@suse.de>
20331 * ipa-inline.c (big_speedup_p): Fix expression.
20333 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20336 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20339 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20343 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20344 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20345 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20346 cond_taken_branch_cost 3->4.
20348 2018-01-01 Jakub Jelinek <jakub@redhat.com>
20350 PR tree-optimization/83581
20351 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20352 TODO_cleanup_cfg if any changes have been made.
20354 PR middle-end/83608
20355 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20356 convert_modes if target mode has the right side, but different mode
20359 PR middle-end/83609
20360 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20361 last argument when extracting from CONCAT. If either from_real or
20362 from_imag is NULL, use expansion through memory. If result is not
20363 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20364 the parts directly to inner mode, if even that fails, use expansion
20367 PR middle-end/83623
20368 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20369 check for bswap in mode rather than HImode and use that in expand_unop
20372 Copyright (C) 2018 Free Software Foundation, Inc.
20374 Copying and distribution of this file, with or without modification,
20375 are permitted in any medium without royalty provided the copyright
20376 notice and this notice are preserved.