1 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4 the containing gimple_seq *.
5 * gimple-iterator.h (gsi_for_stmt): Declare it.
6 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
8 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
12 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
14 (vect_mark_pattern_stmts): ...here. Handle cases in which the
15 statement being replaced is part of an existing pattern
16 definition sequence, inserting the new pattern statements before
18 (vect_pattern_recog_1): Don't return a bool. If the statement
19 is already part of a pattern, instead apply pattern matching
20 to the pattern definition statements. Don't clear the
21 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
22 (vect_pattern_recog): Don't break after the first match;
23 continue processing the pattern definition statements instead.
24 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
26 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
28 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
29 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
30 (vect_recog_widen_sum_pattern): Use it.
32 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
34 * tree-vect-loop.c (vectorizable_reduction): Assert that the
35 phi is not a pattern statement and has not been replaced by
37 * tree-vect-patterns.c (type_conversion_p): Don't check
38 STMT_VINFO_IN_PATTERN_P.
39 (vect_recog_vector_vector_shift_pattern): Likewise.
40 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
41 the pattern statement rather than the original statement; check
42 directly for a WIDEN_MULT_EXPR here.
43 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
44 vect_is_simple_use to return the pattern statement rather
45 than the original statement; use is_pattern_stmt_p to check
46 for such a pattern statement.
47 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
48 to return the pattern statement rather than the original statement;
49 don't do the same transformation here.
50 (vect_is_simple_use): If the defining statement has been replaced
51 by a pattern statement, return the pattern statement instead.
52 Remove the corresponding (local) transformation from the vectype
55 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
57 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
58 end and default to null.
59 * tree-vect-loop.c (vect_create_epilog_for_reduction)
60 (vectorizable_reduction): Update calls accordingly, dropping the
61 gimple ** argument if the passed-back statement isn't needed.
62 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
63 (vect_recog_rotate_pattern): Likewise.
64 (vect_recog_mask_conversion_pattern): Likewise.
65 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
66 (vect_mask_constant_operand_p): Likewise.
67 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
68 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
69 (get_group_load_store_type, get_load_store_type): Likewise.
70 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
71 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
72 (vectorizable_conversion, vectorizable_assignment): Likewise.
73 (vectorizable_shift, vectorizable_operation): Likewise.
74 (vectorizable_store, vect_is_simple_cond): Likewise.
75 (vectorizable_condition, vectorizable_comparison): Likewise.
76 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
77 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
78 and move it to the end. Cope with null def_stmt_outs.
80 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
82 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
84 2018-06-29 Jeff Law <law@redhat.com>
86 * config/v850/v850.c (v850_legitimate_address_p): Handle large
87 displacements for TARGET_V850E2V3 and newer.
88 (TARGET_LRA_P): Remove. Defaults to LRA now.
89 * config/v850/v850.md (sign23byte_load): Remove.
90 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
91 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
93 2018-06-29 Martin Liska <mliska@suse.cz>
96 * coverage.c (coverage_init): Mangle full path name.
97 * doc/invoke.texi: Document the change.
98 * gcov-io.c (mangle_path): New.
99 * gcov-io.h (mangle_path): Likewise.
100 * gcov.c (mangle_name): Use mangle_path for path mangling.
102 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
104 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
105 if starting source register is not even.
107 2018-06-29 Martin Liska <mliska@suse.cz>
109 PR tree-optimization/86263
110 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
111 Make edge redirection.
113 2018-06-29 David Malcolm <dmalcolm@redhat.com>
115 * dumpfile.c (dump_loc): Add indentation based on scope depth.
116 (dump_scope_depth): New variable.
117 (get_dump_scope_depth): New function.
118 (dump_begin_scope): New function.
119 (dump_end_scope): New function.
120 * dumpfile.h (get_dump_scope_depth): New declaration.
121 (dump_begin_scope): New declaration.
122 (dump_end_scope): New declaration.
123 (class auto_dump_scope): New class.
124 (AUTO_DUMP_SCOPE): New macro.
125 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
128 2018-06-29 Richard Biener <rguenther@suse.de>
130 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
131 compute_all_dependences succeeds.
132 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
133 exceed --param loop-max-datarefs-for-datadeps.
135 2018-06-29 Jakub Jelinek <jakub@redhat.com>
137 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
139 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
142 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
143 alternative 0 in preferred_for_speed attribute.
145 2018-06-28 Paul Koning <ni1d@arrl.net>
147 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
148 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
149 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
150 * config/pdp11/pdp11.md: Correct "length" attribute calculation
151 for shift insn patterns.
153 2018-06-28 David Malcolm <dmalcolm@redhat.com>
155 * cgraph.c (cgraph_node::get_body): Replace assignments to
156 "dump_file" with calls to set_dump_file.
157 * dumpfile.c (alt_dump_file): Make static, and group with...
158 (alt_flags): ...this definition.
159 (dumps_are_enabled): New variable.
160 (refresh_dumps_are_enabled): New function.
161 (set_dump_file): New function.
162 (set_alt_dump_file): New function.
163 (gcc::dump_manager::dump_start): Replace assignments to
164 "dump_file" and "alt_dump_file" with calls to set_dump_file and
166 (gcc::dump_manager::dump_finish): Likewise.
167 * dumpfile.h (alt_dump_file): Delete decl.
168 (dumps_are_enabled): New variable decl.
169 (set_dump_file): New function decl.
170 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
172 * tree-nested.c (lower_nested_functions): Replace assignments to
173 "dump_file" with calls to set_dump_file.
175 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
177 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
178 goto_locus of each outgoing edge of each basic block.
180 2018-06-28 Richard Biener <rguenther@suse.de>
182 * dwarf2out.c (decl_scope_table): Remove.
183 (push_decl_scope): Likewise.
184 (pop_decl_scope): Likewise.
185 (gen_type_die_for_member): Do not call push/pop_decl_scope.
186 (gen_struct_or_union_type_die): Likewise.
187 (gen_tagged_type_die): Likewise.
188 (dwarf2out_init): Do not initialize decl_scope_table.
189 (dwarf2out_c_finalize): Do not free it.
191 2018-06-28 Richard Biener <rguenther@suse.de>
193 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
194 deciding whether to not re-use a DIE.
196 2018-06-28 Richard Biener <rguenther@suse.de>
198 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
199 DW_AT_abstract_origin attribute.
201 2018-06-28 Martin Liska <mliska@suse.cz>
203 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
204 Use newly introduced constants.
205 * tree-switch-conversion.h (struct jump_table_cluster):
206 Define max_ratio_for_size and max_ratio_for_speed.
208 2018-06-28 Martin Liska <mliska@suse.cz>
210 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
211 Add new checking assert to catch invalid state.
212 (jump_table_cluster::can_be_handled): Handle single case
214 (jump_table_cluster::is_beneficial): Bail out for such case.
215 (bit_test_cluster::find_bit_tests):
216 Add new checking assert to catch invalid state.
217 (bit_test_cluster::can_be_handled): Handle single case
219 (bit_test_cluster::is_beneficial): Bail out for such case.
220 (switch_decision_tree::analyze_switch_statement):
223 2018-06-28 Martin Liska <mliska@suse.cz>
225 * common.opt: Introduce -completion option.
226 * gcc.c (driver_handle_option): Handle it.
227 (driver::main): Print completions if completion
229 * opt-suggestions.c (option_proposer::get_completions):
231 (option_proposer::suggest_completion): Likewise.
232 (option_proposer::find_param_completions): Likewise.
233 (verify_autocompletions): Likewise.
234 (test_completion_valid_options): Likewise.
235 (test_completion_valid_params): Likewise.
236 (in_completion_p): Likewise.
237 (empty_completion_p): Likewise.
238 (test_completion_partial_match): Likewise.
239 (test_completion_garbage): Likewise.
240 (opt_proposer_c_tests): Likewise.
241 * opt-suggestions.h: Declare new functions.
242 * opts.c (common_handle_option): Handle OPT__completion_.
243 * selftest-run-tests.c (selftest::run_tests): Add
244 opt_proposer_c_tests.
245 * selftest.c (assert_str_startswith): New.
246 * selftest.h (assert_str_startswith): Likewise.
247 (opt_proposer_c_tests): New.
248 (ASSERT_STR_STARTSWITH): Likewise.
250 2018-06-28 Martin Liska <mliska@suse.cz>
252 * Makefile.in: Add opt-suggestions.o.
253 * gcc-main.c: Include opt-suggestions.h.
254 * gcc.c (driver::driver): Likewise.
255 (driver::~driver): Remove m_option_suggestions.
256 (driver::build_option_suggestions): Moved to option_proposer.
257 (driver::suggest_option): Likewise.
258 (driver::handle_unrecognized_options): Use option_proposer.
259 * gcc.h (class driver): Add new memver m_option_proposer.
260 * opt-suggestions.c: New file.
261 * opt-suggestions.h: New file.
263 2018-06-28 Martin Liska <mliska@suse.cz>
265 * vec.h (class auto_string_vec): New (moved from auto_argvec).
266 (auto_string_vec::~auto_string_vec): Likewise.
268 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
270 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
271 statement if id->reset_location is true.
272 (copy_edges_for_bb): Do not set goto_locus on the new edges if
273 id->reset_location is true.
274 (copy_phis_for_bb): Force input_location on the arguments if
275 id->reset_location is true.
276 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
277 is set on the function to be inlined.
278 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
279 prevent_decl_creation_for_types fields up and add reset_location field.
281 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
283 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
285 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
287 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
289 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
290 hard registers for the clobbered pseudo.
292 2018-06-27 Paul Koning <ni1d@arrl.net>
294 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
295 mutually exclusive options.
296 * config/pdp11/constraints.md (h): New constraint.
297 (O): Update definition to match shift code generation.
299 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
301 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
303 (output_jump): Change arguments.
304 (pdp11_fixed_cc_regs): New function.
305 (pdp11_cc_mode): Ditto.
306 (pdp11_expand_shift): Ditto.
307 (pdp11_assemble_shift): Ditto.
308 (pdp11_small_shift): Ditto.
309 (pdp11_branch_cost): Remove.
310 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
312 (pdp11_register_move_cost): Update for CC registers.
313 (pdp11_rtx_costs): Add case for LSHIFTRT.
314 (pdp11_output_jump): Add CCNZ mode conditional branches.
315 (notice_update_cc_on_set): Remove.
316 (pdp11_cc_mode): New function.
317 (simple_memory_operand): Correct pre/post decrement case.
318 (no_side_effect_operand): New function.
319 (pdp11_regno_reg_class): Add CC_REGS class.
320 (pdp11_fixed_cc_regs): New function.
321 (pdp11_small_shift): New function.
322 (pdp11_expand_shift): New function to expand shift insns.
323 (pdp11_assemble_shift): New function to output shifts.
324 (pdp11_branch_cost): Remove.
325 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
326 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
328 (PTRDIFF_TYPE): Ditto.
329 (ADJUST_INSN_LENGTH): New macro.
330 (FIXED_REGISTERS): Add CC registers.
331 (CALL_USED_REGISTERS): Ditto.
333 (REG_CLASS_NAMES): Ditto.
334 (REG_CLASS_CONTENTS): Ditto.
335 (SELECT_CC_MODE): Use new function.
336 (TARGET_FLAGS_REGNUM): New macro.
337 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
338 (cc0_reg_rtx): Remove.
339 (CC_STATUS_MDEP): Remove.
340 (CC_STATUS_MDEFP_INIT): Remove.
342 (NOTICE_UPDATE_CC): Remove.
343 (REGISTER_NAMES): Add CC registers.
344 (BRANCH_COST): Change to constant 1.
345 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
347 * config/pdp11/pdp11.opt (mbcopy): Remove.
348 (mbcopy-builtin): Remove.
349 (mbranch-cheap): Remove.
350 (mbranch-expensive): Remove.
351 * config/pdp11/predicates.md (expand_shift_operand): Update to
352 match shift code generation.
353 (ccnz_operator): New predicate.
354 * doc/invoke.texi (PDP-11 Options): Remove deleted options
355 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
356 Remove non-existent option -mabshi, -mno-abshi. Document mutually
358 * doc/md.texi (PDP-11): Document new D and h constraints. Update
359 description of O constraint.
361 2018-06-27 Jeff Law <law@redhat.com>
362 Austin Law <austinklaw@gmail.com>
364 * config/v850/v850.md (addsi3_set_flags): New pattern.
365 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
366 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
367 (zero_extendhisi2_v850_set_flags): Likewise.
368 (zero_extendqisi2_v850_set_flags): Likewise.
369 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
370 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
371 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
373 * config/v850/v850-protos.h (notice_update_cc): Remove.
374 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
375 (v850_print_operand): Handle 'D' and "d".
376 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
377 Add handling of arithmetic/logical operations compared against zero.
378 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
379 Do not look at v850_compare_op, instead get mode from last argument.
380 (v850_gen_compare): Remove
381 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
382 after reload for prologue insns.
383 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
385 (construct_save_jarl): Likewise.
386 (TARGET_FLAGS_REGNUM): Define.
387 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
388 (NOTICE_UPDATE_CC): Remove.
389 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
390 than cc0. Conditionalize on reload_completed.
391 (cmpsi_insn, setfcc_insn): Likewise.
392 (tst1 splitter): Turn into define_and_split which sets the flags
394 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
395 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
396 (cstoresf4, cstoredf4): Clobber the flags.
397 (cmpsi, cmpsf, cmpdf): Remove expanders.
398 (setf_insn): Remove pattern.
399 (addsi3): Turn into define_and_split which clobbers the flags after
400 reload and a suitable pattern (addsi3_clobber_flags) for use after
402 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
403 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
404 (ashrsi3, ashrsi3_v850e2): Likewise.
405 (bins): Clobber the flags.
406 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
407 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
408 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
409 (call_value_internal_short, call_value_internal_long): Likewise.
410 (callt_save_interrupt, callt_return_interrupt): Likewise.
411 (save_interrupt, return_interrupt): Likewise.
412 (callt_save_all_interrupt, save_all_interrupt): Likewise.
413 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
414 (restore_all_interrupt, _restore_all_interrupt): Likewise.
415 (All FP comparisons): Only allow after reload has completed.
417 (divh, divhu): Tweak output template.
418 (branch_z_normal, branch_z_invert): Remove
419 (branch_nz_normal, branch_nz_invert): Likewise.
420 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
422 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
423 * config/v850/v850.c (notice_update_cc): Remove.
424 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
425 (CC_NO_CARRY): Likewise.
426 (NOTICE_UPDATE_CC): Define to nothing.
427 * config/v850/v850.md: Remove block comment on cc0 handling
428 Remove "cc" attribute from all patterns. Remove cc_status handling
429 from all patterns. Minor formatting fixes.
431 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
433 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
434 (cortex-a76.cortex-a55): Likewise.
435 * config/aarch64/aarch64-tune.md: Regenerate.
436 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
437 cortex-a76.cortex-a55.
439 2018-06-27 Jeff Law <law@redhat.com>
441 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
442 (MULTILIB_DIRNAMES): Similarly.
444 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
446 * gimple.h (gimple_return_retbnd): Delete.
447 (gimple_return_set_retbnd): Likewise.
448 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
449 gimple_return_set_retbnd.
450 * gimple-pretty-print.c (dump_gimple_return): Remove call to
451 gimple_return_retbnd and adjust.
452 * tree-inline.h (struct copy_body_data): Remove retbnd field.
453 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
454 Explicitly return NULL in a couple more cases. Move assertion
455 on debug statements and remove unreachable code.
456 (reset_debug_binding): Do not test id->retbnd.
457 (expand_call_inline): Do not set it.
459 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
461 * configure.ac: Add --disable-gcov option.
462 * configure: Regenerate.
463 * Makefile.in: Honour @enable_gcov@.
464 * doc/install.texi: Document --disable-gcov.
466 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
468 * config/arm/arm-cpus.in (cortex-a76): New entry.
469 (cortex-a76.cortex-a55): Likewise.
470 * config/arm/arm-tables.opt: Regenerate.
471 * config/arm/arm-tune.md: Likewise.
472 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
473 * doc/invoke.texi (ARM Options): Document cortex-a76 and
474 cortex-a76.cortex-a55.
476 2018-06-27 Tamar Christina <tamar.christina@arm.com>
479 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
481 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
483 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
485 (EPILOGUE_USES): Likewise.
487 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
489 * tree-inline.c (remap_location): New function extracted from...
490 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
491 (copy_phis_for_bb): ...here. Call remap_location.
492 (copy_cfg_body): Adjust call to copy_edges_for_bb.
494 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
496 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
497 unaligned vsx for 16B memset.
499 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
502 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
503 ieee128_float_type_node to long_double_type_node unless
504 TARGET_LONG_DOUBLE_128 is set.
506 2018-06-26 David Malcolm <dmalcolm@redhat.com>
508 * cfgloop.c (get_loop_location): Convert return type from
509 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
510 by implicit construction from rtx_insn *, and using
511 dump_user_location_t::from_function_decl for the fallback case.
512 * cfgloop.h (get_loop_location): Convert return type from
513 location_t to dump_user_location_t.
514 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
515 dump_printf_loc to pass in a dump_location_t rather than a
516 location_t, via the gimple stmt.
517 * coverage.c (get_coverage_counts): Update calls to
518 dump_printf_loc to pass in dump_location_t rather than a
520 * doc/optinfo.texi (Dump types): Convert example of
521 dump_printf_loc from taking "locus" to taking "insn". Update
522 description of the "_loc" calls to cover dump_location_t.
523 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
525 (dump_user_location_t::dump_user_location_t): New constructors,
526 from gimple *stmt and rtx_insn *.
527 (dump_user_location_t::from_function_decl): New function.
528 (dump_loc): Make static.
529 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
530 const dump_location_t &.
531 (dump_generic_expr_loc): Delete.
532 (dump_printf_loc): Convert param "loc" from location_t to
533 const dump_location_t &.
534 (selftest::test_impl_location): New function.
535 (selftest::dumpfile_c_tests): New function.
536 * dumpfile.h: Include "profile-count.h".
537 (class dump_user_location_t): New class.
538 (struct dump_impl_location_t): New struct.
539 (class dump_location_t): New class.
540 (dump_printf_loc): Convert 2nd param from source_location to
541 const dump_location_t &.
542 (dump_generic_expr_loc): Delete.
543 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
544 const dump_location_t &.
545 * gimple-fold.c (fold_gimple_assign): Update call to
546 dump_printf_loc to pass in a dump_location_t rather than a
547 location_t, via the gimple stmt.
548 (gimple_fold_call): Likewise.
549 * gimple-loop-interchange.cc
550 (loop_cand::analyze_iloop_reduction_var): Update for change to
551 check_reduction_path.
552 (tree_loop_interchange::interchange): Update for change to
554 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
555 change in return-type of find_loop_location.
556 (graphite_regenerate_ast_isl): Likewise.
557 * graphite-optimize-isl.c (optimize_isl): Likewise.
558 * graphite.c (graphite_transform_loops): Likewise.
559 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
560 pass in a dump_location_t rather than a location_t, via the
562 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
563 * ipa.c (walk_polymorphic_call_targets): Likewise.
564 * loop-unroll.c (report_unroll): Convert "locus" param from
565 location_t to dump_location_t.
566 (decide_unrolling): Update for change to get_loop_location's
568 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
569 location_t to dump_user_location_t.
570 (grid_find_single_omp_among_assignments_1): Updates calls to
571 dump_printf_loc to pass in a dump_location_t rather than a
572 location_t, via the gimple stmt.
573 (grid_parallel_clauses_gridifiable): Convert "tloc" from
574 location_t to dump_location_t. Updates calls to dump_printf_loc
575 to pass in a dump_location_t rather than a location_t, via the
577 (grid_inner_loop_gridifiable_p): Likewise.
578 (grid_dist_follows_simple_pattern): Likewise.
579 (grid_gfor_follows_tiling_pattern): Likewise.
580 (grid_target_follows_gridifiable_pattern): Likewise.
581 (grid_attempt_target_gridification): Convert initialization
582 of local "grid" from memset to zero-initialization; FIXME: does
583 this require C++11? Update call to dump_printf_loc to pass in a
584 optinfo_location rather than a location_t, via the gimple stmt.
585 * profile.c (read_profile_edge_counts): Updates call to
586 dump_printf_loc to pass in a dump_location_t rather than a
588 (compute_branch_probabilities): Likewise.
589 * selftest-run-tests.c (selftest::run_tests): Call
591 * selftest.h (dumpfile_c_tests): New decl.
592 * tree-loop-distribution.c (pass_loop_distribution::execute):
593 Update for change in return type of find_loop_location.
594 * tree-parloops.c (parallelize_loops): Likewise.
595 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
596 "locus" from location_t to dump_user_location_t.
597 (canonicalize_loop_induction_variables): Likewise.
598 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
599 for change in return type of find_loop_location.
600 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
601 to dump_printf_loc to pass in a dump_location_t rather than a
602 location_t, via the stmt.
603 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
605 * tree-vect-loop-manip.c (find_loop_location): Convert return
606 type from source_location to dump_user_location_t.
607 (vect_do_peeling): Update for above change.
608 (vect_loop_versioning): Update for change in type of
610 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
611 from location_t to dump_user_location_t.
612 (vect_estimate_min_profitable_iters): Update for change in type
614 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
615 location_t to dump_location_t.
616 (vect_slp_bb): Update for change in type of vect_location.
617 * tree-vectorizer.c (vect_location): Convert from source_location
618 to dump_user_location_t.
619 (try_vectorize_loop_1): Update for change in vect_location's type.
620 (vectorize_loops): Likewise.
621 (increase_alignment): Likewise.
622 * tree-vectorizer.h (vect_location): Convert from source_location
623 to dump_user_location_t.
624 (find_loop_location): Convert return type from source_location to
625 dump_user_location_t.
626 (check_reduction_path): Convert 1st param from location_t to
627 dump_user_location_t.
628 * value-prof.c (check_counter): Update call to dump_printf_loc to
629 pass in a dump_user_location_t rather than a location_t; update
630 call to error_at for change in type of "locus".
631 (check_ic_target): Update call to dump_printf_loc to
632 pass in a dump_user_location_t rather than a location_t, via the
635 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
637 * config/s390/s390.h (enum processor_flags): Do not use
638 default tune parameter when -march was specified.
640 2018-06-26 Jakub Jelinek <jakub@redhat.com>
643 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
644 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
647 2018-06-26 Richard Biener <rguenther@suse.de>
649 PR tree-optimization/86287
651 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
652 (vect_analyze_loop): Initialize n_stmts.
654 2018-06-26 Richard Biener <rguenther@suse.de>
657 * fold-const.c (fold_convertible_p): Pointer extension
660 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
663 * dwarf2out.c (loc_list_has_views): Adjust comments.
664 (dw_loc_list): Split single cross-partition range with
667 2018-06-25 Jeff Law <law@redhat.com>
669 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
670 on -mbig-switch by default.
672 * config/v850/predicates.md (const_float_1_operand): Fix match_code
674 (const_float_0_operand): Remove unused predicate.
675 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
676 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
677 (recipsf2): New expander. Original pattern now called
679 (recipdf2, recipdf2_insn): Similarly.
680 (rsqrtsf2, rsqrtsf2_insn): Similarly
681 (rsqrtdf2, rsqrtdf2_insn): Similarly
683 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
685 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
686 Simplify logic for FreeBSD (twice).
688 2018-06-25 Martin Sebor <msebor@redhat.com>
690 PR tree-optimization/86204
691 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
692 a strnlen result if it's less than the length of the string.
694 2018-06-25 Martin Sebor <msebor@redhat.com>
696 PR tree-optimization/85700
697 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
698 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
699 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
701 2018-06-25 Martin Sebor <msebor@redhat.com>
703 * doc/extend.texi (Zero-length arrays): Update and clarify.
705 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
707 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
708 added IEEE/IBM long double multilib support on PowerPC little
709 endian Linux systems.
710 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
711 (MULTILIB_DEFAULTS): Likewise.
712 * config/rs6000/rs6000.c (rs6000_option_override_internal):
714 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
715 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
716 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
718 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
721 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
722 (REORDER_45): Likewise.
724 2018-06-25 Jeff Law <law@redhat.com>
726 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
727 dividend to 32 bits. Adjust length.
728 (udivmodhi4): Cleanup output template. Fix length.
730 2018-06-25 Carl Love <cel@us.ibm.com>
732 * config/rs6000/vsx.md: Change word selector to prefered location.
734 2018-06-25 Richard Biener <rguenther@suse.de>
736 PR tree-optimization/86304
737 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
738 epilogue-if-converted loops as well.
740 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
742 * lto-section-out.c (lto_begin_section): Do not print section
743 name for noaddr and unnumbered dumps.
745 2018-06-25 Richard Biener <rguenther@suse.de>
747 * tree-vectorizer.h (struct vec_info_shared): New structure
748 with parts split out from struct vec_info and loop_nest from
749 struct _loop_vec_info.
750 (struct vec_info): Adjust accordingly.
751 (struct _loop_vec_info): Likewise.
752 (LOOP_VINFO_LOOP_NEST): Adjust.
753 (LOOP_VINFO_DATAREFS): Likewise.
754 (LOOP_VINFO_DDRS): Likewise.
755 (struct _bb_vec_info): Likewise.
756 (BB_VINFO_DATAREFS): Likewise.
757 (BB_VINFO_DDRS): Likewise.
758 (struct _stmt_vec_info): Add dr_aux member.
759 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
760 (DR_MISALIGNMENT_UNINITIALIZED): New.
761 (set_dr_misalignment): Adjust.
762 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
763 (vect_analyze_loop): Adjust prototype.
764 (vect_analyze_loop_form): Likewise.
765 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
766 Compute dependences lazily.
767 (vect_record_base_alignments): Use shared datarefs/ddrs.
768 (vect_verify_datarefs_alignment): Likewise.
769 (vect_analyze_data_refs_alignment): Likewise.
770 (vect_analyze_data_ref_accesses): Likewise.
771 (vect_analyze_data_refs): Likewise.
772 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
773 constructor parameter for shared part.
774 (vect_analyze_loop_form): Pass in shared part and adjust.
775 (vect_analyze_loop_2): Pass in storage for the number of
776 stmts. Move loop nest finding to the caller. Compute
778 (vect_analyze_loop): Pass in shared part.
779 (vect_transform_loop): Verify shared datarefs are unchanged.
780 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
781 constructor parameter for shared part.
782 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
783 (vect_slp_bb): Verify shared datarefs are unchanged before
785 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
787 (new_stmt_vec_info): Initialize DR_AUX misalignment to
788 DR_MISALIGNMENT_UNINITIALIZED.
789 * tree-vectorizer.c (vec_info::vec_info): Add constructor
790 parameter for shared part.
791 (vec_info::~vec_info): Adjust.
792 (vec_info_shared::vec_info_shared): New.
793 (vec_info_shared::~vec_info_shared): Likewise.
794 (vec_info_shared::save_datarefs): Likewise.
795 (vec_info_shared::check_datarefs): Likewise.
796 (try_vectorize_loop_1): Construct shared part live for analyses
797 of a single loop for multiple vector sizes.
798 * tree-parloops.c (gather_scalar_reductions): Adjust.
800 2018-06-25 Richard Biener <rguenther@suse.de>
802 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
803 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
804 (vect_analyze_data_refs): Remove similar code from here and
805 simplify accordingly.
807 2018-06-25 Richard Biener <rguenther@suse.de>
809 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
810 for reverse storage order accesses rather than asserting
811 they cannot happen here.
813 2018-06-25 Tom de Vries <tdevries@suse.de>
816 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
817 Use data16 instead of .byte for insn prefix.
819 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
822 * parser.c (make_char_string_pack): Pass this literal chars
823 through cpp_interpret_string.
824 (cp_parser_userdef_numeric_literal): Check the result of
825 make_char_string_pack.
827 2018-06-24 Maya Rashish <coypu@sdf.org>
829 * ginclude/stddef.h: Simplify conditions around avoiding
830 re-definition of __size_t.
832 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
834 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
835 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
837 2018-06-22 Maya Rashish <coypu@sdf.org>
839 * doc/invoke.texi (mno-fancy-math-387): Update for changes
840 made to OpenBSD and NetBSD through the years.
842 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
844 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
845 behavior of vec_pack (vector double, vector double) to match
846 behavior of vec_float2 (vector double, vector double).
848 2018-06-22 Olivier Hainque <hainque@adacore.com>
850 * gimplify.c (gimplify_function_tree): Prevent creation
851 of a trampoline for the address of the current function
852 passed to entry/exit instrumentation hooks.
854 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
857 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
860 2018-06-22 Martin Liska <mliska@suse.cz>
862 PR tree-optimization/86263
863 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
864 Bail out if is_enabled is false.
865 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
867 (jump_table_cluster::is_enabled): New function.
869 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
871 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
872 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
873 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
874 (lto_input_ts_binfo_tree_pointers): Likewise.
875 * tree-streamer-out.c (streamer_write_tree_bitfields,
876 write_ts_binfo_tree_pointers): Likewise.
877 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
879 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
881 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
883 2018-06-22 Martin Liska <mliska@suse.cz>
885 * symbol-summary.h (get): Make it pure and inline move
886 functionality from ::get function.
887 (get): Remove and inline into ::get and ::get_create.
888 (get_create): Move code from ::get function.
890 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
893 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
894 -x assembler-with-cpp.
896 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
898 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
899 _FILE_OFFSET_BITS=64 for C++.
901 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
903 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
904 conversion insn that shows up when pr85657-3.c is compiled using
905 IEEE 128-bit long double.
906 (neg<mode>2_internal): Use the correct mode to check whether the
907 mode is IBM extended.
908 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
909 multiply and divide external functions from being created more
912 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
914 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
916 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
917 the edge can be forwarded.
918 (cfg_layout_merge_blocks): Likewise.
920 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
922 * except.c (finish_eh_generation): Commit edge insertions only after
923 the EH edges have been redirected from post-landing to landing pads.
925 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
927 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
928 create_tmp_var_for to create the FRAME decl.
929 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
931 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
933 * tree-inline.c (copy_edges_for_bb): Minor tweak.
934 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
935 debug statement when resetting its value.
936 (expand_call_inline): Copy the locus of the call onto the assignment
937 of the return value, if any. Use local variable in more cases.
939 2018-06-21 Martin Liska <mliska@suse.cz>
941 * ipa-pure-const.c (propagate_nothrow): Use
942 funct_state_summaries->get.
943 (dump_malloc_lattice): Likewise.
944 (propagate_malloc): Likewise.
946 2018-06-21 Richard Biener <rguenther@suse.de>
948 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
949 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
950 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
952 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
953 BLOCK_ABSTRACT_ORIGIN unconditionally.
955 2018-06-21 David Malcolm <dmalcolm@redhat.com>
957 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
959 * ipa-reference.c (ipa_reference_c_finalize): Delete
960 ipa_ref_opt_sum_summaries and set it to NULL.
962 2018-06-21 Tom de Vries <tdevries@suse.de>
964 PR tree-optimization/85859
965 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
966 test with comment from bb_no_side_effects_p.
968 2018-06-21 Richard Biener <rguenther@suse.de>
970 PR tree-optimization/86232
971 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
972 max for constant niter.
974 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
976 * config/aarch64/aarch64-simd.md
977 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
979 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
981 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
982 Make opernads of the unspec commutative.
984 2018-06-21 Richard Biener <rguenther@suse.de>
986 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
987 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
988 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
989 (vect_analyze_data_ref_dependence): Re-order checks to deal with
991 (vect_record_base_alignments): Do not record base alignment
992 for gathers or scatters.
993 (vect_compute_data_ref_alignment): Drop return value that is always
994 true. Bail out early for gathers or scatters.
995 (vect_enhance_data_refs_alignment): Bail out early for gathers
997 (vect_find_same_alignment_drs): Likewise.
998 (vect_analyze_data_refs_alignment): Remove dead code.
999 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1000 (vect_analyze_data_refs): For possible gathers or scatters do
1001 not create an alternate DR, just check their possible validity
1002 and mark them. Adjust DECL_NONALIASED handling to not rely
1004 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
1005 update inits of gathers or scatters.
1006 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
1007 Also copy gather/scatter flag to pattern vinfo.
1009 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
1011 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1012 behavior of vec_packsu (vector unsigned long long, vector unsigned
1013 long long) to match behavior of vec_packs with same signature.
1015 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1016 Thomas Schwinge <thomas@codesourcery.com>
1017 Cesar Philippidis <cesar@codesourcery.com>
1019 * gimplify.c (gimplify_scan_omp_clauses): Add support for
1020 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1021 (gimplify_adjust_omp_clauses): Likewise.
1022 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
1023 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
1024 (gimplify_omp_target_update): Update handling of acc update and
1026 * omp-low.c (install_var_field): Remove unused parameter
1027 base_pointers_restrict.
1028 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
1029 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
1031 (omp_target_base_pointers_restrict_p): Delete.
1032 (scan_omp_target): Update call to scan_sharing_clauses.
1033 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
1035 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1036 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1037 (convert_local_omp_clauses): Likewise.
1038 * tree-pretty-print.c (dump_omp_clause): Likewise.
1039 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
1041 (omp_clause_code_name): Likewise.
1043 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1046 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
1049 PR tree-optimization/86231
1050 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
1051 anti-range don't overwrite *vr0min before using it to compute *vr0max.
1053 2018-06-20 Tom de Vries <tdevries@suse.de>
1055 PR tree-optimization/86097
1056 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
1057 iv type if signedness of iv type is not the same as that of *nit.
1059 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1061 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
1062 EDGE_EH edges, verify they are all EDGE_EH.
1064 2018-06-20 Maya Rashish <coypu@sdf.org>
1066 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
1068 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1070 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
1071 * config/aarch64/aarch64.c (xgene1_tunings): Add
1072 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
1073 (aarch64_mode_valid_for_sched_fusion_p):
1074 Allow 16-byte modes.
1075 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
1076 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
1078 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
1080 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
1081 * config/aarch64/iterators.md (VQ2): New mode iterator.
1083 2018-06-20 Martin Liska <mliska@suse.cz>
1085 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1086 Change default ratio from 10 to 8.
1088 2018-06-20 Martin Liska <mliska@suse.cz>
1090 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1092 (bit_test_cluster::find_bit_tests): Likewise.
1093 (switch_decision_tree::analyze_switch_statement): Find clusters.
1094 * tree-switch-conversion.h (struct jump_table_cluster): Document
1097 2018-06-20 Martin Liska <mliska@suse.cz>
1099 * tree-switch-conversion.c (switch_conversion::collect):
1100 Record m_uniq property.
1101 (switch_conversion::expand): Bail out for special conditions.
1102 (group_cluster::~group_cluster): New.
1103 (group_cluster::group_cluster): Likewise.
1104 (group_cluster::dump): Likewise.
1105 (jump_table_cluster::emit): New.
1106 (switch_decision_tree::fix_phi_operands_for_edges): New.
1107 (struct case_node): Remove struct.
1108 (jump_table_cluster::can_be_handled): New.
1109 (case_values_threshold): Moved to header.
1110 (reset_out_edges_aux): Likewise.
1111 (jump_table_cluster::is_beneficial): New.
1112 (bit_test_cluster::can_be_handled): Likewise.
1113 (add_case_node): Remove.
1114 (bit_test_cluster::is_beneficial): New.
1115 (case_bit_test::cmp): New.
1116 (bit_test_cluster::emit): New.
1117 (expand_switch_as_decision_tree_p): Remove.
1118 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
1119 (fix_phi_operands_for_edge): Likewise.
1120 (switch_decision_tree::analyze_switch_statement): New.
1121 (compute_cases_per_edge): Move ...
1122 (switch_decision_tree::compute_cases_per_edge): ... here.
1123 (try_switch_expansion): Likewise.
1124 (switch_decision_tree::try_switch_expansion): Likewise.
1125 (record_phi_operand_mapping): Likewise.
1126 (switch_decision_tree::record_phi_operand_mapping): Likewise.
1127 (emit_case_decision_tree): Likewise.
1128 (switch_decision_tree::emit): Likewise.
1129 (balance_case_nodes): Likewise.
1130 (switch_decision_tree::balance_case_nodes): Likewise.
1131 (dump_case_nodes): Likewise.
1132 (switch_decision_tree::dump_case_nodes): Likewise.
1133 (emit_jump): Likewise.
1134 (switch_decision_tree::emit_jump): Likewise.
1135 (emit_cmp_and_jump_insns): Likewise.
1136 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
1137 (emit_case_nodes): Likewise.
1138 (switch_decision_tree::emit_case_nodes): Likewise.
1139 (conditional_probability): Remove.
1140 * tree-switch-conversion.h (enum cluster_type): New.
1142 (struct cluster): Likewise.
1143 (cluster::cluster): Likewise.
1144 (struct simple_cluster): Likewise.
1145 (simple_cluster::simple_cluster): Likewise.
1146 (struct group_cluster): Likewise.
1147 (struct jump_table_cluster): Likewise.
1148 (struct bit_test_cluster): Likewise.
1149 (struct min_cluster_item): Likewise.
1150 (struct case_tree_node): Likewise.
1151 (case_tree_node::case_tree_node): Likewise.
1152 (jump_table_cluster::case_values_threshold): Likewise.
1153 (struct case_bit_test): Likewise.
1154 (struct switch_decision_tree): Likewise.
1155 (struct switch_conversion): Likewise.
1156 (switch_decision_tree::reset_out_edges_aux): Likewise.
1158 2018-06-20 Martin Liska <mliska@suse.cz>
1160 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
1161 (hoist_edge_and_branch_if_true): Likewise.
1162 (expand_switch_using_bit_tests_p): Likewise.
1163 (struct case_bit_test): Likewise.
1164 (case_bit_test_cmp): Likewise.
1165 (emit_case_bit_tests): Likewise.
1166 (switch_conversion::switch_conversion): New class.
1167 (struct switch_conv_info): Remove old struct.
1168 (collect_switch_conv_info): More to ...
1169 (switch_conversion::collect): ... this.
1170 (check_range): Likewise.
1171 (switch_conversion::check_range): Likewise.
1172 (check_all_empty_except_final): Likewise.
1173 (switch_conversion::check_all_empty_except_final): Likewise.
1174 (check_final_bb): Likewise.
1175 (switch_conversion::check_final_bb): Likewise.
1176 (create_temp_arrays): Likewise.
1177 (switch_conversion::create_temp_arrays): Likewise.
1178 (free_temp_arrays): Likewise.
1179 (gather_default_values): Likewise.
1180 (switch_conversion::gather_default_values): Likewise.
1181 (build_constructors): Likewise.
1182 (switch_conversion::build_constructors): Likewise.
1183 (constructor_contains_same_values_p): Likewise.
1184 (switch_conversion::contains_same_values_p): Likewise.
1185 (array_value_type): Likewise.
1186 (switch_conversion::array_value_type): Likewise.
1187 (build_one_array): Likewise.
1188 (switch_conversion::build_one_array): Likewise.
1189 (build_arrays): Likewise.
1190 (switch_conversion::build_arrays): Likewise.
1191 (gen_def_assigns): Likewise.
1192 (switch_conversion::gen_def_assigns): Likewise.
1193 (prune_bbs): Likewise.
1194 (switch_conversion::prune_bbs): Likewise.
1195 (fix_phi_nodes): Likewise.
1196 (switch_conversion::fix_phi_nodes): Likewise.
1197 (gen_inbound_check): Likewise.
1198 (switch_conversion::gen_inbound_check): Likewise.
1199 (process_switch): Use the newly created class.
1200 (switch_conversion::expand): New.
1201 (switch_conversion::~switch_conversion): New.
1202 * tree-switch-conversion.h: New file.
1204 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1206 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
1207 tree-vect-patterns.c.
1208 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
1209 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
1210 (vect_recog_sad_pattern): Likewise.
1211 (vect_recog_widen_sum_pattern): Likewise.
1212 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
1213 (vect_recog_widen_shift_pattern): Remove the type_in argument.
1214 (vect_recog_rotate_pattern): Likewise.
1215 (vect_recog_mult_pattern): Likewise.
1216 (vect_recog_vector_vector_shift_pattern): Likewise.
1217 (vect_recog_divmod_pattern): Likewise.
1218 (vect_recog_mixed_size_cond_pattern): Likewise.
1219 (vect_recog_bool_pattern): Likewise.
1220 (vect_recog_mask_conversion_pattern): Likewise.
1221 (vect_try_gather_scatter_pattern): Likewise.
1222 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
1223 (vect_recog_over_widening_pattern): Likewise.
1224 (vect_recog_gather_scatter_pattern): Likewise.
1225 (vect_recog_func_ptr): Move from tree-vectorizer.h
1226 (vect_vect_recog_func_ptrs): Move further down the file.
1227 (vect_recog_func): Likewise. Remove the third argument.
1228 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
1229 (vect_pattern_recog_1): Expect the pattern function to do any
1230 necessary target tests. Also expect it to provide a vector type.
1231 Remove the type_in handling.
1233 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1235 * tree-vect-patterns.c (vect_pattern_detected): New function.
1236 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
1237 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
1238 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
1239 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
1240 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1241 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1242 (vect_recog_mask_conversion_pattern)
1243 (vect_try_gather_scatter_pattern): Likewise.
1245 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1247 * tree-vect-patterns.c (vect_get_internal_def): New function.
1248 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1249 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
1250 (search_type_for_mask_1): Use it.
1252 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1254 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1255 redundant WIDEN_SUM_EXPR handling.
1256 (vect_recog_sad_pattern): Likewise.
1258 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1260 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1261 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
1262 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
1263 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
1264 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
1266 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1268 * tree-vect-stmts.c (vectorizable_call): Make sure that we
1269 use the stmt_vec_info of the original bb statement for the
1270 new zero assignment, even if the call is part of a pattern.
1272 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1274 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
1275 that the sequence is attached to the original statement rather
1276 than the pattern statement.
1277 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
1278 PATTERN_DEF_SEQ from the original statement rather than
1279 the main pattern statement.
1280 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
1281 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
1282 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
1284 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1286 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
1287 definition statements before the early exit for statements that aren't
1289 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
1291 (vect_transform_loop): ...here. Process pattern definition
1292 statements without first checking whether the main pattern
1293 statement is live or relevant.
1295 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
1297 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
1298 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
1300 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
1302 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
1303 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
1304 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
1305 (expand_block_compare): Change select_block_compare_mode call.
1306 (expand_strncmp_align_check): Use new functions, fix comment.
1307 (emit_final_str_compare_gpr): New function.
1308 (expand_strn_compare): Refactor and clean up code.
1309 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
1311 2018-06-19 Tony Reix <tony.reix@atos.com>
1312 Damien Bergamini <damien.bergamini@atos.com>
1313 David Edelsohn <dje.gcc@gmail.com>
1315 * collect2.c (static_obj): New variable.
1316 (static_libs): New variable.
1317 (is_in_list): Uncomment declaration.
1318 (main): Track AIX libraries linked statically.
1319 (is_in_list): Uncomment definition.
1320 (scan_prog_file): Don't add AIX shared libraries initializer
1321 to constructor list if linking statically.
1323 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
1325 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
1327 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
1329 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
1331 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
1334 2018-06-19 Martin Liska <mliska@suse.cz>
1336 * config/i386/i386.c (ix86_can_inline_p): Do not use
1337 ipa_fn_summaries::get_create.
1338 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
1340 (devirtualization_time_bonus): Likewise.
1341 (ipcp_propagate_stage): Likewise.
1342 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1343 (edge_set_predicate): Likewise.
1344 (evaluate_conditions_for_known_args): Likewise.
1345 (evaluate_properties_for_edge): Likewise.
1346 (ipa_call_summary::reset): Tranform to ...
1347 (ipa_call_summary::~ipa_call_summary): ... this.
1348 (ipa_fn_summary::reset): Transform to ...
1349 (ipa_fn_summary::~ipa_fn_summary): ... this.
1350 (ipa_fn_summary_t::remove): Rename to ...
1351 (ipa_fn_summary_t::remove_callees): ... this.
1352 (ipa_fn_summary_t::duplicate): Use placement new
1353 instead of memory copy.
1354 (ipa_call_summary_t::duplicate): Likewise.
1355 (ipa_call_summary_t::remove): Remove.
1356 (dump_ipa_call_summary): Change get_create to get.
1357 (ipa_dump_fn_summary): Dump only when summary exists.
1358 (analyze_function_body): Use symbol_summary::get instead
1360 (compute_fn_summary): Likewise.
1361 (estimate_edge_devirt_benefit): Likewise.
1362 (estimate_edge_size_and_time): Likewise.
1363 (inline_update_callee_summaries): Likewise.
1364 (remap_edge_change_prob): Likewise.
1365 (remap_edge_summaries): Likewise.
1366 (ipa_merge_fn_summary_after_inlining): Likewise.
1367 (write_ipa_call_summary): Likewise.
1368 (ipa_fn_summary_write): Likewise.
1369 (ipa_free_fn_summary): Likewise.
1370 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
1371 (struct ipa_call_summary): Likewise.
1372 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
1374 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
1375 (estimate_size_after_inlining): Likewise.
1376 (estimate_growth): Likewise.
1377 (growth_likely_positive): Likewise.
1378 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1379 (inline_call): Likewise.
1380 * ipa-inline.c (caller_growth_limits): Likewise.
1381 (can_inline_edge_p): Likewise.
1382 (can_inline_edge_by_limits_p): Likewise.
1383 (compute_uninlined_call_time): Likewise.
1384 (compute_inlined_call_time): Likewise.
1385 (want_inline_small_function_p): Likewise.
1386 (edge_badness): Likewise.
1387 (update_caller_keys): Likewise.
1388 (update_callee_keys): Likewise.
1389 (inline_small_functions): Likewise.
1390 (inline_to_all_callers_1): Likewise.
1391 (dump_overall_stats): Likewise.
1392 (early_inline_small_functions): Likewise.
1393 (early_inliner): Likewise.
1394 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1395 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1396 * ipa-pure-const.c (malloc_candidate_p): Likewise.
1397 * ipa-split.c (execute_split_functions): Likewise.
1398 * symbol-summary.h: Likewise.
1399 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1401 2018-06-19 Richard Biener <rguenther@suse.de>
1403 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
1404 (vectorize_loops): ... here. Fix dbgcnt handling.
1405 (try_vectorize_loop): Wrap try_vectorize_loop_1.
1407 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
1410 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
1411 ieee128 argument takes up only one (vector) register, not two (floating
1414 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
1416 * gimplify.c (gimplify_init_constructor): Really never clear for an
1417 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
1419 2018-06-19 Richard Biener <rguenther@suse.de>
1421 PR tree-optimization/86179
1422 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
1423 after failed recognition.
1425 2018-06-18 Martin Sebor <msebor@redhat.com>
1428 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
1429 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
1430 Handle integer subtraction.
1431 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
1432 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
1434 2018-06-18 David Malcolm <dmalcolm@redhat.com>
1436 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
1437 param from rtx to rtx_insn *.
1438 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
1440 (frv_ifcvt_modify_insn): Likwise.
1441 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
1442 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
1443 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
1444 as_a <rtx_insn *> cast to local "unprotected_region" once
1445 it's been established that it's not NULL or pc_rtx.
1446 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
1447 param "sethi" from rtx to rtx_insn *.
1448 (nds32_group_float_insns): Likewise for param "insn".
1449 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
1451 (vax_output_int_subtract): Likewise.
1452 * config/vax/vax.c (vax_output_int_add): Likewise for param
1454 (vax_output_int_subtract): Likewise.
1455 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
1456 (emit_pattern_after): Likewise for param "after".
1457 (emit_insn_after): Likewise.
1458 (emit_jump_insn_after): Likewise.
1459 (emit_call_insn_after): Likewise.
1460 (emit_debug_insn_after): Likewise.
1461 (emit_pattern_before): Likewise for param "before".
1462 (emit_insn_before): Likewise.
1463 (emit_jump_insn_before): Likewise.
1464 * final.c (get_insn_template): Likewise for param "insn", removing
1466 * output.h (get_insn_template): Likewise for 2nd param.
1467 * rtl.h (emit_insn_before): Likewise.
1468 (emit_jump_insn_before): Likewise.
1469 (emit_debug_insn_before_noloc): Likewise.
1470 (emit_insn_after): Likewise.
1471 (emit_jump_insn_after): Likewise.
1472 (emit_call_insn_after): Likewise.
1473 (emit_debug_insn_after): Likewise.
1474 (set_insn_deleted): Likewise for param.
1476 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
1479 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
1480 floating point modes, so that IFmode is numerically greater than
1481 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
1482 to declare the ordering. This prevents IFmode from being
1483 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
1484 machine. Include rs6000-modes.h to share the fractional values
1485 between genmodes* and the rest of the compiler.
1489 * config/rs6000/rs6000-modes.h: New file.
1490 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
1491 meaning of rs6000_long_double_size so that 126..128 selects an
1492 appropriate 128-bit floating point type.
1493 (rs6000_option_override_internal): Likewise.
1494 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
1495 (TARGET_LONG_DOUBLE_128): Change the meaning of
1496 rs6000_long_double_size so that 126..128 selects an appropriate
1497 128-bit floating point type.
1498 (LONG_DOUBLE_TYPE_SIZE): Update comment.
1499 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
1500 source and destination to match the standard usage.
1501 (truncifkf2): Likewise.
1502 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
1503 ISA 2.07 to use an explicit clobber, instead of passing in a
1505 (copysign<mode>3_soft): Likewise.
1507 2018-06-18 David Malcolm <dmalcolm@redhat.com>
1509 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1510 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
1511 (vect_slp_analyze_instance_dependence): Likewise.
1512 (vect_enhance_data_refs_alignment): Likewise.
1513 (vect_analyze_data_refs_alignment): Likewise.
1514 (vect_slp_analyze_and_verify_instance_alignment
1515 (vect_analyze_data_ref_accesses): Likewise.
1516 (vect_prune_runtime_alias_test_list): Likewise.
1517 (vect_analyze_data_refs): Likewise.
1518 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
1519 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1520 (vect_analyze_scalar_cycles_1): Likewise.
1521 (vect_get_loop_niters): Likewise.
1522 (vect_analyze_loop_form_1): Likewise.
1523 (vect_update_vf_for_slp): Likewise.
1524 (vect_analyze_loop_operations): Likewise.
1525 (vect_analyze_loop): Likewise.
1526 (vectorizable_induction): Likewise.
1527 (vect_transform_loop): Likewise.
1528 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
1529 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1530 (vect_make_slp_decision): Likewise.
1531 (vect_detect_hybrid_slp): Likewise.
1532 (vect_slp_analyze_operations): Likewise.
1533 (vect_slp_bb): Likewise.
1534 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
1535 (vectorizable_bswap): Likewise.
1536 (vectorizable_call): Likewise.
1537 (vectorizable_simd_clone_call): Likewise.
1538 (vectorizable_conversion): Likewise.
1539 (vectorizable_assignment): Likewise.
1540 (vectorizable_shift): Likewise.
1541 (vectorizable_operation): Likewise.
1542 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
1544 2018-06-18 Martin Sebor <msebor@redhat.com>
1546 PR tree-optimization/81384
1547 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
1548 * builtins.c (expand_builtin_strnlen): New function.
1549 (expand_builtin): Call it.
1550 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
1551 * builtins.def (BUILT_IN_STRNLEN): New.
1552 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
1553 Warn for bounds in excess of maximum object size.
1554 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
1555 single-value ranges. Handle strnlen.
1556 (handle_builtin_strlen): Handle strnlen.
1557 (strlen_check_and_optimize_stmt): Same.
1558 * doc/extend.texi (Other Builtins): Document strnlen.
1560 2018-06-18 Maya Rashish <coypu@sdf.org>
1562 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
1563 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
1564 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
1566 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
1568 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
1570 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1572 * tree.c (escaped_string::escape): Replace cast to char * by
1573 const_cast<char *> (unescaped).
1575 2018-06-18 Nick Clifton <nickc@redhat.com>
1578 * tree.c (escaped_string): New class. Converts an unescaped
1579 string into its escaped equivalent.
1580 (warn_deprecated_use): Use the new class to convert the
1581 deprecation message, if present.
1582 (test_escaped_strings): New self test.
1583 (test_c_tests): Add test_escaped_strings.
1584 * doc/extend.texi (deprecated): Add a note that the
1585 deprecation message is affected by the -fmessage-length
1586 option, and that control characters will be escaped.
1587 (#pragma GCC error): Document this pragma.
1588 (#pragma GCC warning): Likewise.
1589 * doc/invoke.texi (-fmessage-length): Document this option's
1590 effect on the #warning and #error preprocessor directives and
1591 the deprecated attribute.
1593 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
1595 * tree.c (decl_value_expr_lookup): Revert latest change.
1596 (decl_value_expr_insert): Likewise.
1598 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
1600 * gimplify.c (nonlocal_vlas): Delete.
1601 (nonlocal_vla_vars): Likewise.
1602 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
1604 (gimplify_body): Do not create and destroy nonlocal_vlas.
1605 * tree-nested.c: Include diagnostic.h.
1606 (use_pointer_in_frame): Tweak.
1607 (lookup_field_for_decl): Add assertion and declare the transformation.
1608 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
1609 internal error when the reference is in a wrong context. Do not
1610 create a debug decl by default.
1611 (note_nonlocal_block_vlas): Delete.
1612 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
1613 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
1614 create a debug decl by default.
1615 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
1616 call is in a wrong context.
1617 (fixup_vla_decls): New function.
1618 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
1619 debug variables were created.
1620 * tree.c (decl_value_expr_lookup): Add checking assertion.
1621 (decl_value_expr_insert): Likewise.
1623 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1626 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
1627 * tree-scalar-evolution.c (interpret_expr): Likewise.
1628 (expression_expensive_p): Likewise.
1629 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
1630 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
1631 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
1632 (ssa_defined_by_minus_one_stmt_p): New.
1634 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1637 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
1638 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
1639 * dojump.c (do_jump): Likewise.
1640 * expr.c (expand_expr_real_2): Check operand type's sign.
1641 * fold-const.c (const_unop): Handle ABSU_EXPR.
1642 (fold_abs_const): Likewise.
1643 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
1644 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
1645 (strip_sign_op_1): Likesise.
1646 * match.pd: Add new pattern to generate ABSU_EXPR.
1647 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
1648 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1649 * tree-eh.c (operation_could_trap_helper_p): Likewise.
1650 * tree-inline.c (estimate_operator_cost): Likewise.
1651 * tree-pretty-print.c (dump_generic_node): Likewise.
1652 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
1653 * tree.def (ABSU_EXPR): New.
1655 2018-06-16 Jakub Jelinek <jakub@redhat.com>
1658 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
1659 documented as preserved for backward compatibility only.
1660 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
1662 PR rtl-optimization/86108
1663 * bb-reorder.c (create_forwarder_block): Renamed to ...
1664 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
1665 jump from new landing pad to the second part.
1666 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
1669 2018-06-15 Jakub Jelinek <jakub@redhat.com>
1672 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
1673 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
1674 Only call store_expr for halves if the mode is the same.
1677 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
1678 Fix up comment formatting.
1680 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1682 * typed-splay-tree.h (typed_splay_tree::remove): New function.
1683 (typed_splay_tree::closure,
1684 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
1685 (typed_splay_tree::typed_splay_tree,
1686 typed_splay_tree::operator =): Declared private.
1687 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
1688 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
1689 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
1690 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
1691 typed_splay_tree::splay_tree_splay,
1692 typed_splay_tree::splay_tree_foreach_helper,
1693 typed_splay_tree::splay_tree_insert,
1694 typed_splay_tree::splay_tree_remove,
1695 typed_splay_tree::splay_tree_lookup,
1696 typed_splay_tree::splay_tree_predecessor,
1697 typed_splay_tree::splay_tree_successor,
1698 typed_splay_tree::splay_tree_min,
1699 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
1700 (typed_splay_tree::root, typed_splay_tree::comp,
1701 typed_splay_tree::delete_key,
1702 typed_splay_tree::delete_value): New data members.
1703 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
1704 typed_splay_tree::remove.
1706 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
1708 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
1709 -mginv and -mno-ginv to the assembler.
1710 * config/mips/mips.opt (-mcrc): New option.
1712 * doc/invoke.text (-mcrc): Document.
1715 2018-06-15 Nick Clifton <nickc@redhat.com>
1718 * tree.c (escaped_string): New class. Converts an unescaped
1719 string into its escaped equivalent.
1720 (warn_deprecated_use): Use the new class to convert the
1721 deprecation message, if present.
1722 (test_escaped_strings): New self test.
1723 (test_c_tests): Add test_escaped_strings.
1724 * doc/extend.texi (deprecated): Add a note that the
1725 deprecation message is affected by the -fmessage-length
1726 option, and that control characters will be escaped.
1727 (#pragma GCC error): Document this pragma.
1728 (#pragma GCC warning): Likewise.
1729 * doc/invoke.texi (-fmessage-length): Document this option's
1730 effect on the #warning and #error preprocessor directives and
1731 the deprecated attribute.
1733 2018-06-15 Richard Biener <rguenther@suse.de>
1735 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
1736 here, also noting vector size used.
1737 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
1738 size used in MSG_OPTIMIZED_LOCATIONS dump.
1739 (pass_slp_vectorize::execute): Adjust.
1741 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
1744 * config/arc/arc.c (arc_return_address_register): Fix
1747 2018-06-15 Richard Biener <rguenther@suse.de>
1750 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
1751 leave useless conversion stripping to force_gimple_operand_gsi.
1752 (gimplify_build2): Likewise.
1753 (gimplify_build1): Likewise.
1755 2018-06-15 Richard Biener <rguenther@suse.de>
1758 * tree-cfg.c (move_stmt_op): unshare invariant addresses
1759 before adjusting their block.
1761 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
1763 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
1764 multilibs for *-*-rtems*.
1765 * config/riscv/t-rtems: New file.
1767 2018-06-14 Jakub Jelinek <jakub@redhat.com>
1770 * match.pd ((A +- CST1) +- CST2): Punt if last resort
1771 unsigned_type_for returns NULL.
1774 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
1775 subregs of multi-word pseudos unless the float mode has word size.
1777 2018-06-14 Richard Biener <rguenther@suse.de>
1780 * tree-vect-generic.c (build_word_mode_vector_type): Remove
1781 duplicate and harmful type_hash_canon.
1782 * tree.c (type_hash_canon): Assert we didn't find ourselves.
1784 2018-06-14 Richard Biener <rguenther@suse.de>
1787 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
1790 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1792 * config/rtems.h (STDINT_LONG32): Define.
1794 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
1795 Prachi Godbole <prachi.godbole@imgtec.com>
1797 * config/mips/mips-cpus.def: Define P6600.
1798 * config/mips/mips-tables.opt: Regenerate.
1799 * config/mips/mips.c (mips_ucbranch_type): New enum.
1800 (mips_rtx_cost_data): Add support for P6600.
1801 (mips_issue_rate): Likewise.
1802 (mips_multipass_dfa_lookahead): Likewise.
1803 (mips_avoid_hazard): Likewise.
1804 (mips_reorg_process_insns): Likewise.
1805 (mips_classify_branch_p6600): New function.
1806 * config/mips/mips.h (TUNE_P6600): New define.
1807 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
1808 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
1809 * config/mips/mips.md: Include p6600.md.
1810 (processor): Add p6600.
1811 * config/mips/p6600.md: New file.
1812 * doc/invoke.texi: Add p6600 to supported architectures.
1814 2018-06-13 Martin Sebor <msebor@redhat.com>
1816 PR tree-optimization/86114
1817 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
1819 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
1821 2018-06-13 Richard Biener <rguenther@suse.de>
1823 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
1824 Properly set vector type of the intermediate stmt.
1825 * tree-vect-stmts.c (vectorizable_operation): The destination
1826 var always has vectype_out type.
1828 2018-06-13 Jeff Law <law@redhat.com>
1830 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
1831 integer 0 for argument to print_rtl_with_bb.
1832 (rl78_reorg): Likewise.
1834 2018-06-13 David Malcolm <dmalcolm@redhat.com>
1836 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
1837 from rtx to rtx_insn *.
1838 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
1840 (add_sched_insns_for_speculation): Likewise for local "target",
1841 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1842 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
1843 from rtx_insn ** to rtx_code_label **.
1844 (reorg_emit_nops): Likewise.
1845 (c6x_reorg): Likewise for local "call_labels".
1846 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
1848 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
1849 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
1850 the loops over LABEL_REFS.
1851 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
1853 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1854 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
1855 (split_branches): Strengthen local "olabel" from rtx to
1856 rtx_insn *, adding a safe_as_a cast.
1857 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
1859 (add_insn_after): Likewise for first two params.
1860 (add_insn_before): Likewise.
1861 (remove_insn): Likewise for param.
1862 (emit_pattern_before_noloc): Likewise for second and third params.
1863 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
1864 (emit_call_insn_before_noloc): Likewise.
1865 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
1867 (emit_barrier_before): Likewise.
1868 (emit_label_before): Strengthen "label" param from "rtx" to
1869 "rtx_code_label *". Strengthen "before" param from "rtx" to
1871 (emit_insn_after_1): Strengthen "after" param from "rtx" to
1873 (emit_pattern_after_noloc): Likewise.
1874 (emit_insn_after_noloc): Likewise.
1875 (emit_jump_insn_after_noloc): Likewise.
1876 (emit_call_insn_after_noloc): Likewise.
1877 (emit_debug_insn_after_noloc): Likewise.
1878 (emit_barrier_after): Likewise.
1879 (emit_label_after): Likewise for both params.
1880 (emit_pattern_after_setloc): Likewise for "after" param. Convert
1881 "loc" param from "int" to "location_t".
1882 (emit_insn_after_setloc): Likewise.
1883 (emit_jump_insn_after_setloc): Likewise.
1884 (emit_call_insn_after_setloc): Likewise.
1885 (emit_debug_insn_after_setloc): Likewise.
1886 (emit_pattern_before_setloc): Likewise for "before" param. Convert
1887 "loc" param from "int" to "location_t".
1888 (emit_pattern_before): Convert NULL_RTX to NULL.
1889 (emit_insn_before_setloc): Convert "loc" param from "int" to
1891 (emit_jump_insn_before_setloc): Likewise.
1892 (emit_call_insn_before_setloc): Likewise.
1893 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
1894 rtx_insn *. Convert "loc" param from "int" to "location_t".
1895 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
1896 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
1897 Convert 3rd param from "int" to "location_t".
1898 (emit_barrier_before, emit_barrier_after, next_real_insn):
1899 Strengthen param from rtx to rtx_insn *.
1900 (emit_label_before): Strengthen 1st param from "rtx" to
1901 "rtx_code_label *". Strengthen 2nd param from "rtx" to
1903 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
1904 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
1905 Strengthen 2nd param from "rtx" to "rtx_insn *".
1906 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
1907 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
1908 Likewise. Convert 3rd param from "int" to "location_t".
1909 (emit_label_after): Strengthen 1st param from "rtx" to
1911 (next_real_insn, remove_insn): Strengthen param from "rtx" to
1913 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
1914 from "rtx" to "rtx_insn *".
1916 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
1918 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
1919 bodies streamed in with -Q.
1920 * dumpfile.c (dump_files): Add lto-stream-out dump file.
1921 * dumpfile.h (tree_dump_index): Add lto_stream_out.
1922 * gimple-streamer-out.c: Include gimple-pretty-print.h
1923 (output_bb): Dump stmts streamed.
1924 * lto-section-out.c: Include print-tree.h
1925 (lto_begin_section): Dump sections created.
1926 (lto_output_decl_index): Dump decl encoded.
1927 * lto-streamer-out.c: Include print-tree.h
1928 (create_output_block): Dump output block created.
1929 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
1930 (output_function): Dump function output.
1931 (output_constructor): Dump constructor streamed.
1932 (write_global_stream): Output indexes encoded.
1933 (produce_asm_for_decls): Dump streams encoded.
1934 * lto-streamer.c (streamer_dump_file): New global var.
1935 * lto-streamer.h (streamer_dump_file): Declare.
1936 * passes.c (ipa_write_summaries): Initialize streamer dump.
1937 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
1940 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
1943 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
1944 offsets for register save directives. Emit a second batch of save
1945 directives, if need be, when the function accesses prior frames.
1947 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1949 * config/arc/fpu.md (fmasf4): Force operand to register.
1950 (fnmasf4): Likewise.
1952 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1954 * config/arc/arc-protos.h (arc_pad_return): Remove.
1955 * config/arc/arc.c (machine_function): Remove force_short_suffix
1957 (arc_print_operand): Adjust printing of '&'.
1958 (arc_verify_short): Remove conditional printing of short suffix.
1959 (arc_final_prescan_insn): Remove reference to size_reason.
1960 (pad_return): New function.
1961 (arc_reorg): Call pad_return.
1962 (arc_pad_return): Remove.
1963 (arc_init_machine_status): Remove reference to force_short_suffix.
1964 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
1965 (attr length): When attribute iscompact is true force to 2
1966 regardless; in the case of maybe check if we want to force the
1967 instruction to have 4 bytes length.
1968 (nopv): Change it to generate 4 byte long nop as well.
1969 (blockage): New pattern.
1970 (simple_return): Remove call to arc_pad_return.
1971 (p_return_i): Likewise.
1973 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1975 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1977 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1979 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
1982 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
1984 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
1985 for ARC700 and ARCv2.
1987 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
1990 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
1991 operands[2] instead of operands[1].
1994 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
1996 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
1997 case, check whether the outer register overlaps an unallocatable
1998 register, not just whether it fits the required class.
2000 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
2002 * poly-int.h (can_div_trunc_p): Add new overload in which all values
2004 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
2005 (memrefs_conflict_p): Likewise.
2006 (init_alias_analysis): Likewise.
2007 * cfgexpand.c (expand_debug_expr): Likewise.
2008 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
2009 * cse.c (fold_rtx): Likewise.
2010 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
2011 * expr.c (emit_block_move_hints): Likewise.
2012 (clear_storage_hints, push_block, emit_push_insn): Likewise.
2013 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
2014 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
2015 (emit_group_store): Likewise.
2016 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
2017 to read the PRE/POST_MODIFY increment.
2018 * calls.c (store_one_arg): Use strip_offset.
2019 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
2021 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
2023 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
2024 (simplify_binary_operation_1): Extend CONST_INT handling to
2026 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
2027 than a HOST_WIDE_INT.
2028 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
2030 (adjust_mems, add_stores): Update accodingly.
2031 (vt_canonicalize_addr): Track polynomial offsets.
2032 (emit_note_insn_var_location): Likewise.
2033 (vt_add_function_parameter): Likewise.
2034 (vt_initialize): Likewise.
2036 2018-06-12 Jeff Law <law@redhat.com>
2038 * config.gcc (alpha*-*-freebsd*): Remove.
2039 * config/alpha/freebsd.h: Remove.
2041 2018-06-12 David Malcolm <dmalcolm@redhat.com>
2044 * spellcheck-tree.c (levenshtein_distance): Rename to...
2045 (get_edit_distance): ...this, and update for underlying renaming.
2046 * spellcheck-tree.h (levenshtein_distance): Rename to...
2047 (get_edit_distance): ...this.
2048 * spellcheck.c (levenshtein_distance): Rename to...
2049 (get_edit_distance): ...this. Convert from Levenshtein distance
2050 to Damerau-Levenshtein distance by supporting transpositions of
2051 adjacent characters. Rename "v1" to "v_next" and "v0" to
2053 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
2054 (selftest::test_edit_distance_unit_test_oneway): ...this, and
2055 update for underlying renaming.
2056 (selftest::levenshtein_distance_unit_test): Rename to...
2057 (selftest::test_get_edit_distance_unit): ...this, and update for
2058 underlying renaming.
2059 (selftest::test_find_closest_string): Add example from PR 69968
2060 where transposition helps
2061 (selftest::test_metric_conditions): Update for renaming.
2062 (selftest::test_metric_conditions): Likewise.
2063 (selftest::spellcheck_c_tests): Likewise.
2064 * spellcheck.h (levenshtein_distance): Rename both overloads to...
2065 (get_edit_distance): ...this.
2066 (best_match::consider): Update for renaming.
2068 2018-06-12 Martin Sebor <msebor@redhat.com>
2070 PR tree-optimization/85259
2071 * builtins.c (compute_objsize): Handle constant offsets.
2072 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
2073 true iff a warning has been issued.
2074 * gimple.h (gimple_nonartificial_location): New function.
2075 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
2076 gimple_nonartificial_location and handle -Wno-system-headers.
2077 (handle_builtin_stxncpy): Same.
2079 2018-06-12 Martin Sebor <msebor@redhat.com>
2082 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
2084 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
2086 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
2087 BUILTIN_VEC_XST entries for pointer to double and long long.
2089 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
2092 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2094 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2097 2018-06-12 Martin Liska <mliska@suse.cz>
2099 * doc/options.texi: Document IntegerRange.
2101 2018-06-12 Martin Liska <mliska@suse.cz>
2103 * config/i386/i386.opt: Make MPX-related options as Deprecated.
2104 * opt-functions.awk: Handle Deprecated flag.
2105 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
2107 (read_cmdline_option): Report warning for a deprecated option.
2108 * opts.h (struct cl_option): Add new field cl_deprecated.
2109 (CL_ERR_DEPRECATED): New.
2111 2018-06-12 Martin Liska <mliska@suse.cz>
2113 * doc/options.texi: Document Deprecated option flag.
2115 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2117 * config/arc/arc-arch.h (arc_extras): New enum.
2118 (arc_cpu_t):Add field extra.
2119 (arc_cpu_types): Consider the extras.
2120 * config/arc/arc-cpus.def: Add extras info.
2121 * config/arc/arc-opts.h (processor_type): Consider extra field.
2122 * config/arc/arc.c (arc_override_options): Handle extra field.
2124 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2126 * config/arc/arc-arch.h: Update ARC_OPTX macro.
2127 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
2129 * config/arc/arc.c (arc_init): Update pic warning.
2130 (irq_range): Update irq range parsing warnings.
2131 (arc_override_options): Update various warning messages.
2132 (arc_handle_aux_attribute): Likewise.
2134 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
2136 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
2138 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2140 * doc/sourcebuild.texi: Document usage of line number 0 in verify
2141 compiler messages directives.
2143 2018-06-12 Matthew Fortune <mfortune@gmail.com>
2145 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
2146 * config/mips/mips-tables.opt: Regenerate.
2147 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
2149 * doc/invoke.texi: Document -march=i6500.
2151 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
2153 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
2154 (i6400_gpmul): Add cpu_unit.
2155 (i6400_gpdiv): Likewise.
2156 (i6400_msa_add_d): Update reservations.
2157 (i6400_msa_int_add) Likewise.
2158 (i6400_msa_short_logic3) Likewise.
2159 (i6400_msa_short_logic2) Likewise.
2160 (i6400_msa_short_logic) Likewise.
2161 (i6400_msa_move) Likewise.
2162 (i6400_msa_cmp) Likewise.
2163 (i6400_msa_short_float2) Likewise.
2164 (i6400_msa_div_d) Likewise.
2165 (i6400_msa_long_logic1) Likewise.
2166 (i6400_msa_long_logic2) Likewise.
2167 (i6400_msa_mult) Likewise.
2168 (i6400_msa_long_float2) Likewise.
2169 (i6400_msa_long_float4) Likewise.
2170 (i6400_msa_long_float5) Likewise.
2171 (i6400_msa_long_float8) Likewise.
2172 (i6400_fpu_fadd): Include frint type.
2173 (i6400_fpu_store): New define_insn_reservation.
2174 (i6400_fpu_load): Likewise.
2175 (i6400_fpu_move): Likewise.
2176 (i6400_fpu_fcmp): Likewise.
2177 (i6400_fpu_fmadd): Likewise.
2178 (i6400_int_mult): Include imul3nc type and update reservation.
2179 (i6400_int_div): Include idiv3 type and update reservation.
2180 (i6400_int_load): Update to check type not move_type.
2181 (i6400_int_store): Likewise.
2182 (i6400_int_prefetch): Set zero latency.
2184 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
2186 * gcc.c: Document new %@{...} sequence.
2187 (LINK_COMMAND_SPEC): Use it for the -L switches.
2188 (cpp_unique_options): Use it for the -I switches.
2189 (at_file_argbuf): New global variable.
2190 (in_at_file): Likewise.
2191 (alloc_args): Create at_file_argbuf.
2192 (clear_args): Truncate at_file_argbuf.
2193 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
2194 (open_at_file): New function.
2195 (close_at_file): Likewise.
2196 (create_at_file): Delete.
2197 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
2200 (validate_switches_from_spec): Deal with %@{...} sequence.
2201 (validate_switches): Likewise.
2202 (driver::finalize): Call clear_args.
2204 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2206 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
2208 2018-06-11 Martin Sebor <msebor@redhat.com>
2210 * doc/invoke.texi (-Wall): List -Wc++17-compat.
2211 (Wno-class-memaccess): Add @opindex.
2212 (Wno-templates, Wno-multiple-inheritance): Same.
2213 (Wno-virtual-inheritance, Wno-namespaces): Same.
2214 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
2215 (Wno-format-overflow, Wno-format-truncation): Same.
2216 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
2217 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
2218 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
2219 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
2220 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
2221 (Wno-misspelled-isr): Same.
2223 2018-06-11 Martin Sebor <msebor@redhat.com>
2225 * PR tree-optimization/86083
2226 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
2228 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
2230 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
2232 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
2235 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
2236 on the correct operand.
2237 (*movdi_internal64): Ditto.
2239 2018-06-11 Martin Liska <mliska@suse.cz>
2241 PR tree-optimization/86089
2242 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
2244 2018-06-11 Julia Koval <julia.koval@intel.com>
2246 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
2247 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
2248 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
2250 2018-06-11 Olivier Hainque <hainque@adacore.com>
2252 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
2253 for Ada with strict dwarf2.
2255 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
2258 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
2261 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
2263 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
2265 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
2267 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
2270 2018-06-08 Martin Liska <mliska@suse.cz>
2272 * tree-cfg.h (debug_function): Fix argument type to match
2275 2018-06-08 Martin Liska <mliska@suse.cz>
2277 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
2278 Remove usage of MPX-related (and removed) fields.
2279 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
2281 2018-06-08 David Malcolm <dmalcolm@redhat.com>
2283 * cfg.c (debug): Use TDF_NONE rather than 0.
2284 * cfghooks.c (debug): Likewise.
2285 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
2286 (struct dump_option_value_info): Convert to...
2287 (struct kv_pair): ...this template type.
2288 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
2290 (optinfo_verbosity_options): Likewise.
2291 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
2293 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
2294 than int for "optgroup_flags" param.
2295 (dump_generic_expr_loc): Use dump_flags_t rather than int for
2297 (dump_dec): Likewise.
2298 (dump_finish): Use TDF_NONE rather than 0.
2299 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
2300 rather than int for "optgroup_flags" param. Use TDF_NONE rather
2301 than 0. Update for change to option_ptr.
2302 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
2303 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
2304 0. Update for changes to optinfo_verbosity_options and
2306 (opt_info_switch_p): Convert optgroup_flags from int to
2308 (dump_basic_block): Use dump_flags_t rather than int
2309 for "dump_kind" param.
2310 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
2311 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
2312 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
2313 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
2314 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
2315 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
2316 TDF_NONE): Convert from macros to...
2317 (enum dump_flag): ...this new enum.
2318 (dump_flags_t): Update to use enum.
2319 (operator|, operator&, operator~, operator|=, operator&=):
2320 Implement for dump_flags_t.
2321 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
2322 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
2323 Convert from macros to...
2324 (enum optgroup_flag): ...this new enum.
2325 (optgroup_flags_t): New typedef.
2326 (operator|, operator|=): Implement for optgroup_flags_t.
2327 (struct dump_file_info): Convert field "alt_flags" to
2328 dump_flags_t. Convert field "optgroup_flags" to
2330 (dump_basic_block): Use dump_flags_t rather than int for param.
2331 (dump_generic_expr_loc): Likewise.
2332 (dump_dec): Likewise.
2333 (dump_register): Convert param "optgroup_flags" to
2335 (opt_info_enable_passes): Likewise.
2336 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
2338 * gimple-pretty-print.c (debug): Likewise.
2339 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
2340 (merged_store_group::apply_stores): Likewise.
2341 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
2342 * gimple.c (verify_gimple_pp): Likewise.
2343 * graphite-poly.c (print_pbb_body): Likewise.
2344 * passes.c (pass_manager::register_one_dump_file): Convert
2345 local "optgroup_flags" to optgroup_flags_t.
2346 * print-tree.c (print_node): Use TDF_NONE rather than 0.
2348 (debug_body): Likewise.
2349 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
2350 to optgroup_flags_t.
2351 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
2353 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
2354 (convert_mult_to_fma): Likewise.
2355 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
2356 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
2357 * tree-vect-data-refs.c (dump_lower_bound): Convert param
2358 "dump_kind" to dump_flags_t.
2360 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
2362 * config/rs6000/rs6000.c (min, max): Delete.
2364 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
2366 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
2367 -mabi=spe and -mabi=no-spe.
2369 2018-06-08 Martin Liska <mliska@suse.cz>
2371 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
2372 where we expect an existing summary.
2374 2018-06-08 Martin Liska <mliska@suse.cz>
2376 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
2377 * ipa-inline.h (estimate_edge_growth): Likewise.
2379 2018-06-08 Martin Liska <mliska@suse.cz>
2381 * cgraph.c (function_version_hasher::hash): Use
2382 cgraph_node::get_uid ().
2383 (function_version_hasher::equal):
2384 * cgraph.h (cgraph_node::get_uid): New method.
2385 * ipa-inline.c (update_caller_keys): Use
2386 cgraph_node::get_uid ().
2387 (update_callee_keys): Likewise.
2388 * ipa-utils.c (searchc): Likewise.
2389 (ipa_reduced_postorder): Likewise.
2390 * lto-cgraph.c (input_node): Likewise.
2391 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
2392 * symbol-summary.h (symtab_insertion): Likewise.
2393 (symtab_removal): Likewise.
2394 (symtab_duplication): Likewise.
2395 * tree-pretty-print.c (dump_function_header): Likewise.
2396 * tree-sra.c (convert_callers_for_node): Likewise.
2398 2018-06-08 Martin Liska <mliska@suse.cz>
2400 * cgraph.c (symbol_table::create_edge): Always assign a new
2402 (symbol_table::free_edge): Do not recycle numbers.
2403 * cgraph.h (cgraph_edge::get): New method.
2404 * symbol-summary.h (symtab_removal): Use it.
2405 (symtab_duplication): Likewise.
2406 (call_summary::hashable_uid): Remove.
2408 2018-06-08 Martin Liska <mliska@suse.cz>
2410 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
2411 (initialize_growth_caches): Remove.
2412 (free_growth_caches): Likewise.
2413 (do_estimate_edge_time): Use edge_growth_cache.
2414 (do_estimate_edge_size): Likewise.
2415 (do_estimate_edge_hints): Likewise.
2416 * ipa-inline.c (reset_edge_caches): Likewise.
2417 (recursive_inlining): Likewise.
2418 (inline_small_functions): Likewise.
2419 * ipa-inline.h (initialize_growth_caches): Remove.
2420 (estimate_edge_size): Likewise.
2421 (estimate_edge_time): Likewise.
2422 (estimate_edge_hints): Likewise.
2423 (reset_edge_growth_cache): Likewise.
2424 * symbol-summary.h (call_summary::remove): New method.
2426 2018-06-08 Martin Liska <mliska@suse.cz>
2428 * ipa-cp.c (class edge_clone_summary): New summary.
2429 (grow_edge_clone_vectors): Remove.
2430 (ipcp_edge_duplication_hook): Remove.
2431 (class edge_clone_summary_t): New call_summary class.
2432 (ipcp_edge_removal_hook): Remove.
2433 (edge_clone_summary_t::duplicate): New function.
2434 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
2435 (create_specialized_node): Likewise.
2436 (ipcp_driver): Initialize edge_clone_summaries and do not
2439 2018-06-08 Martin Liska <mliska@suse.cz>
2441 * symbol-summary.h (get): New function.
2442 (call_summary::m_initialize_when_cloning): New class member.
2444 2018-06-08 Martin Liska <mliska@suse.cz>
2446 * cgraph.c (cgraph_node::remove): Do not recycle uid.
2447 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
2448 (symbol_table::allocate_cgraph_symbol): Do not set uid.
2449 * passes.c (uid_hash_t): Record removed_nodes by their uids.
2450 (remove_cgraph_node_from_order): Use the removed_nodes set.
2451 (do_per_function_toporder): Likwise.
2452 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
2453 instead of summary_uid.
2454 (symtab_removal): Likewise.
2455 (symtab_duplication): Likewise.
2457 2018-06-08 Martin Liska <mliska@suse.cz>
2459 * ipa-cp.c (ipcp_store_bits_results): Use
2460 ipcp_transformation_sum.
2461 (ipcp_store_vr_results): Likewise.
2462 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
2464 (ipcp_transformation_initialize): ... this.
2465 (ipa_set_node_agg_value_chain):
2466 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
2467 (write_ipcp_transformation_info): Likewise.
2468 (read_ipcp_transformation_info): Likewise.
2469 (ipcp_update_bits): Likewise.
2470 (ipcp_update_vr): Likewise.
2471 (ipcp_transform_function): Likewise.
2472 * ipa-prop.h: Rename ipcp_transformation_summary to
2473 ipcp_transformation.
2474 (class ipcp_transformation_t): New function summary.
2475 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
2476 (ipa_get_agg_replacements_for_node): Likewise.
2478 2018-06-08 Martin Liska <mliska@suse.cz>
2480 * ipa-pure-const.c (struct funct_state_d): Do it class instead
2482 (class funct_state_summary_t): New function_summary class.
2483 (has_function_state): Remove.
2484 (get_function_state): Likewise.
2485 (set_function_state): Likewise.
2486 (add_new_function): Likewise.
2487 (funct_state_summary_t::insert): New function.
2488 (duplicate_node_data): Remove.
2489 (remove_node_data): Remove.
2490 (funct_state_summary_t::duplicate): New function.
2491 (register_hooks): Create new funct_state_summaries.
2492 (pure_const_generate_summary): Use it.
2493 (pure_const_write_summary): Likewise.
2494 (pure_const_read_summary): Likewise.
2495 (propagate_pure_const): Likewise.
2496 (propagate_nothrow): Likewise.
2497 (dump_malloc_lattice): Likewise.
2498 (propagate_malloc): Likewise.
2499 (execute): Do not register hooks, just remove summary
2501 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
2504 2018-06-08 Martin Liska <mliska@suse.cz>
2506 * ipa-reference.c (remove_node_data): Remove.
2507 (duplicate_node_data): Likewise.
2508 (class ipa_ref_var_info_summary_t): New class.
2509 (class ipa_ref_opt_summary_t): Likewise.
2510 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
2511 (get_reference_optimization_summary): Use
2512 ipa_ref_opt_sum_summaries.
2513 (set_reference_vars_info): Remove.
2514 (set_reference_optimization_summary): Likewise.
2515 (ipa_init): Create summaries.
2516 (init_function_info): Use function summary.
2517 (ipa_ref_opt_summary_t::duplicate): New function.
2518 (ipa_ref_opt_summary_t::remove): New function.
2519 (get_read_write_all_from_node): Fix GNU coding style.
2520 (propagate): Use function summary.
2521 (write_node_summary_p): Fix GNU coding style.
2522 (stream_out_bitmap): Likewise.
2523 (ipa_reference_read_optimization_summary): Use function summary.
2524 (ipa_reference_c_finalize): Do not release hooks.
2526 2018-06-08 Martin Liska <mliska@suse.cz>
2528 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
2529 (analyze_function_body): Extract multiple calls of get_create.
2530 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2531 * ipa-inline.c (recursive_inlining): Use ::get method.
2532 * ipa-inline.h (estimate_edge_growth): Likewise.
2534 2018-06-08 Martin Liska <mliska@suse.cz>
2536 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
2538 (hsa_function_summary::hsa_function_summary): Use the new enum
2540 (hsa_gpu_implementation_p): Use hsa_summaries::get.
2541 * hsa-gen.c (hsa_get_host_function): Likewise.
2542 (get_brig_function_name): Likewise.
2543 * ipa-hsa.c (process_hsa_functions): Likewise.
2544 (ipa_hsa_write_summary): Likewise.
2545 * symbol-summary.h (symtab_duplication): Use ::get function/
2546 (get): New function.
2548 2018-06-08 Martin Liska <mliska@suse.cz>
2550 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
2552 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
2553 (hsa_register_kernel): Likewise.
2554 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
2555 * hsa-gen.c (hsa_get_host_function): Likewise.
2556 (get_brig_function_name): Likewise.
2557 (generate_hsa): Likewise.
2558 (pass_gen_hsail::execute): Likewise.
2559 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
2560 (devirtualization_time_bonus): Likewise.
2561 (ipcp_propagate_stage): Likewise.
2562 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2563 (edge_set_predicate): Likewise.
2564 (evaluate_conditions_for_known_args): Likewise.
2565 (evaluate_properties_for_edge): Likewise.
2566 (ipa_fn_summary::reset): Likewise.
2567 (ipa_fn_summary_t::duplicate): Likewise.
2568 (dump_ipa_call_summary): Likewise.
2569 (ipa_dump_fn_summary): Likewise.
2570 (analyze_function_body): Likewise.
2571 (compute_fn_summary): Likewise.
2572 (estimate_edge_devirt_benefit): Likewise.
2573 (estimate_edge_size_and_time): Likewise.
2574 (estimate_calls_size_and_time): Likewise.
2575 (estimate_node_size_and_time): Likewise.
2576 (inline_update_callee_summaries): Likewise.
2577 (remap_edge_change_prob): Likewise.
2578 (remap_edge_summaries): Likewise.
2579 (ipa_merge_fn_summary_after_inlining): Likewise.
2580 (ipa_update_overall_fn_summary): Likewise.
2581 (read_ipa_call_summary): Likewise.
2582 (inline_read_section): Likewise.
2583 (write_ipa_call_summary): Likewise.
2584 (ipa_fn_summary_write): Likewise.
2585 (ipa_free_fn_summary): Likewise.
2586 * ipa-hsa.c (process_hsa_functions): Likewise.
2587 (ipa_hsa_write_summary): Likewise.
2588 (ipa_hsa_read_section): Likewise.
2589 * ipa-icf.c (sem_function::merge): Likewise.
2590 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2591 (do_estimate_edge_time): Likewise.
2592 (estimate_size_after_inlining): Likewise.
2593 (estimate_growth): Likewise.
2594 (growth_likely_positive): Likewise.
2595 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2596 (inline_call): Likewise.
2597 * ipa-inline.c (caller_growth_limits): Likewise.
2598 (can_inline_edge_p): Likewise.
2599 (can_inline_edge_by_limits_p): Likewise.
2600 (compute_uninlined_call_time): Likewise.
2601 (compute_inlined_call_time): Likewise.
2602 (want_inline_small_function_p): Likewise.
2603 (edge_badness): Likewise.
2604 (update_caller_keys): Likewise.
2605 (update_callee_keys): Likewise.
2606 (recursive_inlining): Likewise.
2607 (inline_small_functions): Likewise.
2608 (inline_to_all_callers_1): Likewise.
2609 (dump_overall_stats): Likewise.
2610 (early_inline_small_functions): Likewise.
2611 (early_inliner): Likewise.
2612 * ipa-inline.h (estimate_edge_growth): Likewise.
2613 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2614 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2615 * ipa-prop.h (IPA_NODE_REF): Likewise.
2616 (IPA_EDGE_REF): Likewise.
2617 * ipa-pure-const.c (malloc_candidate_p): Likewise.
2618 (propagate_malloc): Likewise.
2619 * ipa-split.c (execute_split_functions): Likewise.
2620 * symbol-summary.h: Rename get to get_create.
2622 (get_create): Likewise.
2623 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2625 2018-06-08 Martin Liska <mliska@suse.cz>
2627 * symbol-summary.h (release): Move definition out of class
2629 (symtab_removal): Likewise.
2630 (symtab_duplication): Likewise.
2632 2018-06-08 Martin Liska <mliska@suse.cz>
2634 * symbol-summary.h (function_summary): Move constructor
2635 implementation out of class declaration.
2636 (release): Likewise.
2637 (symtab_insertion): Likewise.
2638 (symtab_removal): Likewise.
2639 (symtab_duplication): Likewise.
2642 2018-06-08 Martin Liska <mliska@suse.cz>
2644 * Makefile.in: Remove support for MPX (macros, related functions,
2645 fields in cgraph_node, ...).
2646 * builtin-types.def (BT_BND): Likewise.
2647 (BT_FN_BND_CONST_PTR): Likewise.
2648 (BT_FN_CONST_PTR_BND): Likewise.
2649 (BT_FN_VOID_PTR_BND): Likewise.
2650 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
2651 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
2652 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
2653 (expand_builtin_mempcpy_with_bounds): Likewise.
2654 (expand_builtin_memset_with_bounds): Likewise.
2655 (expand_builtin_memset_args): Likewise.
2656 (std_expand_builtin_va_start): Likewise.
2657 (expand_builtin): Likewise.
2658 (expand_builtin_with_bounds): Likewise.
2659 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
2660 (DEF_LIB_BUILTIN_CHKP): Likewise.
2661 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
2662 (DEF_CHKP_BUILTIN): Likewise.
2663 (BUILT_IN_MEMCPY): Likewise.
2664 (BUILT_IN_MEMMOVE): Likewise.
2665 (BUILT_IN_MEMPCPY): Likewise.
2666 (BUILT_IN_MEMSET): Likewise.
2667 (BUILT_IN_STPCPY): Likewise.
2668 (BUILT_IN_STRCAT): Likewise.
2669 (BUILT_IN_STRCHR): Likewise.
2670 (BUILT_IN_STRCPY): Likewise.
2671 (BUILT_IN_STRLEN): Likewise.
2672 (BUILT_IN_MEMCPY_CHK): Likewise.
2673 (BUILT_IN_MEMMOVE_CHK): Likewise.
2674 (BUILT_IN_MEMPCPY_CHK): Likewise.
2675 (BUILT_IN_MEMSET_CHK): Likewise.
2676 (BUILT_IN_STPCPY_CHK): Likewise.
2677 (BUILT_IN_STRCAT_CHK): Likewise.
2678 (BUILT_IN_STRCPY_CHK): Likewise.
2679 * calls.c (store_bounds): Likewise.
2680 (emit_call_1): Likewise.
2681 (special_function_p): Likewise.
2682 (maybe_warn_nonstring_arg): Likewise.
2683 (initialize_argument_information): Likewise.
2684 (finalize_must_preallocate): Likewise.
2685 (compute_argument_addresses): Likewise.
2686 (expand_call): Likewise.
2687 * cfgexpand.c (expand_call_stmt): Likewise.
2688 (expand_return): Likewise.
2689 (expand_gimple_stmt_1): Likewise.
2690 (pass_expand::execute): Likewise.
2691 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
2692 (cgraph_node::remove): Likewise.
2693 (cgraph_node::dump): Likewise.
2694 (cgraph_node::verify_node): Likewise.
2695 * cgraph.h (chkp_function_instrumented_p): Likewise.
2696 (symtab_node::get_alias_target): Likewise.
2697 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
2698 (cgraph_local_p): Likewise.
2699 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
2700 (cgraph_edge::rebuild_references): Likewise.
2701 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
2702 (walk_polymorphic_call_targets): Likewise.
2703 (cgraph_node::expand_thunk): Likewise.
2704 (symbol_table::output_weakrefs): Likewise.
2705 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
2706 (ix86_handle_option): Likewise.
2707 * config/i386/constraints.md: Likewise.
2708 * config/i386/i386-builtin-types.def (BND): Likewise.
2712 * config/i386/i386-builtin.def (BDESC_END): Likewise.
2713 (BDESC_FIRST): Likewise.
2715 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
2716 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
2717 * config/i386/i386.c (enum reg_class): Likewise.
2718 (ix86_target_string): Likewise.
2719 (ix86_option_override_internal): Likewise.
2720 (ix86_conditional_register_usage): Likewise.
2721 (ix86_valid_target_attribute_inner_p): Likewise.
2722 (ix86_set_indirect_branch_type): Likewise.
2723 (ix86_set_current_function): Likewise.
2724 (ix86_function_arg_regno_p): Likewise.
2725 (init_cumulative_args): Likewise.
2726 (ix86_function_arg_advance): Likewise.
2727 (ix86_function_arg): Likewise.
2728 (ix86_pass_by_reference): Likewise.
2729 (ix86_function_value_regno_p): Likewise.
2730 (ix86_function_value_1): Likewise.
2731 (ix86_function_value_bounds): Likewise.
2732 (ix86_return_in_memory): Likewise.
2733 (ix86_setup_incoming_vararg_bounds): Likewise.
2734 (ix86_va_start): Likewise.
2735 (indirect_thunk_need_prefix): Likewise.
2736 (print_reg): Likewise.
2737 (ix86_print_operand): Likewise.
2738 (ix86_expand_call): Likewise.
2739 (ix86_output_function_return): Likewise.
2740 (reg_encoded_number): Likewise.
2741 (BDESC_VERIFYS): Likewise.
2742 (ix86_init_mpx_builtins): Likewise.
2743 (ix86_init_builtins): Likewise.
2744 (ix86_emit_cmove): Likewise.
2745 (ix86_emit_move_max): Likewise.
2746 (ix86_expand_builtin): Likewise.
2747 (ix86_builtin_mpx_function): Likewise.
2748 (ix86_get_arg_address_for_bt): Likewise.
2749 (ix86_load_bounds): Likewise.
2750 (ix86_store_bounds): Likewise.
2751 (ix86_load_returned_bounds): Likewise.
2752 (ix86_store_returned_bounds): Likewise.
2753 (ix86_class_likely_spilled_p): Likewise.
2754 (ix86_hard_regno_mode_ok): Likewise.
2755 (x86_order_regs_for_local_alloc): Likewise.
2756 (ix86_mitigate_rop): Likewise.
2757 (ix86_bnd_prefixed_insn_p): Likewise.
2758 (ix86_mpx_bound_mode): Likewise.
2759 (ix86_make_bounds_constant): Likewise.
2760 (ix86_initialize_bounds): Likewise.
2761 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
2762 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
2763 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
2764 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
2765 (TARGET_CHKP_BOUND_MODE): Likewise.
2766 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
2767 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
2768 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
2769 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
2770 * config/i386/i386.h (TARGET_MPX): Likewise.
2771 (TARGET_MPX_P): Likewise.
2772 (VALID_BND_REG_MODE): Likewise.
2773 (FIRST_BND_REG): Likewise.
2774 (LAST_BND_REG): Likewise.
2775 (enum reg_class): Likewise.
2776 (BND_REG_P): Likewise.
2777 (BND_REGNO_P): Likewise.
2778 (BNDmode): Likewise.
2779 (ADJUST_INSN_LENGTH): Likewise.
2780 * config/i386/i386.md: Likewise.
2781 * config/i386/i386.opt: Likewise.
2782 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
2783 (defined): Likewise.
2784 (LINK_MPX): Likewise.
2785 (MPX_SPEC): Likewise.
2786 (LIBMPX_SPEC): Likewise.
2787 (LIBMPXWRAPPERS_SPEC): Likewise.
2788 (CHKP_SPEC): Likewise.
2789 * config/i386/predicates.md: Likewise.
2790 * dbxout.c (dbxout_type): Likewise.
2791 * doc/extend.texi: Likewise.
2792 * doc/invoke.texi: Likewise.
2793 * doc/md.texi: Likewise.
2794 * doc/tm.texi: Likewise.
2795 * doc/tm.texi.in: Likewise.
2796 * dwarf2out.c (is_base_type): Likewise.
2797 (gen_formal_types_die): Likewise.
2798 (gen_subprogram_die): Likewise.
2799 (gen_type_die_with_usage): Likewise.
2800 (gen_decl_die): Likewise.
2801 (dwarf2out_late_global_decl): Likewise.
2802 * expr.c (expand_assignment): Likewise.
2803 (emit_storent_insn): Likewise.
2804 (store_expr_with_bounds): Likewise.
2805 (store_expr): Likewise.
2806 (expand_expr_real_1): Likewise.
2807 * expr.h (store_expr_with_bounds): Likewise.
2808 * function.c (use_register_for_decl): Likewise.
2809 (struct bounds_parm_data): Likewise.
2810 (assign_parms_augmented_arg_list): Likewise.
2811 (assign_parm_find_entry_rtl): Likewise.
2812 (assign_parm_is_stack_parm): Likewise.
2813 (assign_parm_load_bounds): Likewise.
2814 (assign_bounds): Likewise.
2815 (assign_parms): Likewise.
2816 (expand_function_start): Likewise.
2817 * gcc.c (CHKP_SPEC): Likewise.
2818 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
2819 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
2820 (wrestrict_dom_walker::check_call): Likewise.
2821 * gimple.c (gimple_build_call_from_tree): Likewise.
2822 * gimple.h (enum gf_mask): Likewise.
2823 (gimple_call_with_bounds_p): Likewise.
2824 (gimple_call_set_with_bounds): Likewise.
2825 * gimplify.c (gimplify_init_constructor): Likewise.
2826 * ipa-cp.c (initialize_node_lattices): Likewise.
2827 (propagate_constants_across_call): Likewise.
2828 (find_more_scalar_values_for_callers_subset): Likewise.
2829 * ipa-hsa.c (process_hsa_functions): Likewise.
2830 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
2831 * ipa-icf.c (sem_function::merge): Likewise.
2832 * ipa-inline.c (early_inliner): Likewise.
2833 * ipa-pure-const.c (warn_function_noreturn): Likewise.
2834 (warn_function_cold): Likewise.
2835 (propagate_pure_const): Likewise.
2836 * ipa-ref.h (enum GTY): Likewise.
2837 * ipa-split.c (find_retbnd): Likewise.
2838 (consider_split): Likewise.
2839 (split_function): Likewise.
2840 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2841 * ipa.c (walk_polymorphic_call_targets): Likewise.
2842 (symbol_table::remove_unreachable_nodes): Likewise.
2843 (process_references): Likewise.
2844 (cgraph_build_static_cdtor_1): Likewise.
2845 * lto-cgraph.c (lto_output_node): Likewise.
2846 (output_refs): Likewise.
2847 (compute_ltrans_boundary): Likewise.
2848 (input_overwrite_node): Likewise.
2849 (input_node): Likewise.
2850 (input_cgraph_1): Likewise.
2851 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
2852 * passes.c (pass_manager::execute_early_local_passes): Likewise.
2853 (class pass_chkp_instrumentation_passes): Likewise.
2854 (make_pass_chkp_instrumentation_passes): Likewise.
2855 * passes.def: Likewise.
2856 * rtl.h (struct GTY): Likewise.
2857 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
2858 * stor-layout.c (layout_type): Likewise.
2859 * symtab.c: Likewise.
2860 * target.def: Likewise.
2861 * targhooks.c (default_chkp_bound_type): Likewise.
2862 (default_chkp_bound_mode): Likewise.
2863 (default_builtin_chkp_function): Likewise.
2864 (default_chkp_function_value_bounds): Likewise.
2865 (default_chkp_make_bounds_constant): Likewise.
2866 (default_chkp_initialize_bounds): Likewise.
2867 * targhooks.h (default_chkp_bound_type): Likewise.
2868 (default_chkp_bound_mode): Likewise.
2869 (default_builtin_chkp_function): Likewise.
2870 (default_chkp_function_value_bounds): Likewise.
2871 (default_chkp_make_bounds_constant): Likewise.
2872 (default_chkp_initialize_bounds): Likewise.
2873 * toplev.c (compile_file): Likewise.
2874 (process_options): Likewise.
2875 * tree-core.h (DEF_BUILTIN): Likewise.
2876 (DEF_BUILTIN_CHKP): Likewise.
2877 * tree-inline.c (declare_return_variable): Likewise.
2878 (remap_gimple_stmt): Likewise.
2879 (copy_bb): Likewise.
2880 (initialize_inlined_parameters): Likewise.
2881 (expand_call_inline): Likewise.
2882 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
2883 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
2884 (make_pass_ipa_chkp_produce_thunks): Likewise.
2885 (make_pass_chkp): Likewise.
2886 (make_pass_chkp_opt): Likewise.
2887 (make_pass_chkp_instrumentation_passes): Likewise.
2888 * tree-pretty-print.c (dump_generic_node): Likewise.
2889 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
2890 * tree-ssa-dce.c (propagate_necessity): Likewise.
2891 (eliminate_unnecessary_stmts): Likewise.
2892 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
2893 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2894 * tree-ssa-sccvn.h: Likewise.
2895 * tree-ssa-strlen.c (get_string_length): Likewise.
2896 (valid_builtin_call): Likewise.
2897 (adjust_last_stmt): Likewise.
2898 (handle_builtin_strchr): Likewise.
2899 (handle_builtin_strcpy): Likewise.
2900 (handle_builtin_stxncpy): Likewise.
2901 (handle_builtin_memcpy): Likewise.
2902 (handle_builtin_strcat): Likewise.
2903 (strlen_check_and_optimize_stmt): Likewise.
2904 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
2905 * tree-streamer-in.c: Likewise.
2906 * tree-streamer.c (record_common_node): Likewise.
2907 * tree.c (tree_code_size): Likewise.
2908 (wide_int_to_tree_1): Likewise.
2909 (type_contains_placeholder_1): Likewise.
2910 (build_common_tree_nodes): Likewise.
2911 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
2912 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
2913 (POINTER_BOUNDS_P): Likewise.
2914 (BOUNDED_TYPE_P): Likewise.
2915 (BOUNDED_P): Likewise.
2916 (CALL_WITH_BOUNDS_P): Likewise.
2917 (pointer_bounds_type_node): Likewise.
2918 * value-prof.c (gimple_ic): Likewise.
2919 * var-tracking.c (vt_add_function_parameters): Likewise.
2920 * varasm.c (make_decl_rtl): Likewise.
2921 (assemble_start_function): Likewise.
2922 (output_constant): Likewise.
2923 (maybe_assemble_visibility): Likewise.
2924 * varpool.c (ctor_for_folding): Likewise.
2925 * chkp-builtins.def: Remove.
2926 * ipa-chkp.c: Remove.
2927 * ipa-chkp.h: Remove.
2928 * rtl-chkp.c: Remove.
2929 * rtl-chkp.h: Remove.
2930 * tree-chkp-opt.c: Remove.
2931 * tree-chkp.c: Remove.
2932 * tree-chkp.h: Remove.
2934 2018-06-07 Carl Love <cel@us.ibm.com>
2936 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
2937 vextract_fp_from_shortl): Add BE support.
2939 2018-06-07 Paul Koning <ni1d@arrl.net>
2941 * compare-elim.c (try_merge_compare): Don't merge compare if
2942 address contains a side effect.
2943 (try_eliminate_compare): Likewise.
2945 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
2947 * config.gcc: Support "tremont".
2948 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
2949 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2951 * config/i386/i386.c (m_TREMONT): Define.
2952 (processor_target_table): Add "tremont".
2953 (PTA_TREMONT): Define.
2954 (ix86_lea_outperforms): Add TARGET_TREMONT.
2955 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
2956 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
2957 and M_INTEL_GOLDMONT_PLUS.
2958 (fold_builtin_cpu): Add "tremont".
2959 (ix86_add_stmt_cost): Add TARGET_TREMONT.
2960 (ix86_option_override_internal): Add "tremont".
2961 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
2962 (processor_type): Add PROCESSOR_TREMONT.
2963 * config/i386/x86-tune.def: Add m_TREMONT.
2964 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
2966 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2968 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
2969 symbol defined for msp430i* devices to be lower case.
2971 gcc/testsuite/gcc.target/msp430/
2972 * msp430i-device-symbol.c: New test.
2973 * msp430f-device-symbol.c: New test.
2974 * msp430.h: New test header file.
2976 2018-06-07 Richard Biener <rguenther@suse.de>
2978 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
2979 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
2980 Properly wrap signed arithmetic if overflow wraps.
2982 2018-06-07 Jakub Jelinek <jakub@redhat.com>
2984 PR tree-optimization/69615
2985 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
2986 of a cast from a same precision integral SSA_NAME in a bb dominated
2987 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
2988 cast to utype if rhs2 has already a compatible type.
2990 2018-06-07 Richard Biener <rguenther@suse.de>
2992 PR tree-optimization/85935
2993 * graphite-scop-detection.c (find_params_in_bb): Analyze
2994 condition operands with respect to the correct loop. Assert
2995 the analysis doesn't fail.
2997 2018-06-04 Carl Love <cel@us.ibm.com>
2999 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
3000 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
3001 as it is slightly cheaper.
3002 (first_match_or_eos_index_<mode>):
3003 Calculate index using natural element order.
3004 (first_match_index_<mode>):
3005 Calculate index using natural element order.
3006 (first_match_or_eos_index_<mode>):
3007 Calculate index using natural order.
3008 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
3009 for BE and LE modes.
3010 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
3011 P9V_BUILTIN_VCLZLSBB_V16QI.
3012 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
3015 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
3017 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
3018 indentation and line wrap for many prototypes. Add missing
3019 @smallexample directives around block of prototypes for vec_xl and
3022 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
3024 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
3025 track if we pass or return IEEE 128-bit floating point.
3026 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
3027 C++ mangling that is compatible with GCC 8.1.
3028 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
3029 (init_cumulative_args): Note if we pass or return IEEE 128-bit
3030 floating point types.
3031 (rs6000_function_arg_advance_1): Likewise.
3032 (rs6000_mangle_type): Optionally generate mangled names that match
3033 what GCC 8.1 generated for IEEE 128-bit floating point types.
3034 (rs6000_globalize_decl_name): If we have an external function that
3035 passes or returns IEEE 128-bit types, generate a weak reference
3036 from the mangled name used in GCC 8.1 to the current mangled
3038 (rs6000_init_builtins): Make __ibm128 use the long double type if
3039 long double is IBM extended double. Make __float128 use the long
3040 double type if long double is IEEE 128-bit.
3043 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
3044 macro for __ibm128 built-in functions.
3045 (PACK_IF): Add __ibm128 pack/unpack functions.
3046 (UNPACK_IF): Likewise.
3047 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
3048 enable long double built-in functions if long double is IEEE
3049 128-bit floating point.
3050 (rs6000_invalid_builtin): Update long double built-in function
3052 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
3053 functions, adjust the built-in function to use the long double
3054 built-in function if __ibm128 and long double are the same type.
3055 * doc/extend.texi (PowerPC builtins): Update documention for
3056 __builtin_{,un}pack_longdouble. Add documentation for
3057 __builtin_{,un}pack_ibm128.
3059 2018-06-06 Jim Wilson <jimw@sifive.com>
3061 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
3062 (struct machine_function): New field interrupt_mode.
3063 (riscv_handle_type_attribute): New function. Add forward declaration.
3064 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
3065 (riscv_expand_epilogue): Check interrupt_mode field.
3066 (riscv_set_current_function): Check interrupt attribute args and
3067 set interrupt_mode field.
3068 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
3069 (riscv_sret, riscv_uret): New.
3070 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
3071 new arguments to interrupt attribute.
3073 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
3076 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
3077 Don't handle -mcpu=power8 if -mpower9-vector is also used.
3079 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
3081 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
3082 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
3083 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3084 several redundant entries.
3086 2018-06-06 David Malcolm <dmalcolm@redhat.com>
3088 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
3089 type from "rtx" to "rtx_insn *".
3090 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
3091 for local "call_insn", removing cast.
3092 (ix86_expand_call): Likewise, introducing a "call_insn" local.
3094 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
3096 PR tree-optimization/86066
3097 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
3098 for BIT_INSERT_EXPR stores.
3100 2018-06-06 Richard Biener <rguenther@suse.de>
3102 PR tree-optimization/86062
3103 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3104 component refs ontop
3105 of to be offsetted base.
3107 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3109 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
3110 to be static and remove check on interrupt attribute name.
3112 gcc/testsuite/gcc.target/msp430/
3113 * function-attributes-4.c: New test.
3114 * static-interrupts.c: New test.
3116 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
3118 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3119 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
3121 2018-06-05 Steve Ellcey <sellcey@cavium.com>
3124 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
3126 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
3127 Remove second argument, change how error is called.
3128 (aarch64_layout_arg): Remove second argument from
3129 aarch64_err_no_fpadvsimd call.
3130 (aarch64_init_cumulative_args): Ditto.
3131 (aarch64_gimplify_va_arg_expr): Ditto.
3132 * config/aarch64/aarch64.md (mov<mode>): Ditto.
3134 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
3136 * config/i386/i386.md (simple_return_indirect_internal): New expander.
3137 (*simple_return_indirect_internal<mode>): Rename from
3138 simple_return_indirect_internal. Use W mode iterator.
3139 (rstorssp): New expander.
3140 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
3141 (clrssbsy): New expander.
3142 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
3144 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
3146 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
3148 (cmse_check_pointed_object): Likewise.
3150 2018-06-05 Martin Liska <mliska@suse.cz>
3152 PR gcov-profile/47618
3153 * doc/invoke.texi: Document how -fprofile-dir format
3156 2018-06-05 Richard Biener <rguenther@suse.de>
3158 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
3159 removal pretend DOM info isn't available so we do not update
3160 it and only remove edges, not dominated blocks. Actually free
3161 DOM info in case we removed something. Remove unreachable blocks.
3162 (mfb_keep_latches): Work with either DOM info or marked backedges.
3163 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
3164 first. Mark backedges if DOM info isn't available.
3165 (Re-)compute DOM info after cleanup_control_flow_pre.
3167 2018-06-05 Richard Biener <rguenther@suse.de>
3169 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
3170 (locus_discrim_hasher::hash): Adjust.
3171 (locus_discrim_hasher::equal): Likewise.
3172 (next_discriminator_for_locus): Work on line directly.
3173 (same_line_p): Pass in expanded locus1 as well.
3174 (assign_discriminators): Avoid redundant location expansions.
3176 2018-06-05 Richard Biener <rguenther@suse.de>
3178 PR tree-optimization/86046
3179 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
3180 if required after clearing TREE_ADDRESSABLE.
3182 2018-06-05 Richard Biener <rguenther@suse.de>
3184 PR tree-optimization/86047
3185 * tree-ssa-loop.c (for_each_index): Glob handling of all
3186 decls and constants and really handle all of them.
3188 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3191 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
3192 qualifier_void_pointer and qualifier_const_void_pointer.
3193 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
3194 (arm_init_builtins): Handle the above.
3195 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
3196 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
3197 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
3200 2018-06-05 Martin Liska <mliska@suse.cz>
3202 * auto-profile.c (read_autofdo_file): Do not use
3203 gcov_ctr_summary struct.
3204 (afdo_callsite_hot_enough_for_early_inline): Likewise.
3205 * coverage.c (struct counts_entry): Likewise.
3206 (read_counts_file): Read just single summary entry.
3207 (get_coverage_counts): Use gcov_summary struct.
3208 * coverage.h (get_coverage_counts): Likewise.
3209 * gcov-dump.c (dump_working_sets): Likewise.
3210 (tag_summary): Dump just single summary.
3211 * gcov-io.c (gcov_write_summary): Write just histogram
3213 (gcov_read_summary): Read just single summary.
3214 (compute_working_sets): Use gcov_summary struct.
3215 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
3216 of GCOV_COUNTERS_SUMMABLE.
3217 (GCOV_COUNTERS_SUMMABLE): Remove.
3218 (GCOV_FIRST_VALUE_COUNTER): Replace with
3219 GCOV_COUNTER_V_INTERVAL.
3220 (struct gcov_ctr_summary): Remove.
3221 (struct gcov_summary): Directly use fields of former
3223 (compute_working_sets): Use gcov_summary struct.
3224 * gcov.c (read_count_file): Do not use ctrs fields.
3225 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
3227 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
3229 * profile.c: Likewise.
3230 * profile.h: Likewise.
3232 2018-06-05 Martin Liska <mliska@suse.cz>
3234 PR gcov-profile/84846
3235 * gcov.c (output_lines): Print working directory only
3236 in intermediate format.
3238 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
3240 * config/s390/s390-builtin-types.def: Add void function type.
3241 * config/s390/s390-builtins.def: Use the function type for the
3244 2018-06-04 Jim Wilson <jimw@sifive.com>
3246 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
3248 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
3249 and maybe_eh_return. Change regno to unsigned int. Use new args to
3250 handle EH_RETURN_DATA_REGNO registers properly.
3251 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
3252 (riscv_expand_epilogue): Update comment. Change argument name and
3253 type. Update code to use new name and type. Pass new args to
3254 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
3256 * config/riscv/riscv.md (NORMAL_RETURN): New.
3257 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
3258 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
3259 (eh_return): Call gen_eh_return_internal and emit barrier.
3260 (eh_return_internal): Call riscv_expand_epilogue.
3262 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
3264 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
3265 bit_insertion field and declare can_be_merged_into method.
3266 (merged_store_group::can_be_merged_into): New method.
3267 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
3268 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
3269 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
3271 2018-06-04 Richard Biener <rguenther@suse.de>
3273 PR tree-optimization/85955
3274 * builtins.c (fold_builtin_sincos): Convert pointers to
3275 destination to appropriate type before dereferencing.
3277 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
3279 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
3281 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
3283 * expr.c (expand_expr_real_1): Force the operand into memory if
3284 its TYPE_MODE is BLKmode and if there is no integer mode for
3285 the number of bits being extracted.
3287 2018-06-04 Jakub Jelinek <jakub@redhat.com>
3291 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3292 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
3294 2018-06-04 Richard Biener <rguenther@suse.de>
3296 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
3297 (cleanup_tree_cfg_noloop): ... single caller. Do
3298 start_recording_case_labels later.
3300 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
3302 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
3303 to _IMMINTRIN_H_INCLUDED.
3304 * config/i386/pconfigintrin.h: Ditto.
3305 * config/i386/waitpkgintrin.h: Ditto.
3306 * config/i386/immintrin.h: Add includes for sgxintrin.h,
3307 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
3308 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
3309 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
3310 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
3311 waitpkgintrin.h and cldemoteintrin.h.
3313 2018-06-04 Richard Biener <rguenther@suse.de>
3315 PR tree-optimization/86038
3316 * tracer.c (find_best_successor): Check probability for
3317 being initialized, bail out if not.
3319 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
3322 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
3323 of bits to ignore when comparing architectures.
3325 2018-06-04 Jakub Jelinek <jakub@redhat.com>
3327 PR tree-optimization/69615
3328 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
3329 maximum or minimum of the type, try to merge it also as if
3330 range1 is + [-, x - 1] or + [x + 1, -].
3333 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
3335 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
3337 PR tree-optimization/86034
3338 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
3339 the unsigned bitfield type in a bit insertion sequence if it does not
3340 have a larger precision than the bitfield size.
3341 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
3343 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
3345 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
3347 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
3349 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
3350 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
3351 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
3352 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
3354 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
3356 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
3357 Disable -fdelete-null-pointer-checks for ELF toolchain.
3359 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
3360 Kito Cheng <kito.cheng@gmail.com>
3362 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
3363 (nds32le-*-*, nds32be-*-*): Integrate checking process.
3364 (nds32*-*-*): Add glibc and uclibc conditions.
3365 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
3366 (TARGET_EXCEPT_UNWIND_INFO): Define.
3367 * config/nds32/elf.h: New file.
3368 * config/nds32/linux.h: New file.
3369 * config/nds32/nds32-elf.opt: New file.
3370 * config/nds32/nds32-linux.opt: New file.
3371 * config/nds32/nds32-fp-as-gp.c
3372 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
3373 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
3375 (nds32_asm_file_end): Ditto.
3376 (nds32_print_operand): Ditto.
3377 (nds32_insert_attributes): Ditto.
3378 (nds32_init_libfuncs): New function.
3379 (TARGET_HAVE_TLS): Define.
3380 (TARGET_INIT_LIBFUNCS): Define.
3381 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
3383 (TARGET_ELF): Apply different mcmodel setting.
3384 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
3385 been migrated into elf.h and linux.h files.
3386 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
3387 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
3388 (mcmodel): The content has been migrated into nds32-elf.opt and
3389 nds32-linux.opt files.
3390 * config/nds32/t-elf: New file.
3391 * config/nds32/t-linux: New file.
3393 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
3394 Shiva Chen <shiva0217@gmail.com>
3396 * config/nds32/constants.md (unspec_volatile_element): Add
3397 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
3398 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
3400 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
3401 (make_pass_nds32_fp_as_gp): Declare.
3402 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
3404 (nds32_asm_function_end_prologue): Remove unused asm output.
3405 (nds32_asm_function_begin_epilogue): Remove unused asm output.
3406 (nds32_asm_file_start): Output necessary fp_as_gp information.
3407 (nds32_option_override): Adjust register usage.
3408 (nds32_expand_prologue): Consider fp_as_gp situation.
3409 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
3410 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
3413 (simple_return): Ditto.
3414 (omit_fp_begin): Output special directive for fp_as_gp.
3415 (omit_fp_end): Output special directive for fp_as_gp.
3416 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
3417 mforbid-fp-as-gp): New options.
3419 2018-06-01 Mark Wielaard <mark@klomp.org>
3421 * dwarf2out.c (dwarf2out_finish): Remove generation of
3422 DW_AT_loclists_base.
3424 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3426 * gimple-ssa-store-merging.c: Include gimple-fold.h.
3427 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
3428 (struct merged_store_group): Add bit_insertion field.
3429 (dump_char_array): Use standard hexadecimal format.
3430 (merged_store_group::merged_store_group): Set bit_insertion to false.
3431 (merged_store_group::apply_stores): Use optimal buffer size. Deal
3432 with BIT_INSERT_EXPR stores. Move up code updating the mask and
3433 also print the mask in the dump file.
3434 (pass_store_merging::gate): Minor tweak.
3435 (imm_store_chain_info::coalesce_immediate): Fix wrong association
3436 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
3437 stores with INTEGER_CST stores.
3438 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
3439 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
3440 and use it throughout. Generate bit insertion sequences if need be.
3441 (pass_store_merging::process_store): Remove redundant condition.
3442 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
3444 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
3446 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
3447 the 128-bit floating point types. Fix function comment.
3449 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3451 * config/aarch64/aarch64-simd.md
3452 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
3454 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
3457 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
3459 PR tree-optimization/85989
3460 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
3462 (backprop::intersect_uses): Check it when deciding whether this
3463 is a backedge reference.
3464 (backprop::process_block): Add each phi to m_visited_phis
3465 after visiting it, then clear it at the end.
3467 2018-06-01 Richard Biener <rguenther@suse.de>
3469 * tree-vectorizer.h (vect_dr_stmt): New function.
3470 (vect_get_load_cost): Adjust.
3471 (vect_get_store_cost): Likewise.
3472 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
3473 Use vect_dr_stmt instead of DR_SMTT.
3474 (vect_record_base_alignments): Likewise.
3475 (vect_calculate_target_alignment): Likewise.
3476 (vect_compute_data_ref_alignment): Likewise and make static.
3477 (vect_update_misalignment_for_peel): Likewise.
3478 (vect_verify_datarefs_alignment): Likewise.
3479 (vector_alignment_reachable_p): Likewise.
3480 (vect_get_data_access_cost): Likewise. Pass down
3481 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
3482 (vect_get_peeling_costs_all_drs): Likewise.
3483 (vect_peeling_hash_get_lowest_cost): Likewise.
3484 (vect_enhance_data_refs_alignment): Likewise.
3485 (vect_find_same_alignment_drs): Likewise.
3486 (vect_analyze_data_refs_alignment): Likewise.
3487 (vect_analyze_group_access_1): Likewise.
3488 (vect_analyze_group_access): Likewise.
3489 (vect_analyze_data_ref_access): Likewise.
3490 (vect_analyze_data_ref_accesses): Likewise.
3491 (vect_vfa_segment_size): Likewise.
3492 (vect_small_gap_p): Likewise.
3493 (vectorizable_with_step_bound_p): Likewise.
3494 (vect_prune_runtime_alias_test_list): Likewise.
3495 (vect_analyze_data_refs): Likewise.
3496 (vect_supportable_dr_alignment): Likewise.
3497 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3498 (vect_gen_prolog_loop_niters): Likewise.
3499 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3500 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
3502 (vect_recog_mask_conversion_pattern): Likewise.
3503 (vect_try_gather_scatter_pattern): Likewise.
3504 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
3505 to vect_get_store_cost.
3506 (vect_get_store_cost): Get stmt_info instead of DR.
3507 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
3508 (vect_get_load_cost): Get stmt_info instead of DR.
3510 2018-06-01 Richard Biener <rguenther@suse.de>
3513 * gimple-fold.c (var_decl_component_p): Also allow offsetted
3514 vars wrapped in MEM_REFs.
3516 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
3518 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3519 Fix subreg tests so that we only return a choice between
3520 GENERAL_REGS and FP_REGS if the original classes included both.
3522 2018-06-01 Richard Biener <rguenther@suse.de>
3525 * tree-ssa-structalias.c (get_function_part_constraint):
3526 Handle NULL fi->decl.
3527 (find_func_aliases_for_call): Properly handle indirect
3528 fi from direct call.
3529 (find_func_clobbers): Likewise.
3530 (ipa_pta_execute): Likewise.
3531 (create_variable_info_for): For functions that are ifunc_resolver
3532 resolve to a varinfo that contains the result of the resolver call.
3533 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
3536 2018-05-31 Michael Collison <michael.collison@arm.com>
3538 * config/aarch64/aarch64.md:
3539 (*fix_to_zero_extenddfdi2): New pattern.
3540 * gcc.target/aarch64/fix_extend1.c: New testcase.
3542 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
3546 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
3547 and BUILT_IN_STRNCMP_EQ.
3548 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
3549 BUILT_IN_STRNCMP_EQ.
3550 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
3551 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3552 (gimple_fold_builtin): Likewise.
3553 * tree-ssa-strlen.c (compute_string_length): New function.
3554 (determine_min_obsize): New function.
3555 (handle_builtin_string_cmp): New function to handle calls to
3556 string compare functions.
3557 (strlen_optimize_stmt): Add handling to builtin string compare
3559 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
3560 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3561 * tree.c (build_common_builtin_nodes): Add new defines of
3562 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
3564 2018-05-31 Jakub Jelinek <jakub@redhat.com>
3567 * bb-reorder.c (pass_partition_blocks::gate): Return false for
3568 functions with naked attribute.
3570 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3572 * config/i386/sse.md (avx_vec_concat<mode>):
3573 Substitute concat_tg_mode mode attribute with xtg_mode.
3574 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
3575 (concat_tg_mode): Remove mode attribute.
3577 2018-05-31 Martin Sebor <msebor@redhat.com>
3580 * calls.c (alloc_max_size): Correct a logic error/typo.
3581 Treat excessive arguments as infinite. Warn for invalid arguments.
3582 * doc/invoke.texi (-Walloc-size-larger-than): Update.
3584 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
3587 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
3588 and movx for Haswell.
3590 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
3591 Cesar Philippidis <cesar@codesourcery.com>
3594 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
3595 when emitting error on private/firstprivate reductions.
3596 * omp-low.c (lower_omp_target): Avoid reference-type processing
3597 on pointers for firstprivate clause.
3599 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3601 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
3604 * config/aarch64/aarch64-simd.md
3605 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
3606 (aarch64_ld1_x3_<mode>): Likewise
3607 (aarch64_st1x2<VALLDIF:mode>): Likewise
3608 (aarch64_st1_x2_<mode>): Likewise
3609 (aarch64_st1x3<VALLDIF:mode>): Likewise
3610 (aarch64_st1_x3_<mode>): Likewise
3611 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
3612 (vld1_s8_x3): Likewise.
3613 (vld1_u16_x3): Likewise.
3614 (vld1_s16_x3): Likewise.
3615 (vld1_u32_x3): Likewise.
3616 (vld1_s32_x3): Likewise.
3617 (vld1_u64_x3): Likewise.
3618 (vld1_s64_x3): Likewise.
3619 (vld1_f16_x3): Likewise.
3620 (vld1_f32_x3): Likewise.
3621 (vld1_f64_x3): Likewise.
3622 (vld1_p8_x3): Likewise.
3623 (vld1_p16_x3): Likewise.
3624 (vld1_p64_x3): Likewise.
3625 (vld1q_u8_x3): Likewise.
3626 (vld1q_s8_x3): Likewise.
3627 (vld1q_u16_x3): Likewise.
3628 (vld1q_s16_x3): Likewise.
3629 (vld1q_u32_x3): Likewise.
3630 (vld1q_s32_x3): Likewise.
3631 (vld1q_u64_x3): Likewise.
3632 (vld1q_s64_x3): Likewise.
3633 (vld1q_f16_x3): Likewise.
3634 (vld1q_f32_x3): Likewise.
3635 (vld1q_f64_x3): Likewise.
3636 (vld1q_p8_x3): Likewise.
3637 (vld1q_p16_x3): Likewise.
3638 (vld1q_p64_x3): Likewise.
3639 (vst1_s64_x2): Likewise.
3640 (vst1_u64_x2): Likewise.
3641 (vst1_f64_x2): Likewise.
3642 (vst1_s8_x2): Likewise.
3643 (vst1_p8_x2): Likewise.
3644 (vst1_s16_x2): Likewise.
3645 (vst1_p16_x2): Likewise.
3646 (vst1_s32_x2): Likewise.
3647 (vst1_u8_x2): Likewise.
3648 (vst1_u16_x2): Likewise.
3649 (vst1_u32_x2): Likewise.
3650 (vst1_f16_x2): Likewise.
3651 (vst1_f32_x2): Likewise.
3652 (vst1_p64_x2): Likewise.
3653 (vst1q_s8_x2): Likewise.
3654 (vst1q_p8_x2): Likewise.
3655 (vst1q_s16_x2): Likewise.
3656 (vst1q_p16_x2): Likewise.
3657 (vst1q_s32_x2): Likewise.
3658 (vst1q_s64_x2): Likewise.
3659 (vst1q_u8_x2): Likewise.
3660 (vst1q_u16_x2): Likewise.
3661 (vst1q_u32_x2): Likewise.
3662 (vst1q_u64_x2): Likewise.
3663 (vst1q_f16_x2): Likewise.
3664 (vst1q_f32_x2): Likewise.
3665 (vst1q_f64_x2): Likewise.
3666 (vst1q_p64_x2): Likewise.
3667 (vst1_s64_x3): Likewise.
3668 (vst1_u64_x3): Likewise.
3669 (vst1_f64_x3): Likewise.
3670 (vst1_s8_x3): Likewise.
3671 (vst1_p8_x3): Likewise.
3672 (vst1_s16_x3): Likewise.
3673 (vst1_p16_x3): Likewise.
3674 (vst1_s32_x3): Likewise.
3675 (vst1_u8_x3): Likewise.
3676 (vst1_u16_x3): Likewise.
3677 (vst1_u32_x3): Likewise.
3678 (vst1_f16_x3): Likewise.
3679 (vst1_f32_x3): Likewise.
3680 (vst1_p64_x3): Likewise.
3681 (vst1q_s8_x3): Likewise.
3682 (vst1q_p8_x3): Likewise.
3683 (vst1q_s16_x3): Likewise.
3684 (vst1q_p16_x3): Likewise.
3685 (vst1q_s32_x3): Likewise.
3686 (vst1q_s64_x3): Likewise.
3687 (vst1q_u8_x3): Likewise.
3688 (vst1q_u16_x3): Likewise.
3689 (vst1q_u32_x3): Likewise.
3690 (vst1q_u64_x3): Likewise.
3691 (vst1q_f16_x3): Likewise.
3692 (vst1q_f32_x3): Likewise.
3693 (vst1q_f64_x3): Likewise.
3694 (vst1q_p64_x3): Likewise.
3696 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3698 * config/msp430/msp430.c (msp430_output_labelref): Prepend
3699 user_label_prefix to name.
3701 * tree-core.h: Update comment about the format of NAME string
3702 passed to handler in attribute_spec.
3704 * config/msp430/msp430.md: Remove erroneous subreg expression from
3705 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
3706 zero_extend{q,h}isi2.
3708 2018-05-30 Borislav Petkov <bp@suse.de>
3710 * doc/extend.texi: Document some architecture specific
3711 constraints and sort entries.
3713 2018-05-30 Martin Sebor <msebor@redhat.com>
3716 * builtins.c (expand_builtin_stpcpy_1): New function.
3717 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
3718 only if the former succeeds.
3720 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3722 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
3725 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
3727 * doc/invoke.texi (-flinker-output): Document
3729 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
3731 * passes.c (ipa_write_summaries): Only modify statements if body
3733 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
3734 incrementally linking.
3735 (ipa_passes): Likewise.
3736 * lto-cgraph.c (lto_output_node): When incrementally linking do not
3737 pass down resolution info.
3738 * common.opt (flag_incremental_link): Update info.
3739 * gcc.c (plugin specs): Turn flinker-output=* to
3740 -plugin-opt=-linker-output-known
3741 * toplev.c (compile_file): Also cut compilation when doing incremental
3743 * flag-types. (enum lto_partition_model): Add
3744 LTO_LINKER_OUTPUT_NOLTOREL.
3745 (invoke.texi): Add -flinker-output docs.
3746 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
3747 link same way as WPA; do not stream in dead initializers.
3749 * dwarf2out.c (dwarf2out_die_ref_for_decl,
3750 darf2out_register_external_decl): Support incremental link.
3752 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
3754 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
3756 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
3758 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
3759 it down to simple_object_copy_lto_debug_sections.
3760 (run_gcc): Determine incremental LTO link time and configure
3761 lto1 into non-wpa mode, disable renaming of debug sections.
3763 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
3765 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3766 descriptions of various incorrectly documented functions.
3768 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
3771 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3772 address check not strict.
3774 2018-05-30 Richard Biener <rguenther@suse.de>
3776 PR tree-optimization/85964
3777 * tracer.c (better_p): Drop initialized count check, we only
3778 call the function with initialized counts now.
3779 (find_best_successor): Do find a best edge if one
3780 has uninitialized count.
3781 (find_best_predecessor): Likewise. Do BB frequency check only
3782 if count is initialized.
3784 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
3786 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
3787 (aarch64_ldrstr_offset_compare): New.
3788 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
3789 load/store orderings.
3790 (aarch64_gen_adjusted_ldpstp): Likewise.
3792 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
3794 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3795 Check for subset of GENERAL_REGS and FP_REGS.
3796 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
3799 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
3801 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
3802 and wi::to_poly_offset. Add the current offset and then check
3803 whether the sum fits, rather than using an unchecked addition of
3804 a checked term. Check for a shwi rather than a uhwi.
3805 * expr.c (get_bit_range): Use tree_to_poly_uint64.
3806 (store_constructor): Use poly_int_tree_p.
3807 (expand_expr_real_1): Likewise.
3808 * function.c (assign_temp): Likewise.
3809 * fold-const.c (const_binop): Use poly_int_tree_p and
3811 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
3813 * ipa-icf-gimple.c (func_checker::compare_operand): Use
3814 to_poly_offset for MEM offsets.
3815 * ipa-icf.c (sem_variable::equals): Likewise.
3816 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
3817 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
3818 wi::to_poly_offset for BIT_FIELD_REF offsets.
3819 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
3821 * var-tracking.c (emit_note_insn_var_location): Use
3822 tree_to_poly_uint64.
3824 2018-05-29 Jim Wilson <jimw@sifive.com>
3826 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
3828 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
3831 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
3832 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
3834 (sse4_1_round<mode>2): Use nonimmediate_operand
3835 for operand 1 predicate.
3837 2018-05-29 Martin Sebor <msebor@redhat.com>
3838 Richard Biener <rguenther@suse.de>
3841 * calls.c (get_size_range): Call determine_value_range instead
3842 of get_value_range..
3843 * tree-vrp.h (determine_value_range): Declared new function.
3844 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
3846 2018-05-29 Richard Biener <rguenther@suse.de>
3848 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
3849 sure to use non-pattern stmts for get_earlier_stmt arguments.
3850 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
3851 called on pattern stmts.
3852 (get_later_stmt): Likewise.
3854 2018-05-29 Martin Liska <mliska@suse.cz>
3856 PR gcov-profile/85759
3857 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
3860 2018-05-29 Jakub Jelinek <jakub@redhat.com>
3862 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
3864 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
3868 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3869 VEC_PACK_FLOAT_EXPR): New tree codes.
3870 * tree-pretty-print.c (op_code_prio): Handle
3871 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3872 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3873 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3874 * tree-inline.c (estimate_operator_cost): Likewise.
3875 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
3876 * fold-const.c (const_binop): Likewise.
3877 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
3878 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3879 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3880 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
3881 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3882 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3883 * expr.c (expand_expr_real_2): Likewise.
3884 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
3885 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
3886 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
3888 * optabs.c (expand_widen_pattern_expr): For
3889 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
3890 sign from result type rather than operand's type.
3891 (expand_binop_directly): For vec_packu_float_optab and
3892 vec_packs_float_optab allow result type to be different from operand's
3894 * optabs-tree.c (optab_for_tree_code): Handle
3895 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3896 VEC_PACK_FLOAT_EXPR. Formatting fixes.
3897 * tree-vect-generic.c (expand_vector_operations_1): Handle
3898 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3899 VEC_PACK_FLOAT_EXPR.
3900 * tree-vect-stmts.c (supportable_widening_operation): Handle
3902 (supportable_narrowing_operation): Handle FLOAT_EXPR.
3903 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
3904 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
3905 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
3906 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
3908 (vec_pack<floatprefix>_float_<mode>): New expander.
3909 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
3911 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
3912 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
3913 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
3914 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
3915 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
3917 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
3918 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
3919 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3920 VEC_PACK_FLOAT_EXPR): Document.
3922 2018-05-29 Richard Biener <rguenther@suse.de>
3924 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
3926 (stmt_vec_info_vec): Make pointer.
3927 (init_stmt_vec_info_vec): Remove.
3928 (free_stmt_vec_info_vec): Likewise.
3929 (set_stmt_vec_info_vec): New function.
3930 (free_stmt_vec_infos): Likewise.
3931 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
3932 (set_vinfo_for_stmt): Likewise.
3933 (get_earlier_stmt): Likewise.
3934 (get_later_stmt): Likewise.
3935 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
3936 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
3937 (vec_info::~vec_info): Free stmt_vec_infos.
3938 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
3939 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
3940 (pass_slp_vectorize::execute): Likewise.
3941 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
3942 (free_stmt_vec_info_vec): Likewise.
3943 (set_stmt_vec_info_vec): New function.
3944 (free_stmt_vec_infos): Likewise.
3945 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
3946 the global stmt_vec_info_vec.
3947 * tree-parloops.c (gather_scalar_reductions): Use
3948 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
3951 2018-05-29 Richard Biener <rguenther@suse.de>
3953 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
3955 2018-05-29 Martin Liska <mliska@suse.cz>
3956 David Malcolm <dmalcolm@redhat.com>
3958 * vec.c (test_reverse): New.
3959 (vec_c_tests): Add new test.
3960 * vec.h (vl_ptr>::reverse): New function.
3962 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
3964 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
3966 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
3969 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3971 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
3973 2018-05-28 Richard Biener <rguenther@suse.de>
3975 PR tree-optimization/85933
3976 * tree-vect-data-refs.c (vect_record_base_alignments): Only
3977 look at stmts marked as vectorizable.
3979 2018-05-28 Richard Biener <rguenther@suse.de>
3981 PR tree-optimization/85934
3982 * tree-vect-generic.c (expand_vector_operations_1): Hoist
3983 vector boolean check before scalar optimization.
3985 2018-05-28 Jakub Jelinek <jakub@redhat.com>
3987 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
3990 2018-05-28 Mark Wielaard <mark@klomp.org>
3992 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
3993 if it is an expression containing a minus sign.
3995 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
3997 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
3999 2018-05-27 Paul Koning <ni1d@arrl.net>
4001 * config/pdp11/pdp11.md (truncsihi2): Remove.
4003 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
4004 Chung-Ju Wu <jasonwucj@gmail.com>
4006 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
4008 (unaligned_store_dw): Ditto.
4009 * config/nds32/nds32-memory-manipulation.c
4010 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
4011 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
4012 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
4013 (emit_setmem_word_loop): Rename to ...
4014 (emit_setmem_doubleword_loop): ... this.
4015 (nds32_gen_dup_4_byte_to_word_value): New function.
4016 (nds32_gen_dup_8_byte_to_double_word_value): New function.
4017 (nds32_expand_setmem_loop): Refine implementation.
4018 (nds32_expand_setmem_loop_v3m): Ditto.
4019 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
4022 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
4024 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
4026 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
4028 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
4029 (nds32_init_machine_status): Initialize machine->attr_naked_p and
4030 machine->attr_no_prologue_p.
4031 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
4032 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
4033 (nds32_expand_epilogue): Consider attr_naked_p.
4034 (nds32_expand_epilogue_v3pop): Likewise.
4035 (nds32_can_use_return_insn): Likewise.
4036 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
4037 attr_no_prologue_p fields.
4038 * config/nds32/nds32.opt (mret-in-naked-func): New option.
4040 2018-05-27 Jakub Jelinek <jakub@redhat.com>
4043 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
4045 * config/i386/sse.md
4046 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
4048 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
4050 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
4052 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
4054 (*<floatsuffix>floatv2div2sf2): Rename to ...
4055 (*float<floatunssuffix>v2div2sf2): ... this.
4056 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
4057 (float<floatunssuffix>v2div2sf2_mask): ... this.
4058 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
4059 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
4060 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
4062 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
4064 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4066 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4068 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4070 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4072 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
4073 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
4074 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
4075 gen_ufix_truncv8dfv8si2.
4076 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
4077 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
4078 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
4079 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
4080 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
4081 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
4082 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
4083 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
4085 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
4089 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
4091 2018-05-25 Jim Wilson <jimw@sifive.com>
4093 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
4094 * config/riscv/riscv.c (struct machine_function): Add
4095 interrupt_handler_p and attribute_checked_p fields.
4096 (riscv_attribute_table): Add interrupt.
4097 (riscv_interrupt_type_p): New.
4098 (riscv_save_reg_p): Save extra regs for interrupt handler.
4099 (riscv_use_save_libcall): Return false for interrupt handler.
4100 (riscv_first_stack_step): Add forward declaration.
4101 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
4102 for interrupt handler with large frame. Use it for saved reg list.
4103 (riscv_expand_prologue): Move flag_stack_usage_info support to
4104 eliminate duplication.
4105 (riscv_expand_epilogue): Generate mret for interrupt handler.
4106 (riscv_epilogue_uses): New.
4107 (riscv_can_use_return_insn): Return false for interrupt handler.
4108 (riscv_function_ok_for_sibcall): Likewise.
4109 (riscv_set_current_function): Add interrupt handler support.
4110 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
4111 * config/riscv/riscv.md (UNSPECV_MRET): New.
4113 (riscv_frflags, riscv_fsflags): Use tab after opcode.
4115 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
4117 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
4119 PR tree-optimization/85712
4120 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
4121 this candidate has already been replaced in-situ by a copy.
4123 2018-05-25 Jason Merrill <jason@redhat.com>
4125 PR c++/80485 - inline function non-zero address.
4126 * symtab.c (nonzero_address): Check DECL_COMDAT.
4128 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
4131 * config/alpha/alpha.md (ashlsi3): New insn pattern.
4132 (*ashlsi_se): Rename from *ashldi_se. Define as sign
4133 extension of SImode operation. Use const123_operand predicate.
4134 (*saddsi_1): Remove.
4135 (*saddl_se_1): Ditto.
4137 (*ssubl_se_1): Ditto.
4138 * config/alpha/predicates.md (const123_operand): New predicate.
4139 * config/alpha/constraints.md (P): Use IN_RANGE.
4141 2018-05-25 Richard Biener <rguenther@suse.de>
4143 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
4145 (ref_maybe_used_by_stmt_p): Likewise.
4146 (stmt_may_clobber_ref_p): Likewise.
4147 (stmt_may_clobber_ref_p_1): Likewise.
4148 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
4150 (ref_maybe_used_by_stmt_p): Likewise.
4151 (stmt_may_clobber_ref_p): Likewise.
4152 (stmt_may_clobber_ref_p_1): Likewise.
4153 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
4154 the alias oracle to disambiguate DRs with stmts DR analysis
4156 (vect_analyze_data_refs): Do not give up on not analyzable
4157 DRs for BB vectorization. Remove code truncating the dataref
4160 2018-05-25 Jakub Jelinek <jakub@redhat.com>
4163 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4164 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
4165 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
4167 2018-05-25 Richard Biener <rguenther@suse.de>
4169 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
4170 function, combining stmt data ref gathering and fatal analysis
4172 (vect_analyze_data_refs): Remove now redudnant code and simplify.
4173 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
4174 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
4175 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
4176 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
4178 2018-05-25 Bin Cheng <bin.cheng@arm.com>
4180 PR tree-optimization/85720
4181 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
4182 SCC if all partitions are builtins.
4183 (version_loop_by_alias_check): New parameter. Generate cancelable
4184 runtime alias check if all partitions are builtins.
4185 (distribute_loop): Update call to above function.
4187 2018-05-25 Bin Cheng <bin.cheng@arm.com>
4189 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
4190 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
4191 (parm_default_def_partition_arg): Ditto.
4192 (set_parm_default_def_partition): Ditto.
4193 (get_parm_default_def_partitions): Ditto and make it static.
4194 (get_undefined_value_partitions): Ditto and make it static.
4195 (remove_ssa_form): Refactor call to init_var_map here.
4196 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
4197 computation for loop region.
4198 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
4199 (register_default_def): Delete.
4200 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
4201 (parm_default_def_partition_arg): Ditto.
4202 (set_parm_default_def_partition): Ditto.
4203 (get_parm_default_def_partitions): Ditto and make it static.
4204 (get_undefined_value_partitions): Ditto and make it static.
4205 (coalesce_with_default, coalesce_with_default): Update comment.
4206 (create_coalesce_list_for_region): New func factored out from
4207 create_outofssa_var_map.
4208 (populate_coalesce_list_for_outofssa): New func factored out from
4209 create_outofssa_var_map and coalesce_ssa_name.
4210 (create_outofssa_var_map): Delete.
4211 (coalesce_ssa_name): Refactor to support live range computation.
4212 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
4213 (get_parm_default_def_partitions): Delete.
4214 (get_undefined_value_partitions): Ditto.
4215 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
4216 computation for loop region.
4217 (new_tree_live_info, loe_visit_block): Ditto.
4218 (live_worklist, set_var_live_on_entry): Ditto.
4219 (calculate_live_on_exit, verify_live_on_entry): Ditto.
4220 * tree-ssa-live.h (struct _var_map): New fields.
4221 (init_var_map): Change decl.
4222 (region_contains_p): New.
4224 2018-05-25 Bin Cheng <bin.cheng@arm.com>
4226 * tree-ssa-live.h (live_merge_and_clear): Delete.
4228 2018-05-25 Richard Biener <rguenther@suse.de>
4231 * tree-dump.c (dequeue_and_dump): Remove access to removed
4232 operand 2 of a SWITCH_EXPR.
4234 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4236 * doc/sourcebuild.texi (vect_double_cond_arith): Include
4237 multiplication and division.
4238 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
4239 (cond_udiv@var{m}, cond_umod@var{m}): Document.
4240 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
4241 (cond_udiv_optab, cond_umod_optab): New optabs.
4242 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
4243 (IFN_COND_RDIV): New internal functions.
4244 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
4245 TRUNC_MOD_EXPR and RDIV_EXPR.
4246 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
4247 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
4249 (SVE_INT_BINARY): Include mult.
4250 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
4251 (optab, sve_int_op): Handle mult.
4252 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
4254 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
4255 for SVE_INT_BINARY_SD.
4257 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4259 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
4260 (optab, sve_int_op): Handle div and udiv.
4261 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
4262 for SVE_INT_BINARY_SD.
4263 (*<optab><mode>3): New insn for the same.
4265 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4267 * tree-vect-patterns.c: Include predict.h.
4268 (vect_recog_divmod_pattern): Restrict check for division support
4269 to when optimizing for size.
4271 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4273 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
4274 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
4275 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
4276 (gimple_match_op::set_op): Likewise.
4277 (gimple_resimplify4): Declare.
4278 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
4279 (expr::gen_transform): Likewise.
4280 (decision_tree::gen): Generate a simplification routine for 4 operands.
4281 * gimple-match-head.c (gimple_simplify): Add an overload for
4282 4 operands. In the top-level function, handle up to 4 call
4283 arguments and call gimple_resimplify4.
4284 (gimple_resimplify4): New function.
4285 (build_call_internal): Pass a fourth operand.
4286 (maybe_push_to_seq): Likewise.
4287 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
4288 Fold VEC_COND_EXPRs of an operation and a default value into
4289 an IFN_COND_* function if possible.
4290 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
4292 (SVE_COND_FP_BINARY): Include them.
4293 (optab, sve_fp_op): Handle them.
4294 (SVE_INT_BINARY_REV): New code iterator.
4295 (SVE_COND_FP_BINARY_REV): New int iterator.
4296 (commutative): New int attribute.
4297 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
4299 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
4301 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
4302 (*cond_<optab><mode>): New patterns for reversed operands.
4304 2018-05-25 Richard Biener <rguenther@suse.de>
4306 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
4307 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
4308 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
4309 (STMT_VINFO_GROUPED_ACCESS): Adjust.
4310 * tree-vect-data-refs.c (everywhere): Adjust users.
4311 * tree-vect-loop.c (everywhere): Likewise.
4312 * tree-vect-slp.c (everywhere): Likewise.
4313 * tree-vect-stmts.c (everywhere): Likewise.
4314 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4316 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4318 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
4320 (gcc_cv_as_section_exclude): ... this.
4321 Try Solaris as #exclude syntax.
4322 * configure: Regenerate.
4323 * config.in: Regenerate.
4324 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
4326 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
4327 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
4329 * varasm.c (default_elf_asm_named_section): Don't check if
4330 HAVE_GAS_SECTION_EXCLUDE is defined.
4332 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4334 * doc/md.texi: Update the documentation of the cond_* optabs
4335 to mention the new final operand. Fix GET_MODE_NUNITS call.
4336 Describe the scalar case too.
4337 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
4338 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
4340 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
4341 (get_conditional_internal_fn): Update comment.
4342 * tree-vect-loop.c (vectorizable_reduction): Pass the original
4343 accumulator value as a final argument to conditional functions.
4344 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
4345 a define_expand and add an "else" operand. Assert for now that
4346 the else operand is equal to operand 2. Use SVE_INT_BINARY and
4347 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
4348 (*cond_<optab><mode>): New patterns.
4349 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
4350 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
4351 (UNSPEC_COND_EOR): Delete.
4352 (optab): Remove associated mappings.
4353 (SVE_INT_BINARY): New code iterator.
4354 (sve_int_op): Remove int attribute and add "minus" to the code
4356 (SVE_COND_INT_OP): Delete.
4357 (SVE_COND_FP_OP): Rename to...
4358 (SVE_COND_FP_BINARY): ...this.
4360 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4362 * optabs.c (can_reuse_operands_p): New function.
4363 (maybe_legitimize_operands): Try to reuse the results for
4366 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
4368 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
4369 Add {q} suffix to insn mnemonic.
4371 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4373 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
4374 (msp430_warn_func_return): New.
4376 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
4378 * fold-const.c (tree_nonzero_bits): New function.
4379 * fold-const.h (tree_nonzero_bits): Likewise.
4380 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
4381 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
4383 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
4387 * varasm.c (assemble_alias): Check ifunc_resolver only on
4390 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
4393 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
4394 when memory input operand is handled.
4396 2018-05-24 Luis Machado <luis.machado@linaro.org>
4398 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
4400 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
4402 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
4404 * match.pd: Delay FMA folds until after vectorization.
4406 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
4409 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4410 address check not strict.
4412 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
4414 * gimple-match.h (gimple_match_op): New class.
4415 (mprts_hook): Replace parameters with a gimple_match_op *.
4416 (maybe_build_generic_op): Likewise.
4417 (gimple_simplified_result_is_gimple_val): Replace parameters with
4418 a const gimple_match_op *.
4419 (gimple_simplify): Replace code_helper * and tree * parameters with
4420 a gimple_match_op * parameter.
4421 (gimple_resimplify1): Replace code_helper *, tree and tree *
4422 parameters with a gimple_match_op * parameter.
4423 (gimple_resimplify2): Likewise.
4424 (gimple_resimplify3): Likewise.
4425 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
4426 parameters with a gimple_match_op * parameter.
4427 * gimple-match-head.c (gimple_simplify): Change prototypes of
4428 auto-generated functions to take a gimple_match_op * instead of
4429 separate code_helper * and tree * parameters. Make the same
4430 change in the top-level overload and update calls to the
4431 gimple_resimplify routines. Update calls to the auto-generated
4432 functions and to maybe_push_res_to_seq in the publicly-facing
4433 operation-specific gimple_simplify overloads.
4434 (gimple_match_op::MAX_NUM_OPS): Define.
4435 (gimple_resimplify1): Replace rcode and ops with a single res_op
4436 parameter. Update call to gimple_simplify.
4437 (gimple_resimplify2): Likewise.
4438 (gimple_resimplify3): Likewise.
4439 (mprts_hook): Replace parameters with a gimple_match_op *.
4440 (maybe_build_generic_op): Likewise.
4441 (build_call_internal): Replace type, nargs and ops with
4442 a gimple_match_op *.
4443 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
4444 with a single gimple_match_op *. Update calls to mprts_hook,
4445 build_call_internal and gimple_simplified_result_is_gimple_val.
4446 Factor out code that is common to the tree_code and combined_fn cases.
4447 * genmatch.c (expr::gen_transform): Replace tem_code and
4448 tem_ops with a gimple_match_op called tem_op. Update calls
4449 to the gimple_resimplify functions and maybe_push_res_to_seq.
4450 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
4451 res_ops. Update call to the gimple_resimplify functions.
4452 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
4453 (decision_tree::gen): Make the functions take a gimple_match_op *
4454 called res_op instead of separate res_code and res_ops parameters.
4455 Update call accordingly.
4456 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
4457 and ops with a single res_op parameter. Update calls to
4458 maybe_build_generic_op and maybe_push_res_to_seq.
4459 (fold_stmt_1): Update calls to gimple_simplify and
4460 replace_stmt_with_simplification.
4461 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
4462 and gimple_simplified_result_is_gimple_val.
4463 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
4465 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
4466 with a gimple_match_op *.
4467 (vn_nary_build_or_lookup): Likewise. Update call to
4468 vn_nary_build_or_lookup_1.
4469 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
4470 gimple_match_op *. Update calls to the gimple_resimplify routines
4471 and to gimple_simplified_result_is_gimple_val.
4472 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
4473 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
4474 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
4475 (visit_nary_op): Likewise.
4476 (visit_reference_op_load): Likewise.
4478 2018-05-23 Luis Machado <luis.machado@linaro.org>
4480 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
4481 modifier for printing the step amount.
4483 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
4486 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
4489 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
4491 * doc/sourcebuild.texi (Endianness): New subsubsection.
4493 2018-05-23 Luis Machado <luis.machado@linaro.org>
4495 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4496 <prefetch_dynamic_strides>: New const bool field.
4497 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4498 prefetch_dynamic_strides.
4499 (exynosm1_prefetch_tune): Likewise.
4500 (thunderxt88_prefetch_tune): Likewise.
4501 (thunderx_prefetch_tune): Likewise.
4502 (thunderx2t99_prefetch_tune): Likewise.
4503 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
4505 (aarch64_override_options_internal): Update to set
4506 PARAM_PREFETCH_DYNAMIC_STRIDES.
4507 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
4508 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
4509 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
4510 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
4511 prefetch-dynamic-strides setting.
4513 2018-05-23 Luis Machado <luis.machado@linaro.org>
4515 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4516 <minimum_stride>: New const int field.
4517 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4518 minimum_stride field defaulting to -1.
4519 (exynosm1_prefetch_tune): Likewise.
4520 (thunderxt88_prefetch_tune): Likewise.
4521 (thunderx_prefetch_tune): Likewise.
4522 (thunderx2t99_prefetch_tune): Likewise.
4523 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
4524 <default_opt_level>: Set to 3.
4525 (aarch64_override_options_internal): Update to set
4526 PARAM_PREFETCH_MINIMUM_STRIDE.
4527 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
4528 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
4529 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
4530 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
4531 stride is constant and is below the minimum stride threshold.
4533 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4535 * config/arm/arm-cpus.in (mode26): Delete.
4536 (armv4): Delete mode26 reference.
4537 * config/arm/arm.c (arm_configure_build_target): Delete use of
4540 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
4542 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
4544 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
4545 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
4547 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
4548 (floatunsdidf2): Ditto.
4550 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
4552 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
4553 (fixuns_trunc<mode>si2_avx512f): Ditto.
4554 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
4555 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
4556 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
4558 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
4560 PR rtl-optimization/79985
4561 * df-scan.c (df_insn_refs_collect): Remove special case for
4562 global registers and asm statements.
4564 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
4566 * extend.texi (Global Register Variables): Rewrite the bullet list.
4567 Note that the register is available for allocation. Note that access
4568 via inline asm must use constraints. Add note about async-signal
4569 handlers. Remove paragraph about automagic register selection.
4571 2018-05-23 Richard Biener <rguenther@suse.de>
4573 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
4574 of fixed offset from memset VN.
4576 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
4578 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
4580 (alloc_cand_and_find_basis): Initialize first_interp field.
4581 (slsr_process_mul): Modify first_interp field.
4582 (slsr_process_add): Likewise.
4583 (slsr_process_cast): Modify first_interp field for each new
4585 (slsr_process_copy): Likewise.
4586 (dump_candidate): Dump first_interp field.
4587 (replace_mult_candidate): Process all interpretations, not just
4589 (replace_rhs_if_not_dup): Likewise.
4590 (replace_one_candidate): Likewise.
4592 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
4594 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
4596 (aarch64_needs_frame_chain): New function.
4597 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
4599 2018-05-23 Sudakshina Das <sudi.das@arm.com>
4602 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
4603 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
4604 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
4605 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
4606 as true for strict-align.
4607 (aarch64_can_inline_p): Perform checks even when callee has no
4608 attributes to check for strict alignment.
4609 * doc/extend.texi (AArch64 Function Attributes): Document
4611 * doc/invoke.texi: (AArch64 Options): Likewise.
4613 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
4615 PR tree-optimization/85853
4616 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
4617 the handling of the root of the node to...
4618 (vect_slp_analyze_node_operations_1): ...this new function,
4619 and run the whole thing with the child nodes' def types
4620 set according to their SLP node's def type.
4622 2018-05-23 Richard Biener <rguenther@suse.de>
4625 * tree-data-ref.c (create_runtime_alias_checks): Defer
4626 and ignore overflow warnings.
4628 2018-05-23 Yury Gribov <tetra2005@gmail.com>
4630 PR tree-optimization/85822
4631 * tree-vrp.c (is_masked_range_test): Fix handling of negative
4634 2018-05-23 Richard Biener <rguenther@suse.de>
4636 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4637 memset constants via native_interpret_expr.
4639 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
4642 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
4644 (cgraph_node::create_alias): Likewise.
4645 (cgraph_node::get_availability): Check ifunc_resolver instead
4646 of looking up ifunc attribute.
4647 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4648 * varasm.c (do_assemble_alias): Likewise.
4649 (assemble_alias): Likewise.
4650 (default_binds_local_p_3): Likewise.
4651 * cgraph.h (cgraph_node): Add ifunc_resolver.
4652 (cgraph_node::only_called_directly_or_aliased_p): Return false
4654 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
4656 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
4657 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
4658 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
4659 instead of looking up ifunc attribute.
4661 2018-05-22 Luis Machado <luis.machado@linaro.org>
4663 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
4665 2018-05-22 Martin Sebor <msebor@redhat.com>
4668 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
4669 only when expasion succeeds.
4670 (expand_builtin_strcmp): Same.
4671 (expand_builtin_strncmp): Same.
4673 2018-05-22 Martin Sebor <msebor@redhat.com>
4675 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
4677 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
4678 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4680 * config/aarch64/aarch64-ldpstp.md: Replace uses of
4681 aarch64_mem_pair_operand with memory_operand and delete operand swapping
4683 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4684 Add check for legitimate_address.
4685 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
4686 (aarch64_swap_ldrstr_operands): New.
4687 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
4690 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
4691 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4693 * config/aarch64/aarch64.md: New patterns to generate stp
4695 (store_pair_sw, store_pair_dw): New patterns to generate stp for
4696 single words and double words.
4697 (load_pair_sw, load_pair_dw): Likewise.
4698 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
4700 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
4702 * config/aarch64/aarch64-ldpstp.md: Modify peephole
4703 for different mode ldpstp and add peephole for merged zero stores.
4705 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4707 (aarch64_gen_store_pair): Rename calls to match new patterns.
4708 (aarch64_gen_load_pair): Rename calls to match new patterns.
4709 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
4710 (load_pair<DREG:mode><DREG2:mode>): ... This.
4711 (store_pair<mode>): Rename to...
4712 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
4713 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
4715 (V_INT_EQUIV): Handle SImode.
4716 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
4719 2018-05-22 Martin Sebor <msebor@redhat.com>
4722 * calls.c (maybe_warn_nonstring_arg): Use string length to set
4723 or ajust the presumed bound on an operation to avoid unnecessary
4726 2018-05-22 Martin Sebor <msebor@redhat.com>
4728 PR tree-optimization/85826
4729 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
4730 assuming that a DECL necesarily has a constant size.
4732 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
4735 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
4737 2018-05-22 Richard Biener <rguenther@suse.de>
4739 PR tree-optimization/85834
4740 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
4741 non-constant and non-zero memset arguments.
4743 2018-05-22 Martin Liska <mliska@suse.cz>
4746 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
4748 2018-05-22 Richard Biener <rguenther@suse.de>
4750 PR tree-optimization/85863
4751 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4752 comparisons when vectype is specified.
4753 (vectorizable_condition): Do not specify vectype for
4754 vect_is_simple_cond when SLP vectorizing.
4756 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
4759 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
4760 define __ibm128 as long double.
4761 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
4762 as a distinct type when IEEE 128-bit support is enabled.
4763 (init_float128_ieee): Fix up conversions between IFmode and IEEE
4764 128-bit types to use the correct functions.
4765 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
4766 convert between 128-bit floating point types that have different
4767 modes but the same representation, instead of using gen_lowpart to
4769 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
4771 (IFKF_reg): New attributes to give the register constraints for
4773 (extend<mode>tf2_internal): New insns to mark an explicit
4774 conversion between 128-bit floating point types that have a
4775 different mode but share the same representation.
4777 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
4779 PR tree-optimization/85814
4780 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4781 a null return from get_strinfo when unsharing the next
4782 strinfo in the chain.
4784 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4787 * varasm.c (weak_finish): Clean up weak_decls.
4789 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4791 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
4792 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
4793 UNSPEC_UADALP values.
4794 * config/aarch64/iterators.md (ABAL): New int iterator.
4797 (sur): Add mappings for the above.
4798 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
4800 (aarch64_<sur>abal<mode>_4): Likewise.
4801 (aarch64_<sur>adalp<mode>_3): Likewise.
4802 (<sur>sadv16qi): New define_expand.
4804 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
4806 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
4807 (*movdf_internal): Ditto.
4808 (*rcpsf2_sse): Ditto.
4809 (*rsqrtsf2_sse): Ditto.
4810 (*sqrt<mode>2_sse): Ditto.
4812 2018-05-21 Tamar Christina <tamar.christina@arm.com>
4814 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
4816 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
4817 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
4818 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
4819 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
4821 * config/aarch64/arm_neon.h: Likewise.
4822 * config/aarch64/iterators.md (VQ_I): New.
4824 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
4826 * config.gcc: Add arc/t-multilib-linux to tmake_file for
4828 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
4831 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
4833 * config/nds32/constraints.md (S): New constraint.
4834 * config/nds32/nds32.md (call_internal): Use constraint S.
4835 (call_value_internal): Likewise.
4836 (sibcall_internal): Likewise.
4837 (sibcall_value_internal): Likewise.
4839 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
4840 Chung-Ju Wu <jasonwucj@gmail.com>
4842 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
4845 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
4846 Chung-Ju Wu <jasonwucj@gmail.com>
4848 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
4849 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
4850 (nds32_rtx_costs_impl): Simplify.
4851 (nds32_address_cost_impl): Simplify.
4852 (nds32_init_rtx_costs): New function.
4853 (nds32_rtx_costs_speed_prefer): Likewise.
4854 (nds32_rtx_costs_size_prefer): Likewise.
4855 (nds32_address_cost_speed_prefer): Likewise.
4856 (nds32_address_cost_speed_fwprop): Likewise.
4857 (nds32_address_cost_size_prefer): Likewise.
4858 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
4859 * config/nds32/nds32.c (nds32_option_override): Use
4860 nds32_init_rtx_costs function.
4862 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
4864 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
4865 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
4866 (TARGET_PIPELINE_N8): Likewise.
4867 (TARGET_PIPELINE_N10): Likewise.
4868 (TARGET_PIPELINE_N13): Likewise.
4869 (TARGET_PIPELINE_GRAYWOLF): Likewise.
4871 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
4873 * config/nds32/nds32-fpu.md: Update copyright year.
4875 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4877 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
4879 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4881 * config/nds32/nds32.c
4882 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
4883 * config/nds32/nds32.opt (minline-asm-r15): New option.
4885 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4887 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
4889 * config/nds32/nds32.md (abssi2): New pattern.
4891 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
4893 * config/i386/i386.md (rex64namesuffix): New mode attribute.
4894 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
4895 Merge insn pattern from sse_cvtsi2ss<round_name> and
4896 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
4897 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
4898 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
4899 using SWI48 mode iterator.
4900 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
4901 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
4902 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
4903 pattern from sse_cvttss2si<round_saeonly_name>
4904 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
4905 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
4906 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
4907 using SWI48 mode iterator.
4908 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
4909 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
4910 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
4911 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
4912 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
4913 using SWI48 mode iterator.
4914 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
4915 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
4916 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
4917 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
4918 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
4919 SWI48 mode iterator.
4920 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
4921 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
4922 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
4923 pattern from sse_cvttsd2si<round_saeonly_name>
4924 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
4926 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4928 * config/nds32/nds32-md-auxiliary.c
4929 (nds32_valid_smw_lwm_base_p): Refine.
4930 (nds32_output_smw_single_word): Refine.
4931 (nds32_output_smw_double_word): New.
4932 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
4934 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4936 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
4937 (nds32_output_stack_pop): Refine.
4938 (nds32_expand_unaligned_load): Refine.
4939 (nds32_expand_unaligned_store): Refine.
4941 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4942 Chung-Ju Wu <jasonwucj@gmail.com>
4944 * config/nds32/constants.md: Add TP_REGNUM constant.
4945 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
4946 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
4948 * config/nds32/nds32-doubleword.md: Consider flag_pic.
4949 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
4950 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
4951 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
4952 and PIC code generation.
4953 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
4955 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
4957 * config/nds32/nds32.md: Support TLS and PIC.
4958 * config/nds32/nds32.c: Support TLS and PIC.
4959 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
4960 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
4963 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
4965 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
4966 mode with E_ prefix.
4968 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4969 Chung-Ju Wu <jasonwucj@gmail.com>
4971 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
4972 * config/nds32/nds32-md-auxiliary.c
4973 (symbolic_reference_mentioned_p): New.
4974 (nds32_legitimize_ict_address): New.
4975 (nds32_expand_ict_move): New.
4976 (nds32_indirect_call_referenced_p): New.
4977 (nds32_symbol_binds_local_p): Delete.
4978 (nds32_long_call_p): Modify.
4979 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
4980 * config/nds32/nds32-protos.h
4981 (symbolic_reference_mentioned_p): Declare.
4982 (nds32_legitimize_ict_address): Declare.
4983 (nds32_expand_ict_move): Declare.
4984 (nds32_indirect_call_referenced_p): Declare.
4985 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
4986 (nds32_relax_group): Use nds32_ict_const_p as condition.
4987 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
4988 (nds32_asm_file_start): Output ict_model directive in asm code.
4989 (nds32_legitimate_address_p): Consider indirect call.
4990 (nds32_print_operand): Consider indirect call.
4991 (nds32_print_operand_address): Consider indirect call.
4992 (nds32_insert_attributes): Handle "indirect_call" attribute.
4993 (TARGET_LEGITIMATE_ADDRESS_P): Define.
4994 (TARGET_LEGITIMATE_CONSTANT_P): Define.
4995 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
4996 (TARGET_DELEGITIMIZE_ADDRESS): Define.
4997 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
4998 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
4999 (TARGET_ICT_MODEL_SMALL): Define.
5000 (TARGET_ICT_MODEL_LARGE): Define.
5001 * config/nds32/nds32.md (movsi): Consider ict model.
5002 (call, call_value): Consider ict model.
5003 (sibcall, sibcall_value): Consider ict model.
5004 * config/nds32/nds32.opt (mict-model): New option.
5005 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
5008 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
5009 Monk Chiang <sh.chiang04@gmail.com>
5010 Jim Wilson <jimw@sifive.com>
5012 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
5013 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
5014 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
5015 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
5016 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
5017 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
5018 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
5019 compute save_libcall_adjustment properly.
5020 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
5021 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
5022 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
5023 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
5024 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
5025 (ABI_SPEC): Handle mabi=ilp32e.
5026 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
5027 (RVE): Add RVE mask.
5028 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
5029 <-march>: Add rv32e as an example.
5031 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
5034 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
5035 (intra_create_variable_infos): Handle C++ constructors.
5037 2018-05-18 Martin Liska <mliska@suse.cz>
5039 * passes.def: Remove a redundant pass.
5041 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
5044 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
5046 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5048 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
5050 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
5052 (armv2, armv2a, armv3, armv3m): Delete architectures.
5053 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
5054 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
5055 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
5057 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
5058 (*mulsidi3adddi): Likewise.
5059 (mulsidi3): Likewise.
5060 (*mulsidi3_nov6): Likewise.
5061 (umulsidi3): Likewise.
5062 (umulsidi3_nov6): Likewise.
5063 (umaddsidi4): Likewise.
5064 (*umulsidi3adddi): Likewise.
5065 (smulsi3_highpart): Likewise.
5066 (*smulsi3_highpart_nov6): Likewise.
5067 (umulsi3_highpart): Likewise.
5068 (*umulsi3_highpart_nov6): Likewise.
5069 * config/arm/arm.h (arm_arch3m): Delete.
5070 * config/arm/arm.c (arm_arch3m): Delete.
5071 (arm_option_override_internal): Update armv3-related comment.
5072 (arm_configure_build_target): Delete use of isa_bit_mode32.
5073 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
5074 (arm_rtx_costs_internal): Delete check of arm_arch3m.
5075 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
5077 (mulusa3): Likewise.
5078 * config/arm/arm-protos.h (arm_arch3m): Delete.
5079 * config/arm/arm-tables.opt: Regenerate.
5080 * config/arm/arm-tune.md: Likewise.
5081 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
5082 deleted architectures.
5084 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5086 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
5087 (armv5t, armv5te): New features.
5088 (ARMv5, ARMv5e): Delete fgroups.
5089 (ARMv5t, ARMv5te): Adjust for above changes.
5091 (armv5, armv5e): Delete arches.
5092 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
5094 (*call_reg_arm): Likewise.
5095 (*call_value_reg_armv5): Likewise.
5096 (*call_value_reg_arm): Likewise.
5097 (*call_symbol): Likewise.
5098 (*call_value_symbol): Likewise.
5099 (*sibcall_insn): Likewise.
5100 (*sibcall_value_insn): Likewise.
5102 (prefetch): Likewise.
5103 (define_split and define_peephole2 dependent on arm_arch5):
5105 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
5107 (TARGET_ARM_QBIT): Likewise.
5108 (TARGET_DSP_MULTIPLY): Likewise.
5109 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
5110 (arm_arch5, arm_arch5e): Delete.
5111 (arm_arch5t, arm_arch5te): Declare.
5112 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
5113 (arm_arch5t): Declare.
5114 (arm_option_reconfigure_globals): Update for the above.
5115 (arm_options_perform_arch_sanity_checks): Update comment, replace
5116 use of arm_arch5 with arm_arch5t.
5117 (use_return_insn): Likewise.
5118 (arm_emit_call_insn): Likewise.
5119 (output_return_instruction): Likewise.
5120 (arm_final_prescan_insn): Likewise.
5121 (arm_coproc_builtin_available): Likewise.
5122 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
5123 arm_arch5e with arm_arch5t and arm_arch5te.
5124 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
5125 (arm_arch5t, arm_arch5te): Declare.
5126 * config/arm/arm-tables.opt: Regenerate.
5127 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
5128 * config/arm/t-multilib: Likewise.
5129 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
5130 instead of arm_arch5.
5131 (*call_reg_thumb1): Likewise.
5132 (*call_value_reg_thumb1_v5): Likewise.
5133 (*call_value_reg_thumb1): Likewise.
5134 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
5136 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
5138 2018-05-18 Martin Liska <mliska@suse.cz>
5140 PR gcov-profile/84846
5141 * doc/gcov.texi: Document -t option of gcov tool.
5143 2018-05-18 Martin Liska <mliska@suse.cz>
5145 PR gcov-profile/84846
5146 * gcov.c (print_usage): Add new -t option.
5147 (process_args): Handle the option.
5148 (generate_results): Use stdout as output when requested by
5151 2018-05-18 Martin Liska <mliska@suse.cz>
5153 PR gcov-profile/84846
5154 * coverage.c (coverage_init): Write PWD to .gcno file.
5155 * doc/gcov.texi: Document how working directory is printed.
5156 * gcov-dump.c (dump_gcov_file): Print PWD.
5157 * gcov.c (output_intermediate_file): Likewise.
5158 (read_graph_file): Read PWD string.
5159 (output_lines): Print PWD.
5161 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5164 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
5165 for retval and return false if all args to phi are zero.
5167 2018-05-18 Richard Biener <rguenther@suse.de>
5169 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
5171 (evrp_dom_walker::before_dom_children): Call it.
5173 2018-05-18 Richard Biener <rguenther@suse.de>
5175 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
5176 results when processing array refs with variable index.
5178 2018-05-18 Toon Moene <toon@moene.org>
5180 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
5181 directly after that of -floop-interchange. Indicate that both
5182 options are enabled by default when specifying -O3.
5184 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5186 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
5187 iterator. Delete separate integer-mode vec_set<mode> expander.
5188 (aarch64_simd_vec_setv2di): Delete.
5189 (vec_setv2di): Delete.
5190 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
5191 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
5192 the "w, r" alternative.
5194 2018-05-18 Martin Liska <mliska@suse.cz>
5196 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
5197 * tree-pass.h (make_pass_lower_switch_O0): New function.
5198 * tree-switch-conversion.c (node_has_low_bound): Remove.
5199 (node_has_high_bound): Likewise.
5200 (node_is_bounded): Likewise.
5201 (class pass_lower_switch): Make it a template type and create
5203 (pass_lower_switch::execute): Add template argument.
5204 (make_pass_lower_switch): New function.
5205 (make_pass_lower_switch_O0): New function.
5206 (do_jump_if_equal): Remove.
5207 (emit_case_nodes): Simplify to just handle all 3 cases and leave
5208 all the hard work to tree optimization passes.
5210 2018-05-18 Martin Liska <mliska@suse.cz>
5212 * dbgcnt.c (limit_low): Renamed from limit.
5213 (limit_high): New variable.
5214 (dbg_cnt_is_enabled): Check for upper limit.
5215 (dbg_cnt): Adjust dumping.
5216 (dbg_cnt_set_limit_by_index): Add new argument for high
5218 (dbg_cnt_set_limit_by_name): Likewise.
5219 (dbg_cnt_process_single_pair): Parse new format.
5220 (dbg_cnt_process_opt): Use strtok.
5221 (dbg_cnt_list_all_counters): Remove 'value' and add
5223 * doc/invoke.texi: Document changes.
5225 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
5227 * doc/sourcebuild.texi (scalar_all_fma): Document.
5228 * tree.def (FMA_EXPR): Delete.
5229 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
5230 * internal-fn.c (ternary_direct): New macro.
5231 (expand_ternary_optab_fn): Likewise.
5232 (direct_ternary_optab_supported_p): Likewise.
5233 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
5234 * builtins.c (fold_builtin_fma): Delete.
5235 (fold_builtin_3): Don't call it.
5236 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
5237 * expr.c (expand_expr_real_2): Likewise.
5238 * fold-const.c (operand_equal_p): Likewise.
5239 (fold_ternary_loc): Likewise.
5240 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
5241 * gimple.c (DEFTREECODE): Likewise.
5242 * gimplify.c (gimplify_expr): Likewise.
5243 * optabs-tree.c (optab_for_tree_code): Likewise.
5244 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
5245 * tree-eh.c (operation_could_trap_p): Likewise.
5246 (stmt_could_throw_1_p): Likewise.
5247 * tree-inline.c (estimate_operator_cost): Likewise.
5248 * tree-pretty-print.c (dump_generic_node): Likewise.
5249 (op_code_prio): Likewise.
5250 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5251 * tree-ssa-operands.c (get_expr_operands): Likewise.
5252 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
5253 * fold-const-call.h (fold_fma): Delete.
5254 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
5255 CFN_FNMA and CFN_FNMS.
5257 * genmatch.c (combined_fn): New enum.
5258 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
5259 (commutative_op): New function.
5260 (commutate): Use it. Handle more than 2 operands.
5261 (dt_operand::gen_gimple_expr): Use commutative_op.
5262 (parser::parse_expr): Allow :c to be used with non-binary
5263 operators if the commutative operand is known.
5264 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
5265 CFN_FMS, CFN_FNMA and CFN_FNMS.
5266 (backprop::process_assign_use): Remove FMA_EXPR handling.
5267 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
5268 (gen_hsa_fma): New function.
5269 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
5270 IFN_FNMA and IFN_FNMS.
5271 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
5272 * gimple-fold.h (follow_all_ssa_edges): Declare.
5273 * gimple-fold.c (follow_all_ssa_edges): New function.
5274 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
5275 gimple_build interface and use follow_all_ssa_edges to fold the result.
5276 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
5277 instead of checking for optabs directly.
5278 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
5279 rather than FMA_EXPRs.
5280 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
5281 call to IFN_FMA instead of an FMA_EXPR.
5283 2018-05-17 Jim Wilson <jimw@sifive.com>
5285 * expr.c (do_tablejump): When converting index to Pmode, if we have a
5286 sign extended promoted subreg, and the range does not have the sign bit
5287 set, then do a sign extend.
5289 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
5290 test, check for sign extended subreg and/or constant operands, and
5291 do a sign extend in that case.
5293 2018-05-17 Steve Ellcey <sellcey@cavium.com>
5295 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
5296 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
5298 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
5299 Change logics_shift_reg to logics_shift_imm.
5300 (thunderx2t99_fp_loadpair_basic): Delete.
5301 (thunderx2t99_fp_storepair_basic): Delete.
5302 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
5303 (thunderx2t99_asimd_polynomial): Delete.
5304 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
5305 and neon_fp_mul_d_scalar_q.
5306 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
5307 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
5308 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
5309 (thunderx2t99_asimd_lut): Add missing tbl types.
5310 (thunderx2t99_asimd_ext): Delete.
5311 (thunderx2t99_asimd_load1_1_mult): Delete.
5312 (thunderx2t99_asimd_load1_2_mult): Delete.
5313 (thunderx2t99_asimd_load1_ldp): New.
5314 (thunderx2t99_asimd_load1): New.
5315 (thunderx2t99_asimd_load2): Add missing *load2* types.
5316 (thunderx2t99_asimd_load3): New.
5317 (thunderx2t99_asimd_load4): New.
5318 (thunderx2t99_asimd_store1_1_mult): Delete.
5319 (thunderx2t99_asimd_store1_2_mult): Delete.
5320 (thunderx2t99_asimd_store2_mult): Delete.
5321 (thunderx2t99_asimd_store2_onelane): Delete.
5322 (thunderx2t99_asimd_store_stp): New.
5323 (thunderx2t99_asimd_store1): New.
5324 (thunderx2t99_asimd_store2): New.
5325 (thunderx2t99_asimd_store3): New.
5326 (thunderx2t99_asimd_store4): New.
5328 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
5330 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
5331 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
5333 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
5334 Segher Boessenkool <segher@kernel.crashing.org>
5337 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
5340 2018-05-17 Richard Biener <rguenther@suse.de>
5342 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
5343 for pruning loop and prune defs feeding only already visited PHIs.
5345 2018-05-17 Richard Biener <rguenther@suse.de>
5347 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
5349 2018-05-17 Bin Cheng <bin.cheng@arm.com>
5350 Richard Biener <rguenther@suse.de>
5352 PR tree-optimization/85793
5353 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
5354 for VMAT_ELEMENTWISE.
5356 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
5358 * internal-fn.h (lookup_internal_fn): Declare
5359 * internal-fn.c (lookup_internal_fn): New function.
5360 * gimple.c (gimple_build_call_from_tree): Handle calls to
5362 * gimple-pretty-print.c (dump_gimple_call): Print "." before
5363 internal function names.
5364 * tree-pretty-print.c (dump_generic_node): Likewise.
5365 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
5367 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
5369 * gimple-fold.h (gimple_build): Make the function forms take
5370 combined_fn rather than built_in_function.
5371 (gimple_simplify): Likewise.
5372 * gimple-match-head.c (gimple_simplify): Likewise.
5373 * gimple-fold.c (gimple_build): Likewise.
5374 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
5375 rather than gimple_build_call_internal.
5376 (get_initial_defs_for_reduction): Likewise.
5377 (vect_create_epilog_for_reduction): Likewise.
5378 (vectorizable_live_operation): Likewise.
5380 2018-05-17 Martin Liska <mliska@suse.cz>
5382 * gimple-ssa-sprintf.c (format_directive): Do not use
5383 space in between 'G_' and '('.
5385 2018-05-17 Jakub Jelinek <jakub@redhat.com>
5388 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
5389 even if the mask is not all ones.
5392 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
5394 (ix86_gimple_fold_builtin): Likewise.
5397 * config/i386/i386.c: Include tree-vector-builder.h.
5398 (ix86_vector_shift_count): New function.
5399 (ix86_fold_builtin): Fold shift builtins by scalar count.
5400 (ix86_gimple_fold_builtin): Likewise.
5402 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
5403 _mm512_setzero): New intrinsics.
5405 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5406 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5408 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
5409 code generation for cases where splatting a value is not useful.
5410 * simplify-rtx.c (simplify_ternary_operation): Simplify
5411 vec_merge across a vec_duplicate and a paradoxical subreg forming
5412 a vector mode to a vec_concat.
5414 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
5416 * config.gcc: Support "goldmont-plus".
5417 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5419 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5420 PROCESSOR_GOLDMONT_PLUS.
5421 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
5422 (processor_target_table): Add "goldmont-plus".
5423 (PTA_GOLDMONT_PLUS): Define.
5424 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
5425 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
5426 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
5427 (fold_builtin_cpu): Add "goldmont-plus".
5428 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
5429 (ix86_option_override_internal): Add "goldmont-plus".
5430 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
5431 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
5432 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
5433 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
5435 2018-05-17 Richard Biener <rguenther@suse.de>
5437 PR tree-optimization/85757
5438 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
5439 remove defs that only feed that PHI from further processing.
5441 2018-05-16 Jim Wilson <jimw@sifive.com>
5443 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
5445 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
5447 2018-05-16 Mark Wielaard <mark@klomp.org>
5449 * dwarf2out.c (count_index_strings): New function.
5450 (output_indirect_strings): Call count_index_strings and generate
5451 header for dwarf_version >= 5.
5453 2018-05-16 Mark Wielaard <mark@klomp.org>
5455 * dwarf2out.c (dwarf_FORM): New function.
5456 (set_indirect_string): Use dwarf_FORM.
5457 (reset_indirect_string): Likewise.
5458 (size_of_die): Likewise.
5459 (value_format): Likewise.
5460 (output_die): Likewise.
5461 (add_skeleton_AT_string): Likewise.
5462 (output_macinfo_op): Likewise.
5463 (index_string): Likewise.
5464 (output_index_string_offset): Likewise.
5465 (output_index_string): Likewise.
5466 (count_index_strings): Likewise.
5468 2018-05-16 Carl Love <cel@us.ibm.com>
5470 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5471 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
5473 2018-05-16 Martin Jambor <mjambor@suse.cz>
5475 * ipa-prop.c (ipa_free_all_edge_args): Remove.
5476 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
5478 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
5480 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
5481 (fnma<mode>4): Likewise.
5482 (fms<mode>4): Likewise.
5483 (fnms<mode>4): Likewise.
5484 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
5485 (aarch64_fnma<mode>4): Likewise.
5486 (aarch64_fms<mode>4): Likewise.
5487 (aarch64_fnms<mode>4): Likewise.
5488 (aarch64_fnmadd<mode>4): Likewise.
5490 2018-05-16 Jason Merrill <jason@redhat.com>
5492 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
5494 2018-05-16 Richard Biener <rguenther@suse.de>
5496 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
5497 (dump_stmt_cost): Declare.
5498 (add_stmt_cost): Dump cost we add.
5499 (add_stmt_costs): New function.
5500 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
5502 (vect_analyze_stmt): Adjust prototype.
5503 (vectorizable_condition): Likewise.
5504 (vectorizable_live_operation): Likewise.
5505 (vectorizable_reduction): Likewise.
5506 (vectorizable_induction): Likewise.
5507 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
5508 cost vector to pass to vectorizable_ and record afterwards.
5509 (vect_model_reduction_cost): Take cost vector argument and adjust.
5510 (vect_model_induction_cost): Likewise.
5511 (vectorizable_reduction): Likewise.
5512 (vectorizable_induction): Likewise.
5513 (vectorizable_live_operation): Likewise.
5514 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
5515 SLP_TREE_NUMBER_OF_VEC_STMTS.
5516 (vect_analyze_slp_cost_1): Remove.
5517 (vect_analyze_slp_cost): Likewise.
5518 (vect_slp_analyze_node_operations): Take visited args and
5519 a target cost vector. Avoid processing already visited stmt sets.
5520 (vect_slp_analyze_operations): Use a local cost vector to gather
5521 costs and register those of non-discarded instances.
5522 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
5523 (vect_schedule_slp_instance): Remove copying of
5524 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
5526 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
5527 adding cost. Record cost entry location.
5528 (vect_prologue_cost_for_slp_op): Function to compute cost of
5529 a constant or invariant generated for SLP vect in the prologue,
5530 split out from vect_analyze_slp_cost_1.
5531 (vect_model_simple_cost): Make static. Adjust for SLP costing.
5532 (vect_model_promotion_demotion_cost): Likewise.
5533 (vect_model_store_cost): Likewise, make static.
5534 (vect_model_load_cost): Likewise.
5535 (vectorizable_bswap): Add cost vector arg and adjust.
5536 (vectorizable_call): Likewise.
5537 (vectorizable_simd_clone_call): Likewise.
5538 (vectorizable_conversion): Likewise.
5539 (vectorizable_assignment): Likewise.
5540 (vectorizable_shift): Likewise.
5541 (vectorizable_operation): Likewise.
5542 (vectorizable_store): Likewise.
5543 (vectorizable_load): Likewise.
5544 (vectorizable_condition): Likewise.
5545 (vectorizable_comparison): Likewise.
5546 (can_vectorize_live_stmts): Likewise.
5547 (vect_analyze_stmt): Likewise.
5548 (vect_transform_stmt): Adjust calls to vectorizable_*.
5549 * tree-vectorizer.c: Include gimple-pretty-print.h.
5550 (dump_stmt_cost): New function.
5552 2018-05-16 Richard Biener <rguenther@suse.de>
5554 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
5555 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
5556 * tree-ssa-dse.c: Include tree-ssa-loop.h.
5557 (check_name): New callback.
5558 (dse_classify_store): Track cycles via a visited bitmap of PHI
5559 defs and simplify handling of in-loop and across loop dead stores
5560 and properly fail for loop-variant refs. Handle byte-tracking with
5561 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
5564 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
5566 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
5567 (vect_get_mask_type_for_stmt): Likewise.
5568 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
5570 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
5571 to determine the statement's vector type and the vector type that
5572 should be used for calculating nunits. Deal with cases in which
5573 the type has to be deferred.
5574 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
5575 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
5576 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
5577 (vect_determine_vf_for_stmt): New functions, split out from...
5578 (vect_determine_vectorization_factor): ...here.
5579 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
5580 (vect_get_mask_type_for_stmt): New functions, split out from
5581 vect_determine_vectorization_factor.
5583 2018-05-16 Richard Biener <rguenther@suse.de>
5585 * tree-cfg.c (verify_gimple_assign_ternary): Properly
5586 verify the [VEC_]COND_EXPR embedded comparison.
5588 2018-05-15 Martin Sebor <msebor@redhat.com>
5590 PR tree-optimization/85753
5591 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
5592 RECORD_TYPE in addition to ARRAY_TYPE.
5594 2018-05-15 Martin Sebor <msebor@redhat.com>
5597 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
5599 2018-05-15 Richard Biener <rguenther@suse.de>
5601 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
5602 add by_clobber_p one. Change algorithm to collect all defs
5603 representing uses we need to walk and try reducing them to
5604 a single one before failing.
5605 (dse_dom_walker::dse_optimize_stmt): Adjust.
5607 2018-05-13 Mark Wielaard <mark@klomp.org>
5609 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
5610 (size_of_loc_descr): Likewise.
5611 (output_loc_operands): Likewise.
5612 (output_loc_operands_raw): Likewise.
5613 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
5614 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
5615 (hash_loc_operands): Likewise.
5616 (compare_loc_operands): Likewise.
5618 2018-05-14 Mark Wielaard <mark@klomp.org>
5620 * dwarf2out.c (count_index_addrs): New function.
5621 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
5623 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5625 PR tree-optimization/83648
5626 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
5627 return value as malloc candidate.
5629 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5632 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
5633 param as true in call to suggest_attribute.
5635 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
5637 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
5638 -mreadonly-in-sdata.
5640 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5642 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
5644 (aarch64_crypto_aesd_fused): Likewise.
5646 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
5648 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
5649 (movsi_aarch64): Likewise.
5650 (load_pairsi): Likewise.
5651 (load_pairdi): Likewise.
5652 (store_pairsi): Likewise.
5653 (store_pairdi): Likewise.
5654 (load_pairsf): Likewise.
5655 (load_pairdf): Likewise.
5656 (store_pairsf): Likewise.
5657 (store_pairdf): Likewise.
5658 (zero_extend): Likewise.
5659 (trunc): Swap alternatives.
5660 (fcvt_target): Add '?' to prefer w over r.
5662 2018-05-14 Jakub Jelinek <jakub@redhat.com>
5665 * config/i386/i386.md: Disallow non-commutative arithmetics in
5666 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
5667 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
5668 in the peephole2 before it.
5670 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
5672 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
5673 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
5674 (ix86_handle_option): Handle -mcldemote.
5675 * config.gcc: New header.
5676 * config/i386/cldemoteintrin.h: New file.
5677 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
5678 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5680 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5681 OPTION_MASK_ISA_CLDEMOTE.
5682 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
5683 (ix86_valid_target_attribute_inner_p): Ditto.
5684 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
5685 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
5686 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
5687 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
5688 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
5690 * config/i386/i386.opt: Add -mcldemote.
5691 * config/i386/x86intrin.h: New header.
5692 * doc/invoke.texi: Add -mcldemote.
5694 2018-05-14 Richard Biener <rguenther@suse.de>
5696 * doc/match-and-simplify.texi: Adjust :s documentation.
5698 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
5700 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
5701 intended memcpy size.
5702 (REORDER_45): Likewise.
5704 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
5706 * sort.cc: New file.
5707 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
5708 * vec.c (qsort_chk): Use gcc_qsort.
5709 * Makefile.in (OBJS-libcommon): Add sort.o.
5710 (build/sort.o): New target. Use it...
5711 (BUILD_RTL): ... here, and...
5712 (build/gencfn-macros): ... here, and...
5713 (build/genmatch): ... here.
5715 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
5716 Chung-Ju Wu <jasonwucj@gmail.com>
5718 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
5719 * config/nds32/nds32-graywolf.md: New file.
5720 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
5721 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
5723 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
5724 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
5725 * config/nds32/nds32.md (pipeline_model): Add graywolf.
5726 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
5727 * config/nds32/pipelines.md: Include n15 settings.
5729 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
5730 Chung-Ju Wu <jasonwucj@gmail.com>
5732 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
5733 * config/nds32/nds32-n13.md: New file.
5734 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
5735 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
5737 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
5738 * config/nds32/nds32.md (pipeline_model): Add n13.
5739 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
5740 * config/nds32/pipelines.md: Include n13 settings.
5742 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
5743 Chung-Ju Wu <jasonwucj@gmail.com>
5745 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
5746 * config/nds32/nds32-n10.md: New file.
5747 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
5748 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
5750 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
5751 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
5752 * config/nds32/nds32.md (pipeline_model): Add n10.
5753 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
5754 * config/nds32/pipelines.md: Include n10 settings.
5756 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
5757 Kito Cheng <kito.cheng@gmail.com>
5758 Chung-Ju Wu <jasonwucj@gmail.com>
5760 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
5761 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5762 Add enum values for DSP extension instructions.
5763 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
5765 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
5766 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
5768 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
5769 * config/nds32/nds32-dspext.md: New file for DSP implementation.
5770 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
5771 * config/nds32/nds32-intrinsic.md: Likewise.
5772 * config/nds32/nds32_intrinsic.h: Likewise.
5773 * config/nds32/nds32-md-auxiliary.c: Likewise.
5774 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
5775 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
5776 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
5777 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
5778 * config/nds32/nds32-protos.h: New declarations for DSP extension.
5779 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
5780 TYPE_DMAC in switch statement.
5781 * config/nds32/nds32.c: New checking and implementation for DSP
5782 extension instructions.
5783 * config/nds32/nds32.h: Likewise.
5784 * config/nds32/nds32.md: Likewise.
5785 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
5786 * config/nds32/predicates.md: Implement new predicates for DSP
5789 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
5791 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
5792 Reformat alternatives and attributes so it is easier to identify
5793 which constraints/attributes go with which instruction.
5794 (mov<mode>_hardfloat32, FMOVE64): Likewise.
5795 (mov<mode>_softfloat32, FMOVE64): Likewise.
5796 (mov<mode>_hardfloat64, FMOVE64): Likewise.
5797 (mov<mode>_softfloat64, FMOVE64): Likewise.
5799 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
5801 * doc/extend.texi (PowerPC Built-in Functions): Rename this
5803 (Basic PowerPC Built-in Functions): The new name of the
5804 subsection previously known as "PowerPC Built-in Functions".
5805 (Basic PowerPC Built-in Functions Available on all Configurations):
5807 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
5808 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
5809 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
5810 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
5812 2018-05-11 Martin Jambor <mjambor@suse.cz>
5815 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
5818 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
5821 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
5823 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
5825 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
5826 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
5827 (ix86_handle_option): Handle -mwaitpkg.
5828 * config.gcc: New header.
5829 * config/i386/cpuid.h (bit_WAITPKG): New bit.
5830 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
5831 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
5833 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5834 OPTION_MASK_ISA_WAITPKG.
5835 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
5836 (ix86_option_override_internal): Add PTA_WAITPKG.
5837 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
5838 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
5839 IX86_BUILTIN_TPAUSE.
5840 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
5841 __builtin_ia32_umwait and __builtin_ia32_tpause.
5842 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
5843 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
5844 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
5845 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
5846 UNSPECV_TPAUSE): New.
5847 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
5848 * config/i386/i386.opt: Add -mwaitpkg.
5849 * config/i386/waitpkgintrin.h: New file.
5850 * config/i386/x86intrin.h: New header.
5851 * doc/invoke.texi: Add -mwaitpkg.
5853 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
5856 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
5858 (cortex-m0): Use armv6s-m isa.
5859 (cortex-m0plus): Likewise.
5860 (cortex-m1): Likewise.
5861 (cortex-m0.small-multiply): Likewise.
5862 (cortex-m0plus.small-multiply): Likewise.
5863 (cortex-m1.small-multiply): Likewise.
5865 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
5866 Jakub Jelinek <jakub@redhat.com>
5868 PR tree-optimization/85692
5869 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
5870 source permute as well.
5872 2018-05-11 Martin Liska <mliska@suse.cz>
5875 * doc/extend.texi: Document LLVM style format for no_sanitize
5878 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
5880 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
5881 mode_supports_vsx_dform_quad to mode_supports_dq_form.
5882 (mode_supports_vsx_dform_quad): Likewise.
5883 (mode_supports_vmx_dform): Move these functions to be next to the
5884 other mode_supports functions.
5885 (mode_supports_dq_form): Likewise.
5886 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
5887 mode_supports_dq_form.
5888 (reg_offset_addressing_ok_p): Likewise.
5889 (offsettable_ok_by_alignment): Likewise.
5890 (rs6000_legitimate_offset_address_p): Likewise.
5891 (legitimate_lo_sum_address_p): Likewise.
5892 (rs6000_legitimize_address): Likewise.
5893 (rs6000_legitimize_reload_address): Likewise.
5894 (rs6000_secondary_reload_inner): Likewise.
5895 (rs6000_preferred_reload_class): Likewise.
5896 (rs6000_output_move_128bit): Likewise.
5898 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
5900 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
5901 Generate SImode target register for null target.
5902 <case IX86_BUILTIN_XGETBV>: Ditto.
5903 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
5904 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
5906 2018-05-10 Carl Love <cel@us.ibm.com>
5908 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5909 dcbtt and dcbtstt if operands[2] is 0.
5911 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
5914 * config/i386/sse.md (usadv64qi): New expander.
5916 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
5918 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
5919 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
5920 -maltivec=be support.
5921 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
5922 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
5923 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
5924 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
5925 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
5926 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
5927 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
5928 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
5929 altivec_vsumsws): Adjust.
5930 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
5931 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
5932 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
5934 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
5935 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
5936 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
5937 (altivec_lve<VI_char>x): Delete expand.
5938 (*altivec_lve<VI_char>x_internal): Rename to...
5939 (altivec_lve<VI_char>x): ... this.
5940 (altivec_lvxl_<mode>): Delete expand.
5941 (*altivec_lvxl_<mode>_internal): Rename to ...
5942 (altivec_lvxl_<mode>): ... this.
5943 (altivec_stvxl_<mode>): Delete expand.
5944 (*altivec_stvxl_<mode>_internal): Rename to ...
5945 (altivec_stvxl_<mode>): ... this.
5946 (altivec_stve<VI_char>x): Delete expand.
5947 (*altivec_stve<VI_char>x_internal): Rename to ...
5948 (altivec_stve<VI_char>x): ... this.
5949 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
5950 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
5951 reduc_plus_scal_<mode>): Adjust.
5952 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
5954 (rs6000_cpu_cpp_builtins): Adjust.
5955 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
5956 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
5957 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
5958 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
5959 -maltivec=be support.
5960 (rs6000_split_vec_extract_var): Adjust.
5961 (rs6000_split_v4si_init): Adjust.
5962 (swap_selector_for_mode): Delete.
5963 (altivec_expand_lvx_be, altivec_expand_stvx_be,
5964 altivec_expand_stvex_be): Delete.
5965 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
5966 -maltivec=be support.
5967 (rs6000_gimple_fold_builtin): Ditto.
5968 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
5970 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
5971 (TARGET_DIRECT_MOVE_64BIT): Adjust.
5972 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
5973 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
5974 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
5975 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
5976 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
5977 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
5978 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
5979 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
5980 anonymous split): Adjust.
5981 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
5982 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
5984 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
5986 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
5987 when --with-gxx-include-dir is also specified.
5988 * configure: Regenerate.
5990 2018-05-09 Jim Wilson <jimw@sifive.com>
5993 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
5994 * config/riscv/t-withmultilib: New.
5995 * config/riscv/withmultilib.h: New.
5996 * doc/install.texi: Document RISC-V --with-multilib-list support.
5998 2018-05-09 Richard Biener <rguenther@suse.de>
6000 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
6002 (vect_bb_vectorization_profitable_p): Adjust. Compute
6003 actual scalar cost using the cost vector and the add_stmt_cost
6006 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6008 PR rtl-optimization/85645
6009 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
6010 in the REG_CFA_REGISTER note for LR, don't leave it empty.
6012 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6014 PR rtl-optimization/85645
6015 * shrink-wrap.c (spread_components): Return a boolean saying if
6016 anything was changed.
6017 (try_shrink_wrapping_separate): Iterate spread_components until
6018 nothing changes anymore.
6020 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6022 PR rtl-optimization/85645
6023 * regrename.c (build_def_use): Also kill the chains that include the
6024 destination of a REG_CFA_REGISTER note.
6026 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6028 PR rtl-optimization/85645
6029 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
6030 insn that has a REG_CFA_REGISTER note.
6032 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
6034 * cfgexpand.c (expand_clobber): New function.
6035 (expand_gimple_stmt_1): Use it.
6036 * tree-vect-stmts.c (vect_clobber_variable): New function,
6038 (vectorizable_simd_clone_call): ...here.
6039 (vectorizable_store): Emit a clobber either side of an
6040 IFN_STORE_LANES sequence.
6041 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
6043 2018-05-09 Tom de Vries <tom@codesourcery.com>
6046 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
6047 (define_insn "trap_if_false"): Add exit after trap.
6049 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
6051 PR rtl-optimization/85638
6052 * bb-reorder.c: Include common/common-target.h.
6053 (create_forwarder_block): New function extracted from...
6054 (fix_up_crossing_landing_pad): ...here. Rename into...
6055 (dw2_fix_up_crossing_landing_pad): ...this.
6056 (sjlj_fix_up_crossing_landing_pad): New function.
6057 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
6058 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
6059 from both partitions and exit the loop after one iteration.
6061 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
6064 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6066 (Basic PowerPC Built-in Functions): The new name of the
6067 subsection previously known as "PowerPC Built-in Functions".
6068 (Basic PowerPC Built-in Functions Available on all Configurations):
6070 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6072 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6074 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6076 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6079 2018-05-08 Jim Wilson <jimw@sifive.com>
6081 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
6082 (LD_EMUL_SUFFIX): New.
6083 (LINK_SPEC): Use it.
6085 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
6087 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6089 (Basic PowerPC Built-in Functions): The new name of the
6090 subsection previously known as "PowerPC Built-in Functions".
6091 (Basic PowerPC Built-in Functions Available on all Configurations):
6093 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6095 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6097 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6099 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6102 2018-05-08 Jakub Jelinek <jakub@redhat.com>
6105 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
6106 after cmpelim optimization.
6108 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
6110 * config.gcc: Support "goldmont".
6111 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
6112 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6114 * config/i386/i386.c (m_GOLDMONT): Define.
6115 (processor_target_table): Add "goldmont".
6116 (PTA_GOLDMONT): Define.
6117 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
6118 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
6119 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
6120 (fold_builtin_cpu): Add "goldmont".
6121 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
6122 (ix86_option_override_internal): Add "goldmont".
6123 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
6124 (processor_type): Add PROCESSOR_GOLDMONT.
6125 * config/i386/i386.md: Add CPU "glm".
6126 * config/i386/glm.md: New file.
6127 * config/i386/x86-tune.def: Add m_GOLDMONT.
6128 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
6130 2018-05-08 Jakub Jelinek <jakub@redhat.com>
6133 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
6135 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
6136 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
6137 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
6140 * config/i386/i386.c (ix86_fold_builtin): Handle
6141 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
6144 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
6145 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
6147 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
6150 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
6151 (check_arch): Likewise.
6152 (check_fpu): Return the result rather than printing it.
6153 (end arch): Fix operator precedence.
6154 (end cpu): Likewise.
6155 (END): Print the result from check_fpu.
6157 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
6158 Alan Hayward <alan.hayward@arm.com>
6159 David Sherwood <david.sherwood@arm.com>
6161 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
6162 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
6163 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
6164 (*fcmuo<mode>_and): New patterns.
6166 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
6168 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
6169 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
6170 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
6171 (cmp_op, sve_imm_con): New code attributes.
6172 (SVE_COND_INT_CMP, imm_con): Delete.
6173 (cmp_op): Remove above unspecs from int attribute.
6174 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
6176 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
6177 comparison-specific unspecs.
6178 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
6179 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
6180 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
6181 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
6182 (*vec_fcm<cmp_op><mode>): Rename to...
6183 (*fcm<cmp_op><mode>): ...this and adjust likewise.
6184 (*vec_fcmuo<mode>): Rename to...
6185 (*fcmuo<mode>): ...this and adjust likewise.
6186 (*pred_fcm<cmp_op><mode>): New pattern.
6187 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
6188 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
6190 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
6192 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
6193 (aarch64_emit_sve_predicated_cond): New function.
6194 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
6195 (aarch64_emit_unspec_cond_or): Replace with...
6196 (aarch64_emit_sve_or_conds): ...this new function. Use
6197 aarch64_emit_sve_ptrue_op for the individual comparisons and
6198 aarch64_emit_binop to OR them together.
6199 (aarch64_emit_inverted_unspec_cond): Replace with...
6200 (aarch64_emit_sve_inverted_cond): ...this new function. Use
6201 aarch64_emit_sve_ptrue_op for the comparison and
6202 aarch64_emit_unop to invert the result.
6203 (aarch64_expand_sve_vec_cmp_float): Update after the above
6204 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
6206 2018-05-07 Nathan Sidwell <nathan@acm.org>
6208 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
6209 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
6210 (Backwards Compatibility): Likewise.
6212 2018-05-07 Luis Machado <luis.machado@linaro.org>
6216 2018-05-07 Luis Machado <luis.machado@linaro.org>
6218 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6219 <prefetch_dynamic_strides>: New const bool field.
6220 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6221 prefetch_dynamic_strides.
6222 (exynosm1_prefetch_tune): Likewise.
6223 (thunderxt88_prefetch_tune): Likewise.
6224 (thunderx_prefetch_tune): Likewise.
6225 (thunderx2t99_prefetch_tune): Likewise.
6226 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6228 (aarch64_override_options_internal): Update to set
6229 PARAM_PREFETCH_DYNAMIC_STRIDES.
6230 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6231 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6232 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6233 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6234 prefetch-dynamic-strides setting.
6236 2018-05-07 Luis Machado <luis.machado@linaro.org>
6238 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6239 <minimum_stride>: New const int field.
6240 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6241 minimum_stride field.
6242 (exynosm1_prefetch_tune): Likewise.
6243 (thunderxt88_prefetch_tune): Likewise.
6244 (thunderx_prefetch_tune): Likewise.
6245 (thunderx2t99_prefetch_tune): Likewise.
6246 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6247 (aarch64_override_options_internal): Update to set
6248 PARAM_PREFETCH_MINIMUM_STRIDE.
6249 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6250 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6251 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6252 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6253 stride is constant and is below the minimum stride threshold.
6255 2018-05-07 Luis Machado <luis.machado@linaro.org>
6257 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
6260 2018-05-07 Luis Machado <luis.machado@linaro.org>
6262 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6263 <prefetch_dynamic_strides>: New const bool field.
6264 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6265 prefetch_dynamic_strides.
6266 (exynosm1_prefetch_tune): Likewise.
6267 (thunderxt88_prefetch_tune): Likewise.
6268 (thunderx_prefetch_tune): Likewise.
6269 (thunderx2t99_prefetch_tune): Likewise.
6270 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6272 (aarch64_override_options_internal): Update to set
6273 PARAM_PREFETCH_DYNAMIC_STRIDES.
6274 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6275 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6276 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6277 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6278 prefetch-dynamic-strides setting.
6280 2018-05-07 Luis Machado <luis.machado@linaro.org>
6282 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6283 <minimum_stride>: New const int field.
6284 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6285 minimum_stride field.
6286 (exynosm1_prefetch_tune): Likewise.
6287 (thunderxt88_prefetch_tune): Likewise.
6288 (thunderx_prefetch_tune): Likewise.
6289 (thunderx2t99_prefetch_tune): Likewise.
6290 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6291 (aarch64_override_options_internal): Update to set
6292 PARAM_PREFETCH_MINIMUM_STRIDE.
6293 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6294 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6295 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6296 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6297 stride is constant and is below the minimum stride threshold.
6299 2018-05-06 Jakub Jelinek <jakub@redhat.com>
6302 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
6303 the type is addressable. Don't force op into register if it has
6306 2018-05-05 Roland McGrath <mcgrathr@google.com>
6309 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
6310 any section for which we don't know a specific type it should have,
6311 regardless of name. Previously this was done only for the exact
6312 names ".init_array", ".fini_array", and ".preinit_array".
6313 (default_elf_asm_named_section): Add comment about
6314 relationship with default_section_type_flags and SECTION_NOTYPE.
6315 (get_section): Don't consider it a type conflict if one side has
6316 SECTION_NOTYPE and the other doesn't, as long as neither has the
6317 SECTION_BSS et al used in the default_section_type_flags logic.
6319 2018-05-05 Tom de Vries <tom@codesourcery.com>
6322 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
6323 (workaround_barsyncs): New function.
6324 (nvptx_reorg): Use workaround_barsyncs.
6325 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
6326 (define_expand "nvptx_membar_cta"): New define_expand.
6327 (define_insn "*nvptx_membar_cta"): New insn.
6329 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
6331 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
6332 To improve optimization opportunities.
6333 * builtin-types.def: The new needed builtin types for the above.
6335 2018-05-04 Richard Biener <rguenther@suse.de>
6337 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
6338 * gimple-ssa-store-merging.c
6339 (imm_store_chain_info::output_merged_store): Remove redundant create,
6340 release split_store vector contents on failure.
6341 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
6342 scalar stmt vector on cache hit.
6344 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
6346 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
6348 * config.gcc (powerpc-xilinx-eabi*): Remove.
6349 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
6351 (fusion_addis_mem_combo_load): Ditto.
6352 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
6354 (rs6000_cpu_cpp_builtins): Ditto.
6355 * config/rs6000/rs6000-linux.c
6356 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
6357 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
6358 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
6360 (rs6000_setup_reg_addr_masks): Ditto.
6361 (rs6000_init_hard_regno_mode_ok): Ditto.
6362 (rs6000_option_override_internal): Ditto.
6363 (legitimate_lo_sum_address_p): Ditto.
6364 (rs6000_legitimize_address): Ditto.
6365 (rs6000_legitimize_reload_address): Ditto.
6366 (rs6000_legitimate_address_p): Ditto.
6367 (abi_v4_pass_in_fpr): Ditto.
6368 (setup_incoming_varargs): Ditto.
6369 (rs6000_gimplify_va_arg): Ditto.
6370 (rs6000_split_multireg_move): Ditto.
6371 (rs6000_savres_strategy): Ditto.
6372 (rs6000_emit_prologue_components): Ditto.
6373 (rs6000_emit_epilogue_components): Ditto.
6374 (rs6000_emit_prologue): Ditto.
6375 (rs6000_emit_epilogue): Ditto.
6376 (rs6000_elf_file_end): Ditto.
6377 (rs6000_function_value): Ditto.
6378 (rs6000_libcall_value): Ditto.
6379 * config/rs6000/rs6000.h: Ditto.
6380 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
6381 (TARGET_MINMAX): ... this. New.
6382 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
6383 * config/rs6000/rs6000.md: Remove Xilinx FP support.
6384 (*movsi_internal1_single): Delete.
6385 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
6386 mfpu=, mxilinx-fpu): Delete.
6387 * config/rs6000/singlefp.h: Delete.
6388 * config/rs6000/sysv4.h: Remove Xilinx FP support.
6389 * config/rs6000/t-rs6000: Ditto.
6390 * config/rs6000/t-xilinx: Delete.
6391 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
6392 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
6393 (VStype_simple): Delete.
6394 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
6395 * config/rs6000/xfpu.h: Delete.
6396 * config/rs6000/xfpu.md: Delete.
6397 * config/rs6000/xilinx.h: Delete.
6398 * config/rs6000/xilinx.opt: Delete.
6399 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
6400 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
6402 2018-05-04 Tom de Vries <tom@codesourcery.com>
6405 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
6408 2018-05-04 Richard Biener <rguenther@suse.de>
6411 * tree-complex.c (update_complex_assignment): We are always in SSA form.
6412 (expand_complex_div_wide): Likewise.
6413 (expand_complex_operations_1): Likewise.
6414 (expand_complex_libcall): Preserve EH info of the original stmt.
6415 (tree_lower_complex): Handle removed blocks.
6416 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
6417 on complex multiplication and division libcall builtins.
6419 2018-05-04 Richard Biener <rguenther@suse.de>
6422 * fold-const.c (negate_expr_p): Restrict negation of operand
6423 zero of a division to when we know that can happen without
6425 (fold_negate_expr_1): Likewise.
6427 2018-05-04 Jakub Jelinek <jakub@redhat.com>
6430 * real.h (real_nextafter): Declare.
6431 * real.c (real_nextafter): New function.
6432 * fold-const-call.c (fold_const_nextafter): New function.
6433 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
6434 CASE_CFN_NEXTTOWARD.
6435 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
6436 even when arg1_mode is different from arg0_mode.
6438 2018-05-03 Nathan Sidwell <nathan@acm.org>
6440 * doc/extend.texi (Deprecated Features): Remove
6442 (Backwards Compatibility): Likewise.
6443 * doc/invoke.texi (C++ Language Options): Likewise.
6444 (C++ Dialect Options): Likewise.
6446 2018-05-03 Jakub Jelinek <jakub@redhat.com>
6449 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
6450 _mm512_mask_mullox_epi64): New intrinsics.
6452 2018-05-03 Tom de Vries <tom@codesourcery.com>
6455 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6456 dump files): Add offload-tree.
6458 2018-05-03 Richard Biener <rguenther@suse.de>
6460 PR tree-optimization/85615
6461 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
6462 to loops not nested in BBs loop father to avoid creating multi-entry
6465 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6467 PR tree-optimization/70291
6468 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
6469 arguments. Change return type to tree. Emit libcall as a new
6470 statement rather than replacing existing one when inplace_p is true.
6471 (expand_complex_multiplication_components): New function.
6472 (expand_complex_multiplication): Expand floating-point complex
6473 multiplication using the above.
6474 (expand_complex_division): Rename inner_type parameter to type.
6475 Update expand_complex_libcall call-site.
6476 (expand_complex_operations_1): Update expand_complex_multiplication
6477 and expand_complex_division call-sites.
6479 2018-05-02 Jakub Jelinek <jakub@redhat.com>
6482 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6483 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6484 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
6485 the highest significant bit of the shift count mask is clear. In
6486 check whether and[sq]i3 is needed verify that all significant bits
6487 of the shift count other than the highest are set.
6489 2018-05-02 Tom de Vries <tom@codesourcery.com>
6492 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
6493 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
6494 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
6495 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
6496 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
6497 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
6498 __builtin_goacc_parlevel_size.
6500 2018-05-02 Richard Biener <rguenther@suse.de>
6502 PR tree-optimization/85597
6503 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
6504 do not use split vect_get_vec_defs call but call vect_get_slp_defs
6507 2018-05-02 Tom de Vries <tom@codesourcery.com>
6510 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6511 dump files): Add ltrans-tree.
6513 2018-05-02 Tom de Vries <tom@codesourcery.com>
6516 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6517 dump files): Add wpa-ipa.
6519 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
6521 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
6522 powerpc*-*-linux*paired* target.
6523 * config/rs6000/750cl.h: Delete.
6524 * config/rs6000/paired.h: Delete.
6525 * config/rs6000/paired.md: Delete.
6526 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
6528 * config/rs6000/rs6000-builtin.def: Remove paired float support.
6529 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
6530 comment. Remove paired float support.
6531 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
6532 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6534 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
6535 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
6537 * config/rs6000/rs6000.c: Remove paired float support.
6538 (paired_expand_vector_init, paired_expand_vector_move,
6539 paired_emit_vector_compare, paired_emit_vector_cond_expr,
6540 (paired_expand_lv_builtin, paired_expand_stv_builtin,
6541 paired_expand_builtin, paired_expand_predicate_builtin,
6542 paired_init_builtins): Delete.
6543 * config/rs6000/rs6000.h: Remove paired float support.
6544 * config/rs6000/rs6000.md: Remove paired float support.
6545 (move_from_CR_ov_bit): Delete.
6546 * config/rs6000/rs6000.opt (mpaired): Delete.
6547 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
6548 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
6550 2018-05-02 Richard Biener <rguenther@suse.de>
6553 * gimplify.c (gimplify_save_expr): When in SSA form allow
6554 SAVE_EXPRs to compute to SSA vars.
6556 2018-05-02 Jakub Jelinek <jakub@redhat.com>
6559 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6560 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6561 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
6562 clobber operands[2], instead use a new pseudo. Formatting fixes.
6564 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
6566 PR tree-optimization/85586
6567 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
6568 exit early for statements in the same group if the accesses are
6571 2018-05-02 Tom de Vries <tom@codesourcery.com>
6574 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
6577 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
6579 PR tree-optimization/85143
6580 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
6582 2018-05-01 Tom de Vries <tom@codesourcery.com>
6585 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
6586 not found" error message.
6588 2018-05-01 Tom de Vries <tom@codesourcery.com>
6591 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
6592 * vec.c (test_ordered_remove_if): New function.
6593 (vec_c_tests): Call test_ordered_remove_if.
6594 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
6595 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
6596 * tree-vect-patterns.c (vect_pattern_recog_1): Use
6597 VEC_ORDERED_REMOVE_IF.
6599 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6601 PR tree-optimization/82665
6602 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
6603 pointer subtraction where arguments come from a memchr call.
6605 2018-05-01 Jakub Jelinek <jakub@redhat.com>
6607 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
6608 --push-state --as-needed and --pop-state instead of --as-needed and
6609 --no-as-needed if ld supports it.
6610 * configure: Regenerated.
6613 * doc/install.texi2html: Replace _002d with - and _002a with * in
6614 generated html files using sed.
6616 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6619 * gcc-rich-location.c (blank_line_before_p): New function.
6620 (use_new_line): New function.
6621 (gcc_rich_location::add_fixit_insert_formatted): New function.
6622 * gcc-rich-location.h
6623 (gcc_rich_location::add_fixit_insert_formatted): New function.
6625 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6627 * selftest.c (assert_streq): Rename "expected" and "actual" to
6628 "val1" and "val2". Extend NULL-handling to cover both inputs
6629 symmetrically, while still requiring both to be non-NULL for a pass.
6630 * selftest.h (assert_streq): Rename "expected" and "actual" to
6632 (ASSERT_EQ): Likewise.
6633 (ASSERT_EQ_AT): Likewise.
6634 (ASSERT_KNOWN_EQ): Likewise.
6635 (ASSERT_KNOWN_EQ_AT): Likewise.
6636 (ASSERT_NE): Likewise.
6637 (ASSERT_MAYBE_NE): Likewise.
6638 (ASSERT_MAYBE_NE_AT): Likewise.
6639 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
6640 the assertion to pass.
6641 (ASSERT_STREQ_AT): Likewise.
6643 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
6645 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
6646 interaction with -pie.
6648 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6650 * selftest.h: Fix alphabetization of per-source-file selftest
6653 2018-04-30 Jason Merrill <jason@redhat.com>
6655 PR c++/61982 - dead stores to destroyed objects.
6656 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
6659 2018-04-30 Jason Merrill <jason@redhat.com>
6661 * tree.c (build_clobber): New.
6662 * tree.h: Declare it.
6663 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
6665 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6667 * diagnostic-show-locus.c (layout::layout): Update for
6668 location_get_source_line returning a char_span.
6669 (struct char_span): Move to input.h.
6670 (struct correction): Update for fields in char_span becoming
6672 (struct source_line): Update for location_get_source_line
6673 returning a char_span.
6674 (layout::print_line): Likewise.
6675 * edit-context.c (edited_file::print_content): Likewise.
6676 (edited_file::print_diff_hunk): Likewise.
6677 (edited_file::print_run_of_changed_lines): Likewise.
6678 (edited_file::get_num_lines): Likewise.
6679 (edited_line::edited_line): Likewise.
6680 * final.c (asm_show_source): Likewise.
6681 * input.c (location_get_source_line): Convert return type
6682 from const char * to char_span, losing the final "line_len"
6684 (dump_location_info): Update for the above.
6685 (get_substring_ranges_for_loc): Likewise. Use a char_span
6686 when handling the literal within the line.
6687 (test_reading_source_line): Update for location_get_source_line
6688 returning a char_span.
6689 * input.h (class char_span): Move here from
6690 diagnostic-show-locus.c, converting from a struct to a class.
6691 Make data members private.
6692 (char_span::operator bool): New.
6693 (char_span::length): New.
6694 (char_span::get_buffer): New.
6695 (char_span::operator[]): New.
6696 (char_span::subspan): Make const.
6697 (char_span::xstrdup): New.
6698 (location_get_source_line): Convert return type from const char *
6699 to char_span, losing the final "line_size" param.
6701 2018-04-30 Jan Hubicka <jh@suse.cz>
6703 * lto-wrapper.c (ltrans_priorities): New static var.
6704 (cmp_priority): New.
6705 (run_gcc): Read priorities and if doing parallel build order
6706 the Makefile by them.
6708 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6710 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
6712 2018-04-30 Richard Biener <rguenther@suse.de>
6714 * tree-cfg.c (verify_address): Remove base argument, add
6715 flag whether to check TREE_ADDRESSABLE and do that.
6716 (verify_expr): Remove.
6717 (verify_types_in_gimple_reference): Add pieces from verify_expr.
6718 (verify_gimple_assign_single): Likewise.
6719 (verify_gimple_switch): Likewise.
6720 (verify_expr_location_1): Dereference tp once. Add (disabled)
6721 piece from verify_expr.
6722 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
6724 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
6726 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
6728 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
6730 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
6731 (small_data_pattern): Likewise.
6732 (arc_rewrite_small_data): Likewise.
6733 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
6734 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
6735 (get_symbol_alignment): New function.
6736 (legitimate_small_data_address_p): Likewise.
6737 (legitimate_scaled_address): Update, call
6738 legitimate_small_data_address_p.
6739 (output_sdata): New static variable.
6740 (arc_print_operand): Update how we handle small data operands.
6741 (arc_print_operand_address): Likewise.
6742 (arc_legitimate_address_p): Update, use
6743 legitimate_small_data_address_p.
6744 (arc_rewrite_small_data_p): Remove.
6745 (arc_rewrite_small_data_1): Likewise.
6746 (arc_rewrite_small_data): Likewise.
6747 (small_data_pattern): Likewise.
6748 (compact_sda_memory_operand): Update to use
6749 legitimate_small_data_address_p and get_symbol_alignment.
6750 (prepare_move_operands): Don't rewite sdata pattern.
6751 (prepare_extend_operands): Remove.
6752 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
6754 (zero_extendqisi2): Likewise.
6755 (zero_extendhisi2): Likewise.
6756 (extendqihi2): Likewise.
6757 (extendqisi2): Likewise.
6758 (extendhisi2): Likewise.
6762 * config/arc/constraints.md (Usd): Change it to memory constraint.
6764 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
6766 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
6767 as source of std instructions.
6768 * config/arc/arc.md (movsi_insn): Update pattern predicate to
6769 allow 6-bit constants as source for store instructions.
6770 (movdi_insn): Update instruction pattern to allow 6-bit constants
6771 as source for store instructions.
6773 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
6775 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
6777 2018-04-30 Nathan Sidwell <nathan@acm.org>
6778 Sandra Loosemore <sandra@codesourcery.com>
6780 * dumpfile.c (dump_open): Allow '-' for stdout.
6781 * doc/invoke.texi (Developer Options): Document dump filename
6782 determination early. Document stdin/stdout selection.
6784 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
6786 Microblaze Target: PIC data text relative
6788 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
6789 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
6791 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
6792 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
6793 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
6794 New addressing mode for data-text relative position indepenedent code.
6795 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
6796 'ADDRESS_SYMBOLIC_TXT_REL'.
6797 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
6798 (microblaze_legitimate_pic_operand): Exclude function calls from
6799 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
6800 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
6802 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6803 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6804 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
6805 for 'address + offset'.
6806 (microblaze_expand_prologue): Add new function prologue call for
6808 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
6809 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
6810 table in case of TARGET_PIC_DATA_TEXT_REL.
6811 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
6812 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
6813 Add new macros 'UNSPEC_TEXT',
6814 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
6815 + exclude function calls from 'UNSPEC_PLT' in case of data text
6817 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6818 new target hook for generating address diff vector tables in case of
6820 * doc/tm.texi : Regenerate.
6821 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
6822 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
6823 of addr diff vector generation.
6824 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6825 target hook definition.
6826 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
6827 Add default function for generate_pic_addr_diff_vec -> flag_pic.
6828 * doc/invoke.texi (Add new pic option): Add new microblaze pic
6829 option for data text relative.
6831 2018-04-30 Richard Biener <rguenther@suse.de>
6833 * tree-chrec.h (evolution_function_is_constant_p): Remove
6835 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
6837 2018-04-30 Richard Biener <rguenther@suse.de>
6840 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
6842 2018-04-30 Richard Biener <rguenther@suse.de>
6844 PR tree-optimization/28364
6845 PR tree-optimization/85275
6846 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
6847 copying first exit test.
6849 2018-04-28 Mark Wielaard <mark@klomp.org>
6851 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
6853 (dwarf_AT): Handle DW_AT_addr_base.
6854 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
6856 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
6859 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
6860 (*ashl<dwi>3_doubleword_mask_1): Ditto.
6861 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
6862 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
6864 2018-04-28 Richard Biener <rguenther@suse.de>
6866 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
6867 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
6868 to reflect use. Only add interesting stmts.
6870 2018-04-27 Martin Jambor <mjambor@suse.cz>
6873 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
6874 the jump function allows for passing through aggregate values.
6876 2018-04-27 David Malcolm <dmalcolm@redhat.com>
6878 * input.h (in_system_header_at): Convert from macro to inline
6880 (from_macro_expansion_at): Likewise.
6881 (from_macro_definition_at): Likewise.
6883 2018-04-27 Jeff Law <law@redhat.com>
6885 * config.gcc: Mark tile* targets as deprecated/obsolete.
6887 2018-04-27 Richard Biener <rguenther@suse.de>
6889 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
6892 2018-04-27 Richard Biener <rguenther@suse.de>
6894 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
6896 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
6898 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
6899 with Yd constraint. Set "preferred_for_speed" attribute from
6900 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
6902 (*movdi_internal): Ditto.
6903 (movti_interunit splitters): Remove
6904 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
6905 (movdi_interunit splitters): Ditto.
6906 * config/i386/constraints.md (Ye): Remove.
6907 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
6909 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6912 * config/aarch64/constraints.md (Usg): Limit to 31.
6915 2018-04-27 Jakub Jelinek <jakub@redhat.com>
6917 PR tree-optimization/85529
6918 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
6919 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
6920 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
6921 zero extension or masking of the MSB bit.
6922 (optimize_range_tests): Add FIRST_BB argument, pass it through
6923 to optimize_range_tests_var_bound.
6924 (maybe_optimize_range_tests, reassociate_bb): Adjust
6925 optimize_range_tests callers.
6927 2018-04-26 Richard Biener <rguenther@suse.de>
6928 Jakub Jelinek <jakub@redhat.com>
6930 * cgraph.h (symbol_table): Just declare debug method here.
6931 * symtab.c (symbol_table::debug): Define.
6933 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
6935 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
6937 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
6939 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
6940 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
6941 (*movdi_internal): Substitute Yi and Yj constraint with x
6942 and Ym and Yn constraint with y constraint. Update "isa"
6943 attribute and set "preferred_for_speed" attribute from
6944 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
6945 (*movsi_internal): Ditto.
6946 (*movdf_internal): Ditto.
6947 (*movsf_internal): Ditto.
6948 (*zero_extendsidi2): Ditto.
6949 * config/i386/sse.md (vec_set<mode>_0): Ditto.
6950 (sse2_loadld): Ditto.
6951 (*vec_extract<ssevecmodelower>_0): Ditto.
6952 (*vec_extractv4si_0_zext_sse4): Ditto.
6953 (vec_concatv2di): Ditto.
6954 (*vec_dup<mode>): Ditto.
6955 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
6956 * config/i386/constraints.md (Yi): Remove.
6961 2018-04-26 Nathan Sidwell <nathan@acm.org>
6963 * dumpfile.c (dump_open): New.
6964 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
6965 (dump_finish): Detect stdio/stderr by value not name.
6967 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
6969 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
6971 2018-04-26 Tom de Vries <tom@codesourcery.com>
6974 * config/nvptx/nvptx.c (verify_neutering_jumps)
6975 (verify_neutering_labels): New function
6976 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
6978 2018-04-26 Tom de Vries <tom@codesourcery.com>
6981 * config/nvptx/nvptx.c (needs_neutering_p): New function.
6982 (nvptx_single): Use needs_neutering_p to skip over insns that do not
6985 2018-04-26 Richard Biener <rguenther@suse.de>
6986 Tom de Vries <tom@codesourcery.com>
6989 * lto-streamer-out.c (output_function): Fixup loops if required to match
6990 discovery done in the reader.
6992 2018-04-26 Richard Biener <rguenther@suse.de>
6994 PR tree-optimization/85116
6995 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
6996 have a loop exit from the single latch predecessor. Remove
6997 case of header with just condition.
6998 (ch_base::copy_headers): Exclude infinite loops from any
7000 (pass_ch::execute): Record exits.
7002 2018-04-26 Richard Biener <rguenther@suse.de>
7004 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
7005 prologue cost vector and pass it to vect_get_load_cost.
7006 (vect_get_peeling_costs_all_drs): Likewise.
7007 (vect_peeling_hash_get_lowest_cost): Likewise.
7008 (vect_enhance_data_refs_alignment): Likewise.
7010 2018-04-26 Richard Biener <rguenther@suse.de>
7013 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
7014 checking of integer<->pointer conversions.
7015 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
7016 sign-/zero-extending pointer types.
7017 (expand_omp_for_static_chunk): Likewise.
7019 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
7020 Jean Lee <xiaoyur347@gmail.com>
7022 * config/mips/mips.c (mips_asan_shadow_offset): New function.
7023 (TARGET_ASAN_SHADOW_OFFSET): Define.
7024 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
7025 true for -fsanitize=address.
7027 2018-04-25 Mark Wielaard <mark@klomp.org>
7029 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
7032 2018-04-25 Jakub Jelinek <jakub@redhat.com>
7034 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
7035 than "alu", remove explicit "memory" and "imm_disp" attributes.
7036 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
7039 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
7040 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
7041 gen_lowpart_no_emit.
7043 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
7046 * config/i386/i386.c (ix86_expand_builtin): Change memory
7047 operand to XI, extend p0 to Pmode.
7048 * config/i386/i386.md: Change unspec volatile and operand
7049 1 mode to XI, change operand 0 mode to P.
7051 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7053 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
7054 GET_MODE_MASK before any checking.
7055 (nds32_can_use_bset_p): Likewise.
7056 (nds32_can_use_btgl_p): Likewise.
7058 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7060 * config/nds32/nds32-doubleword.md: New define_split pattern for
7061 illegal register number.
7063 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7065 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
7067 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7069 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
7071 2018-04-25 Richard Biener <rguenther@suse.de>
7073 * lto-streamer.h (LTO_major_version): Bump to 8.
7075 2018-04-25 Jakub Jelinek <jakub@redhat.com>
7077 * BASE-VER: Set to 9.0.0.
7079 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
7081 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
7082 in __abskf2 and __powikf2.
7084 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7087 * config/aarch64/constraints.md (Usg, Usj): New constraints.
7088 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
7089 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
7090 Use the above on operand 2. Reindent.
7091 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
7093 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
7096 * common/config/i386/i386-common.c (ix86_handle_option): Don't
7098 * config/i386/i386.opt (mcet): Removed.
7099 * doc/install.texi: Remove -mcet documentation.
7100 * doc/invoke.texi: Likewise.
7102 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
7105 * doc/install.texi: Remove -mcet from bootstrap-cet.
7107 2018-04-24 Jakub Jelinek <jakub@redhat.com>
7110 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
7111 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
7115 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
7116 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
7117 containing a CONST_VECTOR.
7119 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
7121 * doc/install.texi: Update newlib dependency for nvptx.
7123 2018-04-24 Jakub Jelinek <jakub@redhat.com>
7126 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
7127 instead of INTVAL when shifting x left.
7129 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
7131 PR tree-optimization/85478
7132 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
7133 vect_grouped_store_supported for single element vectors.
7135 2018-04-24 Richard Biener <rguenther@suse.de>
7138 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
7139 load cost increase to the case of non-constant step.
7141 2018-04-24 Jakub Jelinek <jakub@redhat.com>
7144 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
7145 destination if any_malformed_asm.
7147 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
7150 * expr.c (store_field): In the bitfield case, if the value comes from
7151 a function call and is returned in registers by means of a PARALLEL,
7152 do not change the mode of the temporary unless BLKmode and VOIDmode.
7154 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
7156 PR rtl-optimization/85423
7157 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
7158 dependencies to debug insns when the previous insn is non-debug.
7160 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
7162 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
7163 enums into a single definition.
7164 (fls): Fix predicates and printing.
7167 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
7169 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
7170 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
7171 and short u6 immediate.
7172 (check_if_valid_sleep_operand): Remove.
7173 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
7175 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
7177 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
7178 flag_always_save_lp condition.
7179 * config/nds32/nds32.opt (malways-save-lp): New option.
7181 2018-04-22 Shiva Chen <shiva0217@gmail.com>
7183 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
7184 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
7185 * config/nds32/nds32.h
7186 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
7187 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
7189 2018-04-22 Shiva Chen <shiva0217@gmail.com>
7191 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
7192 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
7194 2018-04-22 Shiva Chen <shiva0217@gmail.com>
7195 Chung-Ju Wu <jasonwucj@gmail.com>
7197 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
7199 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
7200 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
7202 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
7204 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
7206 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
7208 * config/nds32/nds32-protos.h (nds32_data_alignment,
7209 nds32_local_alignment): Declare.
7210 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
7211 nds32_local_alignment): New functions.
7212 (TARGET_CONSTANT_ALIGNMENT): Define.
7213 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
7215 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
7217 * config/nds32/nds32.c
7218 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
7219 (TARGET_MODES_TIEABLE_P): Likewise.
7221 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
7223 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
7226 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
7227 Chung-Ju Wu <jasonwucj@gmail.com>
7229 * config/nds32/constants.md (unspec_volatile_element): Add enum values
7230 for unaligned access.
7231 * config/nds32/nds32-intrinsic.c: Implementation of expanding
7233 * config/nds32/nds32-intrinsic.md: Likewise.
7234 * config/nds32/nds32_intrinsic.h: Likewise.
7235 * config/nds32/nds32.h (nds32_builtins): Likewise.
7236 * config/nds32/nds32.opt (munaligned-access): New option.
7237 * config/nds32/nds32.c (nds32_asm_file_start): Display
7238 flag_unaligned_access status.
7240 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
7242 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
7243 -mno-relax is present.
7244 * config/riscv/linux.h (LINK_SPEC): Ditto.
7246 2018-04-20 Martin Sebor <msebor@redhat.com>
7249 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
7251 (gimple_fold_builtin_stxcpy_chk): Same.
7252 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
7254 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
7257 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
7258 __powikf2 when long double is IEEE 128-bit.
7260 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
7262 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
7263 step to make sure stack always aligned.
7265 2018-04-20 Carl Love <cel@us.ibm.com>
7268 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
7269 size check for arg0.
7271 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
7272 Tom de Vries <tom@codesourcery.com>
7275 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
7276 Emit insns for calls too.
7277 (nvptx_find_par): Always look for worker-level predecessor insn.
7278 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
7280 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
7281 (nvptx_process_pars): Propagate frames for calls.
7283 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
7286 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
7288 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
7289 (ix86_handle_option): Don't handle OPT_mibt.
7290 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
7292 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
7294 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
7295 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
7296 (ix86_target_macros): Define __CET__ with flag_cf_protection
7297 for -fcf-protection.
7298 * config/i386/i386.c (isa2_opts): Remove -mibt.
7299 * config/i386/i386.h (TARGET_IBT): Removed.
7300 (TARGET_IBT_P): Likewise.
7301 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
7302 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
7303 * config/i386/i386.opt (mcet): Update help message.
7306 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
7307 -mcet as an alias for -mshstk.
7309 2018-04-20 Richard Biener <rguenther@suse.de>
7312 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
7313 complexity by forcing a single use of the multiply operand.
7315 2018-04-20 Martin Jambor <mjambor@suse.cz>
7318 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
7319 recursion dependency to only apply to non-clones.
7321 2018-04-20 Martin Jambor <mjambor@suse.cz>
7324 * ipa-cp.c (create_specialized_node): Check that clones of
7325 self-recursive edges exist during IPA-CP.
7327 2018-04-19 Toon Moene <toon@moene.org>
7329 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
7332 2018-04-19 Jakub Jelinek <jakub@redhat.com>
7334 PR tree-optimization/85467
7335 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
7336 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
7337 VECTOR_CST element to type.
7339 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
7342 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
7343 * config/i386/i386.md (builtin_setjmp_setup): Removed.
7344 (builtin_longjmp): Likewise.
7345 (save_stack_nonlocal): New pattern.
7346 (restore_stack_nonlocal): Likewise.
7348 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
7351 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7352 Replace ASM_OUTPUT_LABEL with fprintf.
7354 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
7357 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7358 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
7359 * config/i386/i386-c.c (ix86_target_macros_internal): Also
7360 define __IBT__ and __SHSTK__ for -fcf-protection.
7361 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
7363 (ix86_trampoline_init): Likewise.
7364 (x86_output_mi_thunk): Likewise.
7365 (ix86_notrack_prefixed_insn_p): Likewise.
7366 (ix86_option_override_internal): Don't disallow -fcf-protection.
7367 * config/i386/i386.md (rdssp<mode>): Also enable for
7369 (incssp<mode>): Likewise.
7370 (nop_endbr): Likewise.
7371 * config/i386/i386.opt (mcet): Change help message to built-in
7375 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
7376 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
7377 enable CET built-in functions.
7379 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
7381 * common/config/i386/i386-common.c
7382 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
7383 OPTION_MASK_ISA_MOVDIRI_UNSET,
7384 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
7385 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
7386 * config.gcc (movdirintrin.h): New header.
7387 * config/i386/cpuid.h (bit_MOVDIRI,
7388 bit_MOVDIR64B): New bits.
7389 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
7391 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
7392 (VOID, PVOID, PCVOID)): New function types.
7393 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
7394 __builtin_ia32_directstoreu_u64,
7395 __builtin_ia32_movdir64b): New builtins.
7396 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
7397 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
7399 (ix86_valid_target_attribute_inner_p): Ditto.
7400 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
7401 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
7402 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
7403 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
7404 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
7405 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
7406 (movdiri<mode>, movdir64b_<mode>): New.
7407 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
7408 * config/i386/immintrin.h: Include movdirintrin.h.
7409 * config/i386/movdirintrin.h: New file.
7410 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
7412 2018-04-19 Richard Biener <rguenther@suse.de>
7415 * cfg.c (clear_bb_flags): When loop state says we have
7416 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
7418 2018-04-19 Richard Biener <rguenther@suse.de>
7420 PR tree-optimization/84737
7421 * tree-vect-data-refs.c (vect_copy_ref_info): New function
7422 copying restrict info.
7423 (vect_setup_realignment): Use it.
7424 * tree-vectorizer.h (vect_copy_ref_info): Declare.
7425 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
7426 the first DR to all generated stores.
7427 (vectorizable_load): Likewise for loads.
7429 2018-04-19 Jakub Jelinek <jakub@redhat.com>
7431 PR tree-optimization/85446
7432 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
7433 the integral and pointer types to have the same precision.
7435 * doc/install.texi: Document --disable-cet being the default and
7438 2018-04-18 Martin Liska <mliska@suse.cz>
7440 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
7443 2018-04-18 Martin Liska <mliska@suse.cz>
7446 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
7449 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
7450 arguments if they are comparable.
7452 2018-04-18 Martin Liska <mliska@suse.cz>
7455 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
7458 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7461 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
7464 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
7465 ENDBR after calling __morestack.
7467 2018-04-18 David Malcolm <dmalcolm@redhat.com>
7470 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
7471 by using gcc_base_ver to generate a gcc_driver_version, and use
7472 it when generating GCC_DRIVER_NAME.
7473 * configure: Regenerate.
7475 2018-04-18 Jakub Jelinek <jakub@redhat.com>
7478 * config.gcc: Obsolete powerpc*-*-*spe*.
7480 2018-04-17 Jakub Jelinek <jakub@redhat.com>
7483 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
7484 (stabstr_D): Change type of unum from unsigned int to
7485 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
7488 2018-04-17 Jim Wilson <jimw@sifive.com>
7491 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
7492 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
7493 Set arg_pointer_offset after using pretend_args_size.
7495 2018-04-17 Jakub Jelinek <jakub@redhat.com>
7497 PR rtl-optimization/85431
7498 * dse.c (record_store): Ignore zero width stores.
7501 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
7502 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
7503 __builtin_stack_restore rather than after it.
7504 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
7505 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
7506 argument instead of virtual_dynamic_stack_rtx.
7508 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
7510 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
7512 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
7513 Add note to error message to explain internal mapping of overloaded
7514 built-in function name to non-overloaded built-in function name.
7515 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
7518 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
7521 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
7522 where the inputs overlap with the output.
7524 2018-04-17 Jakub Jelinek <jakub@redhat.com>
7526 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
7527 (=v, v) alternative and explicit "memory" attribute.
7528 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
7529 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7531 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
7532 "sselog1" type instead of "sselog".
7533 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
7534 "sselog". Remove explicit "memory" attribute.
7535 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
7536 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7538 (vec_extract_hi_v32hi): Merge all alternatives into one, use
7539 "sselog1" type instead of "sselog". Remove explicit "memory"
7541 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
7542 use "sselog1" type instead of "sselog". Remove explicit "memory"
7544 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
7545 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7547 (vec_extract_hi_v64qi): Merge all alternatives into one, use
7548 "sselog1" type instead of "sselog". Remove explicit "memory"
7550 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
7551 use "sselog1" type instead of "sselog". Remove explicit "memory"
7555 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
7558 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
7561 2018-04-17 Martin Jambor <mjambor@suse.cz>
7564 * ipa-cp.c (create_specialized_node): Call
7565 expand_all_artificial_thunks if necessary.
7567 2018-04-17 Martin Liska <mliska@suse.cz>
7570 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
7571 in message, remote space in between '_G' and '('.
7573 2018-04-17 Jakub Jelinek <jakub@redhat.com>
7576 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
7577 avx512f_vmcmp<mode>3<round_saeonly_name>,
7578 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
7579 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
7580 avx512f_rndscale<mode><round_saeonly_name>,
7581 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
7582 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
7583 Use %<iptr>2 instead of %2 for -masm=intel.
7584 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
7585 avx512f_vcvttss2usi<round_saeonly_name>,
7586 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
7588 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
7589 avx512f_vcvttsd2usi<round_saeonly_name>,
7590 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
7591 Use %q1 instead of %1 for -masm=intel.
7592 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
7593 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
7594 of %3 for -masm=intel.
7595 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
7597 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
7599 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
7601 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
7602 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
7604 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
7606 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
7607 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
7608 %g1 and one with %0 and %1.
7609 (avx512er_vmrcp28<mode><round_saeonly_name>,
7610 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
7612 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
7613 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
7614 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
7615 of %0 and %{%4%} for -masm=intel.
7616 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
7617 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
7618 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
7619 order of %0 and %{%5%}%{z%} for -masm=intel.
7621 2018-04-17 Jan Hubicka <jh@suse.cz>
7624 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
7626 2018-04-17 Martin Liska <mliska@suse.cz>
7629 * multiple_target.c (create_dispatcher_calls): Set apostrophes
7630 for target_clone error message. Make default implementation
7631 clone to be a local declaration.
7632 (separate_attrs): Add new argument and check for an empty
7634 (expand_target_clones): Handle it.
7635 (ipa_target_clone): Make redirection just for target_clones
7638 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
7639 Tom de Vries <tom@codesourcery.com>
7642 * omp-expand.c (expand_oacc_for): Add dummy false branch for
7643 tiled basic blocks without omp continue statements.
7645 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
7648 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
7649 vec_extract expression as having side effects to make sure it gets
7652 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
7655 * config/i386/i386.c (get_builtin_code_for_version): Check
7658 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
7661 * gcc/config.gcc: Support "skylake".
7662 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
7664 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
7665 (processor_target_table): Add "skylake".
7666 (ix86_option_override_internal): Add "skylake".
7667 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
7668 PROCESSOR_CANNONLAKE.
7669 (get_builtin_code_for_version): Fix priority for
7670 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
7671 PROCESSOR_SKYLAKE-AVX512.
7672 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
7673 (processor_type): Add PROCESSOR_SKYLAKE.
7675 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
7676 Jason Merrill <jason@redhat.com>
7679 * convert.c (convert_to_integer_1): Use direct recursion for
7680 enumeral types and types with a precision less than the number
7681 of bits in their mode.
7683 2018-04-16 Julia Koval <julia.koval@intel.com>
7686 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
7687 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
7689 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
7692 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
7693 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
7694 and -mno-direct-move.
7696 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
7699 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
7700 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
7701 Ensure negative shifts result in {0}.
7703 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
7705 PR rtl-optimization/79916
7706 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
7707 regs (if any) to define how to gnerate SD moves when LRA is in
7710 2018-04-13 Jakub Jelinek <jakub@redhat.com>
7712 PR rtl-optimization/85393
7713 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
7714 * except.c (expand_dw2_landing_pad_for_region): Make static.
7715 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
7716 a label and unconditional jump to old_bb, rather than
7717 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
7720 PR rtl-optimization/85376
7721 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
7722 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
7723 instead of a specific value.
7725 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
7726 Bin Cheng <bin.cheng@arm.com>
7728 PR tree-optimization/82965
7729 PR tree-optimization/83991
7730 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
7731 by_profile_only parameter.
7732 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
7733 information if the loop was predicted to iterate too many times.
7734 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
7736 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
7739 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
7742 2018-04-13 Martin Liska <mliska@suse.cz>
7743 Jakub Jelinek <jakub@redhat.com>
7746 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
7747 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
7748 * builtins.c (expand_builtin_memory_copy_args): Use
7749 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
7750 handle dest_addr == pc_rtx.
7752 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
7755 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
7756 asked to not generate direct moves.
7757 (fix_trunc<mode>si2_stfiwx): Similar.
7758 (fix_trunc<mode>si2_internal): Similar.
7760 2018-04-12 Jakub Jelinek <jakub@redhat.com>
7763 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
7764 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
7765 lookup if dest in some wider mode is known to be const0_rtx and
7766 if so, record permanent equivalence for it to be ZERO_EXTEND of
7767 the narrower mode destination.
7769 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
7771 * lto-streamer-out.c (output_function): Revert 259346.
7772 * omp-expand.c (expand_oacc_for): Likewise.
7774 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
7776 PR rtl-optimization/85354
7777 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
7778 * sel-sched.c (sel_global_init): ... here.
7780 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
7783 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
7784 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7785 mode for PE-COFF targets.
7786 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
7787 (i386_pe_asm_lto_end): Likewise.
7788 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
7789 (TARGET_ASM_LTO_END): Likewise.
7790 * config/i386/winnt.c (saved_debug_info_level): New static variable.
7791 (i386_pe_asm_lto_start): New function.
7792 (i386_pe_asm_lto_end): Likewise.
7794 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
7795 Richard Biener <rguenther@suse.de>
7798 * lto-streamer-out.c (output_function): Fix CFG loop state before
7800 * omp-expand.c (expand_oacc_for): Handle calls to internal
7801 functions like regular functions.
7803 2018-04-12 Richard Biener <rguenther@suse.de>
7806 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
7807 for the early LTO debug to properly generate references to it
7808 during DIE emission. Do not re-use that for the skeleton for
7810 (dwarf2out_early_finish): Likewise.
7812 2018-04-12 Jakub Jelinek <jakub@redhat.com>
7815 * config/i386/sse.md
7816 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
7817 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
7818 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
7819 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
7820 and output is a reg, avoid creating invalid lowpart subreg, but
7821 instead split into a 512-bit move. Don't split if not AVX512VL,
7822 input is xmm16+ reg and output is a mem.
7823 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
7824 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
7825 xmm16+ reg and output is a mem.
7827 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
7829 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
7830 also for flag_dwarf2_cfi_asm.
7832 2018-04-12 Jakub Jelinek <jakub@redhat.com>
7834 PR rtl-optimization/85342
7835 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
7836 a bool scalar var inside of the loop instead. Don't try to update
7837 recog_data.operand after failed apply_change_group.
7839 2018-04-12 Tom de Vries <tom@codesourcery.com>
7842 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
7843 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
7844 array with flexible array member as array without given dimension.
7845 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
7846 argument for undefined param to true.
7848 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
7851 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7852 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
7853 from PowerPC section.
7854 * config/rs6000/sysv4.opt (mcall-): Improve help text.
7855 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
7856 help text that is too long.
7857 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
7858 help text that is too long.
7859 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
7860 help text that is too long.
7862 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
7864 * config/alpha/alpha.md (stack_probe_internal): Rename
7865 from "probe_stack". Update all callers.
7867 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
7869 PR rtl-optimization/84566
7870 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
7871 sched_macro_fuse_insns.
7873 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
7876 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
7877 (compute_block_dependences): ... from here.
7879 2018-04-11 Jakub Jelinek <jakub@redhat.com>
7881 PR tree-optimization/85331
7882 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
7883 from int to HOST_WIDE_INT.
7885 2018-04-11 Martin Jambor <mjambor@suse.cz>
7888 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
7889 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
7890 not the same as the source val.
7891 (cgraph_edge_brings_value_p): New parameter.
7892 (gather_edges_for_value): Pass destination value to
7893 cgraph_edge_brings_value_p.
7894 (perhaps_add_new_callers): Likewise.
7895 (get_info_about_necessary_edges): Likewise and exclude values brought
7896 only by self-recursive edges.
7897 (create_specialized_node): Redirect only clones of self-calling edges.
7898 (+self_recursive_pass_through_p): New function.
7899 (find_more_scalar_values_for_callers_subset): Use it.
7900 (find_aggregate_values_for_callers_subset): Likewise.
7901 (known_aggs_to_agg_replacement_list): Removed.
7902 (decide_whether_version_node): Re-calculate known constants for all
7903 remaining context clones.
7905 2018-04-11 Richard Biener <rguenther@suse.de>
7908 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
7909 from early DWARF output.
7910 (dwarf2out_early_finish): Output line info unconditionally into
7911 early DWARF and add reference to it.
7913 2018-04-11 Jakub Jelinek <jakub@redhat.com>
7916 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
7917 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
7918 other than V2DFmode using iptr mode attribute.
7919 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
7921 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
7923 PR rtl-optimization/84659
7924 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
7926 2018-04-11 Jakub Jelinek <jakub@redhat.com>
7929 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
7931 (output_loc_list): Pass address of a dummy size variable even in the
7932 locview handling loop.
7933 (index_location_lists): Add comment on why skip_loc_list_entry can't
7936 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
7939 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
7942 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
7945 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7946 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
7947 and -mstring-compare-inline-limit.
7949 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
7952 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
7953 for stack clash protection in a register whenever we need it to be in
7956 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
7958 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
7959 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
7961 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
7964 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
7966 (mlong-double-): Ditto.
7967 * config/rs6000/sysv4.opt (msdata=): Ditto.
7968 (mtls-size=): Ditto.
7970 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
7972 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7973 erroneous entries for
7974 "vector int vec_ldl (int, long int *)", and
7975 "vector unsigned int vec_ldl (int, unsigned long int *)".
7976 Add comments and entries for
7977 "vector bool char vec_ldl (int, bool char *)",
7978 "vector bool short vec_ldl (int, bool short *)",
7979 "vector bool int vec_ldl (int, bool int *)",
7980 "vector bool long long vec_ldl (int, bool long long *)",
7981 "vector pixel vec_ldl (int, pixel *)",
7982 "vector long long vec_ldl (int, long long *)",
7983 "vector unsigned long long vec_ldl (int, unsigned long long *)".
7984 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
7985 type tree bool_long_long_type_node and correct definition of
7986 bool_V2DI_type_node to make reference to this new type tree.
7987 (rs6000_mangle_type): Replace erroneous reference to
7988 bool_long_type_node with bool_long_long_type_node.
7989 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
7990 comments to emphasize sign distinctions for char and int types and
7991 replace RS6000_BTI_bool_long constant with
7992 RS6000_BTI_bool_long_long constant. Also add comment to restrict
7993 use of RS6000_BTI_pixel.
7994 (bool_long_type_node): Remove this macro definition.
7995 (bool_long_long_type_node): New macro definition
7997 2018-04-10 Jakub Jelinek <jakub@redhat.com>
7999 PR rtl-optimization/85300
8000 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
8001 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
8002 simplify_unary_operation fails.
8004 2018-04-10 Martin Liska <mliska@suse.cz>
8006 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
8007 cgraph_edge and ipa_ref.
8009 2018-04-10 Jakub Jelinek <jakub@redhat.com>
8013 * config/i386/sse.md
8014 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
8015 computation of the VEC_MERGE selector from mask.
8016 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
8017 Fix decoding of the VEC_MERGE selector into mask.
8019 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
8021 PR tree-optimization/85286
8022 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
8024 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
8026 * final.c (final_1): Set insn_last_address as well as
8027 insn_current_address.
8029 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8032 * explow.c (emit_stack_probe): Call validize_mem on memory location
8033 before passing it to gen_probe_stack. Create address operand and
8034 legitimize it for the probe_stack_address case.
8036 2018-04-09 Jan Hubicka <jh@suse.cz>
8039 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
8040 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
8041 * tree.c (free_lang_data_in_type): Fix handling of binfos;
8043 (free_lang_data): Rebuild type inheritance graph.
8045 2018-04-09 Martin Sebor <msebor@redhat.com>
8047 * invoke.texi (-finline-small-functions): Mention other optimization
8049 (-findirect-inlining, -fpartial-inlining): Same.
8050 (-finline-functions-called-once): Same.
8051 (-freorder-blocks-and-partition): Same.
8053 2018-04-09 Jan Hubicka <jh@suse.cz>
8056 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
8057 jumps; choose last target that matches the criteria (i.e.
8058 no partition changes for non-crossing jumps).
8059 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
8060 support for redirecting crossing jumps to non-crossing.
8062 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
8064 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
8065 also for naked functions.
8067 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
8069 * config/arc/arc.md (add_shift): New pattern.
8070 (add_shift2): Likewise.
8071 (sub_shift): Likewise.
8072 (sub_shift_cmp0_noout): Likewise.
8073 (compare_si_ashiftsi): Likewise.
8074 (xbfu_cmp0_noout): New combine pattern.
8075 (xbfu_cmp0"): Likewise.
8076 (movsi_set_cc_insn): Place the predicable variant first.
8077 (commutative_binary_cmp0_noout): Remove clobber.
8078 (commutative_binary_cmp0): New pattern.
8079 (noncommutative_binary_cmp0): Likewise.
8080 (noncommutative_binary_cmp0_noout): Likewise.
8081 (noncommutative_binary_comparison_result_used): Removed.
8082 (rsub_cmp0): New pattern.
8083 (rsub_cmp0_noout): Likewise.
8084 (extzvsi): Changed, keep only meaningful variants.
8085 (SQH, SEZ): New iterators.
8086 (SQH_postfix): New mode attribute.
8087 (SEZ_prefix): New code attribute.
8088 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
8089 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
8090 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
8092 (noncommutative_operator): Check the availability of barrel
8095 2018-04-09 Richard Biener <rguenther@suse.de>
8097 PR tree-optimization/85284
8098 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
8099 Only use the niter constraining form of simple_iv when the exit
8102 2018-04-09 Tom de Vries <tom@codesourcery.com>
8105 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8106 (define_expand "*memory_barrier"): New define_expand.
8107 (define_insn "memory_barrier"): New insn.
8109 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8111 PR rtl-optimization/80463
8112 PR rtl-optimization/83972
8113 PR rtl-optimization/83480
8115 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
8116 correct producer for the insn.
8117 (tidy_control_flow): Fixup seqnos in case of debug insns.
8119 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8121 PR rtl-optimization/83913
8123 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
8124 different sched-times when merging exprs.
8126 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8128 PR rtl-optimization/83962
8130 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
8131 tidy_fallthru_edge and tidy_control_flow.
8133 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8135 PR rtl-optimization/83530
8137 * sel-sched.c (force_next_insn): New global variable.
8138 (remove_insn_for_debug): When force_next_insn is true, also leave only
8139 next insn in the ready list.
8140 (sel_sched_region): When the region wasn't scheduled, make another pass
8141 over it with force_next_insn set to 1.
8143 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
8145 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
8147 * config/nds32/constants.md (unspec_volatile_element): Add enum values
8148 for interrupt control.
8149 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
8150 functions for interrupt control.
8151 * config/nds32/nds32-intrinsic.md: Likewise.
8152 * config/nds32/nds32_intrinsic.h: Likewise.
8153 * config/nds32/nds32.h (nds32_builtins): Likewise.
8155 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
8157 * config/nds32/nds32.c (nds32_init_machine_status,
8158 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
8159 strict_aligned_p field.
8160 (nds32_expand_to_rtl_hook): New function.
8161 (TARGET_EXPAND_TO_RTL_HOOK): Define.
8162 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
8164 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
8165 Chung-Ju Wu <jasonwucj@gmail.com>
8167 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
8168 * config/nds32/nds32-n7.md: New file.
8169 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
8170 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
8172 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
8173 * config/nds32/nds32.md (pipeline_model): Add n7.
8174 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
8175 * config/nds32/pipelines.md: Include n7 settings.
8177 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
8178 Chung-Ju Wu <jasonwucj@gmail.com>
8180 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
8181 * config/nds32/nds32-e8.md: New file.
8182 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
8183 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
8185 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
8186 * config/nds32/nds32.md (pipeline_model): Add e8.
8187 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
8188 * config/nds32/pipelines.md: Include e8 settings.
8190 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
8191 Chung-Ju Wu <jasonwucj@gmail.com>
8193 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
8194 * config/nds32/nds32-n8.md: New file.
8195 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
8196 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
8198 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
8199 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
8200 * config/nds32/nds32.md (pipeline_model): Add n8.
8201 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
8202 * config/nds32/pipelines.md: Include n8 settings.
8204 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
8205 Chung-Ju Wu <jasonwucj@gmail.com>
8207 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
8208 * config/nds32/nds32-n9-2r1w.md: New file.
8209 * config/nds32/nds32-n9-3r2w.md: New file.
8210 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
8211 nds32_register_ports): New or modify for cpu n9.
8212 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
8214 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
8215 * config/nds32/nds32-utils.c: New file.
8216 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
8217 TARGET_MUL_SLOW): Define.
8218 * config/nds32/nds32.md (pipeline_model): New attribute.
8219 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
8220 New options that support cpu n9.
8221 * config/nds32/pipelines.md: Include n9 settings.
8222 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
8224 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
8226 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
8227 information if necessary.
8228 (output_cond_branch_compare_zero): Likewise.
8229 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
8230 (nds32_target_alignment): Refine for alignment.
8231 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
8232 (FUNCTION_BOUNDARY): Modify.
8233 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
8235 * config/nds32/nds32.opt (malways-align, malign-functions): New.
8237 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
8239 * config/nds32/constants.md (unspec_volatile_element): Add values for
8240 TLB operation and data prefetch.
8241 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
8242 functions for TLB operation and data prefetch.
8243 * config/nds32/nds32-intrinsic.md: Likewise.
8244 * config/nds32/nds32_intrinsic.h: Likewise.
8245 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
8246 (nds32_print_operand): Likewise.
8247 * config/nds32/nds32.h (nds32_builtins): Likewise.
8249 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
8250 Andrew Pinski <pinsika@gcc.gnu.org>
8253 * match.pd: Use constant_boolean_node of correct type instead of
8254 boolean_true_node or boolean_false_node for simplifying
8255 pointer comparisons to zero.
8257 2018-04-07 Jakub Jelinek <jakub@redhat.com>
8259 PR tree-optimization/80021
8260 * tree.c (verify_type_variant): Make error call in verify_variant_match
8261 translatable and remove final full stop.
8263 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
8265 * config/nds32/constants.md (unspec_volatile_element): Add
8266 UNSPEC_VOLATILE_EH_RETURN.
8267 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
8268 nds32_output_stack_pop): Support dwarf exception handling process.
8269 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
8270 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
8271 exception handling process.
8272 (nds32_compute_stack_frame): Likewise.
8273 (nds32_return_addr_rtx): Likewise.
8274 (nds32_initial_elimination_offset): Likewise.
8275 (nds32_expand_prologue): Likewise.
8276 (nds32_expand_epilogue): Likewise.
8277 (nds32_dynamic_chain_address): New function.
8278 * config/nds32/nds32.h (machine_function): Add fields for dwarf
8280 (DYNAMIC_CHAIN_ADDRESS): Define.
8281 (EH_RETURN_DATA_REGNO): Define.
8282 (EH_RETURN_STACKADJ_RTX): Define.
8283 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
8284 patterns for dwarf exception handling.
8286 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
8288 * config/nds32/nds32.h: Clean up obsolete macros.
8290 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8292 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8293 Add enum values for particular instructions.
8294 * config/nds32/nds32-intrinsic.c: Implementation of expanding
8295 particular intrinsic functions.
8296 * config/nds32/nds32-intrinsic.md: Likewise.
8297 * config/nds32/nds32_intrinsic.h: Likewise.
8298 * config/nds32/nds32.h (nds32_builtins): Likewise.
8299 * config/nds32/nds32.md (type): Add pbsad and pbsada.
8300 (btst, ave): New patterns for particular instructions.
8302 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8304 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8305 Add enum values for atomic load/store and memory sync.
8306 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
8308 * config/nds32/nds32-intrinsic.md: Likewise.
8309 * config/nds32/nds32_intrinsic.h: Likewise.
8310 * config/nds32/nds32.h (nds32_builtins): Likewise.
8312 2018-04-07 Jakub Jelinek <jakub@redhat.com>
8314 PR tree-optimization/85257
8315 * fold-const.c (native_encode_vector): If not all elts could fit
8316 and off is -1, return 0 rather than offset.
8317 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
8318 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
8319 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
8320 adjust buffer in native_interpret_expr call.
8322 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8324 * config/nds32/constants.md (unspec_volatile_element): Add cache
8325 control enum values.
8326 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
8327 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
8328 * config/nds32/nds32.c (nds32_cctl_names): New.
8329 (nds32_print_operand): Handle cache control register names.
8330 * config/nds32/nds32.h (nds32_builtins): New enum values.
8331 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
8333 * config/nds32/nds32.md (type): Add mmu.
8334 * config/nds32/pipelines.md (simple_insn): Add mmu.
8336 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
8338 * config/nds32/nds32.md (type): Remove call.
8339 * config/nds32/pipelines.md (simple_insn): Likewise.
8341 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8343 * config/nds32/constants.md (unspec_volatile_element): Add
8344 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
8345 UNSPEC_VOLATILE_FMFCFG.
8346 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
8347 description for fmfcfg and fmfcsr.
8348 (bdesc_1arg): Add fmtcsr.
8349 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
8350 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
8351 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
8352 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
8353 unspec_fmfcfg): New patterns.
8354 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
8355 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
8356 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
8357 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
8358 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
8359 __nds32__fmfcfg): Define.
8361 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8363 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
8364 intrinsic register names.
8365 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
8366 intrinsic register enum values and macros.
8368 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
8370 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
8371 for load/store addressing form.
8372 (nds32_print_operand_address): Likewise.
8374 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
8377 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
8378 based on LABEL_REF. Remove useless assertion.
8379 (pic_address_needs_scratch): Fix formatting.
8380 (sparc_legitimize_pic_address): Minor tweaks.
8381 (sparc_delegitimize_address): Adjust assertion accordingly.
8382 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
8383 into symbolic_operand.
8384 (movsi_high_pic_label_ref): Likewise.
8385 (movsi_lo_sum_pic_label_ref): Likewise.
8386 (movdi_pic_label_ref): Likewise.
8387 (movdi_high_pic_label_ref): Likewise.
8388 (movdi_lo_sum_pic_label_ref): Likewise.
8390 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
8392 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
8393 custom LIB_SPEC setup.
8395 2018-04-06 Ruslan Bukin <br@bsdpad.com>
8396 Kito Cheng <kito.cheng@gmail.com>
8398 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
8399 * config/riscv/freebsd.h: New.
8401 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
8403 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
8404 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
8407 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
8408 Kito Cheng <kito.cheng@gmail.com>
8410 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
8411 nds32_output_call, nds32_symbol_binds_local_p): New functions.
8412 * config/nds32/nds32-protos.h (nds32_output_call,
8413 nds32_output_return): Declare.
8414 * config/nds32/nds32.md: Refine all the call and return patterns.
8416 2018-04-06 Jakub Jelinek <jakub@redhat.com>
8419 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
8420 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
8422 PR rtl-optimization/84872
8423 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
8424 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
8427 2018-04-06 Tamar Christina <tamar.christina@arm.com>
8429 * expr.c (copy_blkmode_to_reg): Revert 254862.
8430 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
8432 2018-04-06 Richard Biener <rguenther@suse.de>
8435 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
8436 after seeing a component reference with an adjacent field. Treat
8437 refs to arrays at struct end of external decls similar to
8438 refs to unconstrained commons.
8440 2018-04-06 Jakub Jelinek <jakub@redhat.com>
8443 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
8444 look through SAVE_EXPRs with non-side-effects argument. Adjust
8446 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
8449 2018-04-06 Richard Biener <rguenther@suse.de>
8452 * alias.c (find_base_term): New wrapper around find_base_term
8453 unwinding CSELIB_VAL_PTR changes.
8454 (find_base_term): Do not restore CSELIB_VAL_PTR during the
8457 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8459 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
8461 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
8462 constant definitions.
8463 ("nop"): lr 0,0 -> nopr r0
8464 ("nop_lr0", "nop_lr1"): New insn definitions.
8466 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
8468 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
8469 NDS32_V3PUSH_AVAILABLE_P macro.
8471 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
8472 Chung-Ju Wu <jasonwucj@gmail.com>
8474 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
8475 (nds32*-*-*): Add float and fpu_config into supported_defaults.
8476 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
8477 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
8478 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
8479 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
8480 * config/nds32/constraints.md: New constraints and checking for hard
8481 float configuration.
8482 * config/nds32/iterators.md: New mode iterator and attribute for hard
8483 float configuration.
8484 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
8486 * config/nds32/nds32-fpu.md: New file.
8487 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
8488 deal with hard float code generation.
8489 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
8491 (abi_type, float_reg_number): New enum type.
8492 * config/nds32/nds32-predicates.c: New predicates for hard float.
8493 * config/nds32/nds32-protos.h: Declare functions for hard float.
8494 * config/nds32/nds32.c: Implementation for hard float configuration.
8495 * config/nds32/nds32.h: Definitions for hard float configuration.
8496 * config/nds32/nds32.md: Include hard float machine description and
8497 modify patterns for hard float configuration.
8498 * config/nds32/nds32.opt: New options for hard float configuration.
8499 * config/nds32/predicates.md: New predicates for hard float
8502 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8504 * common/config/nds32/nds32-common.c
8505 (nds32_option_optimization_table): Enable -mreleax-hint by default.
8507 2018-04-05 Jakub Jelinek <jakub@redhat.com>
8510 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
8511 CONSTRUCTOR_ELT (ctor, ...)->value.
8513 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
8516 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
8518 2018-04-05 Tom de Vries <tom@codesourcery.com>
8521 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
8524 2018-04-05 Shiva Chen <shiva0217@gmail.com>
8525 Kito Cheng <kito.cheng@gmail.com>
8527 * config/nds32/constraints.md (U33): Fine-tune checking condition.
8528 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
8529 * config/nds32/nds32.h (nds32_16bit_address_type): Add
8530 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
8532 2018-04-05 Shiva Chen <shiva0217@gmail.com>
8533 Kito Cheng <kito.cheng@gmail.com>
8535 * config/nds32/constraints.md (Ufe): New memory constraint.
8536 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
8537 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
8538 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
8540 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
8541 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
8543 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8545 * config/nds32/nds32.md: Use optimize_size in the condition for
8546 alu-shift instructions.
8548 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8550 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
8552 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8554 * config/nds32/nds32.md (negsi2): Refine pattern.
8556 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
8557 Chung-Ju Wu <jasonwucj@gmail.com>
8559 * config/nds32/iterators.md (shift_rotate): New code iterator.
8560 (shift): New code attribute.
8561 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
8562 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
8563 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
8564 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
8565 bit-wise operations.
8566 (andsi3, *andsi3): Ditto.
8567 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
8568 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
8569 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
8570 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
8571 nds32_ior_operand, nds32_xor_operand): New predicates.
8573 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8575 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
8576 (addsi3, subsi3): ... this.
8578 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8580 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
8582 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8584 * config/nds32/nds32.md: Adjust indention.
8586 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
8588 * config/nds32/nds32.md (feature): New attribute.
8590 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8592 * config/nds32/nds32.md (subtype): New attribute.
8594 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
8597 * config/arm/arm-builtins.c (arm_expand_builtin): Change
8598 expansion to perform a bitwise AND of the argument followed by a
8599 boolean negation of the result.
8601 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
8603 PR rtl-optimization/84878
8604 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
8605 the basic block. Assert the use reference is not artificial and that
8606 it has an associated insn.
8608 2018-04-04 Michael Matz <matz@suse.de>
8610 * builtins.c (compute_objsize): Pass correct operand
8611 to array_at_struct_end_p.
8613 2018-04-04 Richard Biener <rguenther@suse.de>
8616 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
8617 from contexts for DINFO_LEVEL_TERSE and below.
8619 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
8621 * config/nds32/nds32-doubleword.md (move_<mode>): Require
8622 resiter_operand condition.
8623 * config/nds32/nds32.md (*move<mode>): Ditto.
8625 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
8626 Monk Chiang <sh.chiang04@gmail.com>
8628 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
8630 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
8632 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
8634 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
8635 Kito Cheng <kito.cheng@gmail.com>
8637 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
8638 nds32_cond_code_str, output_cond_branch,
8639 output_cond_branch_compare_zero, nds32_expand_cbranch,
8640 nds32_expand_cstore, nds32_expand_movcc,
8641 nds32_output_cbranchsi4_equality_zero,
8642 nds32_output_cbranchsi4_equality_reg,
8643 nds32_output_cbranchsi4_equality_reg_or_const_int,
8644 nds32_output_cbranchsi4_greater_less_zero: New functions.
8645 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
8646 nds32_expand_cstore, nds32_expand_movcc,
8647 nds32_output_cbranchsi4_equality_zero,
8648 nds32_output_cbranchsi4_equality_reg,
8649 nds32_output_cbranchsi4_equality_reg_or_const_int,
8650 nds32_output_cbranchsi4_greater_less_zero): Declare.
8651 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
8652 nds32_rimm11s_operand): New predicates.
8653 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
8654 * config/nds32/nds32.md: Rewrite all the branch and conditional move
8657 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
8659 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
8660 * config/nds32/nds32.md: Ditto.
8661 * config/nds32/pipelines.md: Ditto.
8663 2018-04-04 Richard Biener <rguenther@suse.de>
8665 PR tree-optimization/85168
8666 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
8667 propagating abnormals.
8669 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
8671 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
8673 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
8674 Kito Cheng <kito.cheng@gmail.com>
8676 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
8677 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
8678 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
8679 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
8680 * config/nds32/nds32.md (sibcall_internal): New.
8681 (sibcall_register): Remove.
8682 (sibcall_immediate): Remove.
8683 (sibcall_value_internal): New.
8684 (sibcall_value_register): Remove.
8685 (sibcall_value_immediate): Remove.
8686 * config/nds32/predicates.md (nds32_general_register_operand): New.
8687 (nds32_call_address_operand): New.
8689 2018-04-03 Jakub Jelinek <jakub@redhat.com>
8691 PR rtl-optimization/85167
8692 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
8693 bb_defs if *split_p, instead preinitialize it to NULL.
8695 PR tree-optimization/85156
8696 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
8697 evaluating the argument multiple times.
8699 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
8701 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
8703 (_mm_cvtpd_ps): Likewise.
8704 (_mm_cvttpd_epi32): Likewise.
8705 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
8706 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
8707 vector, pixel, and bool following altivec.h include.
8709 2018-04-03 Martin Sebor <msebor@redhat.com>
8711 * doc/extend.texi (Common Function Attributes): Clarify.
8712 (const attribute): Likewise.
8713 (pure attribute): Likewise.
8715 2018-04-03 Jakub Jelinek <jakub@redhat.com>
8718 * config/i386/i386.c (ix86_expand_vector_set): Use
8719 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
8721 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
8723 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
8724 instructions when changing rounding bits to preserve precision bits
8725 in the x87 control word.
8727 2018-04-03 Martin Liska <mliska@suse.cz>
8729 PR tree-optimization/82491
8730 * rtl.h (strip_offset_and_add): Replace += suboffset with
8731 poly_uint64 () + suboffset.
8733 2018-03-29 Martin Liska <mliska@suse.cz>
8734 Martin Jambor <mjambor@suse.cz>
8737 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
8738 param_type is not an integral or pointer type.
8740 2018-04-03 Richard Biener <rguenther@suse.de>
8742 * sese.h (recompute_all_dominators): Remove.
8744 2018-04-02 Martin Sebor <msebor@redhat.com>
8746 * doc/invoke.texi (-Wrestrict): Fix typos.
8748 2018-04-02 Jim Wilson <jimw@sifive.com>
8750 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
8751 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
8752 (<optab>di3, <optab>si3_extend): Likewise.
8753 (<optab>si3_mask, <optab>si3_mask_1): New.
8754 (<optab>di3_mask, <optab>di3_mask_1): New.
8755 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
8756 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
8757 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
8759 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
8761 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
8764 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
8766 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
8767 (nds32_canonicalize_comparison): New function.
8769 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
8770 Kito Cheng <kito.cheng@gmail.com>
8771 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8773 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
8774 * config/nds32/constants.md (unspec_volatile_element): Add
8775 UNSPEC_VOLATILE_RELAX_GROUP.
8776 * config/nds32/nds32-relax-opt.c: New file.
8777 * config/nds32/nds32-predicates.c
8778 (nds32_symbol_load_store_p): New function.
8779 * config/nds32/nds32-protos.h
8780 (nds32_symbol_load_store_p): Declare function.
8781 (make_pass_nds32_relax_opt): Declare new rtl pass function.
8782 * config/nds32/nds32.c
8783 (nds32_register_pass): New function to register pass.
8784 (nds32_register_passes): New function to register passes.
8785 * config/nds32/nds32.md (relax_group): New pattern.
8786 * config/nds32/nds32.opt (mrelax-hint): New option.
8787 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
8789 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
8791 * config/nds32/t-nds32: Modify files dependency.
8793 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
8795 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
8796 (PROFILE_HOOK): Define its implementation.
8798 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
8800 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
8801 type and 32-bit size.
8803 2018-04-01 Jakub Jelinek <jakub@redhat.com>
8806 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
8807 (V_128_256): New mode iterator.
8808 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
8809 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
8810 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
8812 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
8813 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
8815 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
8818 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
8819 NaN inputs correctly.
8821 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
8824 * config/rs6000/vsx.md (??r): New mode attribute.
8825 (*vsx_mov<mode>_64bit): Use it.
8826 (*vsx_mov<mode>_32bit): Likewise.
8828 2018-03-30 Martin Sebor <msebor@redhat.com>
8830 PR tree-optimization/84818
8831 * builtins.c (check_access): Use warning_n.
8833 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
8836 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
8838 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
8841 2018-03-30 Julia Koval <julia.koval@intel.com>
8844 * x86-tune.def (movx, partial_reg_dependency): Enable for
8847 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
8850 * lra-constraints.c (process_alt_operands): Move setting
8851 this_alternative_matches below.
8853 2018-03-29 Martin Liska <mliska@suse.cz>
8856 * doc/invoke.texi: Document how LTO works with debug info.
8857 Describe auto-load support of binutils. Mention 'x86-64'
8858 as valid option value of -march option.
8860 2018-03-29 Jakub Jelinek <jakub@redhat.com>
8862 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
8865 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
8866 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
8867 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
8870 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
8873 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
8874 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
8875 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
8876 for RS6000_BTM_POWERPC64.
8877 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
8878 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
8879 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
8884 2018-03-28 Carl Love <cel@us.ibm.com>
8887 2017-09-27 Carl Love <cel@us.ibm.com>
8889 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
8890 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
8891 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
8894 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8896 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
8897 instead of __vector bool.
8898 (_mm_max_pu8): Likewise.
8899 (_mm_min_pi16): Likewise.
8901 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
8904 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
8905 (DIVWEUO): Likewise.
8907 (DIVDEUO): Likewise.
8908 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
8909 DIVWEUO and DIVDEUO.
8910 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
8911 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
8912 (div_extend): Likewise.
8913 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
8915 (__builtin_divweuo): Likewise.
8916 (__builtin_divdeo): Likewise.
8917 (__builtin_divdeuo): Likewise.
8919 2018-03-28 Jakub Jelinek <jakub@redhat.com>
8922 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
8923 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
8925 PR tree-optimization/82004
8926 * gimple-match-head.c (optimize_pow_to_exp): New function.
8927 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
8928 Don't fold to exp if optimize_pow_to_exp is false.
8930 2018-03-28 Martin Liska <mliska@suse.cz>
8933 * calls.c (initialize_argument_information): Fix trailing space.
8934 * common.opt: Fix typo and provide better explanation for
8935 -fsanitize-coverage option.
8936 * config/i386/i386.opt: Fix typo.
8938 2018-03-28 Jakub Jelinek <jakub@redhat.com>
8939 Martin Liska <mliska@suse.cz>
8942 * gimplify.c (asan_poison_variable): Don't do the check for
8943 gimplify_omp_ctxp here.
8944 (gimplify_decl_expr): Do it here.
8945 (gimplify_target_expr): Likewise.
8947 2018-03-28 Martin Liska <mliska@suse.cz>
8950 * config/i386/i386.c (ix86_function_arg_advance): Do not call
8951 chkp_type_bounds_count if MPX is not enabled.
8953 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
8955 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
8957 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
8960 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
8961 function to create the function decl for complex long double
8962 multiply and divide for -mabi=ieeelongdouble.
8963 (init_float128_ieee): Call it.
8965 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
8968 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
8969 -fcf-protection=branch -mibt.
8970 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
8972 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8975 * config/arm/arm.c (arm_valid_symbolic_address): Handle
8976 arm_word_relocations.
8978 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
8981 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
8982 extern array declarations.
8984 2018-03-27 Richard Biener <rguenther@suse.de>
8987 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
8988 explicit single_use checks.
8990 2018-03-27 Richard Biener <rguenther@suse.de>
8992 PR tree-optimization/85082
8993 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
8996 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8998 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
8999 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
9000 Turn on fasynchronous-unwind-tables and funwind-tables.
9002 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
9005 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
9006 (*bmi_blsr_<mode>_ccz): Ditto.
9008 2018-03-26 Tom de Vries <tom@codesourcery.com>
9010 PR tree-optimization/85063
9011 * omp-general.c (offloading_function_p): New function. Factor out
9013 * omp-offload.c (pass_omp_target_link::gate): ... here.
9014 * omp-general.h (offloading_function_p): Declare.
9015 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
9016 with attribute omp declare target for offloading functions.
9018 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
9020 PR tree-optimization/84005
9021 * tree-data-ref.h (get_base_for_alignment): Declare.
9022 * tree-data-ref.c (get_base_for_alignment_1): New function.
9023 (get_base_for_alignment): Likewise.
9024 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
9025 get_base_for_alignment to find a suitable base object, instead
9026 of always using drb->base_address.
9028 2018-03-23 Jakub Jelinek <jakub@redhat.com>
9031 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
9032 known size by default.
9034 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
9037 * lra-constraints.c (process_alt_operands): Don't match BLKmode
9038 and non BLKmode operands.
9040 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9043 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
9044 Clean up attributes.
9046 2018-03-23 Richard Biener <rguenther@suse.de>
9049 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
9050 we are going to emit early debug for LTO.
9052 2018-03-23 Jakub Jelinek <jakub@redhat.com>
9055 * function.c (match_asm_constraints_1): Don't optimize if input
9056 doesn't satisfy general_operand predicate for output's mode.
9059 * alias.c (write_dependence_p): Don't require for x_canonicalized
9060 non-VOIDmode if x has VOIDmode.
9063 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
9064 just don't try to optimize it rather than assert it never happens.
9066 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
9068 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
9069 macro expansions for definition of ST_INTERNAL_<mode> and
9070 LD_INTERNAL_<mode> builtins.
9071 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
9073 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
9075 (altivec_expand_st_builtin): Likewise.
9076 (altivec_expand_builtin): Remove calls to deleted functions.
9077 (rs6000_address_for_altivec): Delete this function.
9078 * config/rs6000/vector.md: Remove expands for
9079 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
9081 2018-03-22 Sudakshina Das <sudi.das@arm.com>
9084 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
9085 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
9086 re-computing once computed.
9087 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
9088 (arm_init_machine_status): Initialize
9089 machine->static_chain_stack_bytes.
9091 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
9094 * doc/extend.texi: Add four new prototypes for vec_ld.
9095 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
9096 definitions for more logical presentation.
9097 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
9098 entries for V1TI variants of __builtin_altivec_ld builtin.
9099 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
9100 handling of V1TI variant of LVX icode pattern.
9101 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
9102 (rs6000_gimple_fold_builtin): Likewise.
9103 (altivec_init_builtins): Add code to define
9104 __builtin_altivec_lvx_v1ti function.
9106 2018-03-22 Jakub Jelinek <jakub@redhat.com>
9109 * function.c (match_asm_constraints_1): Don't do the optimization
9110 if input isn't a REG, SUBREG, MEM or constant.
9112 2018-03-22 Tom de Vries <tom@codesourcery.com>
9114 PR tree-optimization/84956
9115 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
9116 bb_has_abnormal_pred.
9118 2018-03-22 Jakub Jelinek <jakub@redhat.com>
9121 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
9122 DECL_INITIAL (decl) to decl at the end.
9123 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
9126 2018-03-21 Joseph Myers <joseph@codesourcery.com>
9128 * doc/extend.texi (__builtin_tgmath): Document when complex
9129 integer types are treated as _Complex _Float64.
9131 2018-03-21 Tom de Vries <tom@codesourcery.com>
9133 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
9135 2018-03-21 Jakub Jelinek <jakub@redhat.com>
9137 PR tree-optimization/84960
9138 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
9139 if it is ENTRY block, move them into single succ of ENTRY in that case.
9141 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
9143 PR tree-optimization/84811
9144 * poly-int.h (poly_span_traits): Remove the T3 parameter and
9145 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
9146 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
9147 (known_subrange_p): Update accordingly. Cast each value involved
9148 in the size comparison, rather than casting the result of the
9151 2018-03-21 Jakub Jelinek <jakub@redhat.com>
9153 PR tree-optimization/84982
9154 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
9155 by flipping the least significant bit rather than all bits from
9156 bitpos to bitpos + bitsize - 1.
9158 2018-03-21 Nathan Sidwell <nathan@acm.org>
9160 * doc/extend.texi (Deprecated Features): Remove mention of
9161 long-deleted deprecations.
9163 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9166 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
9167 * configure: Regenerate.
9169 2018-03-21 Tom de Vries <tom@codesourcery.com>
9171 PR tree-optimization/83126
9172 * tree-parloops.c (num_phis): New function.
9173 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
9175 2018-03-21 Nathan Sidwell <nathan@acm.org>
9177 * doc/extend.texi (Deprecated Features): Update deprecated flags,
9178 mention anon-struct/union members and trailing attributes.
9180 2018-03-21 Bin Cheng <bin.cheng@arm.com>
9182 PR tree-optimization/84969
9183 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
9184 builtin memset partitions if they set different rhs values.
9186 2018-03-21 Jakub Jelinek <jakub@redhat.com>
9188 PR rtl-optimization/84989
9189 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
9190 VEC_DUPLICATE with scalar result mode.
9192 2018-03-21 Martin Liska <mliska@suse.cz>
9195 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
9196 not intended return statement.
9198 2018-03-21 Martin Liska <mliska@suse.cz>
9201 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
9202 (chkp_find_bound_slots_1): Limit number of iterations.
9204 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
9207 * Minor grammar fixes for x86 options.
9209 2018-03-20 Jakub Jelinek <jakub@redhat.com>
9212 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
9213 holding REG_CFA_RESTORE notes, instead turn them into a USE.
9215 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
9218 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
9219 (altivec_lvx_<mode>_1op): Likewise.
9220 (altivec_stvx_<mode>_2op): Likewise.
9221 (altivec_stvx_<mode>_1op): Likewise.
9222 (altivec_lvx_<VM2:mode>): New define_expand.
9223 (altivec_stvx_<VM2:mode>): Likewise.
9224 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
9225 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9226 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
9227 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9228 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
9229 (rs6000_gen_lvx): Likewise.
9230 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
9231 (altivec_expand_stv_builtin): Likewise.
9232 (altivec_expand_builtin): Likewise.
9233 * config/rs6000/vector.md: Likewise.
9235 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9238 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
9241 2018-03-20 Richard Biener <rguenther@suse.de>
9244 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
9245 sign-conversions as zero, fall back to standard scalar_stmt
9248 2018-03-20 Martin Liska <mliska@suse.cz>
9251 * predict.c (rebuild_frequencies): Handle case when we have
9252 PROFILE_ABSENT, but flag_guess_branch_prob is false.
9254 2018-03-20 Jakub Jelinek <jakub@redhat.com>
9257 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
9258 flag_section_anchors.
9259 * varasm.c (use_blocks_for_decl_p): Remove hack for
9260 dw2_force_const_mem.
9263 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
9265 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
9266 be created, use lowpart_subreg of operands[0] rather than operands[0]
9268 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
9269 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
9270 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
9271 and n constraint instead of aarch64_shift_imm_di and Usd.
9272 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
9273 (*aarch64_<optab>_reg_minus<mode>3): ... this.
9275 2018-03-20 Sudakshina Das <sudi.das@arm.com>
9278 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
9279 to favor GPR over NEON registers.
9280 (<shift>di3_neon): Likewise.
9282 2018-03-20 Tom de Vries <tom@codesourcery.com>
9285 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
9286 (nvptx_process_pars): Emit bar.sync asap and alap.
9288 2018-03-20 Tom de Vries <tom@codesourcery.com>
9291 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
9292 seen_label if seen_label is already set.
9294 2018-03-20 Jakub Jelinek <jakub@redhat.com>
9297 * config/i386/i386.c (fold_builtin_cpu): For features above 31
9298 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
9299 Use 1U instead of 1. Formatting fixes.
9302 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
9303 instead of TREE_TYPE (s1) for the return value.
9305 2018-03-19 Jakub Jelinek <jakub@redhat.com>
9307 PR tree-optimization/84946
9308 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
9309 bitsize + bitsize in poly_uint64 rather than poly_int64.
9312 * dwarf2asm.c: Include fold-const.c.
9313 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
9314 of decl rather than decl itself.
9316 PR rtl-optimization/84643
9317 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
9319 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
9322 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
9323 calling assemble_variable.
9325 2018-03-19 Sudakshina Das <sudi.das@arm.com>
9328 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
9329 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
9331 2018-03-19 Jim Wilson <jimw@sifive.com>
9334 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
9335 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
9336 (riscv_first_stack_step): Likewise.
9337 (riscv_option_override): Use STACK_BOUNDARY instead of
9339 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
9341 (BIGGEST_ALIGNMENT): Set to 128.
9342 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
9343 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
9346 2018-03-19 Richard Biener <rguenther@suse.de>
9348 PR tree-optimization/84933
9349 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
9350 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
9352 2018-03-19 Richard Biener <rguenther@suse.de>
9354 PR tree-optimization/84859
9355 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
9356 (cond_if_else_store_replacement): Perform sinking operation on
9357 single-store BBs regardless of MAX_STORES_TO_SINK setting.
9358 Generalize what a BB with a single eligible store is.
9360 2018-03-19 Richard Biener <rguenther@suse.de>
9362 PR tree-optimization/84929
9363 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
9364 chrec_is_positive against non-chrec arg.
9366 2018-03-19 Tamar Christina <tamar.christina@arm.com>
9369 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
9371 2018-03-18 Martin Liska <mliska@suse.cz>
9373 PR rtl-optimization/84635
9374 * regrename.c (build_def_use): Use matches_mode only when
9377 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
9379 PR tree-optimization/84913
9380 * tree-vect-loop.c (vectorizable_reduction): Don't try to
9381 vectorize chains of COND_EXPRs.
9383 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
9385 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
9387 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
9389 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
9391 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
9393 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
9395 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
9396 Kito Cheng <kito.cheng@gmail.com>
9398 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
9399 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
9400 (nds32_adjust_reg_alloc_order): New function.
9401 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
9403 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
9405 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
9406 nds32_print_operand, nds32_print_operand_address): Use
9407 HOST_WIDE_INT_PRINT_DEC instead.
9409 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
9411 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
9413 2018-03-17 Jakub Jelinek <jakub@redhat.com>
9416 * config/i386/i386.c (initial_ix86_tune_features,
9417 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
9419 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
9420 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
9421 rather than 1u << ix86_tune. Formatting fix.
9422 (ix86_option_override_internal): Change ix86_arch_mask from
9423 unsigned int to unsigned HOST_WIDE_INT, initialize to
9424 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
9425 (ix86_function_specific_restore): Likewise.
9427 2018-03-16 Jakub Jelinek <jakub@redhat.com>
9430 * postreload.c (reload_combine_recognize_pattern): Perform
9431 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
9432 truncate_int_for_mode the result for the destination's mode.
9435 * hsa-gen.c (mem_type_for_type): Fix comment typo.
9436 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
9438 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9441 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
9444 * lra-assigns.c (lra_split_hard_reg_for): Don't use
9445 regno_allocno_class_array and sorted_pseudos.
9446 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
9447 insns where regno is used.
9449 2018-03-16 Martin Liska <mliska@suse.cz>
9452 * multiple_target.c (create_dispatcher_calls): Redirect
9453 reference in the symbol table.
9455 2018-03-16 Martin Liska <mliska@suse.cz>
9458 * multiple_target.c (create_dispatcher_calls): Redirect also
9461 2018-03-16 Jakub Jelinek <jakub@redhat.com>
9465 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
9466 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
9467 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
9469 2018-03-16 Julia Koval <julia.koval@intel.com>
9471 * doc/invoke.texi (Skylake Server): Add CLWB.
9472 Cannonlake): Remove CLWB.
9474 2018-03-16 Jakub Jelinek <jakub@redhat.com>
9476 PR tree-optimization/84841
9477 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
9479 (FLOAT_ONE_CONST_TYPE): Define.
9480 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
9481 (sort_by_operand_rank): Put entries with higher constant_type last
9482 rather than first to match comments.
9484 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
9486 * config/nios2/nios2.md (movsi_internal): Fix thinko in
9489 2018-03-15 Jakub Jelinek <jakub@redhat.com>
9492 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
9493 check and use address of target always.
9495 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
9498 * config/i386/i386.c (indirect_thunk_needed): Update comments.
9499 (indirect_thunk_bnd_needed): Likewise.
9500 (indirect_thunks_used): Likewise.
9501 (indirect_thunks_bnd_used): Likewise.
9502 (indirect_return_needed): New.
9503 (indirect_return_bnd_needed): Likewise.
9504 (output_indirect_thunk_function): Add a bool argument for
9506 (output_indirect_thunk_function): Don't generate alias for
9507 function return thunk.
9508 (ix86_code_end): Call output_indirect_thunk_function to generate
9509 function return thunks.
9510 (ix86_output_function_return): Set indirect_return_bnd_needed
9511 and indirect_return_needed instead of indirect_thunk_bnd_needed
9512 and indirect_thunk_needed.
9514 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
9516 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
9517 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
9518 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
9520 2018-03-15 David Malcolm <dmalcolm@redhat.com>
9521 Paul Hua <paul.hua.gm@gmail.com>
9524 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
9526 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
9528 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
9529 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
9532 2018-03-15 Tamar Christina <tamar.christina@arm.com>
9535 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9536 instead of GET_MODE_SIZE when comparing Units.
9538 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9541 * varasm.c (hash_section): Return an unchangeble hash value
9542 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
9543 Return !aarch64_can_use_per_function_literal_pools_p ().
9545 2018-03-15 Jakub Jelinek <jakub@redhat.com>
9548 * optabs.c (emit_conditional_move): Pass address of cmode's copy
9549 rather than address of cmode as last argument to prepare_cmp_insn.
9551 2018-03-15 Julia Koval <julia.koval@intel.com>
9553 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
9554 F_AVX512VNNI, F_AVX512BITALG): New.
9556 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
9559 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
9560 insn for floating-point loads and stores.
9562 2018-03-14 Carl Love <cel@us.ibm.com>
9564 * config/rs6000/rs6000-c.c: Add macro definitions for
9565 ALTIVEC_BUILTIN_VEC_PERMXOR.
9566 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
9567 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
9568 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
9569 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
9571 * config/doc/extend.texi: Add prototypes for vec_permxor.
9573 2018-03-14 David Malcolm <dmalcolm@redhat.com>
9576 * diagnostic-show-locus.c (class layout_point): Convert m_line
9577 from int to linenum_type.
9578 (line_span::comparator): Use linenum "compare" function when
9579 comparing line numbers.
9580 (test_line_span): New function.
9581 (layout_range::contains_point): Convert param "row" from int to
9583 (layout_range::intersects_line_p): Likewise.
9584 (layout::will_show_line_p): Likewise.
9585 (layout::print_source_line): Likewise.
9586 (layout::should_print_annotation_line_p): Likewise.
9587 (layout::print_annotation_line): Likewise.
9588 (layout::print_leading_fixits): Likewise.
9589 (layout::annotation_line_showed_range_p): Likewise.
9590 (struct line_corrections): Likewise for field m_row.
9591 (line_corrections::line_corrections): Likewise for param "row".
9592 (layout::print_trailing_fixits): Likewise.
9593 (layout::get_state_at_point): Likewise.
9594 (layout::get_x_bound_for_row): Likewise.
9595 (layout::print_line): Likewise.
9596 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
9597 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
9598 * input.c (selftest::test_linenum_comparisons): New function.
9599 (selftest::input_c_tests): Call it.
9600 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
9601 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
9602 * selftest.h (ASSERT_GT): New macro.
9603 (ASSERT_GT_AT): New macro.
9604 (ASSERT_LT): New macro.
9605 (ASSERT_LT_AT): New macro.
9607 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
9609 PR rtl-optimization/84780
9610 * combine.c (distribute_links): Don't make a link based on pc_rtx.
9612 2018-03-14 Martin Liska <mliska@suse.cz>
9614 * tree.c (record_node_allocation_statistics): Use
9615 get_stats_node_kind.
9616 (get_stats_node_kind): New function extracted from
9617 record_node_allocation_statistics.
9618 (free_node): Use get_stats_node_kind.
9620 2018-03-14 Richard Biener <rguenther@suse.de>
9622 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
9623 that the value-set of ANTIC_IN doesn't grow.
9626 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9628 (BB_VISITED_WITH_VISITED_SUCCS): New define.
9629 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9631 2018-03-14 Julia Koval <julia.koval@intel.com>
9633 * config.gcc (icelake-client, icelake-server): New.
9635 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
9636 (initial_ix86_arch_features): Ditto.
9637 (PTA_SKYLAKE): Add SGX.
9638 (PTA_ICELAKE): Remove.
9639 (PTA_ICELAKE_CLIENT): New.
9640 (PTA_ICELAKE_SERVER): New.
9641 (ix86_option_override_internal): Split up icelake on icelake client and
9643 (get_builtin_code_for_version): Ditto.
9644 (fold_builtin_cpu): Ditto.
9645 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
9646 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
9647 * config/i386/i386.h (processor_type): Ditto.
9648 * doc/invoke.texi: Ditto.
9650 2018-03-14 Jakub Jelinek <jakub@redhat.com>
9653 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
9654 INTEGER_CST offset, add it together with bitpos / 8 and
9655 sign extend based on POINTER_SIZE.
9659 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
9662 * config/i386/constraints.md (Yc): New register constraint.
9663 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
9664 Use Yc constraint for alternative 2 of operand 0. Remove
9665 preferred_for_speed attribute.
9667 2018-03-14 Richard Biener <rguenther@suse.de>
9669 PR tree-optimization/84830
9670 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
9671 with the old one to avoid oscillations.
9673 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
9676 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
9678 (assign_by_spills): Return a flag of reload assignment failure.
9679 Do not process the reload assignment failures. Do not spill other
9680 reload pseudos if they has the same reg class. Update n if
9682 (lra_assign): Add a return arg. Set up from the result of
9683 assign_by_spills call.
9684 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9685 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
9686 usage_insns if it is not NULL.
9687 (spill_hard_reg_in_range): New function.
9688 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9689 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9690 function prototypes.
9691 (lra_assign): Change prototype.
9692 * lra.c (lra): Add code to deal with fails by splitting hard reg
9695 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
9697 * config/riscv/riscv.opt (mrelax): New option.
9698 * config/riscv/riscv.c (riscv_file_start): Emit ".option
9699 "norelax" when riscv_mrelax is disabled.
9700 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
9702 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
9705 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
9706 reassociation for int modes.
9708 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
9710 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
9711 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
9713 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
9714 * config/aarch64/aarch64-sve.md
9715 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
9716 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
9717 (*extend<mode><Vwide>2): Rename to...
9718 (aarch64_sve_extend<mode><Vwide>2): ...this.
9719 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
9720 renaming the old pattern to...
9721 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
9723 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
9724 define_expand, renaming the old pattern to...
9725 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
9726 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
9727 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
9728 account when deciding which SVE instruction the optab should use.
9729 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
9731 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
9733 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
9734 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
9735 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
9736 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
9737 (tlsdesc_small_<mode>): Turn a define_expand and use
9738 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
9739 (tlsdesc_small_advsimd_<mode>): ...this.
9740 (tlsdesc_small_sve_<mode>): New pattern.
9742 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
9744 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
9745 (UNSPEC_UMUL_HIGHPART): New constants.
9746 (MUL_HIGHPART): New int iteraor.
9747 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
9748 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
9750 (*<su>mul<mode>3_highpart): New define_insn.
9752 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
9755 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9758 2018-03-13 Martin Liska <mliska@suse.cz>
9761 * (sem_item_optimizer::sem_item_optimizer): Initialize new
9763 (sem_item_optimizer::~sem_item_optimizer): Release it.
9764 (sem_item_optimizer::merge_classes): Register variable aliases.
9765 (sem_item_optimizer::fixup_pt_set): New function.
9766 (sem_item_optimizer::fixup_points_to_sets): Likewise.
9767 * ipa-icf.h: Declare new variables and functions.
9769 2018-03-13 Jakub Jelinek <jakub@redhat.com>
9772 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
9773 integer_pow2p@2 and test integer_pow2p in condition.
9774 (A < 0 ? C : 0): Similarly for @1.
9777 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
9778 characters starting at p contain '\0' character, don't look beyond
9782 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
9783 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
9786 * reg-stack.c (change_stack): Change update_end var from int to
9787 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
9788 also call set_block_for_insn on the newly added insns and rescan.
9791 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
9792 on the last operand.
9795 * tree.c (stabilize_reference_1): Return save_expr (e) for
9796 STATEMENT_LIST even if it doesn't have side-effects.
9798 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
9800 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
9802 2018-03-12 Renlin Li <renlin.li@arm.com>
9804 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
9805 aarch64_output_scalar_simd_mov_immediate.
9807 2018-03-12 Martin Sebor <msebor@redhat.com>
9809 PR tree-optimization/83456
9810 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
9811 for perfectly overlapping calls to memcpy.
9812 (gimple_fold_builtin_memory_chk): Same.
9813 (gimple_fold_builtin_strcpy): Handle no-warning.
9814 (gimple_fold_builtin_stxcpy_chk): Same.
9815 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
9817 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
9819 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
9820 parameter. Use it for SFmode.
9821 (rs6000_function_arg_advance_1): Adjust.
9822 (rs6000_function_arg): Adjust.
9823 (rs6000_gimplify_va_arg): Pass false for that new parameter.
9825 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
9827 PR rtl-optimization/84169
9828 PR rtl-optimization/84780
9829 * combine.c (can_combine_p): Check for a 2-insn combination whether
9830 the destination register is used between the two insns, too.
9832 2018-03-12 Richard Biener <rguenther@suse.de>
9834 PR tree-optimization/84803
9835 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
9836 for refs DR analysis didn't process.
9838 2018-03-12 Richard Biener <rguenther@suse.de>
9840 PR tree-optimization/84777
9841 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
9842 force-vectorize loops ignore whether we are optimizing for size.
9844 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
9846 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
9847 (TARGET_MD_ASM_ADJUST): Define.
9849 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
9850 Kito Cheng <kito.cheng@gmail.com>
9851 Chung-Ju Wu <jasonwucj@gmail.com>
9853 * config/nds32/nds32.c (nds32_compute_stack_frame,
9854 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
9855 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
9856 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
9857 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
9858 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
9859 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
9860 * config/nds32/nds32.md (prologue, epilogue): Use macro
9861 NDS32_V3PUSH_AVAILABLE_P to do checking.
9863 2018-03-11 Jakub Jelinek <jakub@redhat.com>
9866 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
9867 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
9868 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
9869 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
9870 addition of most attributes on !orig_type_die or the attribute not
9871 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
9873 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
9874 Chung-Ju Wu <jasonwucj@gmail.com>
9876 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
9878 * config/nds32/nds32.opt (mvh): New option.
9880 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
9881 Chung-Ju Wu <jasonwucj@gmail.com>
9883 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
9885 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
9886 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
9889 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
9890 Chung-Ju Wu <jasonwucj@gmail.com>
9892 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
9894 * config/nds32/nds32-multiple.md (strlensi): New pattern.
9895 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
9897 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
9898 Kito Cheng <kito.cheng@gmail.com>
9899 Chung-Ju Wu <jasonwucj@gmail.com>
9901 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
9902 UNSPEC_FFMISM and UNSPEC_FLMISM.
9903 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
9904 for ffb, ffmism and flmism.
9905 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
9906 (unspec_ffmism): Ditto.
9907 (unspec_flmism): Ditto.
9908 (nds32_expand_builtin_impl): Check if string extension is available.
9909 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
9910 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
9912 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
9915 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
9918 * lra-assigns.c (assign_by_spills): Return a flag of reload
9919 assignment failure. Do not process the reload assignment
9920 failures. Do not spill other reload pseudos if they has the same
9922 (lra_assign): Add a return arg. Set up from the result of
9923 assign_by_spills call.
9924 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9925 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
9926 usage_insns if it is not NULL.
9927 (spill_hard_reg_in_range): New function.
9928 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9929 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9930 function prototypes.
9931 (lra_assign): Change prototype.
9932 * lra.c (lra): Add code to deal with fails by splitting hard reg
9935 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
9938 * config/i386/i386.opt: Replace Enforcment with Enforcement.
9940 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
9943 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
9944 (dw_val_node): Add val_symbolic_view.
9945 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
9946 (symview_upper_bound): New.
9947 (new_line_info_table): Initialize symviews_since_reset.
9948 (dwarf2out_source_line): Count symviews_since_reset and set
9949 symview_upper_bound.
9950 (dw_val_equal_p): Handle symview.
9951 (add_AT_symview): New.
9952 (print_dw_val): Handle symview.
9953 (attr_checksum, attr_checksum_ordered): Likewise.
9954 (same_dw_val_p, size_of_die): Likewise.
9955 (value_format, output_die): Likewise.
9956 (add_high_low_attributes): Use add_AT_symview for entry_view.
9957 (dwarf2out_finish): Reset symview_upper_bound, clear
9960 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
9963 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
9964 Add strict argument and use it.
9965 (rs6000_split_multireg_move): Update for new strict argument.
9966 (mem_operand_gpr): Disallow all non-offsettable addresses.
9967 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
9969 2018-03-09 Jakub Jelinek <jakub@redhat.com>
9972 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
9973 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
9974 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
9977 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
9978 decl, use remap_type if we want to use the type.
9980 2018-03-09 Martin Sebor <msebor@redhat.com>
9982 PR tree-optimization/84526
9983 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9985 (builtin_access::generic_overlap): Be prepared to handle non-array
9988 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
9990 PR rtl-optimization/84682
9991 * lra-constraints.c (process_address_1): Check is_address flag
9992 for address constraints.
9993 (process_alt_operands): Likewise.
9994 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
9995 preprocess_constraints.
9996 * recog.h (preprocess_constraints): Add oploc parameter.
9998 * recog.c (preprocess_constraints): Test address_operand for
9999 CT_ADDRESS constraints.
10001 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
10004 * lra-assigns.c (assign_by_spills): Return a flag of reload
10005 assignment failure. Do not process the reload assignment
10006 failures. Do not spill other reload pseudos if they has the same
10008 (lra_assign): Add a return arg. Set up from the result of
10009 assign_by_spills call.
10010 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10011 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
10012 usage_insns if it is not NULL.
10013 (spill_hard_reg_in_range): New function.
10014 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10015 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10016 function prototypes.
10017 (lra_assign): Change prototype.
10018 * lra.c (lra): Add code to deal with fails by splitting hard reg
10021 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10024 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
10025 Accept complain bool parameter. Only emit errors if it is true.
10026 (arm_parse_cpu_option_name): Likewise.
10027 (arm_target_thumb_only): Adjust callers of the above.
10028 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
10029 prototype to take a default true bool parameter.
10030 (arm_parse_arch_option_name): Likewise.
10032 2018-03-09 David Malcolm <dmalcolm@redhat.com>
10033 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10037 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
10038 * configure: Regenerate.
10039 * configure.ac ("linker --version-script option"): New.
10040 ("linker soname option"): New.
10042 2018-03-09 Richard Biener <rguenther@suse.de>
10044 PR tree-optimization/84775
10045 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
10046 immediate uses of predicate stmts and mark them modified.
10049 PR tree-optimization/84178
10050 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10052 (version_loop_for_if_conversion): Delay update_ssa call.
10053 (tree_if_conversion): Delay update_ssa until after predicate
10056 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
10059 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
10060 when the function accesses prior frames.
10062 2018-03-08 Jakub Jelinek <jakub@redhat.com>
10065 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
10066 gen_llsym, otherwise call maybe_gen_llsym.
10068 PR inline-asm/84742
10069 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
10070 has ',' character inside of it.
10072 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10075 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
10076 as clobbering CC_REGNUM.
10078 2018-03-08 Richard Biener <rguenther@suse.de>
10080 PR middle-end/84552
10081 * tree-scalar-evolution.c: Include tree-into-ssa.h.
10082 (follow_copies_to_constant): Do not follow SSA names registered
10085 2018-03-08 Richard Biener <rguenther@suse.de>
10087 PR tree-optimization/84178
10088 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10090 (version_loop_for_if_conversion): Delay update_ssa call.
10091 (tree_if_conversion): Delay update_ssa until after predicate
10094 2018-03-08 David Malcolm <dmalcolm@redhat.com>
10096 PR tree-optimization/84178
10097 * tree-if-conv.c (release_bb_predicate): Remove the
10098 the assertion that the stmts have NULL use_ops.
10099 Discard the statements, asserting that they haven't
10100 yet been added to a BB.
10102 2018-03-08 Richard Biener <rguenther@suse.de>
10104 PR tree-optimization/84746
10105 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
10106 (phi_translate): Pass in destination ANTIC_OUT set.
10107 (phi_translate_1): Likewise. For a simplified result lookup
10108 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
10109 (phi_translate_set): Adjust.
10110 (do_pre_regular_insertion): Likewise.
10111 (do_pre_partial_partial_insertion): Likewise.
10113 2018-03-08 Martin Liska <mliska@suse.cz>
10115 PR gcov-profile/84735
10116 * doc/gcov.texi: Document usage of profile files.
10117 * gcov-io.h: Document changes in the format.
10119 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
10123 * dwarf2out.c (struct dw_line_info_table): Update comments for
10125 (FORCE_RESET_NEXT_VIEW): New.
10126 (FORCE_RESETTING_VIEW_P): New.
10127 (RESETTING_VIEW_P): Check for -1 too.
10128 (ZERO_VIEW_P): Likewise.
10129 (new_line_info_table): Force-reset next view.
10130 (dwarf2out_begin_function): Likewise.
10131 (dwarf2out_source_line): Simplify zero_view_p initialization.
10132 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
10133 view directly. Omit view when omitting .loc at line 0.
10135 2018-03-08 Jakub Jelinek <jakub@redhat.com>
10137 PR tree-optimization/84740
10138 * tree-switch-conversion.c (process_switch): Call build_constructors
10139 only if info.phi_count is non-zero.
10141 PR tree-optimization/84739
10142 * tree-tailcall.c (find_tail_calls): Check call arguments against
10143 DECL_ARGUMENTS (current_function_decl) rather than
10144 DECL_ARGUMENTS (func) when checking for tail recursion.
10146 2018-03-07 Jakub Jelinek <jakub@redhat.com>
10148 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
10149 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
10150 Volker Reichelt's entry and add entries for people that perform
10151 GCC fuzzy testing and report numerous bugs.
10153 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
10156 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
10157 readonly data in sdata, if that is disabled.
10158 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
10159 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
10160 -mreadonly-in-sdata option.
10162 2018-03-07 Martin Sebor <msebor@redhat.com>
10164 PR tree-optimization/84468
10165 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
10166 basic block when looking for nul assignment.
10168 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
10171 * except.h (output_function_exception_table): Adjust prototype.
10172 * except.c (output_function_exception_table): Remove FNNAME parameter
10173 and add SECTION parameter. Ouput one part of the table at a time.
10174 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
10175 the first part of the exception table and emit unwind directives.
10176 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
10177 (i386_pe_seh_cold_init): Likewise.
10178 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
10179 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
10180 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
10181 (ix86_output_call_insn): Emit a nop in one more case for SEH.
10182 * config/i386/winnt.c: Include except.h.
10183 (struct seh_frame_state): Add reg_offset, after_prologue and
10184 in_cold_section fields.
10185 (i386_pe_seh_end_prologue): Set seh->after_prologue.
10186 (i386_pe_seh_cold_init): New function.
10187 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
10188 to seh->in_cold_section.
10189 (seh_emit_push): Record the offset of the push.
10190 (seh_emit_save): Record the offet of the save.
10191 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
10192 Test seh->after_prologue to disregard the epilogue.
10193 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
10194 (i386_pe_end_cold_function): New function.
10196 2018-03-07 Jakub Jelinek <jakub@redhat.com>
10199 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
10200 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
10203 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
10205 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
10206 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
10208 PR middle-end/84723
10209 * multiple_target.c: Include tree-inline.h and intl.h.
10210 (expand_target_clones): Diagnose and fail if node->definition and
10211 !tree_versionable_function_p (node->decl).
10213 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
10215 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
10217 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
10218 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
10219 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
10221 2018-03-06 Jakub Jelinek <jakub@redhat.com>
10224 * combine.c (try_combine): Use reg_or_subregno instead of handling
10225 just paradoxical SUBREGs and REGs.
10227 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
10229 * config/arc/arc.c (arc_finalize_pic): Remove function.
10230 (arc_must_save_register): We use single base PIC register, remove
10231 checks to save/restore the PIC register.
10232 (arc_expand_prologue): Likewise.
10233 * config/arc/arc-protos.h (arc_set_default_type_attributes):
10235 (arc_verify_short): Likewise.
10236 (arc_attr_type): Likewise.
10237 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
10238 (walk_stores): Likewise.
10239 (arc_address_cost): Make it static.
10240 (arc_verify_short): Likewise.
10241 (branch_dest): Likewise.
10242 (arc_attr_type): Likewise.
10243 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
10244 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
10245 (arc_final_prescan_insn): Remove inserting the nops due to
10246 hardware hazards. It is done in reorg step.
10247 (insn_length_variant_t): Remove.
10248 (insn_length_parameters_t): Likewise.
10249 (arc_insn_length_parameters): Likewise.
10250 (arc_get_insn_variants): Likewise.
10251 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
10253 2018-03-06 Jakub Jelinek <jakub@redhat.com>
10255 PR inline-asm/84683
10256 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
10259 PR tree-optimization/84687
10260 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
10262 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
10264 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10266 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
10267 Rename to ppc_speculation_barrier.
10268 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
10269 __builtin_ppc_speculation_barrier.
10271 2018-03-05 Jakub Jelinek <jakub@redhat.com>
10274 * combine.c (combine_simplify_rtx): Don't try to simplify if
10275 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
10278 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
10280 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
10281 to 32 bytes when compiling for POWER9.
10283 2018-03-05 Jakub Jelinek <jakub@redhat.com>
10286 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
10287 regparm >= 3 with no arg reg available also for calls with
10288 flag_force_indirect_call. Pass decl to ix86_function_regparm.
10291 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
10293 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
10295 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
10298 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
10300 2018-03-05 Richard Biener <rguenther@suse.de>
10302 PR tree-optimization/84486
10303 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
10304 When inserting a __builtin_assume_aligned call set the LHS
10305 SSA name alignment info accordingly.
10307 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
10309 PR tree-optimization/84114
10310 * config/aarch64/aarch64.c (aarch64_reassociation_width)
10311 Avoid reassociation of FLOAT_MODE addition.
10313 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
10315 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
10316 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
10317 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
10318 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
10319 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
10320 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
10321 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
10323 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
10324 __builtin_ia32_wbinvd): New builtins.
10325 (SPECIAL_ARGS2): New.
10326 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
10327 (SPECIAL_ARGS2): New.
10328 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
10329 (ix86_valid_target_attribute_inner_p): Ditto.
10330 (ix86_init_mmx_sse_builtins): Add special_args2.
10331 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
10332 TARGET_WBNOINVD_P): New.
10333 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
10334 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
10335 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
10336 * config/i386/immintrin.h (_wbinvd): New intrinsic.
10337 * config/i386/pconfigintrin.h: New file.
10338 * config/i386/wbnoinvdintrin.h: Ditto.
10339 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
10341 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
10343 2018-03-05 Richard Biener <rguenther@suse.de>
10345 PR tree-optimization/84670
10346 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10348 (BB_VISITED_WITH_VISITED_SUCCS): New define.
10349 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10350 (compute_antic_aux): Only assert the number of values in ANTIC_IN
10351 doesn't grow if all successors (recursively) were visited at least
10354 2018-03-05 Richard Biener <rguenther@suse.de>
10356 PR tree-optimization/84650
10357 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
10358 if executed in the loop pipeline.
10360 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
10362 * doc/configfiles.texi (Configuration Files): Move info about
10363 conditionalizing $target-protos.h to...
10364 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
10365 differs from $target-protos.h.
10367 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
10368 Chung-Ju Wu <jasonwucj@gmail.com>
10370 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
10371 * config/nds32/nds32-multiple.md (setmemsi): Define.
10372 * config/nds32/nds32-memory-manipulation.c
10373 (nds32_gen_dup_4_byte_to_word_value): New.
10374 (emit_setmem_word_loop): New.
10375 (emit_setmem_byte_loop): New.
10376 (nds32_expand_setmem_loop): New.
10377 (nds32_expand_setmem_loop_v3m): New.
10378 (nds32_expand_setmem_unroll): New.
10379 (nds32_expand_setmem): New.
10381 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
10382 Chung-Ju Wu <jasonwucj@gmail.com>
10384 * config/nds32/nds32-memory-manipulation.c
10385 (nds32_emit_load_store): New.
10386 (nds32_emit_post_inc_load_store): New.
10387 (nds32_emit_mem_move): New.
10388 (nds32_emit_mem_move_block): New.
10389 (nds32_expand_movmemsi_loop_unknown_size): New.
10390 (nds32_expand_movmemsi_loop_known_size): New.
10391 (nds32_expand_movmemsi_loop): New.
10392 (nds32_expand_movmemsi_unroll): New.
10393 (nds32_expand_movmemqi): Rename ...
10394 (nds32_expand_movmemsi): ... to this.
10395 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
10396 (movmemsi): ... to this.
10397 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
10398 (nds32_expand_movmemsi): ... to this.
10400 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
10401 Monk Chiang <sh.chiang04@gmail.com>
10402 Chung-Ju Wu <jasonwucj@gmail.com>
10404 * config/nds32/nds32-protos.h
10405 (nds32_expand_load_multiple): New arguments.
10406 (nds32_expand_store_multiple): Ditto.
10407 (nds32_valid_multiple_load_store): Rename ...
10408 (nds32_valid_multiple_load_store_p): ... to this.
10409 * config/nds32/nds32-memory-manipulation.c
10410 (nds32_expand_load_multiple): Refine implementation.
10411 (nds32_expand_store_multiple): Ditto.
10412 * config/nds32/nds32-multiple.md
10413 (load_multiple): Update nds32_expand_load_multiple interface.
10414 (store_multiple): Update nds32_expand_store_multiple interface.
10415 * config/nds32/nds32-predicates.c
10416 (nds32_valid_multiple_load_store): Rename ...
10417 (nds32_valid_multiple_load_store_p): ... to this and refine
10419 * config/nds32/predicates.md
10420 (nds32_load_multiple_and_update_address_operation): New predicate.
10421 (nds32_store_multiple_and_update_address_operation): New predicate.
10423 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
10424 Chung-Ju Wu <jasonwucj@gmail.com>
10426 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
10427 (combo): New attribute.
10428 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
10430 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
10432 * config/nds32/nds32.opt: Change -mcmodel= default value.
10434 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
10435 Monk Chiang <sh.chiang04@gmail.com>
10436 Chung-Ju Wu <jasonwucj@gmail.com>
10438 * config/nds32/constants.md (unspec_element): New enum.
10439 * config/nds32/constraints.md (Umw): New constraint.
10440 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
10441 * config/nds32/nds32-intrinsic.md: Likewise.
10442 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
10443 (nds32_valid_smw_lwm_base_p): New.
10444 (nds32_output_smw_single_word): New.
10445 (nds32_output_lmw_single_word): New.
10446 (nds32_expand_unaligned_load): New.
10447 (nds32_expand_unaligned_store): New.
10448 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
10449 (nds32_output_smw_single_word): Declare.
10450 (nds32_output_lmw_single_word): Declare.
10451 (nds32_expand_unaligned_load): Declare.
10452 (nds32_expand_unaligned_store): Declare.
10453 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
10454 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
10455 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
10456 NDS32_BUILTIN_UASTORE_DW.
10457 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
10460 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
10461 Kito Cheng <kito.cheng@gmail.com>
10462 Chung-Ju Wu <jasonwucj@gmail.com>
10464 * config/nds32/nds32-intrinsic.c
10465 (nds32_expand_builtin_null_ftype_reg): Delete.
10466 (nds32_expand_builtin_reg_ftype_imm): Ditto.
10467 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
10468 (nds32_read_argument): New.
10469 (nds32_legitimize_target): Ditto.
10470 (nds32_legitimize_argument): Ditto.
10471 (nds32_check_constant_argument): Ditto.
10472 (nds32_expand_unop_builtin): Ditto.
10473 (nds32_expand_unopimm_builtin): Ditto.
10474 (nds32_expand_binop_builtin): Ditto.
10475 (nds32_builtin_decl_impl): Ditto.
10476 (builtin_description): Ditto.
10477 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
10478 (nds32_init_builtins_impl): Ditto.
10479 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
10480 (nds32_builtin_decl): New.
10481 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
10482 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
10484 2018-03-02 Jeff Law <law@redhat.com>
10486 * reorg.c (stop_search_p): Handle DEBUG_INSN.
10487 (redundant_insn, fill_simple_delay_slots): Likewise.
10488 (fill_slots_from_thread): Likewise.
10489 * resource.c (mark_referenced_resources): Likewise.
10490 (mark_set_resources, find_dead_or_set_registers): Likewise.
10492 2018-03-02 Jakub Jelinek <jakub@redhat.com>
10494 * substring-locations.h (format_warning_va): Formatting fix for
10495 ATTRIBUTE_GCC_DIAG.
10496 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
10498 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
10499 * substring-locations.c: Include intl.h.
10500 (format_warning_va): Turned into small wrapper around
10501 format_warning_n_va, renamed to ...
10502 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
10503 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
10505 (format_warning_at_substring_n): New function.
10506 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
10507 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
10508 format_warning_at_substring with just a shorter name instead of
10509 const function pointer.
10510 (fmtwarn_n): New function.
10511 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
10512 appropriate, get rid of all the fmtstr temporaries, move conditionals
10513 with G_() wrapped string literals directly into fmtwarn arguments,
10514 cast dir.len to (int), formatting fixes.
10516 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
10518 * doc/invoke.texi: Remove "Cilk Plus" references.
10520 2018-03-02 Jakub Jelinek <jakub@redhat.com>
10521 Richard Biener <rguenther@suse.de>
10524 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
10525 for error or warning attributes if CALL_FROM_THUNK_P is set.
10528 2018-03-02 Jakub Jelinek <jakub@redhat.com>
10531 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
10532 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
10535 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
10536 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
10538 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
10539 instead of -1U in last predictors element's probability member.
10541 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10544 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10545 arguments if they are comparable.
10547 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
10549 PR tree-optimization/84634
10550 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
10551 masks and masked_loop_p with a single loop_masks, making sure it's
10552 null for bb vectorization.
10554 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
10556 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10557 (vect_analyze_data_ref_access): Use loop->safe_len rather than
10558 loop->force_vectorize to check whether there is no alias.
10560 2018-03-02 Jakub Jelinek <jakub@redhat.com>
10563 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
10565 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
10567 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
10568 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
10569 instead of a loop around prev_real_insn.
10570 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
10573 PR inline-asm/84625
10574 * config/i386/i386.c (ix86_print_operand): Use conditional
10575 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
10578 2018-03-02 Richard Biener <rguenther@suse.de>
10580 PR tree-optimization/84427
10581 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
10582 (bitmap_set_subtract_values): Rewrite to handle multiple
10585 (prune_clobbered_mems): Likewise.
10586 (phi_translate): Take edge instead of pred/phiblock.
10587 (phi_translate_1): Likewise.
10588 (phi_translate_set): Likewise. Insert all translated
10589 exprs for a value into the set, keeping possibly multiple
10590 expressions per value.
10591 (compute_antic_aux): Adjust for phi_translate changes.
10592 When intersecting union the expressions and prune those
10593 not in the final value set, keeping possibly multiple
10594 expressions per value. Do not use value-insertion
10595 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
10596 all expressions. Add verification that the value-sets
10597 only shrink during iteration.
10598 (compute_partial_antic_aux): Adjust for the phi_translate changes.
10599 (do_pre_regular_insertion): Likewise.
10600 (do_pre_partial_partial_insertion): Likewise.
10602 2018-03-02 Richard Biener <rguenther@suse.de>
10605 * config/darwin.c (saved_debug_info_level): New static global.
10606 (darwin_asm_lto_start): Disable debug info generation for LTO out.
10607 (darwin_asm_lto_end): Restore debug info generation settings.
10609 2018-03-01 Martin Liska <mliska@suse.cz>
10612 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
10613 volatile arguments.
10615 2018-03-01 Richard Biener <rguenther@suse.de>
10618 * dwarf2out.c (gen_variable_die): Properly handle late VLA
10619 type annotation with LTO when debug was disabled at compile-time.
10621 2018-03-01 Matthew Fortune <mfortune@gmail.com>
10623 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
10625 (mips_final_postscan_insn): Likewise.
10627 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
10629 PR rtl-optimization/84528
10630 * alias.c (init_alias_target): Add commentary.
10631 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
10632 a unique base value if the frame pointer is not eliminated
10633 to the stack pointer.
10635 2018-03-01 Tom de Vries <tom@codesourcery.com>
10637 PR rtl-optimization/83327
10638 * lra-int.h (hard_regs_spilled_into): Declare.
10639 * lra.c (hard_regs_spilled_into): Define.
10640 (init_reg_info): Init hard_regs_spilled_into.
10641 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
10642 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
10643 (process_bb_lives): Handle hard_regs_spilled_into.
10644 (lra_create_live_ranges_1): Before doing liveness propagation, clear
10645 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
10647 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
10649 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
10650 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
10651 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
10652 * config/rs6000/aix72.h: New file.
10654 2018-02-28 Jakub Jelinek <jakub@redhat.com>
10656 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
10657 instead of warning_at with conditional singular and plural messages
10661 * stor-layout.c (update_alignment_for_field): For
10662 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
10663 && !DECL_PACKED (field), do the alignment update, just use
10664 only desired_align instead of MAX (type_align, desired_align)
10666 (place_field): Don't do known_align < desired_align handling
10667 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
10668 is non-NULL, instead do it after rli->prev_field handling and
10669 only if not within a bitfield word. For DECL_PACKED (field)
10670 use type_align of BITS_PER_UNIT.
10672 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
10674 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
10675 superfluous parentheses and trailing spaces.
10677 2018-02-28 Richard Biener <rguenther@suse.de>
10679 PR tree-optimization/84584
10680 * graphite-scop-detection.c (scop_detection::add_scop): Discard
10681 SCoPs with fake exit edge.
10683 2018-02-28 Martin Liska <mliska@suse.cz>
10686 * timevar.c (timer::print): Fix format to properly print 100%
10689 2018-02-28 Richard Biener <rguenther@suse.de>
10691 PR middle-end/84607
10692 * genmatch.c (capture_info::walk_match): Do not mark
10693 captured expressions without operands as expr_p given
10694 they act more like predicates and should be subject to
10695 "lost tail" side-effect preserving.
10697 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
10699 PR rtl-optimization/81611
10700 * auto-inc-dec.c (attempt_change): Move dead note from
10701 mem_insn if it's the next use of regno
10702 (find_address): Take address use of reg holding
10703 non-incremented value. Add parm to limit search to the named
10705 (merge_in_block): Attempt to use a mem insn that is the next
10706 use of the original regno.
10708 2018-02-27 Martin Sebor <msebor@redhat.com>
10711 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
10712 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
10714 2018-02-27 Martin Sebor <msebor@redhat.com>
10716 PR translation/84207
10717 * diagnostic-core.h (warning_n, error_n, inform_n): Change
10718 n argument to unsigned HOST_WIDE_INT.
10719 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
10720 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
10721 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
10722 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
10724 2018-02-27 Richard Biener <rguenther@suse.de>
10726 PR tree-optimization/84512
10727 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
10728 Do not use the estimate returned from record_stmt_cost for
10729 the scalar iteration cost but sum properly using add_stmt_cost.
10731 2018-02-27 Richard Biener <rguenther@suse.de>
10733 PR tree-optimization/84466
10734 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10735 Adjust last change to less strictly validate use operands.
10737 2018-02-27 Martin Liska <mliska@suse.cz>
10739 PR gcov-profile/84548
10740 * gcov.c (process_file): Allow partial overlap and consider it
10741 also as group functions.
10742 (output_lines): Properly calculate range of lines for a group.
10744 2018-02-27 Martin Liska <mliska@suse.cz>
10746 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
10747 'ggc' suffixes. Change first column width.
10748 (timer::print): Fix formatting of the column.
10750 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
10752 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
10753 preserve inline entry blocks for the sake of debug inline
10754 entry point markers alone.
10755 (remove_unused_locals): Suggest in comments a better place to
10756 force the preservation of inline entry blocks that are
10757 otherwise unused, but do not preserve them.
10759 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
10761 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
10763 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
10766 * config/i386/constraints.md (Bs): Replace
10767 ix86_indirect_branch_register with
10768 TARGET_INDIRECT_BRANCH_REGISTER.
10770 * config/i386/i386.md (indirect_jump): Likewise.
10771 (tablejump): Likewise.
10772 (*sibcall_memory): Likewise.
10773 (*sibcall_value_memory): Likewise.
10774 Peepholes of indirect call and jump via memory: Likewise.
10775 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
10776 (*sibcall_value_GOT_32): Likewise.
10777 * config/i386/predicates.md (indirect_branch_operand): Likewise.
10778 (GOT_memory_operand): Likewise.
10779 (call_insn_operand): Likewise.
10780 (sibcall_insn_operand): Likewise.
10781 (GOT32_symbol_operand): Likewise.
10782 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
10784 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
10786 PR rtl-optimization/83496
10787 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
10788 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
10789 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
10790 redundant insn, if any.
10791 (relax_delay_slots): Likewise.
10792 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
10794 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
10796 PR tree-optimization/83965
10797 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
10798 that grouped statements are part of a reduction chain. Return
10799 true if the statement is not marked as a reduction itself but
10800 is part of a group.
10801 (vect_recog_dot_prod_pattern): Don't check whether the statement
10802 is part of a group here.
10803 (vect_recog_sad_pattern): Likewise.
10804 (vect_recog_widen_sum_pattern): Likewise.
10806 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
10809 * final.c (rest_of_clean_state): Also look for calls inside sequences.
10811 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
10814 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
10816 (ix86_output_indirect_function_return): New prototype.
10817 (ix86_split_simple_return_pop_internal): Likewise.
10818 * config/i386/i386.c (indirect_return_via_cx): New.
10819 (indirect_return_via_cx_bnd): Likewise.
10820 (indirect_thunk_name): Handle return va CX_REG.
10821 (output_indirect_thunk_function): Create alias for
10822 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
10823 (ix86_output_indirect_jmp): Remove the bool argument.
10824 (ix86_output_indirect_function_return): New function.
10825 (ix86_split_simple_return_pop_internal): Likewise.
10826 * config/i386/i386.md (*indirect_jump): Don't pass false
10827 to ix86_output_indirect_jmp.
10828 (*tablejump_1): Likewise.
10829 (simple_return_pop_internal): Change it to define_insn_and_split.
10830 Call ix86_split_simple_return_pop_internal to split it for
10831 -mfunction-return=.
10832 (simple_return_indirect_internal): Call
10833 ix86_output_indirect_function_return instead of
10834 ix86_output_indirect_jmp.
10836 2018-02-26 Jakub Jelinek <jakub@redhat.com>
10839 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
10840 memset and value initialization afterwards.
10842 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
10844 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
10846 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10849 * common/config/aarch64/aarch64-common.c
10850 (aarch_option_optimization_table[]): Switch
10851 off fomit-frame-pointer
10853 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
10854 Chung-Ju Wu <jasonwucj@gmail.com>
10856 * config/nds32/nds32-multiple.md (load_multiple): Disallow
10858 (store_multiple): Ditto.
10860 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
10862 * config.gcc: Add --with-cpu support for nds32 target.
10863 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
10864 * config/nds32/nds32.opt: Add -mcpu= option.
10866 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
10868 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
10869 isel=yes): Warn for these deprecated options.
10871 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
10873 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
10874 ISA_2_5_MASKS_EMBEDDED.
10876 2018-02-23 Jakub Jelinek <jakub@redhat.com>
10878 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
10879 p->max as pointers rather than using iterative_hash_expr.
10881 2018-02-23 Carl Love <cel@us.ibm.com>
10883 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
10884 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
10886 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
10887 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
10888 P8V_BUILTIN_VEC_VUNSIGNED2.
10890 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
10893 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
10894 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
10896 * lra-constraints.c (curr_insn_transform): Set up
10897 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
10899 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
10900 * lra-eliminations.c (spill_pseudos): Ditto.
10901 (process_insn_for_elimination): Ditto.
10902 * lra-lives.c (reg_early_clobber_p): Use the new macros.
10903 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
10904 LRA_NON_CLOBBERED_ALT.
10906 2018-02-22 Martin Sebor <msebor@redhat.com>
10908 PR tree-optimization/84480
10909 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
10910 to maybe_diag_stxncpy_trunc. Call it.
10911 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
10912 from gimple_fold_builtin_strcpy. Print inlining stack.
10913 (handle_builtin_stxncpy): Print inlining stack.
10914 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
10916 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
10919 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
10920 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
10921 and -fcheck-pointer-bounds are used together.
10922 (indirect_thunk_prefix): New enum.
10923 (indirect_thunk_need_prefix): New function.
10924 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
10925 "_nt" instead of "_bnd" for NOTRACK prefix.
10926 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
10927 (output_indirect_thunk_function): Likewise.
10929 (ix86_code_end): Update output_indirect_thunk_function calls.
10930 (ix86_output_indirect_branch_via_reg): Replace
10931 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
10932 (ix86_output_indirect_branch_via_push): Likewise.
10933 (ix86_output_function_return): Likewise.
10934 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
10935 incompatible with -fcf-protection=branch and
10936 -fcheck-pointer-bounds.
10938 2018-02-22 Steve Ellcey <sellcey@cavium.com>
10941 * config/aarch64/aarch64.c (aarch64_print_address_internal):
10942 Change gcc_assert call to output_operand_lossage.
10944 2018-02-22 Steve Ellcey <sellcey@cavium.com>
10946 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
10948 2018-02-22 DJ Delorie <dj@redhat.com>
10949 Sebastian Perta <sebastian.perta@renesas.com>
10950 Oleg Endo <olegendo@gcc.gnu.org>
10952 * config/rx/rx.c (rx_rtx_costs): New function.
10953 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
10955 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
10957 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
10959 2018-02-22 Martin Liska <mliska@suse.cz>
10962 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
10963 Add "native" as a possible value.
10965 2018-02-22 Martin Liska <mliska@suse.cz>
10968 * config/i386/i386.c (ix86_option_override_internal):
10969 Add "native" as a possible value for -march and -mtune.
10971 2018-02-22 Jakub Jelinek <jakub@redhat.com>
10974 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
10975 to all type variants.
10977 PR tree-optimization/84503
10978 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
10979 width as info->bitpos + info->bitsize - start.
10980 (merged_store_group::merge_overlapping): Simplify width computation.
10981 (check_no_overlap): New function.
10982 (imm_store_chain_info::try_coalesce_bswap): Compute expected
10983 start + width and last_order of the group, fail if check_no_overlap
10985 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
10986 to group if check_no_overlap fails.
10988 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
10990 * config/rs6000/altivec.md: Delete contraint arguments to
10991 define_expand, define_split, and define_peephole2, and in
10992 define_insn_and_split if always unused.
10993 * config/rs6000/darwin.md: Ditto.
10994 * config/rs6000/dfp.md: Ditto.
10995 * config/rs6000/rs6000.md: Ditto.
10996 * config/rs6000/sync.md: Ditto.
10997 * config/rs6000/vector.md: Ditto.
10998 * config/rs6000/vsx.md: Ditto.
11000 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
11002 * config/rs6000/altivec.md: Write output control strings as braced
11003 blocks instead of double-quoted strings.
11004 * config/rs6000/darwin.md: Ditto.
11005 * config/rs6000/rs6000.md: Ditto.
11006 * config/rs6000/vector.md: Ditto.
11007 * config/rs6000/vsx.md: Ditto.
11009 2018-02-21 Jason Merrill <jason@redhat.com>
11011 PR c++/84314 - ICE with templates and fastcall attribute.
11012 * attribs.c (build_type_attribute_qual_variant): Remove assert.
11014 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
11016 * ipa-cp.c (determine_versionability): Fix comment typos.
11018 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
11021 * ipa-cp.c (determine_versionability): Do not version functions caling
11024 2018-02-21 Martin Liska <mliska@suse.cz>
11027 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
11028 Add "native" as a possible value.
11029 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
11030 the macro when native cpu detection is available.
11032 2018-02-21 Martin Liska <mliska@suse.cz>
11035 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
11036 Add "native" as a possible value.
11037 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
11038 when native cpu detection is available.
11040 2018-02-21 Jakub Jelinek <jakub@redhat.com>
11041 Martin Sebor <msebor@redhat.com>
11043 PR tree-optimization/84478
11044 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
11046 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
11047 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
11048 support which is conservatively correct, for 2 only stay conservative
11049 for maxlen. Formatting and comment capitalization fixes. Add STRICT
11050 argument to the 2 argument get_range_strlen, adjust 6 arg
11051 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
11053 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
11054 (gimple_fold_builtin_strlen): Pass true as last argument to
11057 2018-02-20 Martin Sebor <msebor@redhat.com>
11059 PR middle-end/84095
11060 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
11061 (builtin_memref::set_base_and_offset): Same. Handle inner references.
11062 (builtin_memref::builtin_memref): Factor out parts into
11063 set_base_and_offset and call it.
11065 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
11067 PR middle-end/84406
11068 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
11069 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
11070 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
11071 search at the associated MODE_INT.
11073 2018-02-20 Jeff Law <law@redhat.com>
11075 PR middle-end/82123
11076 PR tree-optimization/81592
11077 PR middle-end/79257
11078 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
11079 for range data rather than using global data.
11080 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
11081 range data rather than using global data.
11082 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
11083 pass it to children as needed.
11084 (struct directive::fmtresult): Similarly.
11085 (struct directive::set_width): Similarly.
11086 (struct directive::set_precision): Similarly.
11087 (format_integer, format_directive, parse_directive): Similarly.
11088 (format_none): Accept unnamed vr_values parameter.
11089 (format_percent, format_floating, format_character): Similarly.
11090 (format_string, format_plain): Similarly.
11091 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
11092 the EVRP range analyzer for range data rather than using global data.
11093 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
11094 gimple-ssa-evrp-analyze.h
11095 (class sprintf_dom_walker): Add after_dom_children member function.
11096 Add evrp_range_analyzer member.
11097 (sprintf_dom_walker::before_dom_children): Call into the EVRP
11098 range analyzer as needed.
11099 (sprintf_dom_walker::after_dom_children): New member function.
11100 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
11102 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
11103 (evrp_range_analyzer::pop_to_marker): Likewise.
11105 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
11107 PR tree-optimization/84419
11108 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
11109 with the required type if its current type is compatible but
11112 2018-02-20 Jakub Jelinek <jakub@redhat.com>
11114 PR middle-end/82004
11115 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
11116 after vectorization.
11118 2018-02-20 Martin Liska <mliska@suse.cz>
11121 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
11122 possible values if we don't have a hint.
11124 2018-02-20 Martin Liska <mliska@suse.cz>
11128 * final.c (shorten_branches): Build align_tab array with one
11130 * opts.c (finish_options): Add alignment option limit check.
11131 (MAX_CODE_ALIGN): Likewise.
11132 (MAX_CODE_ALIGN_VALUE): Likewise.
11133 * doc/invoke.texi: Document maximum allowed option value for
11134 all -falign-* options.
11136 2018-02-19 Jakub Jelinek <jakub@redhat.com>
11139 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
11140 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
11141 * var-tracking.c (emit_note_insn_var_location): Remove all references
11142 to NOTE_INSN_CALL_ARG_LOCATION.
11143 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
11144 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
11145 Use copy_rtx_if_shared.
11146 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
11147 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
11148 (dwarf2out_var_location): Remove handling of
11149 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
11151 * final.c (final_scan_insn): Remove all references to
11152 NOTE_INSN_CALL_ARG_LOCATION.
11153 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
11154 before dumping final insns.
11155 * except.c (emit_note_eh_region_end): Remove all references to
11156 NOTE_INSN_CALL_ARG_LOCATION.
11157 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
11158 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
11159 * config/arc/arc.c (hwloop_optimize): Likewise.
11160 * config/arm/arm.c (create_fix_barrier): Likewise.
11161 * config/s390/s390.c (s390_chunkify_start): Likewise.
11162 * config/sh/sh.c (find_barrier): Likewise.
11163 * config/i386/i386.c (rest_of_insert_endbranch,
11164 ix86_seh_fixup_eh_fallthru): Likewise.
11165 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
11166 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
11167 * config/frv/frv.c (frv_function_prologue): Likewise.
11168 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
11170 (note_outside_basic_block_p): Remove all references to
11171 NOTE_INSN_CALL_ARG_LOCATION.
11172 * gengtype.c (adjust_field_rtx_def): Likewise.
11173 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
11175 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
11176 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
11179 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
11182 PR tree-optimization/84452
11183 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
11184 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
11187 2018-02-19 Martin Liska <mliska@suse.cz>
11190 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
11192 2018-02-19 Martin Liska <mliska@suse.cz>
11193 Richard Sandiford <richard.sandiford@linaro.org>
11195 PR tree-optimization/82491
11196 * gimple-fold.c (get_base_constructor): Make earlier bail out
11199 2018-02-19 Carl Love <cel@us.ibm.com>
11201 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
11202 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
11204 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
11205 P8V_BUILTIN_VEC_NEG.
11207 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
11209 * config/rl78/rl78.md (movdf): New define expand.
11211 2018-02-19 Martin Liska <mliska@suse.cz>
11214 * doc/invoke.texi: Fix typo.
11215 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
11217 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
11219 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
11220 handle rs6000_single_float and rs6000_double_float specially for
11223 2018-02-16 Jeff Law <law@redhat.com>
11225 * config/rx/rx.c (add_pop_cfi_notes): New function.;
11226 (pop_regs): Use it.
11228 2018-02-16 Jakub Jelinek <jakub@redhat.com>
11231 * ipa-inline.c (inline_small_functions): Fix a typo.
11233 2018-02-16 Nathan Sidwell <nathan@acm.org>
11235 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
11237 2018-02-16 Carl Love <cel@us.ibm.com>
11239 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
11240 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
11241 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
11242 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
11243 expansion to P8V_BUILTIN_VEC_FLOAT2.
11245 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
11247 PR rtl-optimization/70023
11248 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
11249 src_regno into account.
11251 2018-02-16 Carl Love <cel@us.ibm.com>
11253 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
11254 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
11255 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
11256 * config/rs6000/rs6000.c: Remove case statements for
11257 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
11258 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
11259 and P9V_BUILTIN_VEC_VINSERT4B.
11260 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
11261 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
11262 * config/rs6000/vsx.md:
11263 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
11266 2018-02-16 Carl Love <cel@us.ibm.com>
11268 * config/rs6000/altivec.h: Add builtin names vec_extract4b
11270 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
11272 * config/rs6000/rs6000-c.c: Add the definitions for
11273 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
11274 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
11275 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
11276 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
11277 definition for insert4b and define insn *insert3b_internal.
11278 * doc/extend.texi: Add documentation for vec_extract4b.
11280 2018-02-16 Nathan Sidwell <nathan@acm.org>
11282 * doc/extend.texi (Backwards Compatibility): Mention friend
11283 injection. Note for-scope is deprecated.
11284 * doc/invoke.texi (-ffriend-injection): Deprecate.
11286 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
11288 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
11289 that moved to I2, also allow destinations that are a paradoxical
11290 subreg (instead of a normal reg).
11292 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
11295 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
11298 2018-02-16 Richard Biener <rguenther@suse.de>
11300 PR tree-optimization/84037
11301 PR tree-optimization/84016
11303 * config/i386/i386.c (ix86_builtin_vectorization_cost):
11304 Adjust vec_construct for the fact we need additional higher latency
11305 128bit inserts for AVX256 and AVX512 vector builds.
11306 (ix86_add_stmt_cost): Scale vector construction cost for
11309 2018-02-16 Richard Biener <rguenther@suse.de>
11311 PR tree-optimization/84417
11312 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
11313 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
11314 (non_rewritable_lvalue_p): Likewise, use poly-ints.
11316 2018-02-16 Martin Liska <mliska@suse.cz>
11319 * internal-fn.def (ASAN_CHECK): Set proper flags.
11320 (ASAN_MARK): Likewise.
11322 2018-02-16 Julia Koval <julia.koval@intel.com>
11324 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
11325 from PTA_CANNONLAKE.
11327 2018-02-16 Jakub Jelinek <jakub@redhat.com>
11330 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
11331 Use ++iter rather than iter++ for std::list iterators.
11332 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
11333 defer deleting them until all nodes in the forest are processed. Do
11334 free even leaf nodes. Change to_process into auto_vec.
11337 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
11338 * vec.h (vec_default_construct): Use memset instead of placement new
11339 if BROKEN_VALUE_INITIALIZATION is defined.
11340 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
11341 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
11344 PR rtl-optimization/83723
11345 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
11346 * lra.c (lra_substitute_pseudo): Likewise. If true, use
11347 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
11349 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
11351 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
11353 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
11355 PR rtl-optimization/81443
11356 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
11357 from inner REGs to paradoxical SUBREGs.
11359 2018-02-16 Richard Biener <rguenther@suse.de>
11361 PR tree-optimization/84399
11362 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11363 For operands we can analyze at their definition make sure we can
11364 analyze them at each use as well.
11366 2018-02-16 Richard Biener <rguenther@suse.de>
11368 PR tree-optimization/84190
11369 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
11370 volatile accesses if the decl isn't volatile.
11372 2018-02-15 Jason Merrill <jason@redhat.com>
11374 PR c++/84314 - ICE with templates and fastcall attribute.
11375 * attribs.c (build_type_attribute_qual_variant): Don't clobber
11376 TYPE_CANONICAL on an existing type.
11378 2018-02-15 Jakub Jelinek <jakub@redhat.com>
11380 PR tree-optimization/84383
11381 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
11382 dstoff nor call operand_equal_p if dstbase is NULL.
11384 PR tree-optimization/84334
11385 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
11386 also a CONSTANT_CLASS_P, punt.
11388 2018-02-14 Jim Wilson <jimw@sifive.com>
11390 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
11391 first SMALL_OPERAND check. New local min_second_step. Move assert
11392 to where locals are set. Add TARGET_RVC support.
11393 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
11395 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
11397 * doc/invoke.texi: Correct -Wformat-overflow code sample.
11399 2018-02-14 Martin Sebor <msebor@redhat.com>
11401 PR tree-optimization/83698
11402 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
11403 arrays constrain the offset range to their bounds.
11404 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
11405 (builtin_access::overlap): Avoid setting the size of overlap if it's
11407 (maybe_diag_overlap): Also consider arrays when deciding what values
11408 of offsets to include in diagnostics.
11410 2018-02-14 Martin Sebor <msebor@redhat.com>
11413 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
11414 that correspond to the kind of a declaration.
11416 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
11419 * config/pa/pa.md: Load address of PIC label using the linkage table
11420 if the label is nonlocal.
11422 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
11424 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
11425 warning message if user requests -maltivec=be.
11426 * doc/invoke.texi: Document deprecation of -maltivec=be.
11428 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
11431 * config/rs6000/rs6000-c.c: Update definitions for
11432 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
11433 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
11435 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
11438 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
11439 add _get_ssp intrinsics. Remove argument from
11440 __builtin_ia32_rdssp[d|q].
11441 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
11442 * config/i386/i386-builtin.def: Remove argument from
11443 __builtin_ia32_rdssp[d|q].
11444 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
11445 ix86_expand_special_args_builtin for _rdssp[d|q].
11446 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
11447 Clear register before usage.
11448 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
11449 Add documentation for new _get_ssp and _inc_ssp intrinsics.
11451 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
11453 PR tree-optimization/84357
11454 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
11455 operand 1 of an ARRAY_REF too.
11457 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
11460 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
11461 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11463 (set_of_reg): New struct.
11464 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
11465 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
11466 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11468 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
11469 Split into bitclr, bitset, bitinvert patterns if appropriate.
11470 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
11471 use rx_fuse_in_memory_bitop.
11472 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
11473 to named insn, correct maximum insn length.
11475 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
11478 * machmode.def: Define a complex mode for PARTIAL_INT.
11479 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
11481 * doc/rtl.texi: Document CSPImode.
11482 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
11484 (msp430_hard_regno_nregs_with_padding): Likewise.
11486 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
11489 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
11491 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
11493 PR rtl-optimization/84169
11494 * combine.c (try_combine): New variable split_i2i3. Set it to true if
11495 we generated a parallel as new i3 and we split that to new i2 and i3
11496 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
11497 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
11498 those to i2, not i1. Partially rewrite this scan code.
11500 2018-02-13 Jakub Jelinek <jakub@redhat.com>
11503 * stor-layout.c (place_field): For variable length fields, adjust
11504 offset_align afterwards not just based on the field's alignment,
11505 but also on the size.
11507 PR middle-end/84309
11508 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
11509 of exps and logs in the use_exp2 case.
11511 2018-02-13 Jeff Law <law@redhat.com>
11513 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
11514 entry for "vector".
11516 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
11519 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
11523 * common.opt (gas-loc-support, gas-locview-support): New.
11524 (ginline-points, ginternal-reset-location-views): New.
11525 * doc/invoke.texi: Document them. Use @itemx where intended.
11526 (gvariable-location-views): Adjust.
11527 * target.def (reset_location_view): New.
11528 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
11529 (TARGET_RESET_LOCATION_VIEW): New.
11530 * doc/tm.texi: Rebuilt.
11531 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
11532 (dwarf2out_default_as_locview_support): New.
11533 (output_asm_line_debug_info): Use option variables.
11534 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
11535 (output_loc_list): Likewise.
11536 (add_high_low_attributes): Check option variables.
11537 Don't output entry view attribute in strict mode.
11538 (gen_inlined_subroutine_die): Check option variables.
11539 (dwarf2out_inline_entry): Likewise.
11540 (init_sections_and_labels): Likewise.
11541 (dwarf2out_early_finish): Likewise.
11542 (maybe_reset_location_view): New, from...
11543 (dwarf2out_var_location): ... here. Call it.
11544 * debug.h (dwarf2out_default_as_loc_support): Declare.
11545 (dwarf2out_default_as_locview_support): Declare.
11546 * hooks.c (hook_int_rtx_insn_0): New.
11547 * hooks.h (hook_int_rtx_insn_0): Declare.
11548 * toplev.c (process_options): Take -gas-loc-support and
11549 -gas-locview-support from dwarf2out. Enable
11550 -gvariable-location-views by default only with locview
11551 assembler support. Enable -ginternal-reset-location-views by
11552 default only if the target defines the corresponding hook.
11553 Enable -ginline-points by default if location views are
11554 enabled; force it disabled if statement frontiers are
11556 * tree-inline.c (expand_call_inline): Check option variables.
11557 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
11559 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
11561 PR tree-optimization/84321
11562 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
11563 handling. Also check whether the anti-range contains any values
11564 that satisfy the mask; switch to a VR_RANGE if not.
11566 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
11569 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
11571 2018-02-13 Martin Jambor <mjambor@suse.cz>
11574 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
11575 of call statements, also set location of a load to a temporary.
11577 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
11579 * config/rl78/rl78.c (add_vector_labels): New function.
11580 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
11581 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
11582 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
11583 which checks that no arguments are passed.
11584 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
11585 * doc/extend.texi: Documentation for the new attribute.
11587 2018-02-13 Andreas Schwab <schwab@suse.de>
11589 * config/riscv/linux.h (CPP_SPEC): Define.
11591 2018-02-13 Jakub Jelinek <jakub@redhat.com>
11594 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
11595 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
11596 OPTION_MASK_ISA_AES as first argument to def_builtin_const
11597 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
11598 instead of OPTION_MASK_ISA_PCLMUL as first argument to
11599 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
11600 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
11601 temporarily for AES and PCLMUL builtins.
11603 PR tree-optimization/84339
11604 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
11605 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
11608 PR middle-end/84309
11609 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
11610 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
11611 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
11613 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
11615 * omp-simd-clone.h: New file.
11616 * omp-simd-clone.c: Include omp-simd-clone.h.
11617 (expand_simd_clones): No longer static.
11618 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
11619 cgraph.h and omp-simd-clone.h.
11620 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
11621 (vect_recog_widen_shift_pattern): Formatting fix.
11622 (vect_pattern_recog_1): Don't check optab for calls.
11625 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
11626 operands[2] into a REG before using gen_lowpart on it.
11628 2018-02-12 Jeff Law <law@redhat.com>
11631 * config/sh/sh.c (find_barrier): Consider a sibling call
11634 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
11635 successfully back substituting a reg.
11637 2018-02-12 Richard Biener <rguenther@suse.de>
11639 PR tree-optimization/84037
11640 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
11641 parameter, move visited init to caller.
11642 (vect_slp_analyze_operations): Separate cost from validity
11643 check, initialize visited once for all instances.
11644 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
11646 * tree-vect-stmts.c (vect_model_simple_cost): Make early
11648 (vect_model_promotion_demotion_cost): Likewise.
11649 (vectorizable_bswap): Guard cost modeling with !slp_node
11650 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
11652 (vectorizable_call): Likewise.
11653 (vectorizable_conversion): Likewise.
11654 (vectorizable_assignment): Likewise.
11655 (vectorizable_shift): Likewise.
11656 (vectorizable_operation): Likewise.
11657 (vectorizable_store): Likewise.
11658 (vectorizable_load): Likewise.
11659 (vectorizable_condition): Likewise.
11660 (vectorizable_comparison): Likewise.
11662 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
11665 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
11666 (ASAN_MARK): Fix fnspec to account for return value, change pointer
11667 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
11669 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
11671 PR middle-end/83665
11672 * params.def (inline-min-speedup): Increase from 8 to 15.
11673 (max-inline-insns-auto): Decrease from 40 to 30.
11674 * ipa-split.c (consider_split): Add some buffer for function to
11675 be considered inlining candidate.
11676 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
11679 2018-02-12 Richard Biener <rguenther@suse.de>
11681 PR tree-optimization/84037
11682 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
11683 matched stmts if we cannot swap the non-matched ones.
11685 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
11687 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
11688 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
11689 _mm_maskz_scalef_round_ss): New intrinsics.
11690 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
11691 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
11692 __builtin_ia32_scalefss_round): Remove.
11693 (__builtin_ia32_scalefsd_mask_round,
11694 __builtin_ia32_scalefss_mask_round): New intrinsics.
11695 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
11696 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
11697 ((match_operand:VF_128 2 "<round_nimm_predicate>"
11698 "<round_constraint>")): Changed to ...
11699 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
11700 "<round_scalar_constraint>")): ... this.
11701 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
11702 %0, %1, %2<round_op3>}"): Changed to ...
11703 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
11704 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
11705 %2<round_scalar_mask_op3>}"): ... this.
11706 * config/i386/subst.md (round_scalar_nimm_predicate): New.
11708 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
11710 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
11711 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
11712 (_mm_maskz_sqrt_round_ss): New intrinsics.
11713 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
11714 (__builtin_ia32_sqrtsd_mask_round)
11715 (__builtin_ia32_sqrtss_mask_round): New builtins.
11716 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
11717 (__builtin_ia32_sqrtss_round): Remove.
11718 (__builtin_ia32_sqrtsd_mask_round)
11719 (__builtin_ia32_sqrtss_mask_round): New builtins.
11720 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
11721 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
11722 ((match_operand:VF_128 1 "vector_operand"
11723 "xBm,<round_constraint>")): Changed to ...
11724 ((match_operand:VF_128 1 "vector_operand"
11725 "xBm,<round_scalar_constraint>")): ... this.
11726 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
11727 %0, %2, %<iptr>1<round_op3>}): Changed to ...
11728 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
11729 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
11730 %<iptr>1<round_scalar_mask_op3>}): ... this.
11731 ((set_attr "prefix" "<round_prefix>")): Changed to ...
11732 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
11734 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
11737 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
11738 Cast vec_cmpeq result to correct type.
11739 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
11740 Cast vec_cmpgt result to correct type.
11742 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
11744 * final.c (final_scan_insn_1): Renamed from...
11745 (final_scan_insn): ... this. New wrapper, to recover
11746 seen from the outermost call in recursive ones.
11747 * config/sparc/sparc.c (output_return): Drop seen from call.
11748 (output_sibcall): Likewise.
11749 * config/visium/visium.c (output_branch): Likewise.
11751 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
11753 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
11756 2018-02-10 Alan Modra <amodra@gmail.com>
11759 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
11760 Specify LR as an input.
11762 2018-02-10 Jakub Jelinek <jakub@redhat.com>
11765 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
11766 remove_member_access_dummy_vars): New functions.
11767 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
11768 lower_omp_1, execute_lower_omp): Use them.
11770 PR rtl-optimization/84308
11771 * shrink-wrap.c (spread_components): Release todo vector.
11773 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
11775 PR rtl-optimization/57193
11776 * ira-color.c (struct allocno_color_data): Add member
11777 conflict_allocno_hard_prefs.
11778 (update_conflict_allocno_hard_prefs): New.
11779 (bucket_allocno_compare_func): Add a preference based on
11780 conflict_allocno_hard_prefs.
11781 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
11782 (color_allocnos): Remove a dead code. Initiate
11783 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
11785 2018-02-09 Jakub Jelinek <jakub@redhat.com>
11788 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
11789 constraint from =wa to wa. Avoid a subreg on the output operand,
11790 instead use a pseudo and subreg it in a move.
11791 (p9_xxbrd_<mode>): Changed to ...
11792 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
11793 (p9_xxbrd_v2df): New expander.
11794 (p9_xxbrw_<mode>): Changed to ...
11795 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
11796 (p9_xxbrw_v4sf): New expander.
11798 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
11800 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
11802 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
11805 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
11806 multiply in 32-bit mode.
11807 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
11808 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
11811 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
11813 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
11814 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
11815 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
11816 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
11818 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
11821 * dwarf2out.c (is_trivial_indirect_ref): New function.
11822 (dwarf2out_late_global_decl): Do not generate a location
11823 attribute for variables that have a non-trivial DECL_VALUE_EXPR
11824 and that are not defined in the current unit.
11826 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
11828 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
11829 instead of a libcall for UNORDERED.
11831 2018-02-09 Tamar Christina <tamar.christina@arm.com>
11834 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
11835 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
11837 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11840 * config/s390/s390.c (s390_set_current_function): Invoke
11841 s390_indirect_branch_settings also if fndecl didn't change.
11843 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
11845 * config/rs6000/rs6000.md (blockage): Set length to zero.
11847 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
11849 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
11851 2018-02-09 Jakub Jelinek <jakub@redhat.com>
11854 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
11855 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
11859 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
11860 PARALLEL incoming that failed vt_get_decl_and_offset check.
11862 PR middle-end/84237
11863 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
11864 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
11866 (get_variable_section): For decls in named .bss* sections pass true as
11867 second argument to bss_initializer_p.
11869 2018-02-09 Marek Polacek <polacek@redhat.com>
11870 Jakub Jelinek <jakub@redhat.com>
11873 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
11874 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
11875 Sync some changes from cxx_fold_indirect_ref.
11877 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
11879 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
11881 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
11882 (BLOCK_INLINE_ENTRY_LABEL): New.
11883 (dwarf2out_var_location): Disregard inline entry markers.
11884 (inline_entry_data): New struct.
11885 (inline_entry_data_hasher): New hashtable type.
11886 (inline_entry_data_hasher::hash): New.
11887 (inline_entry_data_hasher::equal): New.
11888 (inline_entry_data_table): New variable.
11889 (add_high_low_attributes): Add DW_AT_entry_pc and
11890 DW_AT_GNU_entry_view attributes if a pending entry is found
11891 in inline_entry_data_table. Add old entry_pc attribute only
11892 if debug nonbinding markers are disabled.
11893 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
11894 markers are enabled.
11895 (block_within_block_p, dwarf2out_inline_entry): New.
11896 (dwarf2out_finish): Check that no entries remained in
11897 inline_entry_data_table.
11898 * final.c (reemit_insn_block_notes): Handle inline entry notes.
11899 (final_scan_insn, notice_source_line): Likewise.
11900 (rest_of_clean_state): Skip inline entry markers.
11901 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
11903 * gimple.c (gimple_build_debug_inline_entry): New.
11904 * gimple.h (enum gimple_debug_subcode): Add
11905 GIMPLE_DEBUG_INLINE_ENTRY.
11906 (gimple_build_debug_inline_entry): Declare.
11907 (gimple_debug_inline_entry_p): New.
11908 (gimple_debug_nonbind_marker_p): Adjust.
11909 * insn-notes.def (INLINE_ENTRY): New.
11910 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
11911 inline entry marker notes.
11912 (print_insn): Likewise.
11913 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
11914 (INSN_DEBUG_MARKER_KIND): Likewise.
11915 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
11916 * tree-inline.c (expand_call_inline): Build and insert
11917 debug_inline_entry stmt.
11918 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
11919 inline entry blocks early, if nonbind markers are enabled.
11920 (dump_scope_block): Dump fragment info.
11921 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
11922 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
11923 (gimple_build_debug_inline_entry): New.
11924 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
11925 Enable/disable inline entry points too.
11926 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
11927 (DEBUG_INSN): Describe inline entry markers.
11929 * common.opt (gvariable-location-views): New.
11930 (gvariable-location-views=incompat5): New.
11931 * config.in: Rebuilt.
11932 * configure: Rebuilt.
11933 * configure.ac: Test assembler for view support.
11934 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
11935 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
11936 * dwarf2out.c (var_loc_view): New typedef.
11937 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
11938 (dwarf2out_locviews_in_attribute): New.
11939 (dwarf2out_locviews_in_loclist): New.
11940 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
11941 (enum dw_line_info_opcode): Add LI_adv_address.
11942 (struct dw_line_info_table): Add view.
11943 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
11944 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
11945 (zero_view_p): New variable.
11946 (ZERO_VIEW_P): New macro.
11947 (output_asm_line_debug_info): New.
11948 (struct var_loc_node): Add view.
11949 (add_AT_view_list, AT_loc_list): New.
11950 (add_var_loc_to_decl): Add view param. Test it against last.
11951 (new_loc_list): Add view params. Record them.
11952 (AT_loc_list_ptr): Handle loc and view lists.
11953 (view_list_to_loc_list_val_node): New.
11954 (print_dw_val): Handle dw_val_class_view_list.
11955 (size_of_die): Likewise.
11956 (value_format): Likewise.
11957 (loc_list_has_views): New.
11958 (gen_llsym): Set vl_symbol too.
11959 (maybe_gen_llsym, skip_loc_list_entry): New.
11960 (dwarf2out_maybe_output_loclist_view_pair): New.
11961 (output_loc_list): Output view list or entries too.
11962 (output_view_list_offset): New.
11963 (output_die): Handle dw_val_class_view_list.
11964 (output_dwarf_version): New.
11965 (output_compilation_unit_header): Use it.
11966 (output_skeleton_debug_sections): Likewise.
11967 (output_rnglists, output_line_info): Likewise.
11968 (output_pubnames, output_aranges): Update version comments.
11969 (output_one_line_info_table): Output view numbers in asm comments.
11970 (dw_loc_list): Determine current endview, pass it to new_loc_list.
11971 Call maybe_gen_llsym.
11972 (loc_list_from_tree_1): Adjust.
11973 (add_AT_location_description): Create view list attribute if
11974 needed, check it's absent otherwise.
11975 (convert_cfa_to_fb_loc_list): Adjust.
11976 (maybe_emit_file): Call output_asm_line_debug_info for test.
11977 (dwarf2out_var_location): Reset views as needed. Precompute
11978 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
11979 attribute. Set view.
11980 (new_line_info_table): Reset next view.
11981 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
11982 (dwarf2out_source_line): Likewise. Output view resets and labels to
11983 the assembler, or select appropriate line info opcodes.
11984 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
11985 (optimize_string_length): Catch it. Adjust.
11986 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
11987 dw_val_class_view_list, and remove it if no longer needed.
11988 (hash_loc_list): Hash view numbers.
11989 (loc_list_hasher::equal): Compare them.
11990 (optimize_location_lists): Check whether a view list symbol is
11991 needed, and whether the locview attribute is present, and
11992 whether they match. Remove the locview attribute if no longer
11994 (index_location_lists): Call skip_loc_list_entry for test.
11995 (dwarf2out_finish): Call output_asm_line_debug_info for test.
11996 Use output_dwarf_version.
11997 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
11998 (struct dw_val_node): Add val_view_list.
11999 * final.c (SEEN_NEXT_VIEW): New.
12000 (set_next_view_needed): New.
12001 (clear_next_view_needed): New.
12002 (maybe_output_next_view): New.
12003 (final_start_function): Rename to...
12004 (final_start_function_1): ... this. Take pointer to FIRST,
12005 add SEEN parameter. Emit param bindings in the initial view.
12006 (final_start_function): Reintroduce SEEN-less interface.
12007 (final): Rename to...
12008 (final_1): ... this. Take SEEN parameter. Output final pending
12009 next view at the end.
12010 (final): Reintroduce seen-less interface.
12011 (final_scan_insn): Output pending next view before switching
12012 sections or ending a block. Mark the next view as needed when
12013 outputting variable locations. Notify debug backend of section
12014 changes, and of location view changes.
12015 (rest_of_handle_final): Adjust.
12016 * toplev.c (process_options): Autodetect value for debug variable
12017 location views option. Warn on incompat5 without -gdwarf-5.
12018 * doc/invoke.texi (gvariable-location-views): New.
12019 (gvariable-location-views=incompat5): New.
12020 (gno-variable-location-views): New.
12022 2018-02-08 David Malcolm <dmalcolm@redhat.com>
12024 PR tree-optimization/84136
12025 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
12026 that the result of find_edge is non-NULL.
12028 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
12031 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
12032 storing integer register in SImode. Fix cost of 256 and 512
12033 byte aligned SSE register store.
12035 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
12037 * config/i386/i386.c (ix86_multiplication_cost): Fix
12038 multiplication cost for TARGET_AVX512DQ.
12040 2018-02-08 Marek Polacek <polacek@redhat.com>
12042 PR tree-optimization/84238
12043 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
12046 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
12048 PR tree-optimization/84265
12049 * tree-vect-stmts.c (vectorizable_store): Don't treat
12050 VMAT_CONTIGUOUS accesses as grouped.
12051 (vectorizable_load): Likewise.
12053 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
12055 PR tree-optimization/81635
12056 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
12057 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
12058 (test_round_for_mask): New functions.
12059 (wide_int_cc_tests): Call test_round_for_mask.
12060 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
12061 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
12062 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
12063 range returned by get_range_info.
12065 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
12068 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
12069 * symtab.c: Include builtins.h
12070 (symtab_node::output_to_lto_symbol_table_p): Move here
12071 from lto-streamer-out.c:output_symbol_p.
12072 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
12073 (output_symbol_p): Move all logic to symtab.c
12074 (produce_symtab): Update.
12076 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12078 * config/s390/s390-opts.h (enum indirect_branch): Define.
12079 * config/s390/s390-protos.h (s390_return_addr_from_memory)
12080 (s390_indirect_branch_via_thunk)
12081 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
12082 (enum s390_indirect_branch_type): Define.
12083 * config/s390/s390.c (struct s390_frame_layout, struct
12084 machine_function): Remove.
12085 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
12086 (indirect_branch_table_label_no, indirect_branch_table_name):
12088 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
12089 (enum s390_indirect_branch_option): Define.
12090 (s390_return_addr_from_memory): New function.
12091 (s390_handle_string_attribute): New function.
12092 (s390_attribute_table): Add new attribute handler.
12093 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
12094 (s390_indirect_branch_via_thunk): New function.
12095 (s390_indirect_branch_via_inline_thunk): New function.
12096 (s390_function_ok_for_sibcall): When jumping via thunk disallow
12097 sibling call optimization for non z10 compiles.
12098 (s390_emit_call): Force indirect branch target to be a single
12099 register. Add r1 clobber for non-z10 compiles.
12100 (s390_emit_epilogue): Emit return jump via return_use expander.
12101 (s390_reorg): Handle JUMP_INSNs as execute targets.
12102 (s390_option_override_internal): Perform validity checks for the
12103 new command line options.
12104 (s390_indirect_branch_attrvalue): New function.
12105 (s390_indirect_branch_settings): New function.
12106 (s390_set_current_function): Invoke s390_indirect_branch_settings.
12107 (s390_output_indirect_thunk_function): New function.
12108 (s390_code_end): Implement target hook.
12109 (s390_case_values_threshold): Implement target hook.
12110 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
12112 * config/s390/s390.h (struct s390_frame_layout)
12113 (struct machine_function): Move here from s390.c.
12114 (TARGET_INDIRECT_BRANCH_NOBP_RET)
12115 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
12116 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
12117 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
12118 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
12119 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
12120 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
12121 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
12122 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
12123 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
12124 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
12125 (mnemonic attribute): Add values which aren't recognized
12127 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
12128 pattern for branch conversion. Fix mnemonic attribute.
12129 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
12130 indirect branch via thunk if requested.
12131 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
12132 ("*indirect_jump"): Disable for branch conversion using out of
12134 ("indirect_jump_via_thunk<mode>_z10")
12135 ("indirect_jump_via_thunk<mode>")
12136 ("indirect_jump_via_inlinethunk<mode>_z10")
12137 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
12138 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
12139 ("casesi_jump_via_inlinethunk<mode>_z10")
12140 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
12141 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
12142 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
12143 ("*indirect2_jump"): Disable for branch conversion.
12144 ("casesi_jump"): Turn into expander and expand patterns for branch
12146 ("return_use"): New expander.
12147 ("*return"): Emit return via thunk and rename it to ...
12148 ("*return<mode>"): ... this one.
12149 * config/s390/s390.opt: Add new options and and enum for the
12152 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
12154 * lra-constraints.c (match_reload): Unconditionally use
12155 gen_lowpart_SUBREG, rather than selecting between that
12156 and equivalent gen_rtx_SUBREG code.
12158 2018-02-08 Richard Biener <rguenther@suse.de>
12160 PR tree-optimization/84233
12161 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
12162 changed flag instead of boguously re-using phi_inserted.
12164 2018-02-08 Martin Jambor <mjambor@suse.cz>
12166 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
12167 static local variables.
12169 2018-02-08 Richard Biener <rguenther@suse.de>
12171 PR tree-optimization/84278
12172 * tree-vect-stmts.c (vectorizable_store): When looking for
12173 smaller vector types to perform grouped strided loads/stores
12174 make sure the mode is supported by the target.
12175 (vectorizable_load): Likewise.
12177 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
12179 * config/aarch64/aarch64.c (aarch64_components_for_bb):
12180 Increase LDP/STP opportunities by adding adjacent callee-saves.
12182 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
12184 PR rtl-optimization/84068
12185 PR rtl-optimization/83459
12186 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
12188 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
12190 PR tree-optimization/84224
12191 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
12192 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
12193 non-zero arguments.
12195 2018-02-07 Iain Sandoe <iain@codesourcery.com>
12198 * config/rs6000/altivec.md (*restore_world): Remove LR use.
12199 * config/rs6000/predicates.md (restore_world_operation): Adjust op
12200 count, remove one USE.
12202 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
12204 * doc/install.texi (Configuration): Document the
12205 --with-long-double-format={ibm,ieee} PowerPC configuration
12209 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
12210 Convert from define_expand to be define_insn_and_split. Rework
12211 float/double/_Float128 conversions to QI/HI/SImode to work with
12212 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
12213 conversions to QI/HImode types did a store and then a load to
12214 truncate the value. For conversions to VSX registers, don't split
12215 the insn, instead emit the code directly. Use the code iterator
12216 any_fix to combine signed and unsigned conversions.
12217 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
12218 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
12219 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12220 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
12221 (fix_<mode>di2_hw): Likewise.
12222 (fixuns_<mode>di2_hw): Likewise.
12223 (fix_<mode>si2_hw): Likewise.
12224 (fixuns_<mode>si2_hw): Likewise.
12225 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
12226 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12227 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
12228 fix<uns>_trunc<SFDF:mode>si2_p8.
12229 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
12230 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
12231 (fix<uns>_<mode>_mem): Likewise.
12232 (fctiw<u>z_<mode>_mem): Likewise.
12233 (fix<uns>_<mode>_mem): Likewise.
12234 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
12235 the register allocator from doing a direct move to the GPRs to do
12236 a store, and instead use the ISA 3.0 store byte/half-word from
12237 vector register instruction. For IEEE 128-bit floating point,
12238 also optimize stores of 32-bit ints.
12239 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
12241 2018-02-07 Alan Hayward <alan.hayward@arm.com>
12243 * genextract.c (push_pathstr_operand): New function to support
12245 (walk_rtx): Call push_pathstr_operand.
12246 (print_path): Support [a-zA-Z].
12248 2018-02-07 Richard Biener <rguenther@suse.de>
12250 PR tree-optimization/84037
12251 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
12252 (cse_and_gimplify_to_preheader): Declare.
12253 (vect_get_place_in_interleaving_chain): Likewise.
12254 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12256 (_loop_vec_info::~_loop_vec_info): Delete it.
12257 (cse_and_gimplify_to_preheader): New function.
12258 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
12259 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
12260 (vectorizable_load): Likewise. For grouped stores always base
12261 the IV on the first element.
12262 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
12263 condition before gimplifying.
12265 2018-02-07 Jakub Jelinek <jakub@redhat.com>
12267 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
12268 *DIV_EXPR and *MOD_EXPR.
12270 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
12273 * config/i386/i386.c (ix86_option_override_internal): Mask out
12274 the CF_SET bit when checking -fcf-protection.
12276 2018-02-07 Tom de Vries <tom@codesourcery.com>
12279 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
12282 2018-02-07 Richard Biener <rguenther@suse.de>
12284 PR tree-optimization/84204
12285 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
12288 PR tree-optimization/84205
12289 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
12290 special-case isl_ast_op_zdiv_r.
12292 PR tree-optimization/84223
12293 * graphite-scop-detection.c (gather_bbs::before_dom_children):
12294 Only add conditions from within the region.
12295 (gather_bbs::after_dom_children): Adjust.
12297 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
12300 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
12301 * config/avr/avr.md: Only post-reload split REG-REG moves if
12302 either register is GENERAL_REG_P.
12304 2018-02-07 Jakub Jelinek <jakub@redhat.com>
12306 PR tree-optimization/84235
12307 * tree-ssa-scopedtables.c
12308 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
12309 if the subtraction is performed in floating point type where NaNs are
12310 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
12311 build 1. Formatting fix.
12313 2018-02-06 Jakub Jelinek <jakub@redhat.com>
12316 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
12317 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
12318 and skip it regardless of bb boundaries. Use CALL_P macro,
12319 don't test INSN_P (insn) together with CALL_P or JUMP_P check
12320 unnecessarily, formatting fix.
12322 2018-02-06 Michael Collison <michael.collison@arm.com>
12324 * config/arm/thumb2.md:
12325 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
12326 (*thumb_mov_notscc): Ditto.
12328 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
12331 * config/rs6000/rs6000.md (su code attribute): Use "u" for
12332 unsigned_fix, not "s".
12334 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12336 * configure.ac (gcc_fn_eh_frame_ro): New function.
12337 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
12338 correct .eh_frame permissions.
12339 * configure: Regenerate.
12341 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
12343 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
12344 irrelevant options.
12346 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12348 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12349 Display warning message for -mno-speculate-indirect-jumps.
12351 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
12353 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
12355 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
12357 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
12359 PR tree-optimization/84225
12360 * tree-eh.c (find_trapping_overflow): Only call
12361 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
12363 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
12366 * config/i386/i386.c: Reimplement the check of possible options
12367 -mibt/-mshstk conbination. Change error messages.
12368 * doc/invoke.texi: Fix a typo: remove extra '='.
12370 2018-02-06 Marek Polacek <polacek@redhat.com>
12372 PR tree-optimization/84228
12373 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
12375 2018-02-06 Tamar Christina <tamar.christina@arm.com>
12378 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
12379 emitted arch directives.
12380 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
12381 __ARM_FEATURE_COPROC before changing architectures.
12383 2018-02-06 Richard Biener <rguenther@suse.de>
12385 * config/i386/i386.c (print_reg): Fix typo.
12386 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
12388 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
12390 * configure: Regenerate.
12392 2018-02-05 Martin Sebor <msebor@redhat.com>
12394 PR tree-optimization/83369
12395 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
12398 2018-02-05 Martin Liska <mliska@suse.cz>
12400 * doc/invoke.texi: Cherry-pick upstream r323995.
12402 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
12404 * ira.c (ira_init_register_move_cost): Adjust comment.
12406 2018-02-05 Martin Liska <mliska@suse.cz>
12408 PR gcov-profile/84137
12409 * doc/gcov.texi: Fix typo in documentation.
12411 2018-02-05 Martin Liska <mliska@suse.cz>
12413 PR gcov-profile/83879
12414 * doc/gcov.texi: Document necessity of --dynamic-list-data when
12415 using dlopen functionality.
12417 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
12419 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
12420 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
12421 _mm_maskz_range_ss, _mm_mask_range_round_ss,
12422 _mm_maskz_range_round_ss): New intrinsics.
12423 (__builtin_ia32_rangesd128_round)
12424 (__builtin_ia32_rangess128_round): Remove.
12425 (__builtin_ia32_rangesd128_mask_round,
12426 __builtin_ia32_rangess128_mask_round): New builtins.
12427 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
12428 __builtin_ia32_rangess128_round): Remove.
12429 (__builtin_ia32_rangesd128_mask_round,
12430 __builtin_ia32_rangess128_mask_round): New builtins.
12431 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
12432 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
12433 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
12434 "<round_saeonly_constraint>")): Changed to ...
12435 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
12436 "<round_saeonly_scalar_constraint>")): ... this.
12437 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
12438 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
12439 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
12440 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
12441 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
12443 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
12445 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
12447 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
12448 Remove all values except native, 8540 and 8548.
12450 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
12452 * config/i386/i386.c (ix86_output_function_return): Pass
12453 INVALID_REGNUM, instead of -1, as invalid register number to
12454 indirect_thunk_name and output_indirect_thunk.
12456 2018-02-02 Julia Koval <julia.koval@intel.com>
12458 * config.gcc: Add -march=icelake.
12459 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
12460 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
12461 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
12462 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
12463 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
12464 (processor_target_table): Add icelake.
12465 (ix86_option_override_internal): Handle new PTAs.
12466 (get_builtin_code_for_version): Handle icelake.
12467 (M_INTEL_COREI7_ICELAKE): New.
12468 (fold_builtin_cpu): Handle icelake.
12469 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
12470 * doc/invoke.texi: Add -march=icelake.
12472 2018-02-02 Julia Koval <julia.koval@intel.com>
12474 * config/i386/i386.c (ix86_option_override_internal): Change flags type
12475 to wide_int_bitmask.
12476 * wide-int-bitmask.h: New.
12478 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
12481 * config/i386/i386.md: Replace Pmode with word_mode in
12482 builtin_setjmp_setup and builtin_longjmp to support x32.
12484 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
12488 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
12490 (rs6000_supported_cpu_names): New static variable.
12491 (linux_cpu_translation_table): Likewise.
12492 (elf_platform) <cpu>: Define new static variable and use it.
12493 Translate kernel AT_PLATFORM name to canonical name if needed.
12494 Error if platform name is unknown.
12496 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
12499 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
12501 2018-02-01 Jeff Law <law@redhat.com>
12504 * config/i386/i386.c (release_scratch_register_on_entry): Add new
12505 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
12506 the scratch if RELEASE_VIA_POP is false.
12507 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
12508 If we have to save a temporary register, decrement SIZE appropriately.
12509 Pass new arguments to release_scratch_register_on_entry.
12510 (ix86_adjust_stack_and_probe): Likewise.
12511 (ix86_emit_probe_stack_range): Pass new arguments to
12512 release_scratch_register_on_entry.
12514 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
12516 PR rtl-optimization/84157
12517 * combine.c (change_zero_ext): Use REG_P predicate in
12518 front of HARD_REGISTER_P predicate.
12520 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
12522 * config/avr/avr.c (avr_option_override): Move disabling of
12523 -fdelete-null-pointer-checks to...
12524 * common/config/avr/avr-common.c (avr_option_optimization_table):
12527 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12529 PR tree-optimization/81635
12530 * tree-data-ref.c (split_constant_offset_1): For types that
12531 wrap on overflow, try to use range info to prove that wrapping
12534 2018-02-01 Renlin Li <renlin.li@arm.com>
12537 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
12538 TAILCALL_ADDR_REGS.
12539 (aarch64_register_move_cost): Likewise.
12540 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
12541 TAILCALL_ADDR_REGS.
12542 (REG_CLASS_NAMES): Likewise.
12543 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
12544 TAILCALL_ADDR_REGS. Remove IP registers.
12545 * config/aarch64/aarch64.md (Ucs): Update register constraint.
12547 2018-02-01 Richard Biener <rguenther@suse.de>
12549 * domwalk.h (dom_walker::dom_walker): Add additional constructor
12550 for specifying RPO order and allow NULL for that.
12551 * domwalk.c (dom_walker::dom_walker): Likewise.
12552 (dom_walker::walk): Handle NULL RPO order.
12553 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
12555 (rewrite_update_dom_walker): Likewise.
12556 (mark_def_dom_walker): Likewise.
12558 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12560 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
12561 (aarch64_maybe_expand_sve_subreg_move): Declare.
12562 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
12563 * config/aarch64/predicates.md (aarch64_any_register_operand): New
12565 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
12566 that are semantically a reverse operation.
12567 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
12568 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
12569 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
12571 (aarch64_can_change_mode_class): For big-endian, forbid changes
12572 between two SVE modes if they have different element sizes.
12574 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12576 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
12577 the TImode handling for big-endian targets.
12579 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12581 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
12582 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
12584 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
12585 Remove BSWAP handing for big-endian targets and use the form of
12586 LD1RQ appropariate for the mode.
12588 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12590 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
12591 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
12592 duplicated element.
12594 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12597 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
12598 check for operands that need to go through aarch64_sve_reload_be.
12600 2018-02-01 Jakub Jelinek <jakub@redhat.com>
12602 PR tree-optimization/81661
12603 PR tree-optimization/84117
12604 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
12605 * tree-eh.c: Include gimplify.h.
12606 (find_trapping_overflow, replace_trapping_overflow,
12607 rewrite_to_non_trapping_overflow): New functions.
12608 * tree-vect-loop.c: Include tree-eh.h.
12609 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
12610 * tree-data-ref.c: Include tree-eh.h.
12611 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
12613 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
12615 PR rtl-optimization/84123
12616 * combine.c (change_zero_ext): Check if hard register satisfies
12617 can_change_dest_mode before calling gen_lowpart_SUBREG.
12619 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
12622 * ira.c (ira_init_register_move_cost): Remove assert.
12624 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
12626 PR rtl-optimization/84071
12627 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
12628 * doc/tm.texi: Regenerate.
12630 2018-01-31 Richard Biener <rguenther@suse.de>
12632 PR tree-optimization/84132
12633 * tree-data-ref.c (analyze_miv_subscript): Properly
12634 check whether evolution_function_is_affine_multivariate_p
12635 before calling gcd_of_steps_may_divide_p.
12637 2018-01-31 Julia Koval <julia.koval@intel.com>
12640 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
12641 * config/i386/i386.md (rdpid_rex64) New.
12642 (rdpid): Make 32bit only.
12644 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
12647 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
12648 an IDENTIFIER_NODE for FUNCTION_TYPE's.
12650 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
12653 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
12655 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
12657 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
12659 PR rtl-optimization/84071
12660 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
12661 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
12663 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
12665 * config/arc/arc.c (arc_handle_aux_attribute): New function.
12666 (arc_attribute_table): Add 'aux' attribute.
12667 (arc_in_small_data_p): Consider aux like variables.
12668 (arc_is_aux_reg_p): New function.
12669 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
12670 (arc_get_aux_arg): New function.
12671 (prepare_move_operands): Handle aux-register access.
12672 (arc_handle_aux_attribute): New function.
12673 * doc/extend.texi (ARC Variable attributes): Add subsection.
12675 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
12677 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
12678 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
12679 (arc_attribute_table): Add 'uncached' attribute.
12680 (arc_print_operand): Print '.di' flag for uncached memory
12682 (arc_in_small_data_p): Do not consider for small data the uncached
12684 (arc_is_uncached_mem_p): New function.
12685 * config/arc/predicates.md (compact_store_memory_operand): Check
12686 for uncached memory accesses.
12687 (nonvol_nonimm_operand): Likewise.
12688 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
12690 2018-01-31 Jakub Jelinek <jakub@redhat.com>
12693 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
12694 falign-loops=): Add Optimization flag.
12696 2018-01-30 Jeff Law <law@redhat.com>
12699 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
12700 INT_REGISTERS_SAVED. Check it prior to calling
12701 get_scratch_register_on_entry.
12702 (ix86_adjust_stack_and_probe): Similarly.
12703 (ix86_emit_probe_stack_range): Similarly.
12704 (ix86_expand_prologue): Corresponding changes.
12706 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12709 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
12710 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
12712 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
12715 * lra-constraints.c (curr_insn_transform): Process AND in the
12718 2018-01-30 Jakub Jelinek <jakub@redhat.com>
12720 PR rtl-optimization/83986
12721 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
12722 dependence against last_pending_memory_flush in addition to
12723 pending_jump_insns.
12725 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
12727 PR tree-optimization/81611
12728 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
12731 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12734 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
12737 2018-01-30 Richard Biener <rguenther@suse.de>
12738 Jakub Jelinek <jakub@redhat.com>
12740 PR tree-optimization/84111
12741 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
12742 inner loops added during recursion, as they don't have up-to-date
12745 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
12748 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
12749 (can_inline_edge_by_limits_p): ... here.
12750 (can_early_inline_edge_p, check_callers,
12751 update_caller_keys, update_callee_keys, recursive_inlining,
12752 add_new_edges_to_heap, speculation_useful_p,
12753 inline_small_functions,
12754 inline_small_functions, flatten_function,
12755 inline_to_all_callers_1): Update.
12757 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
12759 * profile-count.c (profile_count::combine_with_ipa_count): Handle
12762 2018-01-30 Richard Biener <rguenther@suse.de>
12764 PR tree-optimization/83008
12765 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
12766 invariant and constant vector uses in stmts when they need
12767 more than one stmt.
12769 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12772 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
12773 * configure: Regenerate.
12775 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
12777 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
12779 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
12780 Use gen_rtx_REG rather than gen_lowpart.
12782 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
12784 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
12785 rather than 0 when creating partial subregs.
12787 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
12789 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
12792 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
12795 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
12796 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
12797 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
12798 flags. This restores the settings used before the 2017-07-24.
12799 Turning off pre increment/decrement/modify allows IVOPTS to
12800 optimize DF/SF loops where the index is an int.
12802 2018-01-29 Richard Biener <rguenther@suse.de>
12803 Kelvin Nilsen <kelvin@gcc.gnu.org>
12806 * tree-vect-stmts.c (vectorizable_call): Don't call
12807 targetm.vectorize_builtin_md_vectorized_function if callee is
12810 2018-01-22 Carl Love <cel@us.ibm.com>
12812 * doc/extend.tex: Fix typo in second arg in
12813 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
12815 2018-01-29 Richard Biener <rguenther@suse.de>
12817 PR tree-optimization/84086
12818 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
12819 (flush_ssaname_freelist): When SSA names were released reset
12820 the SCEV hash table.
12822 2018-01-29 Richard Biener <rguenther@suse.de>
12824 PR tree-optimization/84057
12825 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
12826 removed paths when removing edges.
12828 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
12830 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
12831 -mfunction-return=@var{choice}.
12833 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
12835 PR diagnostic/84034
12836 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
12837 Handle CR like TAB.
12838 (layout::print_source_line): Likewise.
12839 (test_get_line_width_without_trailing_whitespace): Add test cases.
12841 2018-01-27 Jakub Jelinek <jakub@redhat.com>
12843 PR middle-end/84040
12844 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
12847 2018-01-26 Jim Wilson <jimw@sifive.com>
12849 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
12851 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
12854 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12856 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
12857 and CMP + SUB-immediate -> SUBS.
12859 2018-01-26 Martin Sebor <msebor@redhat.com>
12861 PR tree-optimization/83896
12862 * tree-ssa-strlen.c (get_string_len): Rename...
12863 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
12864 Avoid assuming length is constant.
12865 (handle_char_store): Use HOST_WIDE_INT for string length.
12867 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
12870 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
12871 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
12873 2018-01-26 Richard Biener <rguenther@suse.de>
12875 PR rtl-optimization/84003
12876 * dse.c (record_store): Only record redundant stores when
12877 the earlier store aliases at least all accesses the later one does.
12879 2018-01-26 Jakub Jelinek <jakub@redhat.com>
12881 PR rtl-optimization/83985
12882 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
12883 REG_CFA_RESTORE insns.
12884 (delete_unmarked_insns): Don't ignore separate shrink wrapping
12885 REG_CFA_RESTORE insns here.
12888 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
12889 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
12891 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
12893 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
12894 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
12895 (arc_init): Likewise.
12896 (arc_override_options): Likewise.
12897 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
12899 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
12901 * config/arc/arc.h (TARGET_DBNZ): Define.
12902 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
12903 properly set the tune attribute.
12904 (dbnz): Use TARGET_DBNZ guard.
12905 * config/arc/arc.opt (mtune): Add core3 option.
12907 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
12909 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
12910 recognize new pic like addresses.
12911 (arc_delegitimize_address): Clean up.
12913 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
12915 * config/arc/arc-arches.def: Option mrf16 valid for all
12917 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
12918 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
12919 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
12920 * config/arc/arc-tables.opt: Regenerate.
12921 * config/arc/arc.c (arc_conditional_register_usage): Handle
12922 reduced register file case.
12923 (arc_file_start): Set must have build attributes.
12924 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
12925 mrf16 option value.
12926 * config/arc/arc.opt (mrf16): Add new option.
12927 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
12928 * config/arc/genmultilib.awk: Handle new mrf16 option.
12929 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
12930 * config/arc/t-multilib: Regenerate.
12931 * doc/invoke.texi (ARC Options): Document mrf16 option.
12933 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
12935 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
12936 * config/arc/arc.c (arc_handle_secure_attribute): New function.
12937 (arc_attribute_table): Add 'secure_call' attribute.
12938 (arc_print_operand): Print secure call operand.
12939 (arc_function_ok_for_sibcall): Don't optimize tail calls when
12941 (arc_is_secure_call_p): New function. * config/arc/arc.md
12942 (call_i): Add support for sjli instruction.
12943 (call_value_i): Likewise.
12944 * config/arc/constraints.md (Csc): New constraint.
12946 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
12947 John Eric Martin <John.Martin@emmicro-us.com>
12949 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
12950 * config/arc/arc.c (_arc_jli_section): New struct.
12951 (arc_jli_section): New type.
12952 (rc_jli_sections): New static variable.
12953 (arc_handle_jli_attribute): New function.
12954 (arc_attribute_table): Add jli_always and jli_fixed attribute.
12955 (arc_file_end): New function.
12956 (TARGET_ASM_FILE_END): Define.
12957 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
12958 (arc_add_jli_section): New function.
12959 (jli_call_scan): Likewise.
12960 (arc_reorg): Call jli_call_scan.
12961 (arc_output_addsi): Remove 'S' from printing asm operand.
12962 (arc_is_jli_call_p): New function.
12963 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
12965 (movhi_insn): Likewise.
12966 (movsi_insn): Likewise.
12967 (movsi_set_cc_insn): Likewise.
12968 (loadqi_update): Likewise.
12969 (load_zeroextendqisi_update): Likewise.
12970 (load_signextendqisi_update): Likewise.
12971 (loadhi_update): Likewise.
12972 (load_zeroextendhisi_update): Likewise.
12973 (load_signextendhisi_update): Likewise.
12974 (loadsi_update): Likewise.
12975 (loadsf_update): Likewise.
12976 (movsicc_insn): Likewise.
12977 (bset_insn): Likewise.
12978 (bxor_insn): Likewise.
12979 (bclr_insn): Likewise.
12980 (bmsk_insn): Likewise.
12981 (bicsi3_insn): Likewise.
12982 (cmpsi_cc_c_insn): Likewise.
12983 (movsi_ne): Likewise.
12984 (movsi_cond_exec): Likewise.
12985 (clrsbsi2): Likewise.
12986 (norm_f): Likewise.
12996 (call_i): Remove 'S' asm letter, add jli instruction.
12997 (call_value_i): Likewise.
12998 * config/arc/arc.op (mjli-always): New option.
12999 * config/arc/constraints.md (Cji): New constraint.
13000 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
13002 (subsf3_fpx): Likewise.
13003 (mulsf3_fpx): Likewise.
13004 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
13006 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
13007 function attrbutes.
13008 * doc/invoke.texi (ARC): Document mjli-always option.
13010 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
13012 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
13013 avoid addition with 0 and use incw and decw where possible.
13015 2018-01-26 Richard Biener <rguenther@suse.de>
13017 PR tree-optimization/81082
13018 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
13019 association if it requires casting to unsigned.
13020 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
13021 from fold_plusminus_mult_expr to catch important cases late when
13022 range info is available.
13024 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13026 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
13027 * configure.ac (hidden_linkonce): New test.
13028 * configure: Regenerate.
13029 * config.in: Regenerate.
13031 2018-01-26 Julia Koval <julia.koval@intel.com>
13033 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
13034 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
13035 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
13036 _mm_mask_bitshuffle_epi64_mask): Fix type.
13037 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
13038 USI_FTYPE_V4DI_V4DI_USI): Remove.
13039 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
13040 __builtin_ia32_vpshufbitqmb256_mask,
13041 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
13042 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
13043 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
13045 2018-01-26 Alan Modra <amodra@gmail.com>
13048 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
13049 UNSPEC_VBPERMQ. Sort other unspecs.
13051 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
13053 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
13055 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
13057 PR middle-end/83055
13058 * predict.c (drop_profile): Do not push/pop cfun; update also
13060 (handle_missing_profiles): Fix logic looking for zero profiles.
13062 2018-01-25 Jakub Jelinek <jakub@redhat.com>
13064 PR middle-end/83977
13065 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
13066 on functions with #pragma omp declare simd or functions with simd
13068 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
13069 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
13070 Remove trailing \n from warning_at calls.
13072 2018-01-25 Tom de Vries <tom@codesourcery.com>
13075 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
13076 for neutered workers.
13078 2018-01-24 Joseph Myers <joseph@codesourcery.com>
13081 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
13082 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
13084 2018-01-24 Jeff Law <law@redhat.com>
13087 * i386.c (get_probe_interval): Move to earlier point.
13088 (ix86_compute_frame_layout): If -fstack-clash-protection and
13089 the frame is larger than the probe interval, then use pushes
13090 to save registers rather than reg->mem moves.
13091 (ix86_expand_prologue): Remove conditional for int_registers_saved
13094 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
13097 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
13098 min/max for never referenced object.
13100 2018-01-24 Jakub Jelinek <jakub@redhat.com>
13102 PR middle-end/83977
13103 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
13105 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
13106 attributes from DECL_ATTRIBUTES (decl) without affecting
13107 DECL_ATTRIBUTES (current_function_decl).
13108 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
13109 functions with non-NULL DECL_ABSTRACT_ORIGIN.
13111 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
13113 PR tree-optimization/83979
13114 * fold-const.c (fold_comparison): Use constant_boolean_node
13115 instead of boolean_{true,false}_node.
13117 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
13119 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
13122 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13124 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13125 Simplify the clause that sets the length attribute.
13126 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13127 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
13128 clause that sets the length attribute.
13129 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13131 2018-01-24 Tom de Vries <tom@codesourcery.com>
13134 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
13135 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
13136 Add strict parameter.
13137 (prevent_branch_around_nothing): Insert dummy insn between branch to
13138 label and label with no ptx insn inbetween.
13139 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
13141 2018-01-24 Tom de Vries <tom@codesourcery.com>
13144 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
13145 for neutered threads in warp.
13146 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
13148 2018-01-24 Richard Biener <rguenther@suse.de>
13150 PR tree-optimization/83176
13151 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
13154 2018-01-24 Richard Biener <rguenther@suse.de>
13156 PR tree-optimization/82819
13157 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
13158 code generating pluses that are no-ops in the target precision.
13160 2018-01-24 Richard Biener <rguenther@suse.de>
13162 PR middle-end/84000
13163 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
13165 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
13167 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
13168 to merge probabilities.
13169 * predict.c (probably_never_executed): Also mark as cold functions
13170 with global 0 profile and guessed local profile.
13171 * profile-count.c (profile_probability::combine_with_count): New
13173 * profile-count.h (profile_probability::operator*,
13174 profile_probability::operator*=, profile_probability::operator/,
13175 profile_probability::operator/=): Reduce precision to adjusted
13176 and set value to guessed on contradictory divisions.
13177 (profile_probability::combine_with_freq): Remove.
13178 (profile_probability::combine_wiht_count): Declare.
13179 (profile_count::force_nonzero):: Set to adjusted.
13180 (profile_count::probability_in):: Set quality to adjusted.
13181 * tree-ssa-tail-merge.c (replace_block_by): Use
13182 combine_with_count.
13184 2018-01-23 Andrew Waterman <andrew@sifive.com>
13185 Jim Wilson <jimw@sifive.com>
13187 * config/riscv/riscv.c (riscv_stack_boundary): New.
13188 (riscv_option_override): Set riscv_stack_boundary. Handle
13189 riscv_preferred_stack_boundary_arg.
13190 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
13191 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
13192 (STACK_BOUNDARY): Set to riscv_stack_boundary.
13193 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
13194 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
13195 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
13197 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
13200 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
13201 of struct ix86_frame.
13202 (ix86_expand_epilogue): Likewise. Add a local variable for
13203 the reg_save_offset field in struct ix86_frame.
13205 2018-01-23 Bin Cheng <bin.cheng@arm.com>
13207 PR tree-optimization/82604
13208 * tree-loop-distribution.c (enum partition_kind): New enum item
13209 PKIND_PARTIAL_MEMSET.
13210 (partition_builtin_p): Support above new enum item.
13211 (generate_code_for_partition): Ditto.
13212 (compute_access_range): Differentiate cases that equality can be
13213 proven at all loops, the innermost loops or no loops.
13214 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
13215 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
13216 (finalize_partitions, distribute_loop): Don't fuse partition of
13217 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
13218 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
13219 parloop is enabled.
13221 2018-01-23 Martin Liska <mliska@suse.cz>
13223 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
13224 order to ignore the predictor.
13225 (PRED_POLYMORPHIC_CALL): Likewise.
13226 (PRED_RECURSIVE_CALL): Likewise.
13228 2018-01-23 Martin Liska <mliska@suse.cz>
13230 * tree-profile.c (tree_profiling): Print function header to
13231 aware reader which function we are working on.
13232 * value-prof.c (gimple_find_values_to_profile): Do not print
13233 not interesting value histograms.
13235 2018-01-23 Martin Liska <mliska@suse.cz>
13237 * profile-count.h (enum profile_quality): Add
13238 profile_uninitialized as the first value. Do not number values
13239 as they are zero based.
13240 (profile_count::verify): Update sanity check.
13241 (profile_probability::verify): Likewise.
13243 2018-01-23 Nathan Sidwell <nathan@acm.org>
13245 * doc/invoke.texi (ffor-scope): Deprecate.
13247 2018-01-23 David Malcolm <dmalcolm@redhat.com>
13249 PR tree-optimization/83510
13250 * domwalk.c (set_all_edges_as_executable): New function.
13251 (dom_walker::dom_walker): Convert bool param
13252 "skip_unreachable_blocks" to enum reachability. Move setup of
13253 edge flags to set_all_edges_as_executable and only do it when
13254 reachability is REACHABLE_BLOCKS.
13255 * domwalk.h (enum dom_walker::reachability): New enum.
13256 (dom_walker::dom_walker): Convert bool param
13257 "skip_unreachable_blocks" to enum reachability.
13258 (set_all_edges_as_executable): New decl.
13259 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
13260 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
13262 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
13263 but converting true to REACHABLE_BLOCKS.
13264 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
13266 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
13267 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
13268 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
13270 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
13271 if check_all_array_refs will be called.
13273 2018-01-23 David Malcolm <dmalcolm@redhat.com>
13275 * tree.c (selftest::test_location_wrappers): Add more test
13278 2018-01-23 David Malcolm <dmalcolm@redhat.com>
13280 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
13281 (selftest::test_bit_in_range): Likewise.
13283 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
13286 * doc/sourcebuild.texi (vect_float): Say that the selector
13287 only describes the situation when -funsafe-math-optimizations is on.
13288 (vect_float_strict): Document.
13290 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
13292 PR tree-optimization/83965
13293 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13294 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
13295 instead of checking only for a reduction.
13296 (vect_recog_widen_sum_pattern): Likewise.
13298 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
13300 * predict.c (probably_never_executed): Only use precise profile info.
13301 (compute_function_frequency): Skip after inlining hack since we now
13302 have quality checking.
13304 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
13306 * profile-count.h (profile_probability::very_unlikely,
13307 profile_probability::unlikely, profile_probability::even): Set
13308 precision to guessed.
13310 2018-01-23 Richard Biener <rguenther@suse.de>
13312 PR tree-optimization/83963
13313 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
13314 Properly terminate dominator walk when crossing the exit edge not
13315 when visiting its source block.
13317 2018-01-23 Jakub Jelinek <jakub@redhat.com>
13320 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
13321 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
13323 2018-01-22 Jakub Jelinek <jakub@redhat.com>
13325 PR tree-optimization/83957
13326 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
13327 semicolon after for body surrounded by braces.
13329 PR tree-optimization/83081
13330 * profile-count.h (profile_probability::split): New method.
13331 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
13332 Use profile_probability::split.
13333 (do_compare_rtx_and_jump): Fix adjustment of probabilities
13334 when splitting a single conditional jump into 2.
13336 2018-01-22 David Malcolm <dmalcolm@redhat.com>
13338 PR tree-optimization/69452
13339 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
13342 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13344 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
13345 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
13346 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
13348 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13350 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
13352 * config/rl78/rl78.md (movdi): New define_expand.
13353 * config/rl78/rl78.c (rl78_split_movdi): New function.
13355 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
13358 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
13360 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
13361 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
13362 128-bit to produce an UNSPEC move to get the double word with the
13363 signbit and then a shift directly to do signbit.
13364 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
13365 implementation with a new version that just does either a direct
13366 move or a regular move. Move memory interface to separate insns.
13367 Move insns so they are next to the expander.
13368 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
13369 with signbit move. Split big and little endian case.
13370 (signbit<mode>2_dm_mem_le): Likewise.
13371 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
13372 (signbit<mode>2_dm2): Likewise.
13374 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13376 * config/rl78/rl78.md (anddi3): New define_expand.
13378 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13380 * config/rl78/rl78.md (umindi3): New define_expand.
13382 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13384 * config/rl78/rl78.md (smindi3): New define_expand.
13386 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13388 * config/rl78/rl78.md (smaxdi3): New define_expand.
13390 2018-01-22 Carl Love <cel@us.ibm.com>
13392 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
13393 LVX_V1TI): Add macro expansion.
13394 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
13395 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
13396 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
13397 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
13398 Change check to determine if the instruction is a byte reversing
13399 entry. Fix typo in comment.
13400 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
13401 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
13402 Add def_builtin calls for new builtins.
13403 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
13404 Add define_insn expansion.
13406 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13408 * config/rl78/rl78.md (umaxdi3): New define_expand.
13410 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13412 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
13413 for non-QImode registers.
13415 2018-01-22 Richard Biener <rguenther@suse.de>
13417 PR tree-optimization/83963
13418 * graphite-scop-detection.c (scop_detection::get_sese): Delay
13419 including the loop exit block.
13420 (scop_detection::merge_sese): Likewise.
13421 (scop_detection::add_scop): Do it here instead.
13423 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13425 * doc/sourcebuild.texi (arm_softfloat): Document.
13427 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
13430 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
13431 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
13432 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
13434 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13435 David Edelsohn <dje.gcc@gmail.com>
13438 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13439 Change "crset eq" to "crset 2".
13440 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13441 (*call_indirect_aix<mode>_nospec): Likewise.
13442 (*call_value_indirect_aix<mode>_nospec): Likewise.
13443 (*call_indirect_elfv2<mode>_nospec): Likewise.
13444 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
13445 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
13446 change assembly output from . to $.
13447 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13448 (indirect_jump<mode>_nospec): Change assembly output from . to $.
13449 (*tablejump<mode>_internal1_nospec): Likewise.
13451 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
13454 * config/sh/sh_optimize_sett_clrt.cc:
13455 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
13457 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
13459 PR tree-optimization/83940
13460 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
13461 offset_dt to vect_constant_def rather than vect_unknown_def_type.
13462 (vect_check_load_store_mask): Add a mask_dt_out parameter and
13463 use it to pass back the definition type.
13464 (vect_check_store_rhs): Likewise rhs_dt_out.
13465 (vect_build_gather_load_calls): Add a mask_dt argument and use
13466 it instead of a call to vect_is_simple_use.
13467 (vectorizable_store): Update calls to vect_check_load_store_mask
13468 and vect_check_store_rhs. Use the dt returned by the latter instead
13469 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
13470 instead of calls to vect_is_simple_use. Pass the scalar rather
13471 than the vector operand to vect_is_simple_use when handling
13472 second and subsequent copies of an rhs value.
13473 (vectorizable_load): Update calls to vect_check_load_store_mask
13474 and vect_build_gather_load_calls. Use the cached mask_dt and
13475 gs_info.offset_dt instead of calls to vect_is_simple_use.
13477 2018-01-20 Jakub Jelinek <jakub@redhat.com>
13479 PR middle-end/83945
13480 * tree-emutls.c: Include gimplify.h.
13481 (lower_emutls_2): New function.
13482 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
13483 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
13484 it before further processing.
13487 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
13488 UINTVAL (trueop1) instead of INTVAL (op1).
13490 2018-01-19 Jakub Jelinek <jakub@redhat.com>
13494 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
13495 INCOMING_FRAME_SP_OFFSET if not defined.
13496 (scan_trace): Add ENTRY argument. If true and
13497 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
13498 emit a note to adjust the CFA offset.
13499 (create_cfi_notes): Adjust scan_trace callers.
13500 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
13501 INCOMING_FRAME_SP_OFFSET in the CIE.
13502 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
13503 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
13505 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
13506 * doc/tm.texi: Regenerated.
13508 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13510 PR rtl-optimization/83147
13511 * lra-constraints.c (remove_inheritance_pseudos): Use
13512 lra_substitute_pseudo_within_insn.
13514 2018-01-19 Tom de Vries <tom@codesourcery.com>
13515 Cesar Philippidis <cesar@codesourcery.com>
13518 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
13520 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
13523 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
13524 spaces for function labels.
13526 2018-01-19 Martin Liska <mliska@suse.cz>
13528 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
13529 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
13530 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
13531 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
13532 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
13533 (PRED_CONST_RETURN): Change from 69 to 65.
13534 (PRED_NULL_RETURN): Change from 91 to 71.
13535 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
13536 (PRED_LOOP_GUARD): Change from 66 to 73.
13538 2018-01-19 Martin Liska <mliska@suse.cz>
13540 * predict.c (predict_insn_def): Add new assert.
13541 (struct branch_predictor): Change type to signed integer.
13542 (test_prediction_value_range): Amend test to cover
13543 PROB_UNINITIALIZED.
13544 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
13545 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
13546 (PRED_LOOP_ITERATIONS_MAX): Likewise.
13547 (PRED_LOOP_IV_COMPARE): Likewise.
13548 * predict.h (PROB_UNINITIALIZED): Define new constant.
13550 2018-01-19 Martin Liska <mliska@suse.cz>
13552 * predict.c (dump_prediction): Add new format for
13553 analyze_brprob.py script which is enabled with -details
13555 * profile-count.h (precise_p): New function.
13557 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
13559 PR tree-optimization/83922
13560 * tree-vect-loop.c (vect_verify_full_masking): Return false if
13561 there are no statements that need masking.
13562 (vect_active_double_reduction_p): New function.
13563 (vect_analyze_loop_operations): Use it when handling phis that
13564 are not in the loop header.
13566 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
13568 PR tree-optimization/83914
13569 * tree-vect-loop.c (vectorizable_induction): Don't convert
13570 init_expr or apply the peeling adjustment for inductions
13571 that are nested within the vectorized loop.
13573 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13575 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
13578 2018-01-18 Jakub Jelinek <jakub@redhat.com>
13582 * function.h (gimplify_parameters): Add gimple_seq * argument.
13583 * function.c: Include gimple.h and options.h.
13584 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
13585 for the added local temporaries if needed.
13586 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
13587 if there are any parameter cleanups, wrap whole body into a
13588 try/finally with the cleanups.
13590 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
13593 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
13594 Use GET_MODE_CLASS for scalar floating point.
13596 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
13600 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
13601 Fix call of call_cgraph_insertion_hooks.
13603 2018-01-18 Martin Sebor <msebor@redhat.com>
13605 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
13607 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
13610 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
13613 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
13616 * common.opt: (-ffile-prefix-map): New option.
13617 * opts.c (common_handle_option): Defer it.
13618 * opts-global.c (handle_common_deferred_options): Handle it.
13619 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
13620 * file-prefix-map.h: New file.
13621 (remap_debug_filename, add_debug_prefix_map): ...here.
13622 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
13623 * final.c (debug_prefix_map, add_debug_prefix_map
13624 remap_debug_filename): Move to...
13625 * file-prefix-map.c: New file.
13626 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
13627 generalize, get rid of alloca(), use strrchr() instead of strchr().
13628 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
13629 Implement in terms of add_prefix_map().
13630 (remap_macro_filename, remap_debug_filename): Implement in term of
13632 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
13633 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
13634 * dbxout.c: Include file-prefix-map.h.
13635 * varasm.c: Likewise.
13636 * vmsdbgout.c: Likewise.
13637 * xcoffout.c: Likewise.
13638 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
13639 * doc/cppopts.texi (-fmacro-prefix-map): Document.
13640 * doc/invoke.texi (-ffile-prefix-map): Document.
13641 (-fdebug-prefix-map): Update description.
13643 2018-01-18 Martin Liska <mliska@suse.cz>
13645 * config/i386/i386.c (indirect_thunk_name): Document that also
13647 (output_indirect_thunk): Document why both instructions
13648 (pause and lfence) are generated.
13650 2018-01-18 Richard Biener <rguenther@suse.de>
13652 PR tree-optimization/83887
13653 * graphite-scop-detection.c
13654 (scop_detection::get_nearest_dom_with_single_entry): Remove.
13655 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
13656 (scop_detection::merge_sese): Re-implement with a flood-fill
13657 algorithm that properly finds a SESE region if it exists.
13659 2018-01-18 Jakub Jelinek <jakub@redhat.com>
13662 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
13663 pointer_diff optimizations use view_convert instead of convert.
13665 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13667 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13668 Generate different code for -mno-speculate-indirect-jumps.
13669 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13670 (*call_indirect_aix<mode>): Disable for
13671 -mno-speculate-indirect-jumps.
13672 (*call_indirect_aix<mode>_nospec): New define_insn.
13673 (*call_value_indirect_aix<mode>): Disable for
13674 -mno-speculate-indirect-jumps.
13675 (*call_value_indirect_aix<mode>_nospec): New define_insn.
13676 (*sibcall_nonlocal_sysv<mode>): Generate different code for
13677 -mno-speculate-indirect-jumps.
13678 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13680 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
13682 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
13683 long double type, set the flags for noting the default long double
13684 type, even if we don't pass or return a long double type.
13686 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
13689 * ipa-inline.c (flatten_function): Do not overwrite final inlining
13692 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
13694 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
13695 support for merge[hl].
13696 (fold_mergehl_helper): New helper function.
13697 (tree-vector-builder.h): New #include for tree_vector_builder usage.
13698 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
13699 (altivec_vmrglw_direct): Add xxmrglw insn.
13701 2018-01-17 Andrew Waterman <andrew@sifive.com>
13703 * config/riscv/riscv.c (riscv_conditional_register_usage): If
13704 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
13706 2018-01-17 David Malcolm <dmalcolm@redhat.com>
13709 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
13710 call the lto_location_cache before reading the
13711 DECL_SOURCE_LOCATION of the types.
13713 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
13714 Richard Sandiford <richard.sandiford@linaro.org>
13716 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
13717 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
13718 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
13719 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
13720 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
13722 * config/aarch64/constraints.md (aarch64_movti_operand):
13724 * config/aarch64/predicates.md (Uti): Add new constraint.
13726 2018-01-17 Carl Love <cel@us.ibm.com>
13728 * config/rs6000/vsx.md (define_expand xl_len_r,
13729 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
13730 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
13732 (define_expand, define_insn): Move the shift left from the
13733 define_insn to the define_expand for lxvl and stxvl instructions.
13734 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
13735 and XL_LEN_R definitions to PURE.
13737 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
13739 * config/i386/i386.c (indirect_thunk_name): Declare regno
13740 as unsigned int. Compare regno with INVALID_REGNUM.
13741 (output_indirect_thunk): Ditto.
13742 (output_indirect_thunk_function): Ditto.
13743 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
13744 in the call to output_indirect_thunk_function.
13746 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
13748 PR middle-end/83884
13749 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
13750 rather than the size of inner_type to determine the stack slot size
13751 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
13753 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
13756 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
13759 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
13761 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
13762 endian Linux systems to optionally enable multilibs for selecting
13763 the long double type if the user configured an explicit type.
13764 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
13765 have no long double multilibs if not defined.
13766 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
13767 warn if the user used -mabi={ieee,ibm}longdouble and we built
13768 multilibs for long double.
13769 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
13770 appropriate multilib option.
13771 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
13773 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
13774 for building long double multilibs.
13775 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
13777 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
13779 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
13782 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
13784 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
13787 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
13790 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
13793 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
13795 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
13796 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
13798 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
13800 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
13801 different rtl trees depending on TARGET_64BIT.
13802 (rs6000_gen_lvx): Likewise.
13804 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
13806 * config/visium/visium.md (nop): Tweak comment.
13807 (hazard_nop): Likewise.
13809 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13811 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
13812 -mspeculate-indirect-jumps.
13813 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
13814 for -mno-speculate-indirect-jumps.
13815 (*call_indirect_elfv2<mode>_nospec): New define_insn.
13816 (*call_value_indirect_elfv2<mode>): Disable for
13817 -mno-speculate-indirect-jumps.
13818 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
13819 (indirect_jump): Emit different RTL for
13820 -mno-speculate-indirect-jumps.
13821 (*indirect_jump<mode>): Disable for
13822 -mno-speculate-indirect-jumps.
13823 (*indirect_jump<mode>_nospec): New define_insn.
13824 (tablejump): Emit different RTL for
13825 -mno-speculate-indirect-jumps.
13826 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
13827 (tablejumpsi_nospec): New define_expand.
13828 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
13829 (tablejumpdi_nospec): New define_expand.
13830 (*tablejump<mode>_internal1): Disable for
13831 -mno-speculate-indirect-jumps.
13832 (*tablejump<mode>_internal1_nospec): New define_insn.
13833 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
13836 2018-01-16 Artyom Skrobov tyomitch@gmail.com
13838 * caller-save.c (insert_save): Drop unnecessary parameter. All
13841 2018-01-16 Jakub Jelinek <jakub@redhat.com>
13842 Richard Biener <rguenth@suse.de>
13845 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
13846 return early, inline manually is_gimple_sizepos. Make sure if we
13847 call gimplify_expr we don't end up with a gimple constant.
13848 * tree.c (variably_modified_type_p): Don't return true for
13849 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
13850 * gimplify.h (is_gimple_sizepos): Remove.
13852 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
13854 PR tree-optimization/83857
13855 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
13856 vectorizable_live_operation for pure SLP statements.
13857 (vectorizable_live_operation): Handle PHIs.
13859 2018-01-16 Richard Biener <rguenther@suse.de>
13861 PR tree-optimization/83867
13862 * tree-vect-stmts.c (vect_transform_stmt): Precompute
13863 nested_in_vect_loop_p since the scalar stmt may get invalidated.
13865 2018-01-16 Jakub Jelinek <jakub@redhat.com>
13868 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
13869 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
13870 If off is not INTEGER_CST, issue a may not be aligned warning
13871 rather than isn't aligned. Use isn%'t rather than isn't.
13872 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
13874 <case MULT_EXPR>: Improve the case when bottom and one of the
13875 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
13876 operand, in that case check if the other operand is multiple of
13877 bottom divided by the INTEGER_CST operand.
13879 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
13882 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
13883 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
13884 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
13885 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
13886 * config/pa/pa.c (pa_function_arg_advance): Likewise.
13887 (pa_function_arg, pa_arg_partial_bytes): Likewise.
13888 (pa_function_arg_size): New function.
13890 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
13892 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
13893 in a separate statement.
13895 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
13897 PR tree-optimization/83847
13898 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
13899 group gathers and scatters.
13901 2018-01-16 Jakub Jelinek <jakub@redhat.com>
13903 PR rtl-optimization/86620
13904 * params.def (max-sched-ready-insns): Bump minimum value to 1.
13906 PR rtl-optimization/83213
13907 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
13908 to last if both are JUMP_INSNs.
13910 PR tree-optimization/83843
13911 * gimple-ssa-store-merging.c
13912 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
13913 store_immediate_info for bswap/nop orig_stores.
13915 2018-01-15 Andrew Waterman <andrew@sifive.com>
13917 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
13919 <UDIV>: Increase cost if !TARGET_DIV.
13921 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
13923 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
13924 (define_attr "cr_logical_3op"): New.
13925 (cceq_ior_compare): Adjust.
13926 (cceq_ior_compare_complement): Adjust.
13927 (*cceq_rev_compare): Adjust.
13928 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
13929 (is_cracked_insn): Adjust.
13930 (insn_must_be_first_in_group): Adjust.
13931 * config/rs6000/40x.md: Adjust.
13932 * config/rs6000/440.md: Adjust.
13933 * config/rs6000/476.md: Adjust.
13934 * config/rs6000/601.md: Adjust.
13935 * config/rs6000/603.md: Adjust.
13936 * config/rs6000/6xx.md: Adjust.
13937 * config/rs6000/7450.md: Adjust.
13938 * config/rs6000/7xx.md: Adjust.
13939 * config/rs6000/8540.md: Adjust.
13940 * config/rs6000/cell.md: Adjust.
13941 * config/rs6000/e300c2c3.md: Adjust.
13942 * config/rs6000/e500mc.md: Adjust.
13943 * config/rs6000/e500mc64.md: Adjust.
13944 * config/rs6000/e5500.md: Adjust.
13945 * config/rs6000/e6500.md: Adjust.
13946 * config/rs6000/mpc.md: Adjust.
13947 * config/rs6000/power4.md: Adjust.
13948 * config/rs6000/power5.md: Adjust.
13949 * config/rs6000/power6.md: Adjust.
13950 * config/rs6000/power7.md: Adjust.
13951 * config/rs6000/power8.md: Adjust.
13952 * config/rs6000/power9.md: Adjust.
13953 * config/rs6000/rs64.md: Adjust.
13954 * config/rs6000/titan.md: Adjust.
13956 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
13958 * config/i386/predicates.md (indirect_branch_operand): Rewrite
13959 ix86_indirect_branch_register logic.
13961 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
13963 * config/i386/constraints.md (Bs): Update
13964 ix86_indirect_branch_register check. Don't check
13965 ix86_indirect_branch_register with GOT_memory_operand.
13967 * config/i386/predicates.md (GOT_memory_operand): Don't check
13968 ix86_indirect_branch_register here.
13969 (GOT32_symbol_operand): Likewise.
13971 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
13973 * config/i386/predicates.md (constant_call_address_operand):
13974 Rewrite ix86_indirect_branch_register logic.
13975 (sibcall_insn_operand): Likewise.
13977 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
13979 * config/i386/constraints.md (Bs): Replace
13980 ix86_indirect_branch_thunk_register with
13981 ix86_indirect_branch_register.
13983 * config/i386/i386.md (indirect_jump): Likewise.
13984 (tablejump): Likewise.
13985 (*sibcall_memory): Likewise.
13986 (*sibcall_value_memory): Likewise.
13987 Peepholes of indirect call and jump via memory: Likewise.
13988 * config/i386/i386.opt: Likewise.
13989 * config/i386/predicates.md (indirect_branch_operand): Likewise.
13990 (GOT_memory_operand): Likewise.
13991 (call_insn_operand): Likewise.
13992 (sibcall_insn_operand): Likewise.
13993 (GOT32_symbol_operand): Likewise.
13995 2018-01-15 Jakub Jelinek <jakub@redhat.com>
13997 PR middle-end/83837
13998 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
13999 type rather than type addr's type points to.
14000 (expand_omp_atomic_mutex): Likewise.
14001 (expand_omp_atomic): Likewise.
14003 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14006 * config/i386/i386.c (output_indirect_thunk_function): Use
14007 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
14008 for __x86_return_thunk.
14010 2018-01-15 Richard Biener <rguenther@suse.de>
14012 PR middle-end/83850
14013 * expmed.c (extract_bit_field_1): Fix typo.
14015 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14018 * config/arm/iterators.md (VF): New mode iterator.
14019 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
14020 Remove integer-related logic from pattern.
14021 (neon_vabd<mode>_3): Likewise.
14023 2018-01-15 Jakub Jelinek <jakub@redhat.com>
14025 PR middle-end/82694
14026 * common.opt (fstrict-overflow): No longer an alias.
14027 (fwrapv-pointer): New option.
14028 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
14029 also for pointer types based on flag_wrapv_pointer.
14030 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
14031 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
14032 opts->x_flag_wrapv got set.
14033 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
14034 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
14035 POINTER_TYPE_OVERFLOW_UNDEFINED.
14036 * match.pd: Likewise in address comparison pattern.
14037 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
14039 2018-01-15 Richard Biener <rguenther@suse.de>
14042 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
14043 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
14044 Reset type names to their identifier if their TYPE_DECL doesn't
14045 have linkage (and thus is used for ODR and devirt).
14046 (save_debug_info_for_decl): Remove.
14047 (save_debug_info_for_type): Likewise.
14048 (add_tree_to_fld_list): Adjust.
14049 * tree-pretty-print.c (dump_generic_node): Make dumping of
14050 type names more robust.
14052 2018-01-15 Richard Biener <rguenther@suse.de>
14054 * BASE-VER: Bump to 8.0.1.
14056 2018-01-14 Martin Sebor <msebor@redhat.com>
14059 * builtins.c (check_access): Avoid warning when the no-warning bit
14062 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
14064 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
14065 * ira-color (allocno_hard_regs_compare): Likewise.
14067 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
14070 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
14071 Use .pushsection/.popsection.
14073 2018-01-14 Martin Sebor <msebor@redhat.com>
14076 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
14078 2018-01-14 Jakub Jelinek <jakub@redhat.com>
14080 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
14081 entry from extra_headers.
14082 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
14083 extra_headers, make the list bitwise identical to the i?86-*-* one.
14085 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14087 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
14088 -mcmodel=large with -mindirect-branch=thunk,
14089 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
14090 -mfunction-return=thunk-extern.
14091 * doc/invoke.texi: Document -mcmodel=large is incompatible with
14092 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
14093 -mfunction-return=thunk and -mfunction-return=thunk-extern.
14095 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14097 * config/i386/i386.c (print_reg): Print the name of the full
14098 integer register without '%'.
14099 (ix86_print_operand): Handle 'V'.
14100 * doc/extend.texi: Document 'V' modifier.
14102 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14104 * config/i386/constraints.md (Bs): Disallow memory operand for
14105 -mindirect-branch-register.
14107 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14108 (GOT_memory_operand): Likewise.
14109 (call_insn_operand): Likewise.
14110 (sibcall_insn_operand): Likewise.
14111 (GOT32_symbol_operand): Likewise.
14112 * config/i386/i386.md (indirect_jump): Call convert_memory_address
14113 for -mindirect-branch-register.
14114 (tablejump): Likewise.
14115 (*sibcall_memory): Likewise.
14116 (*sibcall_value_memory): Likewise.
14117 Disallow peepholes of indirect call and jump via memory for
14118 -mindirect-branch-register.
14119 (*call_pop): Replace m with Bw.
14120 (*call_value_pop): Likewise.
14121 (*sibcall_pop_memory): Replace m with Bs.
14122 * config/i386/i386.opt (mindirect-branch-register): New option.
14123 * doc/invoke.texi: Document -mindirect-branch-register option.
14125 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14127 * config/i386/i386-protos.h (ix86_output_function_return): New.
14128 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
14129 set function_return_type.
14130 (indirect_thunk_name): Add ret_p to indicate thunk for function
14132 (output_indirect_thunk_function): Pass false to
14133 indirect_thunk_name.
14134 (ix86_output_indirect_branch_via_reg): Likewise.
14135 (ix86_output_indirect_branch_via_push): Likewise.
14136 (output_indirect_thunk_function): Create alias for function
14137 return thunk if regno < 0.
14138 (ix86_output_function_return): New function.
14139 (ix86_handle_fndecl_attribute): Handle function_return.
14140 (ix86_attribute_table): Add function_return.
14141 * config/i386/i386.h (machine_function): Add
14142 function_return_type.
14143 * config/i386/i386.md (simple_return_internal): Use
14144 ix86_output_function_return.
14145 (simple_return_internal_long): Likewise.
14146 * config/i386/i386.opt (mfunction-return=): New option.
14147 (indirect_branch): Mention -mfunction-return=.
14148 * doc/extend.texi: Document function_return function attribute.
14149 * doc/invoke.texi: Document -mfunction-return= option.
14151 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14153 * config/i386/i386-opts.h (indirect_branch): New.
14154 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
14155 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
14156 with local indirect jump when converting indirect call and jump.
14157 (ix86_set_indirect_branch_type): New.
14158 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
14159 (indirectlabelno): New.
14160 (indirect_thunk_needed): Likewise.
14161 (indirect_thunk_bnd_needed): Likewise.
14162 (indirect_thunks_used): Likewise.
14163 (indirect_thunks_bnd_used): Likewise.
14164 (INDIRECT_LABEL): Likewise.
14165 (indirect_thunk_name): Likewise.
14166 (output_indirect_thunk): Likewise.
14167 (output_indirect_thunk_function): Likewise.
14168 (ix86_output_indirect_branch_via_reg): Likewise.
14169 (ix86_output_indirect_branch_via_push): Likewise.
14170 (ix86_output_indirect_branch): Likewise.
14171 (ix86_output_indirect_jmp): Likewise.
14172 (ix86_code_end): Call output_indirect_thunk_function if needed.
14173 (ix86_output_call_insn): Call ix86_output_indirect_branch if
14175 (ix86_handle_fndecl_attribute): Handle indirect_branch.
14176 (ix86_attribute_table): Add indirect_branch.
14177 * config/i386/i386.h (machine_function): Add indirect_branch_type
14178 and has_local_indirect_jump.
14179 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
14181 (tablejump): Likewise.
14182 (*indirect_jump): Use ix86_output_indirect_jmp.
14183 (*tablejump_1): Likewise.
14184 (simple_return_indirect_internal): Likewise.
14185 * config/i386/i386.opt (mindirect-branch=): New option.
14186 (indirect_branch): New.
14189 (thunk-inline): Likewise.
14190 (thunk-extern): Likewise.
14191 * doc/extend.texi: Document indirect_branch function attribute.
14192 * doc/invoke.texi: Document -mindirect-branch= option.
14194 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
14197 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
14199 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
14201 * ipa-inline.c (want_inline_small_function_p): Return false if
14202 inlining has already failed with CIF_FINAL_ERROR.
14203 (update_caller_keys): Call want_inline_small_function_p before
14205 (update_callee_keys): Likewise.
14207 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14209 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
14211 (rs6000_quadword_masked_address_p): Likewise.
14212 (quad_aligned_load_p): Likewise.
14213 (quad_aligned_store_p): Likewise.
14214 (const_load_sequence_p): Add comment to describe the outer-most loop.
14215 (mimic_memory_attributes_and_flags): New function.
14216 (rs6000_gen_stvx): Likewise.
14217 (replace_swapped_aligned_store): Likewise.
14218 (rs6000_gen_lvx): Likewise.
14219 (replace_swapped_aligned_load): Likewise.
14220 (replace_swapped_load_constant): Capitalize argument name in
14221 comment describing this function.
14222 (rs6000_analyze_swaps): Add a third pass to search for vector loads
14223 and stores that access quad-word aligned addresses and replace
14224 with stvx or lvx instructions when appropriate.
14225 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
14226 New function prototype.
14227 (rs6000_quadword_masked_address_p): Likewise.
14228 (rs6000_gen_lvx): Likewise.
14229 (rs6000_gen_stvx): Likewise.
14230 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
14231 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
14232 when memory address is aligned.
14233 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
14234 this split to select lvx instruction when memory address is aligned.
14235 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
14236 instruction when memory address is aligned.
14237 (*vsx_le_perm_load_v16qi): Likewise.
14238 (four unnamed splitters): Modify to select the stvx instruction
14239 when memory is aligned.
14241 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
14243 * predict.c (determine_unlikely_bbs): Handle correctly BBs
14244 which appears in the queue multiple times.
14246 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14247 Alan Hayward <alan.hayward@arm.com>
14248 David Sherwood <david.sherwood@arm.com>
14250 * tree-vectorizer.h (vec_lower_bound): New structure.
14251 (_loop_vec_info): Add check_nonzero and lower_bounds.
14252 (LOOP_VINFO_CHECK_NONZERO): New macro.
14253 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
14254 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
14255 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
14256 fields. Make seg_len the distance travelled, not including the
14258 (dr_direction_indicator): Declare.
14259 (dr_zero_step_indicator): Likewise.
14260 (dr_known_forward_stride_p): Likewise.
14261 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
14263 (runtime_alias_check_p): Allow runtime alias checks with
14265 (operator ==): Compare access_size and align.
14266 (prune_runtime_alias_test_list): Rework for new distinction between
14267 the access_size and seg_len.
14268 (create_intersect_range_checks_index): Likewise. Cope with polynomial
14270 (get_segment_min_max): New function.
14271 (create_intersect_range_checks): Use it.
14272 (dr_step_indicator): New function.
14273 (dr_direction_indicator): Likewise.
14274 (dr_zero_step_indicator): Likewise.
14275 (dr_known_forward_stride_p): Likewise.
14276 * tree-loop-distribution.c (data_ref_segment_size): Return
14277 DR_STEP * (niters - 1).
14278 (compute_alias_check_pairs): Update call to the dr_with_seg_len
14280 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
14281 (vect_preserves_scalar_order_p): New function, split out from...
14282 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
14283 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
14284 (vect_vfa_access_size): New function.
14285 (vect_vfa_align): Likewise.
14286 (vect_compile_time_alias): Take access_size_a and access_b arguments.
14287 (dump_lower_bound): New function.
14288 (vect_check_lower_bound): Likewise.
14289 (vect_small_gap_p): Likewise.
14290 (vectorizable_with_step_bound_p): Likewise.
14291 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
14292 depencies if the vectorization factor is 1. Convert the checks
14293 for nonzero steps into checks on the bounds of DR_STEP. Try using
14294 a bunds check for variable steps if the minimum required step is
14295 relatively small. Update calls to the dr_with_seg_len
14296 constructor and to vect_compile_time_alias.
14297 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
14299 (vect_loop_versioning): Call it.
14300 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
14302 (vect_estimate_min_profitable_iters): Account for any bounds checks.
14304 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14305 Alan Hayward <alan.hayward@arm.com>
14306 David Sherwood <david.sherwood@arm.com>
14308 * doc/sourcebuild.texi (vect_scatter_store): Document.
14309 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
14311 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
14313 * genopinit.c (main): Add supports_vec_scatter_store and
14314 supports_vec_scatter_store_cached to target_optabs.
14315 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
14316 IFN_MASK_SCATTER_STORE.
14317 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
14319 * internal-fn.h (internal_store_fn_p): Declare.
14320 (internal_fn_stored_value_index): Likewise.
14321 * internal-fn.c (scatter_store_direct): New macro.
14322 (expand_scatter_store_optab_fn): New function.
14323 (direct_scatter_store_optab_supported_p): New macro.
14324 (internal_store_fn_p): New function.
14325 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
14326 IFN_MASK_SCATTER_STORE.
14327 (internal_fn_mask_index): Likewise.
14328 (internal_fn_stored_value_index): New function.
14329 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
14330 for scatter stores.
14331 * optabs-query.h (supports_vec_scatter_store_p): Declare.
14332 * optabs-query.c (supports_vec_scatter_store_p): New function.
14333 * tree-vectorizer.h (vect_get_store_rhs): Declare.
14334 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
14335 true for scatter stores.
14336 (vect_gather_scatter_fn_p): Handle scatter stores too.
14337 (vect_check_gather_scatter): Consider using scatter stores if
14338 supports_vec_scatter_store_p.
14339 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
14340 scatter stores too.
14341 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14342 internal_fn_stored_value_index.
14343 (check_load_store_masking): Handle scatter stores too.
14344 (vect_get_store_rhs): Make public.
14345 (vectorizable_call): Use internal_store_fn_p.
14346 (vectorizable_store): Handle scatter store internal functions.
14347 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
14348 when deciding whether the end of the group has been reached.
14349 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
14350 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
14351 (mask_scatter_store<mode>): New insns.
14353 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14354 Alan Hayward <alan.hayward@arm.com>
14355 David Sherwood <david.sherwood@arm.com>
14357 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
14358 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
14359 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
14361 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
14362 Use vect_truncate_gather_scatter_offset if we can't treat the
14363 operation as a normal gather load or scatter store.
14364 (get_group_load_store_type): Take the gather_scatter_info
14365 as argument. Try using a gather load or scatter store for
14366 single-element groups.
14367 (get_load_store_type): Update calls to get_group_load_store_type
14368 and vect_use_strided_gather_scatters_p.
14370 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14371 Alan Hayward <alan.hayward@arm.com>
14372 David Sherwood <david.sherwood@arm.com>
14374 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
14375 optional tree argument.
14376 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
14378 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
14379 but continue to use the current value as a fallback.
14380 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
14381 to compare the updates.
14382 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
14383 (get_load_store_type): Use it when handling a strided access.
14384 (vect_get_strided_load_store_ops): New function.
14385 (vect_get_data_ptr_increment): Likewise.
14386 (vectorizable_load): Handle strided gather loads. Always pass
14387 a step to vect_create_data_ref_ptr and bump_vector_ptr.
14389 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14390 Alan Hayward <alan.hayward@arm.com>
14391 David Sherwood <david.sherwood@arm.com>
14393 * doc/md.texi (gather_load@var{m}): Document.
14394 (mask_gather_load@var{m}): Likewise.
14395 * genopinit.c (main): Add supports_vec_gather_load and
14396 supports_vec_gather_load_cached to target_optabs.
14397 * optabs-tree.c (init_tree_optimization_optabs): Use
14398 ggc_cleared_alloc to allocate target_optabs.
14399 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
14400 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
14402 * internal-fn.h (internal_load_fn_p): Declare.
14403 (internal_gather_scatter_fn_p): Likewise.
14404 (internal_fn_mask_index): Likewise.
14405 (internal_gather_scatter_fn_supported_p): Likewise.
14406 * internal-fn.c (gather_load_direct): New macro.
14407 (expand_gather_load_optab_fn): New function.
14408 (direct_gather_load_optab_supported_p): New macro.
14409 (direct_internal_fn_optab): New function.
14410 (internal_load_fn_p): Likewise.
14411 (internal_gather_scatter_fn_p): Likewise.
14412 (internal_fn_mask_index): Likewise.
14413 (internal_gather_scatter_fn_supported_p): Likewise.
14414 * optabs-query.c (supports_at_least_one_mode_p): New function.
14415 (supports_vec_gather_load_p): Likewise.
14416 * optabs-query.h (supports_vec_gather_load_p): Declare.
14417 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
14418 and memory_type field.
14419 (NUM_PATTERNS): Bump to 15.
14420 * tree-vect-data-refs.c: Include internal-fn.h.
14421 (vect_gather_scatter_fn_p): New function.
14422 (vect_describe_gather_scatter_call): Likewise.
14423 (vect_check_gather_scatter): Try using internal functions for
14424 gather loads. Recognize existing calls to a gather load function.
14425 (vect_analyze_data_refs): Consider using gather loads if
14426 supports_vec_gather_load_p.
14427 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
14428 (vect_get_gather_scatter_offset_type): Likewise.
14429 (vect_convert_mask_for_vectype): Likewise.
14430 (vect_add_conversion_to_patterm): Likewise.
14431 (vect_try_gather_scatter_pattern): Likewise.
14432 (vect_recog_gather_scatter_pattern): New pattern recognizer.
14433 (vect_vect_recog_func_ptrs): Add it.
14434 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14435 internal_fn_mask_index and internal_gather_scatter_fn_p.
14436 (check_load_store_masking): Take the gather_scatter_info as an
14437 argument and handle gather loads.
14438 (vect_get_gather_scatter_ops): New function.
14439 (vectorizable_call): Check internal_load_fn_p.
14440 (vectorizable_load): Likewise. Handle gather load internal
14442 (vectorizable_store): Update call to check_load_store_masking.
14443 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
14444 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
14445 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
14446 (aarch64_gather_scale_operand_d): New predicates.
14447 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
14448 (mask_gather_load<mode>): New insns.
14450 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14451 Alan Hayward <alan.hayward@arm.com>
14452 David Sherwood <david.sherwood@arm.com>
14454 * optabs.def (fold_left_plus_optab): New optab.
14455 * doc/md.texi (fold_left_plus_@var{m}): Document.
14456 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
14457 * internal-fn.c (fold_left_direct): Define.
14458 (expand_fold_left_optab_fn): Likewise.
14459 (direct_fold_left_optab_supported_p): Likewise.
14460 * fold-const-call.c (fold_const_fold_left): New function.
14461 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
14462 * tree-parloops.c (valid_reduction_p): New function.
14463 (gather_scalar_reductions): Use it.
14464 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
14465 (vect_finish_replace_stmt): Declare.
14466 * tree-vect-loop.c (fold_left_reduction_fn): New function.
14467 (needs_fold_left_reduction_p): New function, split out from...
14468 (vect_is_simple_reduction): ...here. Accept reductions that
14469 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
14470 (vect_force_simple_reduction): Also store the reduction type in
14471 the assignment's STMT_VINFO_REDUC_TYPE.
14472 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
14473 (merge_with_identity): New function.
14474 (vect_expand_fold_left): Likewise.
14475 (vectorize_fold_left_reduction): Likewise.
14476 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
14477 scalar phi in place for it. Check for target support and reject
14478 cases that would reassociate the operation. Defer the transform
14479 phase to vectorize_fold_left_reduction.
14480 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
14481 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
14482 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
14484 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14486 * tree-if-conv.c (predicate_mem_writes): Remove redundant
14487 call to ifc_temp_var.
14489 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14490 Alan Hayward <alan.hayward@arm.com>
14491 David Sherwood <david.sherwood@arm.com>
14493 * target.def (legitimize_address_displacement): Take the original
14494 offset as a poly_int.
14495 * targhooks.h (default_legitimize_address_displacement): Update
14497 * targhooks.c (default_legitimize_address_displacement): Likewise.
14498 * doc/tm.texi: Regenerate.
14499 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
14500 as an argument, moving assert of ad->disp == ad->disp_term to...
14501 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
14502 Try calling targetm.legitimize_address_displacement before expanding
14503 the address rather than afterwards, and adjust for the new interface.
14504 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
14505 Match the new hook interface. Handle SVE addresses.
14506 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
14507 new hook interface.
14509 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14511 * Makefile.in (OBJS): Add early-remat.o.
14512 * target.def (select_early_remat_modes): New hook.
14513 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
14514 * doc/tm.texi: Regenerate.
14515 * targhooks.h (default_select_early_remat_modes): Declare.
14516 * targhooks.c (default_select_early_remat_modes): New function.
14517 * timevar.def (TV_EARLY_REMAT): New timevar.
14518 * passes.def (pass_early_remat): New pass.
14519 * tree-pass.h (make_pass_early_remat): Declare.
14520 * early-remat.c: New file.
14521 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
14523 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
14525 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14526 Alan Hayward <alan.hayward@arm.com>
14527 David Sherwood <david.sherwood@arm.com>
14529 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
14530 vfm1 with a bound_epilog parameter.
14531 (vect_do_peeling): Update calls accordingly, and move the prologue
14532 call earlier in the function. Treat the base bound_epilog as 0 for
14533 fully-masked loops and retain vf - 1 for other loops. Add 1 to
14534 this base when peeling for gaps.
14535 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
14536 with fully-masked loops.
14537 (vect_estimate_min_profitable_iters): Handle the single peeled
14538 iteration in that case.
14540 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14541 Alan Hayward <alan.hayward@arm.com>
14542 David Sherwood <david.sherwood@arm.com>
14544 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
14545 single-element interleaving even if the size is not a power of 2.
14546 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
14547 accesses for single-element interleaving if the group size is
14550 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14551 Alan Hayward <alan.hayward@arm.com>
14552 David Sherwood <david.sherwood@arm.com>
14554 * doc/md.texi (fold_extract_last_@var{m}): Document.
14555 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
14556 * optabs.def (fold_extract_last_optab): New optab.
14557 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
14558 * internal-fn.c (fold_extract_direct): New macro.
14559 (expand_fold_extract_optab_fn): Likewise.
14560 (direct_fold_extract_optab_supported_p): Likewise.
14561 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
14562 * tree-vect-loop.c (vect_model_reduction_cost): Handle
14563 EXTRACT_LAST_REDUCTION.
14564 (get_initial_def_for_reduction): Do not create an initial vector
14565 for EXTRACT_LAST_REDUCTION reductions.
14566 (vectorizable_reduction): Leave the scalar phi in place for
14567 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
14568 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
14569 epilogue code for EXTRACT_LAST_REDUCTION and defer the
14570 transform phase to vectorizable_condition.
14571 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
14573 (vect_finish_stmt_generation): ...here.
14574 (vect_finish_replace_stmt): New function.
14575 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
14576 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
14578 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
14580 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14581 Alan Hayward <alan.hayward@arm.com>
14582 David Sherwood <david.sherwood@arm.com>
14584 * doc/md.texi (extract_last_@var{m}): Document.
14585 * optabs.def (extract_last_optab): New optab.
14586 * internal-fn.def (EXTRACT_LAST): New internal function.
14587 * internal-fn.c (cond_unary_direct): New macro.
14588 (expand_cond_unary_optab_fn): Likewise.
14589 (direct_cond_unary_optab_supported_p): Likewise.
14590 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
14591 loops using EXTRACT_LAST.
14592 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
14593 (extract_last_<mode>): ...this optab.
14594 (vec_extract<mode><Vel>): Update accordingly.
14596 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14597 Alan Hayward <alan.hayward@arm.com>
14598 David Sherwood <david.sherwood@arm.com>
14600 * target.def (empty_mask_is_expensive): New hook.
14601 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
14602 * doc/tm.texi: Regenerate.
14603 * targhooks.h (default_empty_mask_is_expensive): Declare.
14604 * targhooks.c (default_empty_mask_is_expensive): New function.
14605 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
14606 if the target says that empty masks are expensive.
14607 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
14609 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
14611 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14612 Alan Hayward <alan.hayward@arm.com>
14613 David Sherwood <david.sherwood@arm.com>
14615 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
14616 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
14617 (vect_use_loop_mask_for_alignment_p): New function.
14618 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
14619 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
14620 niters_skip argument. Make sure that the first niters_skip elements
14621 of the first iteration are inactive.
14622 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
14623 Update call to vect_set_loop_masks_directly.
14624 (get_misalign_in_elems): New function, split out from...
14625 (vect_gen_prolog_loop_niters): ...here.
14626 (vect_update_init_of_dr): Take a code argument that specifies whether
14627 the adjustment should be added or subtracted.
14628 (vect_update_init_of_drs): Likewise.
14629 (vect_prepare_for_masked_peels): New function.
14630 (vect_do_peeling): Skip prologue peeling if we're using a mask
14631 instead. Update call to vect_update_inits_of_drs.
14632 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14634 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
14635 alignment. Do not include the number of peeled iterations in
14636 the minimum threshold in that case.
14637 (vectorizable_induction): Adjust the start value down by
14638 LOOP_VINFO_MASK_SKIP_NITERS iterations.
14639 (vect_transform_loop): Call vect_prepare_for_masked_peels.
14640 Take the number of skipped iterations into account when calculating
14642 * tree-vect-stmts.c (vect_gen_while_not): New function.
14644 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14645 Alan Hayward <alan.hayward@arm.com>
14646 David Sherwood <david.sherwood@arm.com>
14648 * doc/sourcebuild.texi (vect_fully_masked): Document.
14649 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
14650 default value to 0.
14651 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
14653 (vect_analyze_loop_2): ...here. Don't check the vectorization
14654 factor against the number of loop iterations if the loop is
14657 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14658 Alan Hayward <alan.hayward@arm.com>
14659 David Sherwood <david.sherwood@arm.com>
14661 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
14662 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
14663 (dump_groups): Update accordingly.
14664 (iv_use::mem_type): New member variable.
14665 (address_p): New function.
14666 (record_use): Add a mem_type argument and initialize the new
14668 (record_group_use): Add a mem_type argument. Use address_p.
14669 Remove obsolete null checks of base_object. Update call to record_use.
14670 (find_interesting_uses_op): Update call to record_group_use.
14671 (find_interesting_uses_cond): Likewise.
14672 (find_interesting_uses_address): Likewise.
14673 (get_mem_type_for_internal_fn): New function.
14674 (find_address_like_use): Likewise.
14675 (find_interesting_uses_stmt): Try find_address_like_use before
14676 calling find_interesting_uses_op.
14677 (addr_offset_valid_p): Use the iv mem_type field as the type
14678 of the addressed memory.
14679 (add_autoinc_candidates): Likewise.
14680 (get_address_cost): Likewise.
14681 (split_small_address_groups_p): Use address_p.
14682 (split_address_groups): Likewise.
14683 (add_iv_candidate_for_use): Likewise.
14684 (autoinc_possible_for_pair): Likewise.
14685 (rewrite_groups): Likewise.
14686 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
14687 (determine_group_iv_cost): Update after split of USE_ADDRESS.
14688 (get_alias_ptr_type_for_ptr_address): New function.
14689 (rewrite_use_address): Rewrite address uses in calls that were
14690 identified by find_address_like_use.
14692 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14693 Alan Hayward <alan.hayward@arm.com>
14694 David Sherwood <david.sherwood@arm.com>
14696 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
14698 * gimple-expr.h (is_gimple_addressable: Likewise.
14699 * gimple-expr.c (is_gimple_address): Likewise.
14700 * internal-fn.c (expand_call_mem_ref): New function.
14701 (expand_mask_load_optab_fn): Use it.
14702 (expand_mask_store_optab_fn): Likewise.
14704 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14705 Alan Hayward <alan.hayward@arm.com>
14706 David Sherwood <david.sherwood@arm.com>
14708 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
14709 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
14710 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
14711 (cond_umax@var{mode}): Document.
14712 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
14713 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
14714 (cond_umin_optab, cond_umax_optab): New optabs.
14715 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
14716 (COND_IOR, COND_XOR): New internal functions.
14717 * internal-fn.h (get_conditional_internal_fn): Declare.
14718 * internal-fn.c (cond_binary_direct): New macro.
14719 (expand_cond_binary_optab_fn): Likewise.
14720 (direct_cond_binary_optab_supported_p): Likewise.
14721 (get_conditional_internal_fn): New function.
14722 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
14723 Cope with reduction statements that are vectorized as calls rather
14725 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
14726 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
14727 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
14728 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14729 (UNSPEC_COND_EOR): New unspecs.
14730 (optab): Add mappings for them.
14731 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
14732 (sve_int_op, sve_fp_op): New int attributes.
14734 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14735 Alan Hayward <alan.hayward@arm.com>
14736 David Sherwood <david.sherwood@arm.com>
14738 * optabs.def (while_ult_optab): New optab.
14739 * doc/md.texi (while_ult@var{m}@var{n}): Document.
14740 * internal-fn.def (WHILE_ULT): New internal function.
14741 * internal-fn.h (direct_internal_fn_supported_p): New override
14742 that takes two types as argument.
14743 * internal-fn.c (while_direct): New macro.
14744 (expand_while_optab_fn): New function.
14745 (convert_optab_supported_p): Likewise.
14746 (direct_while_optab_supported_p): New macro.
14747 * wide-int.h (wi::udiv_ceil): New function.
14748 * tree-vectorizer.h (rgroup_masks): New structure.
14749 (vec_loop_masks): New typedef.
14750 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
14751 and fully_masked_p.
14752 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
14753 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
14754 (vect_max_vf): New function.
14755 (slpeel_make_loop_iterate_ntimes): Delete.
14756 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
14757 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
14758 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
14759 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
14760 internal-fn.h, stor-layout.h and optabs-query.h.
14761 (vect_set_loop_mask): New function.
14762 (add_preheader_seq): Likewise.
14763 (add_header_seq): Likewise.
14764 (interleave_supported_p): Likewise.
14765 (vect_maybe_permute_loop_masks): Likewise.
14766 (vect_set_loop_masks_directly): Likewise.
14767 (vect_set_loop_condition_masked): Likewise.
14768 (vect_set_loop_condition_unmasked): New function, split out from
14769 slpeel_make_loop_iterate_ntimes.
14770 (slpeel_make_loop_iterate_ntimes): Rename to..
14771 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
14772 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
14773 (vect_do_peeling): Update call accordingly.
14774 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
14776 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14777 mask_compare_type, can_fully_mask_p and fully_masked_p.
14778 (release_vec_loop_masks): New function.
14779 (_loop_vec_info): Use it to free the loop masks.
14780 (can_produce_all_loop_masks_p): New function.
14781 (vect_get_max_nscalars_per_iter): Likewise.
14782 (vect_verify_full_masking): Likewise.
14783 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
14784 retries, and free the mask rgroups before retrying. Check loop-wide
14785 reasons for disallowing fully-masked loops. Make the final decision
14786 about whether use a fully-masked loop or not.
14787 (vect_estimate_min_profitable_iters): Do not assume that peeling
14788 for the number of iterations will be needed for fully-masked loops.
14789 (vectorizable_reduction): Disable fully-masked loops.
14790 (vectorizable_live_operation): Likewise.
14791 (vect_halve_mask_nunits): New function.
14792 (vect_double_mask_nunits): Likewise.
14793 (vect_record_loop_mask): Likewise.
14794 (vect_get_loop_mask): Likewise.
14795 (vect_transform_loop): Handle the case in which the final loop
14796 iteration might handle a partial vector. Call vect_set_loop_condition
14797 instead of slpeel_make_loop_iterate_ntimes.
14798 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
14799 (check_load_store_masking): New function.
14800 (prepare_load_store_mask): Likewise.
14801 (vectorizable_store): Handle fully-masked loops.
14802 (vectorizable_load): Likewise.
14803 (supportable_widening_operation): Use vect_halve_mask_nunits for
14805 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
14806 (vect_gen_while): New function.
14807 * config/aarch64/aarch64.md (umax<mode>3): New expander.
14808 (aarch64_uqdec<mode>): New insn.
14810 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14811 Alan Hayward <alan.hayward@arm.com>
14812 David Sherwood <david.sherwood@arm.com>
14814 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
14815 (reduc_xor_scal_optab): New optabs.
14816 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
14817 (reduc_xor_scal_@var{m}): Document.
14818 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
14819 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
14820 internal functions.
14821 * fold-const-call.c (fold_const_call): Handle them.
14822 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
14823 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
14824 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
14825 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
14826 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
14827 (UNSPEC_XORV): New unspecs.
14828 (optab): Add entries for them.
14829 (BITWISEV): New int iterator.
14830 (bit_reduc_op): New int attributes.
14832 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14833 Alan Hayward <alan.hayward@arm.com>
14834 David Sherwood <david.sherwood@arm.com>
14836 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
14837 * internal-fn.def (VEC_SHL_INSERT): New internal function.
14838 * optabs.def (vec_shl_insert_optab): New optab.
14839 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
14840 (duplicate_and_interleave): Likewise.
14841 * tree-vect-loop.c: Include internal-fn.h.
14842 (neutral_op_for_slp_reduction): New function, split out from
14843 get_initial_defs_for_reduction.
14844 (get_initial_def_for_reduction): Handle option 2 for variable-length
14845 vectors by loading the neutral value into a vector and then shifting
14846 the initial value into element 0.
14847 (get_initial_defs_for_reduction): Replace the code argument with
14848 the neutral value calculated by neutral_op_for_slp_reduction.
14849 Use gimple_build_vector for constant-length vectors.
14850 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
14851 but the first group_size elements have a neutral value.
14852 Use duplicate_and_interleave otherwise.
14853 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
14854 Update call to get_initial_defs_for_reduction. Handle SLP
14855 reductions for variable-length vectors by creating one vector
14856 result for each scalar result, with the elements associated
14857 with other scalar results stubbed out with the neutral value.
14858 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
14859 Require IFN_VEC_SHL_INSERT for double reductions on
14860 variable-length vectors, or SLP reductions that have
14861 a neutral value. Require can_duplicate_and_interleave_p
14862 support for variable-length unchained SLP reductions if there
14863 is no neutral value, such as for MIN/MAX reductions. Also require
14864 the number of vector elements to be a multiple of the number of
14865 SLP statements when doing variable-length unchained SLP reductions.
14866 Update call to vect_create_epilog_for_reduction.
14867 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
14868 and remove initial values.
14869 (duplicate_and_interleave): Make public.
14870 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
14871 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
14873 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14874 Alan Hayward <alan.hayward@arm.com>
14875 David Sherwood <david.sherwood@arm.com>
14877 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
14878 (can_duplicate_and_interleave_p): New function.
14879 (vect_get_and_check_slp_defs): Take the vector of statements
14880 rather than just the current one. Remove excess parentheses.
14881 Restriction rejectinon of vect_constant_def and vect_external_def
14882 for variable-length vectors to boolean types, or types for which
14883 can_duplicate_and_interleave_p is false.
14884 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
14885 (duplicate_and_interleave): New function.
14886 (vect_get_constant_vectors): Use gimple_build_vector for
14887 constant-length vectors and suitable variable-length constant
14888 vectors. Use duplicate_and_interleave for other variable-length
14889 vectors. Don't defer the update when inserting new statements.
14891 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14892 Alan Hayward <alan.hayward@arm.com>
14893 David Sherwood <david.sherwood@arm.com>
14895 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
14896 min_profitable_iters doesn't go negative.
14898 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14899 Alan Hayward <alan.hayward@arm.com>
14900 David Sherwood <david.sherwood@arm.com>
14902 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
14903 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
14904 * optabs.def (vec_mask_load_lanes_optab): New optab.
14905 (vec_mask_store_lanes_optab): Likewise.
14906 * internal-fn.def (MASK_LOAD_LANES): New internal function.
14907 (MASK_STORE_LANES): Likewise.
14908 * internal-fn.c (mask_load_lanes_direct): New macro.
14909 (mask_store_lanes_direct): Likewise.
14910 (expand_mask_load_optab_fn): Handle masked operations.
14911 (expand_mask_load_lanes_optab_fn): New macro.
14912 (expand_mask_store_optab_fn): Handle masked operations.
14913 (expand_mask_store_lanes_optab_fn): New macro.
14914 (direct_mask_load_lanes_optab_supported_p): Likewise.
14915 (direct_mask_store_lanes_optab_supported_p): Likewise.
14916 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
14918 (vect_load_lanes_supported): Likewise.
14919 * tree-vect-data-refs.c (strip_conversion): New function.
14920 (can_group_stmts_p): Likewise.
14921 (vect_analyze_data_ref_accesses): Use it instead of checking
14922 for a pair of assignments.
14923 (vect_store_lanes_supported): Take a masked_p parameter.
14924 (vect_load_lanes_supported): Likewise.
14925 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
14926 vect_store_lanes_supported and vect_load_lanes_supported.
14927 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14928 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
14929 parameter. Don't allow gaps for masked accesses.
14930 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
14931 and vect_load_lanes_supported.
14932 (get_load_store_type): Take a masked_p parameter and update
14933 call to get_group_load_store_type.
14934 (vectorizable_store): Update call to get_load_store_type.
14935 Handle IFN_MASK_STORE_LANES.
14936 (vectorizable_load): Update call to get_load_store_type.
14937 Handle IFN_MASK_LOAD_LANES.
14939 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14940 Alan Hayward <alan.hayward@arm.com>
14941 David Sherwood <david.sherwood@arm.com>
14943 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
14945 * config/aarch64/aarch64-protos.h
14946 (aarch64_sve_struct_memory_operand_p): Declare.
14947 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
14948 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
14949 (VPRED, vpred): Handle SVE structure modes.
14950 * config/aarch64/constraints.md (Utx): New constraint.
14951 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
14952 (aarch64_sve_struct_nonimmediate_operand): New predicates.
14953 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
14954 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
14955 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
14956 structure modes. Split into pieces after RA.
14957 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
14958 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
14960 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
14961 SVE structure modes.
14962 (aarch64_classify_address): Likewise.
14963 (sizetochar): Move earlier in file.
14964 (aarch64_print_operand): Handle SVE register lists.
14965 (aarch64_array_mode): New function.
14966 (aarch64_sve_struct_memory_operand_p): Likewise.
14967 (TARGET_ARRAY_MODE): Redefine.
14969 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14970 Alan Hayward <alan.hayward@arm.com>
14971 David Sherwood <david.sherwood@arm.com>
14973 * target.def (array_mode): New target hook.
14974 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
14975 * doc/tm.texi: Regenerate.
14976 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
14977 * hooks.c (hook_optmode_mode_uhwi_none): New function.
14978 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
14979 targetm.array_mode.
14980 * stor-layout.c (mode_for_array): Likewise. Support polynomial
14983 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14984 Alan Hayward <alan.hayward@arm.com>
14985 David Sherwood <david.sherwood@arm.com>
14987 * fold-const.c (fold_binary_loc): Check the argument types
14988 rather than the result type when testing for a vector operation.
14990 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14992 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
14993 * doc/tm.texi: Regenerate.
14995 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14996 Alan Hayward <alan.hayward@arm.com>
14997 David Sherwood <david.sherwood@arm.com>
14999 * doc/invoke.texi (-msve-vector-bits=): Document new option.
15000 (sve): Document new AArch64 extension.
15001 * doc/md.texi (w): Extend the description of the AArch64
15002 constraint to include SVE vectors.
15003 (Upl, Upa): Document new AArch64 predicate constraints.
15004 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
15006 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
15007 (msve-vector-bits=): New option.
15008 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
15009 SVE when these are disabled.
15010 (sve): New extension.
15011 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
15012 modes. Adjust their number of units based on aarch64_sve_vg.
15013 (MAX_BITSIZE_MODE_ANY_MODE): Define.
15014 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
15015 aarch64_addr_query_type.
15016 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
15017 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
15018 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
15019 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
15020 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
15021 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
15022 (aarch64_simd_imm_zero_p): Delete.
15023 (aarch64_check_zero_based_sve_index_immediate): Declare.
15024 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
15025 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
15026 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
15027 (aarch64_sve_float_mul_immediate_p): Likewise.
15028 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15029 rather than an rtx.
15030 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
15031 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
15032 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
15033 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
15034 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
15035 (aarch64_regmode_natural_size): Likewise.
15036 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
15037 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
15039 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
15040 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
15041 for VG and the SVE predicate registers.
15042 (V_ALIASES): Add a "z"-prefixed alias.
15043 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
15044 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
15045 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
15046 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
15047 (REG_CLASS_NAMES): Add entries for them.
15048 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
15049 and the predicate registers.
15050 (aarch64_sve_vg): Declare.
15051 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
15052 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
15053 (REGMODE_NATURAL_SIZE): Define.
15054 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
15056 * config/aarch64/aarch64.c: Include cfgrtl.h.
15057 (simd_immediate_info): Add a constructor for series vectors,
15058 and an associated step field.
15059 (aarch64_sve_vg): New variable.
15060 (aarch64_dbx_register_number): Handle VG and the predicate registers.
15061 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
15062 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
15063 (VEC_ANY_DATA, VEC_STRUCT): New constants.
15064 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
15065 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
15066 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
15067 (aarch64_get_mask_mode): New functions.
15068 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
15069 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
15070 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
15071 predicate modes and predicate registers. Explicitly restrict
15072 GPRs to modes of 16 bytes or smaller. Only allow FP registers
15073 to store a vector mode if it is recognized by
15074 aarch64_classify_vector_mode.
15075 (aarch64_regmode_natural_size): New function.
15076 (aarch64_hard_regno_caller_save_mode): Return the original mode
15078 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
15079 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
15080 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
15081 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
15083 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
15084 does not overlap dest if the function is frame-related. Handle
15086 (aarch64_split_add_offset): New function.
15087 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
15088 them aarch64_add_offset.
15089 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
15090 and update call to aarch64_sub_sp.
15091 (aarch64_add_cfa_expression): New function.
15092 (aarch64_expand_prologue): Pass extra temporary registers to the
15093 functions above. Handle the case in which we need to emit new
15094 DW_CFA_expressions for registers that were originally saved
15095 relative to the stack pointer, but now have to be expressed
15096 relative to the frame pointer.
15097 (aarch64_output_mi_thunk): Pass extra temporary registers to the
15099 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
15100 IP0 and IP1 values for SVE frames.
15101 (aarch64_expand_vec_series): New function.
15102 (aarch64_expand_sve_widened_duplicate): Likewise.
15103 (aarch64_expand_sve_const_vector): Likewise.
15104 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
15105 Handle SVE constants. Use emit_move_insn to move a force_const_mem
15106 into the register, rather than emitting a SET directly.
15107 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
15108 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
15109 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
15110 (offset_9bit_signed_scaled_p): New functions.
15111 (aarch64_replicate_bitmask_imm): New function.
15112 (aarch64_bitmask_imm): Use it.
15113 (aarch64_cannot_force_const_mem): Reject expressions involving
15114 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
15115 (aarch64_classify_index): Handle SVE indices, by requiring
15116 a plain register index with a scale that matches the element size.
15117 (aarch64_classify_address): Handle SVE addresses. Assert that
15118 the mode of the address is VOIDmode or an integer mode.
15119 Update call to aarch64_classify_symbol.
15120 (aarch64_classify_symbolic_expression): Update call to
15121 aarch64_classify_symbol.
15122 (aarch64_const_vec_all_in_range_p): New function.
15123 (aarch64_print_vector_float_operand): Likewise.
15124 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
15125 "vN" for FP registers with SVE modes. Handle (const ...) vectors
15126 and the FP immediates 1.0 and 0.5.
15127 (aarch64_print_address_internal): Handle SVE addresses.
15128 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
15129 (aarch64_regno_regclass): Handle predicate registers.
15130 (aarch64_secondary_reload): Handle big-endian reloads of SVE
15132 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
15133 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
15134 (aarch64_convert_sve_vector_bits): New function.
15135 (aarch64_override_options): Use it to handle -msve-vector-bits=.
15136 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15137 rather than an rtx.
15138 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
15139 Handle SVE vector and predicate modes. Accept VL-based constants
15140 that need only one temporary register, and VL offsets that require
15141 no temporary registers.
15142 (aarch64_conditional_register_usage): Mark the predicate registers
15143 as fixed if SVE isn't available.
15144 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
15145 Return true for SVE vector and predicate modes.
15146 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
15147 rather than an unsigned int. Handle SVE modes.
15148 (aarch64_preferred_simd_mode): Update call accordingly. Handle
15150 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
15152 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
15153 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
15154 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
15155 (aarch64_sve_float_mul_immediate_p): New functions.
15156 (aarch64_sve_valid_immediate): New function.
15157 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
15158 Explicitly reject structure modes. Check for INDEX constants.
15159 Handle PTRUE and PFALSE constants.
15160 (aarch64_check_zero_based_sve_index_immediate): New function.
15161 (aarch64_simd_imm_zero_p): Delete.
15162 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
15163 vector modes. Accept constants in the range of CNT[BHWD].
15164 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
15165 ask for an Advanced SIMD mode.
15166 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
15167 (aarch64_simd_vector_alignment): Handle SVE predicates.
15168 (aarch64_vectorize_preferred_vector_alignment): New function.
15169 (aarch64_simd_vector_alignment_reachable): Use it instead of
15171 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
15172 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
15174 (MAX_VECT_LEN): Delete.
15175 (expand_vec_perm_d): Add a vec_flags field.
15176 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
15177 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
15178 (aarch64_evpc_ext): Don't apply a big-endian lane correction
15180 (aarch64_evpc_rev): Rename to...
15181 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
15182 (aarch64_evpc_rev_global): New function.
15183 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
15184 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
15186 (aarch64_evpc_sve_tbl): New function.
15187 (aarch64_expand_vec_perm_const_1): Update after rename of
15188 aarch64_evpc_rev. Handle SVE permutes too, trying
15189 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
15190 than aarch64_evpc_tbl.
15191 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
15192 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
15193 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
15194 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
15195 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
15196 (aarch64_expand_sve_vcond): New functions.
15197 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
15198 of aarch64_vector_mode_p.
15199 (aarch64_dwarf_poly_indeterminate_value): New function.
15200 (aarch64_compute_pressure_classes): Likewise.
15201 (aarch64_can_change_mode_class): Likewise.
15202 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
15203 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
15204 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
15205 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
15206 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
15207 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
15208 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
15209 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
15211 (Dn, Dl, Dr): Accept const as well as const_vector.
15212 (Dz): Likewise. Compare against CONST0_RTX.
15213 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
15214 of "vector" where appropriate.
15215 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
15216 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
15217 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
15218 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
15219 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
15220 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
15221 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
15222 (v_int_equiv): Extend to SVE modes.
15223 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
15225 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
15226 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
15227 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
15228 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
15229 (SVE_COND_FP_CMP): New int iterators.
15230 (perm_hilo): Handle the new unpack unspecs.
15231 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
15233 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
15234 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
15235 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
15236 (aarch64_equality_operator, aarch64_constant_vector_operand)
15237 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
15238 (aarch64_sve_nonimmediate_operand): Likewise.
15239 (aarch64_sve_general_operand): Likewise.
15240 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
15241 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
15242 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
15243 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
15244 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
15245 (aarch64_sve_float_arith_immediate): Likewise.
15246 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
15247 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
15248 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
15249 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
15250 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
15251 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
15252 (aarch64_sve_float_arith_operand): Likewise.
15253 (aarch64_sve_float_arith_with_sub_operand): Likewise.
15254 (aarch64_sve_float_mul_operand): Likewise.
15255 (aarch64_sve_vec_perm_operand): Likewise.
15256 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
15257 (aarch64_mov_operand): Accept const_poly_int and const_vector.
15258 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
15259 as well as const_vector.
15260 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
15261 in file. Use CONST0_RTX and CONSTM1_RTX.
15262 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
15263 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
15264 Use aarch64_simd_imm_zero.
15265 * config/aarch64/aarch64-sve.md: New file.
15266 * config/aarch64/aarch64.md: Include it.
15267 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
15268 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
15269 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
15270 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
15271 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
15272 (sve): New attribute.
15273 (enabled): Disable instructions with the sve attribute unless
15275 (movqi, movhi): Pass CONST_POLY_INT operaneds through
15276 aarch64_expand_mov_immediate.
15277 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
15278 CNT[BHSD] immediates.
15279 (movti): Split CONST_POLY_INT moves into two halves.
15280 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
15281 Split additions that need a temporary here if the destination
15282 is the stack pointer.
15283 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
15284 (*add<mode>3_poly_1): New instruction.
15285 (set_clobber_cc): New expander.
15287 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15289 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
15290 parameter and use it instead of GET_MODE_SIZE (innermode). Use
15291 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
15292 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
15293 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
15294 Change innermode from fixed_mode_size to machine_mode.
15295 (simplify_subreg): Update call accordingly. Handle a constant-sized
15296 subreg of a variable-length CONST_VECTOR.
15298 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15299 Alan Hayward <alan.hayward@arm.com>
15300 David Sherwood <david.sherwood@arm.com>
15302 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
15303 (add_offset_to_base): New function, split out from...
15304 (create_mem_ref): ...here. When handling a scale other than 1,
15305 check first whether the address is valid without the offset.
15306 Add it into the base if so, leaving the index and scale as-is.
15308 2018-01-12 Jakub Jelinek <jakub@redhat.com>
15311 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
15312 fold_for_warn before checking if arg2 is INTEGER_CST.
15314 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
15316 * config/rs6000/predicates.md (load_multiple_operation): Delete.
15317 (store_multiple_operation): Delete.
15318 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
15319 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
15320 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
15321 guarded by TARGET_STRING.
15322 (rs6000_output_load_multiple): Delete.
15323 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
15324 OPTION_MASK_STRING / TARGET_STRING handling.
15325 (print_operand) <'N', 'O'>: Add comment that these are unused now.
15326 (const rs6000_opt_masks) <"string">: Change mask to 0.
15327 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
15328 (MASK_STRING): Delete.
15329 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
15331 (load_multiple): Delete.
15338 (store_multiple): Delete.
15345 (movmemsi_8reg): Delete.
15346 (corresponding unnamed define_insn): Delete.
15347 (movmemsi_6reg): Delete.
15348 (corresponding unnamed define_insn): Delete.
15349 (movmemsi_4reg): Delete.
15350 (corresponding unnamed define_insn): Delete.
15351 (movmemsi_2reg): Delete.
15352 (corresponding unnamed define_insn): Delete.
15353 (movmemsi_1reg): Delete.
15354 (corresponding unnamed define_insn): Delete.
15355 * config/rs6000/rs6000.opt (mno-string): New.
15356 (mstring): Replace by deprecation warning stub.
15357 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
15359 2018-01-12 Jakub Jelinek <jakub@redhat.com>
15361 * regrename.c (regrename_do_replace): If replacing the same
15362 reg multiple times, try to reuse last created gen_raw_REG.
15365 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
15366 main to workaround a bug in GDB.
15368 2018-01-12 Tom de Vries <tom@codesourcery.com>
15371 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
15373 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
15375 PR rtl-optimization/80481
15376 * ira-color.c (get_cap_member): New function.
15377 (allocnos_conflict_by_live_ranges_p): Use it.
15378 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
15379 (setup_slot_coalesced_allocno_live_ranges): Ditto.
15381 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
15384 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
15385 (*saddl_se_1): Ditto.
15386 (*ssubsi_1): Ditto.
15387 (*ssubl_se_1): Ditto.
15389 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
15391 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
15392 rather than wi::to_widest for DR_INITs.
15393 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
15394 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
15395 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
15397 (vect_analyze_group_access_1): Note that here.
15399 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
15401 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
15402 polynomial type sizes.
15404 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
15406 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
15407 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
15408 (gimple_add_tmp_var): Likewise.
15410 2018-01-12 Martin Liska <mliska@suse.cz>
15412 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
15413 (gimple_alloc_sizes): Likewise.
15414 (dump_gimple_statistics): Use PRIu64 in printf format.
15415 * gimple.h: Change uint64_t to int.
15417 2018-01-12 Martin Liska <mliska@suse.cz>
15419 * tree-core.h: Use uint64_t instead of int.
15420 * tree.c (tree_node_counts): Likewise.
15421 (tree_node_sizes): Likewise.
15422 (dump_tree_statistics): Use PRIu64 in printf format.
15424 2018-01-12 Martin Liska <mliska@suse.cz>
15426 * Makefile.in: As qsort_chk is implemented in vec.c, add
15427 vec.o to linkage of gencfn-macros.
15428 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
15429 passing the info to record_node_allocation_statistics.
15430 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
15432 * ggc-common.c (struct ggc_usage): Add operator== and use
15433 it in operator< and compare function.
15434 * mem-stats.h (struct mem_usage): Likewise.
15435 * vec.c (struct vec_usage): Remove operator< and compare
15436 function. Can be simply inherited.
15438 2018-01-12 Martin Jambor <mjambor@suse.cz>
15441 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
15442 * tree-ssa-math-opts.c: Include domwalk.h.
15443 (convert_mult_to_fma_1): New function.
15444 (fma_transformation_info): New type.
15445 (fma_deferring_state): Likewise.
15446 (cancel_fma_deferring): New function.
15447 (result_of_phi): Likewise.
15448 (last_fma_candidate_feeds_initial_phi): Likewise.
15449 (convert_mult_to_fma): Added deferring logic, split actual
15450 transformation to convert_mult_to_fma_1.
15451 (math_opts_dom_walker): New type.
15452 (math_opts_dom_walker::after_dom_children): New method, body moved
15453 here from pass_optimize_widening_mul::execute, added deferring logic
15455 (pass_optimize_widening_mul::execute): Moved most of code to
15456 math_opts_dom_walker::after_dom_children.
15457 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
15458 * config/i386/i386.c (ix86_option_override_internal): Added
15459 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
15461 2018-01-12 Richard Biener <rguenther@suse.de>
15464 * dwarf2out.c (gen_variable_die): Do not reset old_die for
15465 inline instance vars.
15467 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
15470 * config/rx/rx.c (rx_is_restricted_memory_address):
15471 Handle SUBREG case.
15473 2018-01-12 Richard Biener <rguenther@suse.de>
15475 PR tree-optimization/80846
15476 * target.def (split_reduction): New target hook.
15477 * targhooks.c (default_split_reduction): New function.
15478 * targhooks.h (default_split_reduction): Declare.
15479 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
15480 target requests first reduce vectors by combining low and high
15482 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
15483 (get_vectype_for_scalar_type_and_size): Export.
15484 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
15485 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
15486 * doc/tm.texi: Regenerate.
15487 * config/i386/i386.c (ix86_split_reduction): Implement
15488 TARGET_VECTORIZE_SPLIT_REDUCTION.
15490 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15493 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
15494 in PIC mode except for TARGET_VXWORKS_RTP.
15495 * config/sparc/sparc.c: Include cfgrtl.h.
15496 (TARGET_INIT_PIC_REG): Define.
15497 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
15498 (sparc_pic_register_p): New predicate.
15499 (sparc_legitimate_address_p): Use it.
15500 (sparc_legitimize_pic_address): Likewise.
15501 (sparc_delegitimize_address): Likewise.
15502 (sparc_mode_dependent_address_p): Likewise.
15503 (gen_load_pcrel_sym): Remove 4th parameter.
15504 (load_got_register): Adjust call to above. Remove obsolete stuff.
15505 (sparc_expand_prologue): Do not call load_got_register here.
15506 (sparc_flat_expand_prologue): Likewise.
15507 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
15508 (sparc_use_pseudo_pic_reg): New function.
15509 (sparc_init_pic_reg): Likewise.
15510 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15511 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
15513 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
15515 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
15516 Add item for branch_cost.
15518 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15520 PR rtl-optimization/83565
15521 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
15522 not extend the result to a larger mode for rotate operations.
15523 (num_sign_bit_copies1): Likewise.
15525 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15528 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
15530 Use values-Xc.o for -pedantic.
15531 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
15533 2018-01-12 Martin Liska <mliska@suse.cz>
15536 * ipa-devirt.c (final_warning_record::grow_type_warnings):
15538 (possible_polymorphic_call_targets): Use it.
15539 (ipa_devirt): Likewise.
15541 2018-01-12 Martin Liska <mliska@suse.cz>
15543 * profile-count.h (enum profile_quality): Use 0 as invalid
15544 enum value of profile_quality.
15546 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
15548 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
15549 -mext-string options.
15551 2018-01-12 Richard Biener <rguenther@suse.de>
15553 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
15554 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
15555 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
15557 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
15559 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
15561 * configure.ac (--with-long-double-format): Add support for the
15562 configuration option to change the default long double format on
15564 * config.gcc (powerpc*-linux*-*): Likewise.
15565 * configure: Regenerate.
15566 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
15567 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
15568 used without modification.
15570 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15572 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
15573 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
15574 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
15575 MISC_BUILTIN_SPEC_BARRIER.
15576 (rs6000_init_builtins): Likewise.
15577 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
15579 (speculation_barrier): New define_insn.
15580 * doc/extend.texi: Document __builtin_speculation_barrier.
15582 2018-01-11 Jakub Jelinek <jakub@redhat.com>
15585 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
15586 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
15587 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
15589 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
15590 integral modes instead of "ss" and "sd".
15591 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
15592 vectors with 32-bit and 64-bit elements.
15593 (vecdupssescalarmodesuffix): New mode attribute.
15594 (vec_dup<mode>): Use it.
15596 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
15599 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
15600 frame if argument is passed on stack.
15602 2018-01-11 Jakub Jelinek <jakub@redhat.com>
15605 * ree.c (combine_reaching_defs): Optimize also
15606 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
15607 reg2=any_extend(exp); reg1=reg2;, formatting fix.
15609 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
15611 PR middle-end/83189
15612 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
15614 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
15616 PR middle-end/83718
15617 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
15618 after they are computed.
15620 2018-01-11 Bin Cheng <bin.cheng@arm.com>
15622 PR tree-optimization/83695
15623 * gimple-loop-linterchange.cc
15624 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
15625 reset cached scev information after interchange.
15626 (pass_linterchange::execute): Remove call to scev_reset_htab.
15628 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15630 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
15631 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
15632 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
15633 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
15634 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
15635 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
15636 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
15637 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
15638 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
15639 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
15640 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
15641 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
15642 (V_lane_reg): Likewise.
15643 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
15645 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
15646 (vfmal_lane_low<mode>_intrinsic,
15647 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
15648 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
15649 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
15650 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
15651 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
15652 vfmsl_lane_high<mode>_intrinsic): New define_insns.
15654 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15656 * config/arm/arm-cpus.in (fp16fml): New feature.
15657 (ALL_SIMD): Add fp16fml.
15658 (armv8.2-a): Add fp16fml as an option.
15659 (armv8.3-a): Likewise.
15660 (armv8.4-a): Add fp16fml as part of fp16.
15661 * config/arm/arm.h (TARGET_FP16FML): Define.
15662 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
15664 * config/arm/arm-modes.def (V2HF): Define.
15665 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
15666 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
15667 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
15668 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
15669 vfmsl_low, vfmsl_high): New set of builtins.
15670 * config/arm/iterators.md (PLUSMINUS): New code iterator.
15671 (vfml_op): New code attribute.
15672 (VFMLHALVES): New int iterator.
15673 (VFML, VFMLSEL): New mode attributes.
15674 (V_reg): Define mapping for V2HF.
15675 (V_hi, V_lo): New mode attributes.
15676 (VF_constraint): Likewise.
15677 (vfml_half, vfml_half_selector): New int attributes.
15678 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
15680 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
15681 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
15683 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
15684 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
15685 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
15686 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
15688 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
15689 Document new effective target and option set.
15691 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15693 * config/arm/arm-cpus.in (armv8_4): New feature.
15694 (ARMv8_4a): New fgroup.
15695 (armv8.4-a): New arch.
15696 * config/arm/arm-tables.opt: Regenerate.
15697 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
15698 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
15699 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
15700 Add matching rules for -march=armv8.4-a and extensions.
15701 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
15703 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
15706 * config/rx/rx.md (BW): New mode attribute.
15707 (sync_lock_test_and_setsi): Add mode suffix to insn output.
15709 2018-01-11 Richard Biener <rguenther@suse.de>
15711 PR tree-optimization/83435
15712 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
15713 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
15714 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
15716 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15717 Alan Hayward <alan.hayward@arm.com>
15718 David Sherwood <david.sherwood@arm.com>
15720 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
15722 (aarch64_classify_address): Initialize it. Track polynomial offsets.
15723 (aarch64_print_address_internal): Use it to check for a zero offset.
15725 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15726 Alan Hayward <alan.hayward@arm.com>
15727 David Sherwood <david.sherwood@arm.com>
15729 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
15730 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
15731 Return a poly_int64 rather than a HOST_WIDE_INT.
15732 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
15733 rather than a HOST_WIDE_INT.
15734 * config/aarch64/aarch64.h (aarch64_frame): Protect with
15735 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
15736 hard_fp_offset, frame_size, initial_adjust, callee_offset and
15737 final_offset from HOST_WIDE_INT to poly_int64.
15738 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
15739 to_constant when getting the number of units in an Advanced SIMD
15741 (aarch64_builtin_vectorized_function): Check for a constant number
15743 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
15745 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
15746 attribute instead of GET_MODE_NUNITS.
15747 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
15748 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
15749 GET_MODE_SIZE for fixed-size registers.
15750 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
15751 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
15752 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
15753 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
15754 (aarch64_print_operand, aarch64_print_address_internal)
15755 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
15756 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
15757 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
15758 Handle polynomial GET_MODE_SIZE.
15759 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
15760 wider than SImode without modification.
15761 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
15762 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
15763 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
15764 passing and returning SVE modes.
15765 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
15766 rather than GEN_INT.
15767 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
15768 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
15769 (aarch64_allocate_and_probe_stack_space): Likewise.
15770 (aarch64_layout_frame): Cope with polynomial offsets.
15771 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
15772 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
15773 polynomial offsets.
15774 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
15775 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
15776 poly_int64 rather than a HOST_WIDE_INT.
15777 (aarch64_get_separate_components, aarch64_process_components)
15778 (aarch64_expand_prologue, aarch64_expand_epilogue)
15779 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
15780 (aarch64_anchor_offset): New function, split out from...
15781 (aarch64_legitimize_address): ...here.
15782 (aarch64_builtin_vectorization_cost): Handle polynomial
15783 TYPE_VECTOR_SUBPARTS.
15784 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
15786 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
15787 number of elements from the PARALLEL rather than the mode.
15788 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
15789 rather than GET_MODE_BITSIZE.
15790 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
15791 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
15792 (aarch64_expand_vec_perm_const_1): Handle polynomial
15793 d->perm.length () and d->perm elements.
15794 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
15795 Apply to_constant to d->perm elements.
15796 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
15797 polynomial CONST_VECTOR_NUNITS.
15798 (aarch64_move_pointer): Take amount as a poly_int64 rather
15800 (aarch64_progress_pointer): Avoid temporary variable.
15801 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
15802 the mode attribute instead of GET_MODE.
15804 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15805 Alan Hayward <alan.hayward@arm.com>
15806 David Sherwood <david.sherwood@arm.com>
15808 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
15809 x exists before using it.
15810 (aarch64_add_constant_internal): Rename to...
15811 (aarch64_add_offset_1): ...this. Replace regnum with separate
15812 src and dest rtxes. Handle the case in which they're different,
15813 including when the offset is zero. Replace scratchreg with an rtx.
15814 Use 2 additions if there is no spare register into which we can
15815 move a 16-bit constant.
15816 (aarch64_add_constant): Delete.
15817 (aarch64_add_offset): Replace reg with separate src and dest
15818 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
15819 Use aarch64_add_offset_1.
15820 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
15821 an rtx rather than an int. Take the delta as a poly_int64
15822 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
15823 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
15824 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
15825 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
15826 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
15827 and aarch64_add_sp.
15828 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
15829 aarch64_add_constant.
15831 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15833 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
15834 Use scalar_float_mode.
15836 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15838 * config/aarch64/aarch64-simd.md
15839 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
15840 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
15841 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
15842 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
15843 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
15844 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
15845 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
15846 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
15847 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
15848 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
15850 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15853 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
15854 targ_options->x_arm_arch_string is non NULL.
15856 2018-01-11 Tamar Christina <tamar.christina@arm.com>
15858 * config/aarch64/aarch64.h
15859 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
15861 2018-01-11 Sudakshina Das <sudi.das@arm.com>
15864 * expmed.c (emit_store_flag_force): Swap if const op0
15865 and change VOIDmode to mode of op0.
15867 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
15869 PR rtl-optimization/83761
15870 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
15871 than bytes to mode_for_size.
15873 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
15875 PR middle-end/83189
15876 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
15877 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
15880 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
15882 PR middle-end/83575
15883 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
15884 when in layout mode.
15885 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
15886 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
15889 2018-01-10 Michael Collison <michael.collison@arm.com>
15891 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
15892 * config/aarch64/aarch64-option-extension.def: Add
15893 AARCH64_OPT_EXTENSION of 'fp16fml'.
15894 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15895 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
15896 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
15897 * config/aarch64/constraints.md (Ui7): New constraint.
15898 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
15899 (VFMLA_SEL_W): Ditto.
15902 (VFMLA16_LOW): New int iterator.
15903 (VFMLA16_HIGH): Ditto.
15904 (UNSPEC_FMLAL): New unspec.
15905 (UNSPEC_FMLSL): Ditto.
15906 (UNSPEC_FMLAL2): Ditto.
15907 (UNSPEC_FMLSL2): Ditto.
15908 (f16mac): New code attribute.
15909 * config/aarch64/aarch64-simd-builtins.def
15910 (aarch64_fmlal_lowv2sf): Ditto.
15911 (aarch64_fmlsl_lowv2sf): Ditto.
15912 (aarch64_fmlalq_lowv4sf): Ditto.
15913 (aarch64_fmlslq_lowv4sf): Ditto.
15914 (aarch64_fmlal_highv2sf): Ditto.
15915 (aarch64_fmlsl_highv2sf): Ditto.
15916 (aarch64_fmlalq_highv4sf): Ditto.
15917 (aarch64_fmlslq_highv4sf): Ditto.
15918 (aarch64_fmlal_lane_lowv2sf): Ditto.
15919 (aarch64_fmlsl_lane_lowv2sf): Ditto.
15920 (aarch64_fmlal_laneq_lowv2sf): Ditto.
15921 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
15922 (aarch64_fmlalq_lane_lowv4sf): Ditto.
15923 (aarch64_fmlsl_lane_lowv4sf): Ditto.
15924 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
15925 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
15926 (aarch64_fmlal_lane_highv2sf): Ditto.
15927 (aarch64_fmlsl_lane_highv2sf): Ditto.
15928 (aarch64_fmlal_laneq_highv2sf): Ditto.
15929 (aarch64_fmlsl_laneq_highv2sf): Ditto.
15930 (aarch64_fmlalq_lane_highv4sf): Ditto.
15931 (aarch64_fmlsl_lane_highv4sf): Ditto.
15932 (aarch64_fmlalq_laneq_highv4sf): Ditto.
15933 (aarch64_fmlsl_laneq_highv4sf): Ditto.
15934 * config/aarch64/aarch64-simd.md:
15935 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
15936 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15937 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
15938 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15939 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
15940 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
15941 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
15942 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
15943 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
15944 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
15945 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
15946 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
15947 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
15948 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
15949 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
15950 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
15951 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
15952 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
15953 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
15954 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
15955 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
15956 (vfmlsl_low_u32): Ditto.
15957 (vfmlalq_low_u32): Ditto.
15958 (vfmlslq_low_u32): Ditto.
15959 (vfmlal_high_u32): Ditto.
15960 (vfmlsl_high_u32): Ditto.
15961 (vfmlalq_high_u32): Ditto.
15962 (vfmlslq_high_u32): Ditto.
15963 (vfmlal_lane_low_u32): Ditto.
15964 (vfmlsl_lane_low_u32): Ditto.
15965 (vfmlal_laneq_low_u32): Ditto.
15966 (vfmlsl_laneq_low_u32): Ditto.
15967 (vfmlalq_lane_low_u32): Ditto.
15968 (vfmlslq_lane_low_u32): Ditto.
15969 (vfmlalq_laneq_low_u32): Ditto.
15970 (vfmlslq_laneq_low_u32): Ditto.
15971 (vfmlal_lane_high_u32): Ditto.
15972 (vfmlsl_lane_high_u32): Ditto.
15973 (vfmlal_laneq_high_u32): Ditto.
15974 (vfmlsl_laneq_high_u32): Ditto.
15975 (vfmlalq_lane_high_u32): Ditto.
15976 (vfmlslq_lane_high_u32): Ditto.
15977 (vfmlalq_laneq_high_u32): Ditto.
15978 (vfmlslq_laneq_high_u32): Ditto.
15979 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
15980 (AARCH64_FL_FOR_ARCH8_4): New.
15981 (AARCH64_ISA_F16FML): New ISA flag.
15982 (TARGET_F16FML): New feature flag for fp16fml.
15983 (doc/invoke.texi): Document new fp16fml option.
15985 2018-01-10 Michael Collison <michael.collison@arm.com>
15987 * config/aarch64/aarch64-builtins.c:
15988 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
15989 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15990 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
15991 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
15992 (AARCH64_ISA_SHA3): New ISA flag.
15993 (TARGET_SHA3): New feature flag for sha3.
15994 * config/aarch64/iterators.md (sha512_op): New int attribute.
15995 (CRYPTO_SHA512): New int iterator.
15996 (UNSPEC_SHA512H): New unspec.
15997 (UNSPEC_SHA512H2): Ditto.
15998 (UNSPEC_SHA512SU0): Ditto.
15999 (UNSPEC_SHA512SU1): Ditto.
16000 * config/aarch64/aarch64-simd-builtins.def
16001 (aarch64_crypto_sha512hqv2di): New builtin.
16002 (aarch64_crypto_sha512h2qv2di): Ditto.
16003 (aarch64_crypto_sha512su0qv2di): Ditto.
16004 (aarch64_crypto_sha512su1qv2di): Ditto.
16005 (aarch64_eor3qv8hi): Ditto.
16006 (aarch64_rax1qv2di): Ditto.
16007 (aarch64_xarqv2di): Ditto.
16008 (aarch64_bcaxqv8hi): Ditto.
16009 * config/aarch64/aarch64-simd.md:
16010 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
16011 (aarch64_crypto_sha512su0qv2di): Ditto.
16012 (aarch64_crypto_sha512su1qv2di): Ditto.
16013 (aarch64_eor3qv8hi): Ditto.
16014 (aarch64_rax1qv2di): Ditto.
16015 (aarch64_xarqv2di): Ditto.
16016 (aarch64_bcaxqv8hi): Ditto.
16017 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
16018 (vsha512h2q_u64): Ditto.
16019 (vsha512su0q_u64): Ditto.
16020 (vsha512su1q_u64): Ditto.
16021 (veor3q_u16): Ditto.
16022 (vrax1q_u64): Ditto.
16023 (vxarq_u64): Ditto.
16024 (vbcaxq_u16): Ditto.
16025 * config/arm/types.md (crypto_sha512): New type attribute.
16026 (crypto_sha3): Ditto.
16027 (doc/invoke.texi): Document new sha3 option.
16029 2018-01-10 Michael Collison <michael.collison@arm.com>
16031 * config/aarch64/aarch64-builtins.c:
16032 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
16033 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16034 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
16035 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
16036 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
16037 (AARCH64_ISA_SM4): New ISA flag.
16038 (TARGET_SM4): New feature flag for sm4.
16039 * config/aarch64/aarch64-simd-builtins.def
16040 (aarch64_sm3ss1qv4si): Ditto.
16041 (aarch64_sm3tt1aq4si): Ditto.
16042 (aarch64_sm3tt1bq4si): Ditto.
16043 (aarch64_sm3tt2aq4si): Ditto.
16044 (aarch64_sm3tt2bq4si): Ditto.
16045 (aarch64_sm3partw1qv4si): Ditto.
16046 (aarch64_sm3partw2qv4si): Ditto.
16047 (aarch64_sm4eqv4si): Ditto.
16048 (aarch64_sm4ekeyqv4si): Ditto.
16049 * config/aarch64/aarch64-simd.md:
16050 (aarch64_sm3ss1qv4si): Ditto.
16051 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
16052 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
16053 (aarch64_sm4eqv4si): Ditto.
16054 (aarch64_sm4ekeyqv4si): Ditto.
16055 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
16056 (sm3part_op): Ditto.
16057 (CRYPTO_SM3TT): Ditto.
16058 (CRYPTO_SM3PART): Ditto.
16059 (UNSPEC_SM3SS1): New unspec.
16060 (UNSPEC_SM3TT1A): Ditto.
16061 (UNSPEC_SM3TT1B): Ditto.
16062 (UNSPEC_SM3TT2A): Ditto.
16063 (UNSPEC_SM3TT2B): Ditto.
16064 (UNSPEC_SM3PARTW1): Ditto.
16065 (UNSPEC_SM3PARTW2): Ditto.
16066 (UNSPEC_SM4E): Ditto.
16067 (UNSPEC_SM4EKEY): Ditto.
16068 * config/aarch64/constraints.md (Ui2): New constraint.
16069 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
16070 * config/arm/types.md (crypto_sm3): New type attribute.
16071 (crypto_sm4): Ditto.
16072 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
16073 (vsm3tt1aq_u32): Ditto.
16074 (vsm3tt1bq_u32): Ditto.
16075 (vsm3tt2aq_u32): Ditto.
16076 (vsm3tt2bq_u32): Ditto.
16077 (vsm3partw1q_u32): Ditto.
16078 (vsm3partw2q_u32): Ditto.
16079 (vsm4eq_u32): Ditto.
16080 (vsm4ekeyq_u32): Ditto.
16081 (doc/invoke.texi): Document new sm4 option.
16083 2018-01-10 Michael Collison <michael.collison@arm.com>
16085 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
16086 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
16087 (AARCH64_FL_FOR_ARCH8_4): New.
16088 (AARCH64_FL_V8_4): New flag.
16089 (doc/invoke.texi): Document new armv8.4-a option.
16091 2018-01-10 Michael Collison <michael.collison@arm.com>
16093 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16094 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
16095 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
16096 * config/aarch64/aarch64-option-extension.def: Add
16097 AARCH64_OPT_EXTENSION of 'sha2'.
16098 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
16099 (crypto): Disable sha2 and aes if crypto disabled.
16100 (crypto): Enable aes and sha2 if enabled.
16101 (simd): Disable sha2 and aes if simd disabled.
16102 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
16104 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
16105 (TARGET_SHA2): New feature flag for sha2.
16106 (TARGET_AES): New feature flag for aes.
16107 * config/aarch64/aarch64-simd.md:
16108 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
16109 conditional on TARGET_AES.
16110 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
16111 (aarch64_crypto_sha1hsi): Make pattern conditional
16113 (aarch64_crypto_sha1hv4si): Ditto.
16114 (aarch64_be_crypto_sha1hv4si): Ditto.
16115 (aarch64_crypto_sha1su1v4si): Ditto.
16116 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
16117 (aarch64_crypto_sha1su0v4si): Ditto.
16118 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
16119 (aarch64_crypto_sha256su0v4si): Ditto.
16120 (aarch64_crypto_sha256su1v4si): Ditto.
16121 (doc/invoke.texi): Document new aes and sha2 options.
16123 2018-01-10 Martin Sebor <msebor@redhat.com>
16125 PR tree-optimization/83781
16126 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
16129 2018-01-11 Martin Sebor <msebor@gmail.com>
16130 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16132 PR tree-optimization/83501
16133 PR tree-optimization/81703
16135 * tree-ssa-strlen.c (get_string_cst): Rename...
16136 (get_string_len): ...to this. Handle global constants.
16137 (handle_char_store): Adjust.
16139 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
16140 Jim Wilson <jimw@sifive.com>
16142 * config/riscv/riscv-protos.h (riscv_output_return): New.
16143 * config/riscv/riscv.c (struct machine_function): New naked_p field.
16144 (riscv_attribute_table, riscv_output_return),
16145 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
16146 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
16147 (riscv_compute_frame_info): Only compute frame->mask if not a naked
16149 (riscv_expand_prologue): Add early return for naked function.
16150 (riscv_expand_epilogue): Likewise.
16151 (riscv_function_ok_for_sibcall): Return false for naked function.
16152 (riscv_set_current_function): New.
16153 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
16154 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
16155 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
16156 * doc/extend.texi (RISC-V Function Attributes): New.
16158 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
16160 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
16161 check for 128-bit long double before checking TCmode.
16162 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
16163 128-bit long doubles before checking TFmode or TCmode.
16164 (FLOAT128_IBM_P): Likewise.
16166 2018-01-10 Martin Sebor <msebor@redhat.com>
16168 PR tree-optimization/83671
16169 * builtins.c (c_strlen): Unconditionally return zero for the empty
16171 Use -Warray-bounds for warnings.
16172 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
16173 for non-constant array indices with COMPONENT_REF, arrays of
16174 arrays, and pointers to arrays.
16175 (gimple_fold_builtin_strlen): Determine and set length range for
16176 non-constant character arrays.
16178 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
16180 PR middle-end/81897
16181 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
16184 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
16186 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
16188 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
16191 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
16192 VECTOR_MEM_ALTIVEC_OR_VSX_P.
16193 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
16194 indexed_or_indirect_operand predicate.
16195 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
16196 (*vsx_le_perm_load_v8hi): Likewise.
16197 (*vsx_le_perm_load_v16qi): Likewise.
16198 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
16199 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
16200 (*vsx_le_perm_store_v8hi): Likewise.
16201 (*vsx_le_perm_store_v16qi): Likewise.
16202 (eight unnamed splitters): Likewise.
16204 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
16206 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
16207 * config/rs6000/emmintrin.h: Likewise.
16208 * config/rs6000/mmintrin.h: Likewise.
16209 * config/rs6000/xmmintrin.h: Likewise.
16211 2018-01-10 David Malcolm <dmalcolm@redhat.com>
16214 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
16216 * tree.c (tree_nop_conversion): Return true for location wrapper
16218 (maybe_wrap_with_location): New function.
16219 (selftest::check_strip_nops): New function.
16220 (selftest::test_location_wrappers): New function.
16221 (selftest::tree_c_tests): Call it.
16222 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
16223 (maybe_wrap_with_location): New decl.
16224 (EXPR_LOCATION_WRAPPER_P): New macro.
16225 (location_wrapper_p): New inline function.
16226 (tree_strip_any_location_wrapper): New inline function.
16228 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
16231 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
16232 stack_realign_offset for the largest alignment of stack slot
16234 (ix86_find_max_used_stack_alignment): New function.
16235 (ix86_finalize_stack_frame_flags): Use it. Set
16236 max_used_stack_alignment if we don't realign stack.
16237 * config/i386/i386.h (machine_function): Add
16238 max_used_stack_alignment.
16240 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
16242 * config/arm/arm.opt (-mbranch-cost): New option.
16243 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
16246 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
16249 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
16250 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
16252 2018-01-10 Richard Biener <rguenther@suse.de>
16255 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
16256 early out so it also covers the case where we have a non-NULL
16259 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
16261 PR tree-optimization/83753
16262 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
16263 for non-strided grouped accesses if the number of elements is 1.
16265 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
16268 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
16269 * i386.h (TARGET_USE_GATHER): Define.
16270 * x86-tune.def (X86_TUNE_USE_GATHER): New.
16272 2018-01-10 Martin Liska <mliska@suse.cz>
16275 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
16276 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
16278 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
16279 CLEANUP_NO_PARTITIONING is not set.
16281 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
16283 * doc/rtl.texi: Remove documentation of (const ...) wrappers
16284 for vectors, as a partial revert of r254296.
16285 * rtl.h (const_vec_p): Delete.
16286 (const_vec_duplicate_p): Don't test for vector CONSTs.
16287 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
16288 * expmed.c (make_tree): Likewise.
16291 * common.md (E, F): Use CONSTANT_P instead of checking for
16293 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
16294 checking for CONST_VECTOR.
16296 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
16298 PR middle-end/83575
16299 * predict.c (force_edge_cold): Handle in more sane way edges
16300 with no prediction.
16302 2018-01-09 Carl Love <cel@us.ibm.com>
16304 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
16306 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
16307 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
16308 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
16309 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
16310 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
16311 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
16312 * config/rs6000/rs6000-protos.h: Add extern defition for
16313 rs6000_generate_float2_double_code.
16314 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
16316 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
16317 (float2_v2df): Add define_expand.
16319 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
16322 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
16323 op_mode in the force_to_mode call.
16325 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
16327 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
16328 instead of checking each element individually.
16329 (aarch64_evpc_uzp): Likewise.
16330 (aarch64_evpc_zip): Likewise.
16331 (aarch64_evpc_ext): Likewise.
16332 (aarch64_evpc_rev): Likewise.
16333 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
16334 instead of checking each element individually. Return true without
16336 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
16337 whether all selected elements come from the same input, instead of
16338 checking each element individually. Remove calls to gen_rtx_REG,
16339 start_sequence and end_sequence and instead assert that no rtl is
16342 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
16344 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
16345 order of HIGH and CONST checks.
16347 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
16349 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
16350 if the destination isn't an SSA_NAME.
16352 2018-01-09 Richard Biener <rguenther@suse.de>
16354 PR tree-optimization/83668
16355 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
16357 (canonicalize_loop_form): ... here, renamed from ...
16358 (canonicalize_loop_closed_ssa_form): ... this and amended to
16359 swap successor edges for loop exit blocks to make us use
16360 the RPO order we need for initial schedule generation.
16362 2018-01-09 Joseph Myers <joseph@codesourcery.com>
16364 PR tree-optimization/64811
16365 * match.pd: When optimizing comparisons with Inf, avoid
16366 introducing or losing exceptions from comparisons with NaN.
16368 2018-01-09 Martin Liska <mliska@suse.cz>
16371 * asan.c (shadow_mem_size): Add gcc_assert.
16373 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
16375 Don't save registers in main().
16378 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
16379 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
16380 * config/avr/avr.c (avr_set_current_function): Don't error if
16381 naked, OS_task or OS_main are specified at the same time.
16382 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
16384 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
16386 * common/config/avr/avr-common.c (avr_option_optimization_table):
16387 Switch on -mmain-is-OS_task for optimizing compilations.
16389 2018-01-09 Richard Biener <rguenther@suse.de>
16391 PR tree-optimization/83572
16392 * graphite.c: Include cfganal.h.
16393 (graphite_transform_loops): Connect infinite loops to exit
16394 and remove fake edges at the end.
16396 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
16398 * ipa-inline.c (edge_badness): Revert accidental checkin.
16400 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
16403 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
16404 symbols; not inline clones.
16406 2018-01-09 Jakub Jelinek <jakub@redhat.com>
16409 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
16410 hard registers. Formatting fixes.
16412 PR preprocessor/83722
16413 * gcc.c (try_generate_repro): Pass
16414 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
16415 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
16418 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
16419 Kito Cheng <kito.cheng@gmail.com>
16421 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
16422 (riscv_leaf_function_p): Delete.
16423 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
16425 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16427 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
16429 (do_ifelse): New function.
16430 (do_isel): New function.
16431 (do_sub3): New function.
16432 (do_add3): New function.
16433 (do_load_mask_compare): New function.
16434 (do_overlap_load_compare): New function.
16435 (expand_compare_loop): New function.
16436 (expand_block_compare): Call expand_compare_loop() when appropriate.
16437 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
16438 option description.
16439 (-mblock-compare-inline-loop-limit): New option.
16441 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16444 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
16445 Reverse order of second and third operands in first alternative.
16446 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
16447 of first and second elements in UNSPEC_VPERMR vector.
16448 (altivec_expand_vec_perm_le): Likewise.
16450 2018-01-08 Jeff Law <law@redhat.com>
16452 PR rtl-optimizatin/81308
16453 * tree-switch-conversion.c (cfg_altered): New file scoped static.
16454 (process_switch): If group_case_labels makes a change, then set
16456 (pass_convert_switch::execute): If a switch is converted, then
16457 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
16459 PR rtl-optimization/81308
16460 * recog.c (split_all_insns): Conditionally cleanup the CFG after
16463 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
16465 PR target/83663 - Revert r255946
16466 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
16467 generation for cases where splatting a value is not useful.
16468 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
16469 across a vec_duplicate and a paradoxical subreg forming a vector
16470 mode to a vec_concat.
16472 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16474 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
16475 -march=armv8.3-a variants.
16476 * config/arm/t-multilib: Likewise.
16477 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
16479 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16481 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
16483 (cceq_ior_compare_complement): Give it a name so I can use it, and
16484 change boolean_or_operator predicate to boolean_operator so it can
16485 be used to generate a crand.
16486 (eqne): New code iterator.
16487 (bd/bd_neg): New code_attrs.
16488 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
16489 a single define_insn.
16490 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
16491 decrement (bdnzt/bdnzf/bdzt/bdzf).
16492 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
16493 with the new names of the branch decrement patterns, and added the
16494 names of the branch decrement conditional patterns.
16496 2018-01-08 Richard Biener <rguenther@suse.de>
16498 PR tree-optimization/83563
16499 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
16502 2018-01-08 Richard Biener <rguenther@suse.de>
16504 PR middle-end/83713
16505 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
16507 2018-01-08 Richard Biener <rguenther@suse.de>
16509 PR tree-optimization/83685
16510 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
16511 references to abnormals.
16513 2018-01-08 Richard Biener <rguenther@suse.de>
16516 * dwarf2out.c (output_indirect_strings): Handle empty
16517 skeleton_debug_str_hash.
16518 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
16520 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
16522 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
16523 (emit_store_direct): Likewise.
16524 (arc_trampoline_adjust_address): Likewise.
16525 (arc_asm_trampoline_template): New function.
16526 (arc_initialize_trampoline): Use asm_trampoline_template.
16527 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
16528 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
16529 * config/arc/arc.md (flush_icache): Delete pattern.
16531 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
16533 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
16534 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
16537 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
16540 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
16541 by not USED_FOR_TARGET.
16542 (make_pass_resolve_sw_modes): Likewise.
16544 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
16546 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
16549 2018-01-08 Richard Biener <rguenther@suse.de>
16551 PR middle-end/83580
16552 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
16554 2018-01-08 Richard Biener <rguenther@suse.de>
16556 PR middle-end/83517
16557 * match.pd ((t * 2) / 2) -> t): Add missing :c.
16559 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
16561 PR middle-end/81897
16562 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
16563 basic blocks with a small number of successors.
16564 (convert_control_dep_chain_into_preds): Improve handling of
16566 (dump_predicates): Split apart into...
16567 (dump_pred_chain): ...here...
16568 (dump_pred_info): ...and here.
16569 (can_one_predicate_be_invalidated_p): Add debugging printfs.
16570 (can_chain_union_be_invalidated_p): Improve check for invalidation
16572 (uninit_uses_cannot_happen): Avoid unnecessary if
16573 convert_control_dep_chain_into_preds yielded nothing.
16575 2018-01-06 Martin Sebor <msebor@redhat.com>
16577 PR tree-optimization/83640
16578 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
16579 subtracting negative offset from size.
16580 (builtin_access::overlap): Adjust offset bounds of the access to fall
16581 within the size of the object if possible.
16583 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
16585 PR rtl-optimization/83699
16586 * expmed.c (extract_bit_field_1): Restrict the vector usage of
16587 extract_bit_field_as_subreg to cases in which the extracted
16588 value is also a vector.
16590 * lra-constraints.c (process_alt_operands): Test for the equivalence
16591 substitutions when detecting a possible reload cycle.
16593 2018-01-06 Jakub Jelinek <jakub@redhat.com>
16596 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
16597 by default if flag_selective_schedling{,2}. Formatting fixes.
16599 PR rtl-optimization/83682
16600 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
16601 if it has non-VECTOR_MODE element mode.
16602 (vec_duplicate_p): Likewise.
16604 PR middle-end/83694
16605 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
16606 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
16608 2018-01-05 Jakub Jelinek <jakub@redhat.com>
16611 * config/i386/i386-builtin.def
16612 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
16613 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
16614 Require also OPTION_MASK_ISA_AVX512F in addition to
16615 OPTION_MASK_ISA_GFNI.
16616 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
16617 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
16618 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
16619 to OPTION_MASK_ISA_GFNI.
16620 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
16621 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
16622 OPTION_MASK_ISA_AVX512BW.
16623 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
16624 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
16625 addition to OPTION_MASK_ISA_GFNI.
16626 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
16627 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
16628 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
16629 to OPTION_MASK_ISA_GFNI.
16630 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
16631 a requirement for all ISAs rather than any of them with a few
16633 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
16635 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
16636 bitmasks to be enabled with 3 exceptions, instead of requiring any
16637 enabled ISA with lots of exceptions.
16638 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
16639 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
16640 Change avx512bw in isa attribute to avx512f.
16641 * config/i386/sgxintrin.h: Add license boilerplate.
16642 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
16643 to __AVX512F__ and __AVX512VL to __AVX512VL__.
16644 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
16645 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
16647 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
16648 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
16649 temporarily sse2 rather than sse if not enabled already.
16652 * config/i386/sse.md (VI248_VLBW): Rename to ...
16653 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
16654 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
16655 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
16656 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
16657 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
16658 mode iterator instead of VI248_VLBW.
16660 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
16662 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
16663 (record_modified): Skip clobbers; add debug output.
16664 (param_change_prob): Use sreal frequencies.
16666 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
16668 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
16669 punt for user-aligned variables.
16671 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
16673 * tree-chrec.c (chrec_contains_symbols): Return true for
16676 2018-01-05 Sudakshina Das <sudi.das@arm.com>
16679 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
16680 of (x|y) == x for BICS pattern.
16682 2018-01-05 Jakub Jelinek <jakub@redhat.com>
16684 PR tree-optimization/83605
16685 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
16686 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
16689 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
16691 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
16692 * config/epiphany/rtems.h: New file.
16694 2018-01-04 Jakub Jelinek <jakub@redhat.com>
16695 Uros Bizjak <ubizjak@gmail.com>
16698 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
16699 QIreg_operand instead of register_operand predicate.
16700 * config/i386/i386.c (ix86_rop_should_change_byte_p,
16701 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
16702 comments instead of -fmitigate[-_]rop.
16704 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16707 * cgraphunit.c (symbol_table::compile): Switch to text_section
16708 before calling assembly_start debug hook.
16709 * run-rtl-passes.c (run_rtl_passes): Likewise.
16712 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16714 * tree-vrp.c (extract_range_from_binary_expr_1): Check
16715 range_int_cst_p rather than !symbolic_range_p before calling
16716 extract_range_from_multiplicative_op_1.
16718 2018-01-04 Jeff Law <law@redhat.com>
16720 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
16721 redundant test in assertion.
16723 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16725 * doc/rtl.texi: Document machine_mode wrapper classes.
16727 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16729 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
16730 using tree_to_uhwi.
16732 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16734 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
16735 the VEC_PERM_EXPR fold to fail.
16737 2018-01-04 Jakub Jelinek <jakub@redhat.com>
16740 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
16741 to switched_sections.
16743 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16746 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
16747 test for d.testing.
16749 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
16752 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
16753 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
16755 2018-01-04 Jakub Jelinek <jakub@redhat.com>
16758 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
16759 is BLKmode and bitpos not zero or mode change is needed.
16761 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
16764 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
16767 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
16770 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
16771 instead of MULT rtx. Update all corresponding splitters.
16772 (*saddl_se): Ditto.
16773 (*ssub<modesuffix>): Ditto.
16774 (*ssubl_se): Ditto.
16775 (*cmp_sadd_di): Update split patterns.
16776 (*cmp_sadd_si): Ditto.
16777 (*cmp_sadd_sidi): Ditto.
16778 (*cmp_ssub_di): Ditto.
16779 (*cmp_ssub_si): Ditto.
16780 (*cmp_ssub_sidi): Ditto.
16781 * config/alpha/predicates.md (const23_operand): New predicate.
16782 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
16783 Look for ASHIFT, not MULT inner operand.
16784 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
16786 2018-01-04 Martin Liska <mliska@suse.cz>
16788 PR gcov-profile/83669
16789 * gcov.c (output_intermediate_file): Add version to intermediate
16791 * doc/gcov.texi: Document new field 'version' in intermediate
16792 file format. Fix location of '-k' option of gcov command.
16794 2018-01-04 Martin Liska <mliska@suse.cz>
16797 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
16799 2018-01-04 Jakub Jelinek <jakub@redhat.com>
16801 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
16803 2018-01-03 Martin Sebor <msebor@redhat.com>
16805 PR tree-optimization/83655
16806 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
16807 checking calls with invalid arguments.
16809 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16811 * tree-vect-stmts.c (vect_get_store_rhs): New function.
16812 (vectorizable_mask_load_store): Delete.
16813 (vectorizable_call): Return false for masked loads and stores.
16814 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
16815 instead of gimple_assign_rhs1.
16816 (vectorizable_load): Handle IFN_MASK_LOAD.
16817 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
16819 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16821 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
16823 (vectorizable_mask_load_store): ...here.
16824 (vectorizable_load): ...and here.
16826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16828 * tree-vect-stmts.c (vect_build_all_ones_mask)
16829 (vect_build_zero_merge_argument): New functions, split out from...
16830 (vectorizable_load): ...here.
16832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16834 * tree-vect-stmts.c (vect_check_store_rhs): New function,
16836 (vectorizable_mask_load_store): ...here.
16837 (vectorizable_store): ...and here.
16839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16841 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
16843 (vectorizable_mask_load_store): ...here.
16845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16847 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
16848 (vect_model_store_cost): Take a vec_load_store_type instead of a
16850 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
16851 (vect_model_store_cost): Take a vec_load_store_type instead of a
16853 (vectorizable_mask_load_store): Update accordingly.
16854 (vectorizable_store): Likewise.
16855 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
16857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16859 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
16860 IFN_MASK_LOAD calls here rather than...
16861 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
16863 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16864 Alan Hayward <alan.hayward@arm.com>
16865 David Sherwood <david.sherwood@arm.com>
16867 * expmed.c (extract_bit_field_1): For vector extracts,
16868 fall back to extract_bit_field_as_subreg if vec_extract
16871 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16872 Alan Hayward <alan.hayward@arm.com>
16873 David Sherwood <david.sherwood@arm.com>
16875 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
16876 they are variable or constant sized.
16877 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
16878 slots for constant-sized data.
16880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16881 Alan Hayward <alan.hayward@arm.com>
16882 David Sherwood <david.sherwood@arm.com>
16884 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
16885 handling COND_EXPRs with boolean comparisons, try to find a better
16886 basis for the mask type than the boolean itself.
16888 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16890 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
16891 is calculated and how it can be overridden.
16892 * genmodes.c (max_bitsize_mode_any_mode): New variable.
16893 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
16895 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
16898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16899 Alan Hayward <alan.hayward@arm.com>
16900 David Sherwood <david.sherwood@arm.com>
16902 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
16903 Remove the mode argument.
16904 (aarch64_simd_valid_immediate): Remove the mode and inverse
16906 * config/aarch64/iterators.md (bitsize): New iterator.
16907 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
16908 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
16909 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
16910 aarch64_simd_valid_immediate.
16911 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
16912 (aarch64_reg_or_bic_imm): Likewise.
16913 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
16914 with an insn_type enum and msl with a modifier_type enum.
16915 Replace element_width with a scalar_mode. Change the shift
16916 to unsigned int. Add constructors for scalar_float_mode and
16917 scalar_int_mode elements.
16918 (aarch64_vect_float_const_representable_p): Delete.
16919 (aarch64_can_const_movi_rtx_p)
16920 (aarch64_simd_scalar_immediate_valid_for_move)
16921 (aarch64_simd_make_constant): Update call to
16922 aarch64_simd_valid_immediate.
16923 (aarch64_advsimd_valid_immediate_hs): New function.
16924 (aarch64_advsimd_valid_immediate): Likewise.
16925 (aarch64_simd_valid_immediate): Remove mode and inverse
16926 arguments. Rewrite to use the above. Use const_vec_duplicate_p
16927 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
16928 and aarch64_float_const_representable_p on the result.
16929 (aarch64_output_simd_mov_immediate): Remove mode argument.
16930 Update call to aarch64_simd_valid_immediate and use of
16931 simd_immediate_info.
16932 (aarch64_output_scalar_simd_mov_immediate): Update call
16935 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16936 Alan Hayward <alan.hayward@arm.com>
16937 David Sherwood <david.sherwood@arm.com>
16939 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
16940 (mode_nunits): Likewise CONST_MODE_NUNITS.
16941 * machmode.def (ADJUST_NUNITS): Document.
16942 * genmodes.c (mode_data::need_nunits_adj): New field.
16943 (blank_mode): Update accordingly.
16944 (adj_nunits): New variable.
16945 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
16947 (emit_mode_size_inline): Set need_bytesize_adj for all modes
16948 listed in adj_nunits.
16949 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
16950 listed in adj_nunits. Don't emit case statements for such modes.
16951 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
16952 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
16953 nothing if adj_nunits is nonnull.
16954 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
16955 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
16956 (emit_mode_fbit): Update use of print_maybe_const_decl.
16957 (emit_move_size): Likewise. Treat the array as non-const
16959 (emit_mode_adjustments): Handle adj_nunits.
16961 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16963 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
16964 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
16965 (VECTOR_MODES): Use it.
16966 (make_vector_modes): Take the prefix as an argument.
16968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16969 Alan Hayward <alan.hayward@arm.com>
16970 David Sherwood <david.sherwood@arm.com>
16972 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
16973 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
16974 for MODE_VECTOR_BOOL.
16975 * machmode.def (VECTOR_BOOL_MODE): Document.
16976 * genmodes.c (VECTOR_BOOL_MODE): New macro.
16977 (make_vector_bool_mode): New function.
16978 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
16980 * lto-streamer-in.c (lto_input_mode_table): Likewise.
16981 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
16983 * stor-layout.c (int_mode_for_mode): Likewise.
16984 * tree.c (build_vector_type_for_mode): Likewise.
16985 * varasm.c (output_constant_pool_2): Likewise.
16986 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
16987 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
16988 for MODE_VECTOR_BOOL.
16989 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
16990 of mode class checks.
16991 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
16992 instead of a list of mode class checks.
16993 (expand_vector_scalar_condition): Likewise.
16994 (type_for_widest_vector_mode): Handle BImode as an inner mode.
16996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
16997 Alan Hayward <alan.hayward@arm.com>
16998 David Sherwood <david.sherwood@arm.com>
17000 * machmode.h (mode_size): Change from unsigned short to
17002 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
17003 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17004 or if measurement_type is not polynomial.
17005 (fixed_size_mode::includes_p): Check for constant-sized modes.
17006 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
17007 return a poly_uint16 rather than an unsigned short.
17008 (emit_mode_size): Change the type of mode_size from unsigned short
17009 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
17010 (emit_mode_adjustments): Cope with polynomial vector sizes.
17011 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17013 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17015 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
17016 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
17017 * caller-save.c (setup_save_areas): Likewise.
17018 (replace_reg_with_saved_mem): Likewise.
17019 * calls.c (emit_library_call_value_1): Likewise.
17020 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
17021 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
17022 (gen_lowpart_for_combine): Likewise.
17023 * convert.c (convert_to_integer_1): Likewise.
17024 * cse.c (equiv_constant, cse_insn): Likewise.
17025 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
17026 (cselib_subst_to_values): Likewise.
17027 * dce.c (word_dce_process_block): Likewise.
17028 * df-problems.c (df_word_lr_mark_ref): Likewise.
17029 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
17030 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
17031 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
17032 (rtl_for_decl_location): Likewise.
17033 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
17034 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
17035 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
17036 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
17037 (expand_expr_real_1): Likewise.
17038 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
17039 (pad_below): Likewise.
17040 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17041 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
17042 * ira.c (get_subreg_tracking_sizes): Likewise.
17043 * ira-build.c (ira_create_allocno_objects): Likewise.
17044 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
17045 (ira_sort_regnos_for_alter_reg): Likewise.
17046 * ira-costs.c (record_operand_costs): Likewise.
17047 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
17048 (resolve_simple_move): Likewise.
17049 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
17050 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
17051 (lra_constraints): Likewise.
17052 (CONST_POOL_OK_P): Reject variable-sized modes.
17053 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
17054 (add_pseudo_to_slot, lra_spill): Likewise.
17055 * omp-low.c (omp_clause_aligned_alignment): Likewise.
17056 * optabs-query.c (get_best_extraction_insn): Likewise.
17057 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17058 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
17059 (expand_mult_highpart, valid_multiword_target_p): Likewise.
17060 * recog.c (offsettable_address_addr_space_p): Likewise.
17061 * regcprop.c (maybe_mode_change): Likewise.
17062 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
17063 * regrename.c (build_def_use): Likewise.
17064 * regstat.c (dump_reg_info): Likewise.
17065 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
17066 (find_reloads, find_reloads_subreg_address): Likewise.
17067 * reload1.c (eliminate_regs_1): Likewise.
17068 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
17069 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
17070 (simplify_binary_operation_1, simplify_subreg): Likewise.
17071 * targhooks.c (default_function_arg_padding): Likewise.
17072 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
17073 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
17074 (verify_gimple_assign_ternary): Likewise.
17075 * tree-inline.c (estimate_move_cost): Likewise.
17076 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17077 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
17078 (get_address_cost_ainc): Likewise.
17079 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
17080 (vect_supportable_dr_alignment): Likewise.
17081 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17082 (vectorizable_reduction): Likewise.
17083 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
17084 (vectorizable_operation, vectorizable_load): Likewise.
17085 * tree.c (build_same_sized_truth_vector_type): Likewise.
17086 * valtrack.c (cleanup_auto_inc_dec): Likewise.
17087 * var-tracking.c (emit_note_insn_var_location): Likewise.
17088 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
17089 (ADDR_VEC_ALIGN): Likewise.
17091 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17092 Alan Hayward <alan.hayward@arm.com>
17093 David Sherwood <david.sherwood@arm.com>
17095 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
17097 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17098 or if measurement_type is polynomial.
17099 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
17100 * combine.c (make_extraction): Likewise.
17101 * dse.c (find_shift_sequence): Likewise.
17102 * dwarf2out.c (mem_loc_descriptor): Likewise.
17103 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
17104 (extract_bit_field, extract_low_bits): Likewise.
17105 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
17106 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
17107 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
17108 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
17109 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17110 * reload.c (find_reloads): Likewise.
17111 * reload1.c (alter_reg): Likewise.
17112 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
17113 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
17114 * tree-if-conv.c (predicate_mem_writes): Likewise.
17115 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
17116 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
17117 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
17118 * valtrack.c (dead_debug_insert_temp): Likewise.
17119 * varasm.c (mergeable_constant_section): Likewise.
17120 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
17122 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17123 Alan Hayward <alan.hayward@arm.com>
17124 David Sherwood <david.sherwood@arm.com>
17126 * expr.c (expand_assignment): Cope with polynomial mode sizes
17127 when assigning to a CONCAT.
17129 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17130 Alan Hayward <alan.hayward@arm.com>
17131 David Sherwood <david.sherwood@arm.com>
17133 * machmode.h (mode_precision): Change from unsigned short to
17135 (mode_to_precision): Return a poly_uint16 rather than an unsigned
17137 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
17138 or if measurement_type is not polynomial.
17139 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
17140 in which the mode is already known to be a scalar_int_mode.
17141 * genmodes.c (emit_mode_precision): Change the type of mode_precision
17142 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
17144 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17145 for GET_MODE_PRECISION.
17146 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17147 for GET_MODE_PRECISION.
17148 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
17150 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
17151 (expand_field_assignment, make_extraction): Likewise.
17152 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
17153 (get_last_value): Likewise.
17154 * convert.c (convert_to_integer_1): Likewise.
17155 * cse.c (cse_insn): Likewise.
17156 * expr.c (expand_expr_real_1): Likewise.
17157 * lra-constraints.c (simplify_operand_subreg): Likewise.
17158 * optabs-query.c (can_atomic_load_p): Likewise.
17159 * optabs.c (expand_atomic_load): Likewise.
17160 (expand_atomic_store): Likewise.
17161 * ree.c (combine_reaching_defs): Likewise.
17162 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
17163 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
17164 * tree.h (type_has_mode_precision_p): Likewise.
17165 * ubsan.c (instrument_si_overflow): Likewise.
17167 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17168 Alan Hayward <alan.hayward@arm.com>
17169 David Sherwood <david.sherwood@arm.com>
17171 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
17172 polynomial numbers of units.
17173 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
17174 (valid_vector_subparts_p): New function.
17175 (build_vector_type): Remove temporary shim and take the number
17176 of units as a poly_uint64 rather than an int.
17177 (build_opaque_vector_type): Take the number of units as a
17178 poly_uint64 rather than an int.
17179 * tree.c (build_vector_from_ctor): Handle polynomial
17180 TYPE_VECTOR_SUBPARTS.
17181 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
17182 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
17183 (build_vector_from_val): If the number of units is variable,
17184 use build_vec_duplicate_cst for constant operands and
17185 VEC_DUPLICATE_EXPR otherwise.
17186 (make_vector_type): Remove temporary is_constant ().
17187 (build_vector_type, build_opaque_vector_type): Take the number of
17188 units as a poly_uint64 rather than an int.
17189 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
17191 * cfgexpand.c (expand_debug_expr): Likewise.
17192 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
17193 (store_constructor, expand_expr_real_1): Likewise.
17194 (const_scalar_mask_from_tree): Likewise.
17195 * fold-const-call.c (fold_const_reduction): Likewise.
17196 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
17197 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
17198 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
17199 (fold_relational_const): Likewise.
17200 (native_interpret_vector): Likewise. Change the size from an
17201 int to an unsigned int.
17202 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
17203 TYPE_VECTOR_SUBPARTS.
17204 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
17205 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
17206 duplicating a non-constant operand into a variable-length vector.
17207 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
17208 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
17209 * ipa-icf.c (sem_variable::equals): Likewise.
17210 * match.pd: Likewise.
17211 * omp-simd-clone.c (simd_clone_subparts): Likewise.
17212 * print-tree.c (print_node): Likewise.
17213 * stor-layout.c (layout_type): Likewise.
17214 * targhooks.c (default_builtin_vectorization_cost): Likewise.
17215 * tree-cfg.c (verify_gimple_comparison): Likewise.
17216 (verify_gimple_assign_binary): Likewise.
17217 (verify_gimple_assign_ternary): Likewise.
17218 (verify_gimple_assign_single): Likewise.
17219 * tree-pretty-print.c (dump_generic_node): Likewise.
17220 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17221 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
17222 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
17223 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
17224 (vect_shift_permute_load_chain): Likewise.
17225 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
17226 (expand_vector_condition, optimize_vector_constructor): Likewise.
17227 (lower_vec_perm, get_compute_type): Likewise.
17228 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17229 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
17230 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
17231 (vect_recog_mask_conversion_pattern): Likewise.
17232 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
17233 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
17234 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17235 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
17236 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
17237 (vectorizable_shift, vectorizable_operation, vectorizable_store)
17238 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
17239 (supportable_widening_operation): Likewise.
17240 (supportable_narrowing_operation): Likewise.
17241 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
17243 * varasm.c (output_constant): Likewise.
17245 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17246 Alan Hayward <alan.hayward@arm.com>
17247 David Sherwood <david.sherwood@arm.com>
17249 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
17250 so that both the length == 3 and length != 3 cases set up their
17251 own permute vectors. Add comments explaining why we know the
17252 number of elements is constant.
17253 (vect_permute_load_chain): Likewise.
17255 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17256 Alan Hayward <alan.hayward@arm.com>
17257 David Sherwood <david.sherwood@arm.com>
17259 * machmode.h (mode_nunits): Change from unsigned char to
17261 (ONLY_FIXED_SIZE_MODES): New macro.
17262 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
17263 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
17264 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
17266 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
17267 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
17268 or if measurement_type is not polynomial.
17269 * genmodes.c (ZERO_COEFFS): New macro.
17270 (emit_mode_nunits_inline): Make mode_nunits_inline return a
17272 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
17273 Use ZERO_COEFFS when emitting initializers.
17274 * data-streamer.h (bp_pack_poly_value): New function.
17275 (bp_unpack_poly_value): Likewise.
17276 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17277 for GET_MODE_NUNITS.
17278 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17279 for GET_MODE_NUNITS.
17280 * tree.c (make_vector_type): Remove temporary shim and make
17281 the real function take the number of units as a poly_uint64
17282 rather than an int.
17283 (build_vector_type_for_mode): Handle polynomial nunits.
17284 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
17285 * emit-rtl.c (const_vec_series_p_1): Likewise.
17286 (gen_rtx_CONST_VECTOR): Likewise.
17287 * fold-const.c (test_vec_duplicate_folding): Likewise.
17288 * genrecog.c (validate_pattern): Likewise.
17289 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
17290 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17291 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
17292 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
17293 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
17294 * rtlanal.c (subreg_get_info): Likewise.
17295 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17296 (vect_grouped_load_supported): Likewise.
17297 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
17298 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
17299 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17300 (simplify_const_unary_operation, simplify_binary_operation_1)
17301 (simplify_const_binary_operation, simplify_ternary_operation)
17302 (test_vector_ops_duplicate, test_vector_ops): Likewise.
17303 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
17304 instead of CONST_VECTOR_NUNITS.
17305 * varasm.c (output_constant_pool_2): Likewise.
17306 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
17307 explicit-encoded elements in the XVEC for variable-length vectors.
17309 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17311 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
17313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17314 Alan Hayward <alan.hayward@arm.com>
17315 David Sherwood <david.sherwood@arm.com>
17317 * coretypes.h (fixed_size_mode): Declare.
17318 (fixed_size_mode_pod): New typedef.
17319 * builtins.h (target_builtins::x_apply_args_mode)
17320 (target_builtins::x_apply_result_mode): Change type to
17321 fixed_size_mode_pod.
17322 * builtins.c (apply_args_size, apply_result_size, result_vector)
17323 (expand_builtin_apply_args_1, expand_builtin_apply)
17324 (expand_builtin_return): Update accordingly.
17326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17328 * cse.c (hash_rtx_cb): Hash only the encoded elements.
17329 * cselib.c (cselib_hash_rtx): Likewise.
17330 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
17331 CONST_VECTOR encoding.
17333 2018-01-03 Jakub Jelinek <jakub@redhat.com>
17334 Jeff Law <law@redhat.com>
17337 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
17338 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
17339 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
17340 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
17343 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
17344 explicitly probe *sp in a noreturn function if there were any callee
17345 register saves or frame pointer is needed.
17347 2018-01-03 Jakub Jelinek <jakub@redhat.com>
17350 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
17351 BLKmode for ternary, binary or unary expressions.
17354 * var-tracking.c (delete_vta_debug_insn): New inline function.
17355 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
17356 insns from get_insns () to NULL instead of each bb separately.
17357 Use delete_vta_debug_insn. No longer static.
17358 (vt_debug_insns_local, variable_tracking_main_1): Adjust
17359 delete_vta_debug_insns callers.
17360 * rtl.h (delete_vta_debug_insns): Declare.
17361 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
17362 instead of variable_tracking_main.
17364 2018-01-03 Martin Sebor <msebor@redhat.com>
17366 PR tree-optimization/83603
17367 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
17368 arguments past the endof the argument list in functions declared
17369 without a prototype.
17370 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
17371 Avoid checking when arguments are null.
17373 2018-01-03 Martin Sebor <msebor@redhat.com>
17376 * doc/extend.texi (attribute const): Fix a typo.
17377 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
17378 issuing -Wsuggest-attribute for void functions.
17380 2018-01-03 Martin Sebor <msebor@redhat.com>
17382 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
17383 offset_int::from instead of wide_int::to_shwi.
17384 (maybe_diag_overlap): Remove assertion.
17385 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
17386 * gimple-ssa-sprintf.c (format_directive): Same.
17387 (parse_directive): Same.
17388 (sprintf_dom_walker::compute_format_length): Same.
17389 (try_substitute_return_value): Same.
17391 2018-01-03 Jeff Law <law@redhat.com>
17393 PR middle-end/83654
17394 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
17395 non-constant residual for zero at runtime and avoid probing in
17396 that case. Reorganize code for trailing problem to mirror handling
17399 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17401 PR tree-optimization/83501
17402 * tree-ssa-strlen.c (get_string_cst): New.
17403 (handle_char_store): Call get_string_cst.
17405 2018-01-03 Martin Liska <mliska@suse.cz>
17407 PR tree-optimization/83593
17408 * tree-ssa-strlen.c: Include tree-cfg.h.
17409 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
17410 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
17411 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
17413 (strlen_dom_walker::before_dom_children): Call
17414 gimple_purge_dead_eh_edges. Dump tranformation with details
17416 (strlen_dom_walker::before_dom_children): Update call by adding
17417 new argument cleanup_eh.
17418 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
17420 2018-01-03 Martin Liska <mliska@suse.cz>
17423 * cif-code.def (VARIADIC_THUNK): New enum value.
17424 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
17427 2018-01-03 Jan Beulich <jbeulich@suse.com>
17429 * sse.md (mov<mode>_internal): Tighten condition for when to use
17430 vmovdqu<ssescalarsize> for TI and OI modes.
17432 2018-01-03 Jakub Jelinek <jakub@redhat.com>
17434 Update copyright years.
17436 2018-01-03 Martin Liska <mliska@suse.cz>
17439 * ipa-visibility.c (function_and_variable_visibility): Skip
17440 functions with noipa attribure.
17442 2018-01-03 Jakub Jelinek <jakub@redhat.com>
17444 * gcc.c (process_command): Update copyright notice dates.
17445 * gcov-dump.c (print_version): Ditto.
17446 * gcov.c (print_version): Ditto.
17447 * gcov-tool.c (print_version): Ditto.
17448 * gengtype.c (create_file): Ditto.
17449 * doc/cpp.texi: Bump @copying's copyright year.
17450 * doc/cppinternals.texi: Ditto.
17451 * doc/gcc.texi: Ditto.
17452 * doc/gccint.texi: Ditto.
17453 * doc/gcov.texi: Ditto.
17454 * doc/install.texi: Ditto.
17455 * doc/invoke.texi: Ditto.
17457 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17459 * vector-builder.h (vector_builder::m_full_nelts): Change from
17460 unsigned int to poly_uint64.
17461 (vector_builder::full_nelts): Update prototype accordingly.
17462 (vector_builder::new_vector): Likewise.
17463 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
17464 (vector_builder::operator ==): Likewise.
17465 (vector_builder::finalize): Likewise.
17466 * int-vector-builder.h (int_vector_builder::int_vector_builder):
17467 Take the number of elements as a poly_uint64 rather than an
17469 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
17470 from unsigned int to poly_uint64.
17471 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
17472 (vec_perm_indices::new_vector): Likewise.
17473 (vec_perm_indices::length): Likewise.
17474 (vec_perm_indices::nelts_per_input): Likewise.
17475 (vec_perm_indices::input_nelts): Likewise.
17476 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
17477 number of elements per input as a poly_uint64 rather than an
17478 unsigned int. Use the original encoding for variable-length
17479 vectors, rather than clamping each individual element.
17480 For the second and subsequent elements in each pattern,
17481 clamp the step and base before clamping their sum.
17482 (vec_perm_indices::series_p): Handle polynomial element counts.
17483 (vec_perm_indices::all_in_range_p): Likewise.
17484 (vec_perm_indices_to_tree): Likewise.
17485 (vec_perm_indices_to_rtx): Likewise.
17486 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
17487 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
17488 (tree_vector_builder::new_binary_operation): Handle polynomial
17489 element counts. Return false if we need to know the number
17490 of elements at compile time.
17491 * fold-const.c (fold_vec_perm): Punt if the number of elements
17492 isn't known at compile time.
17494 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17496 * vec-perm-indices.h (vec_perm_builder): Change element type
17497 from HOST_WIDE_INT to poly_int64.
17498 (vec_perm_indices::element_type): Update accordingly.
17499 (vec_perm_indices::clamp): Handle polynomial element_types.
17500 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17501 (vec_perm_indices::all_in_range_p): Likewise.
17502 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
17504 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
17505 polynomial vec_perm_indices element types.
17506 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
17507 * fold-const.c (fold_vec_perm): Likewise.
17508 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
17509 * tree-vect-generic.c (lower_vec_perm): Likewise.
17510 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17511 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
17512 element type to HOST_WIDE_INT.
17514 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17515 Alan Hayward <alan.hayward@arm.com>
17516 David Sherwood <david.sherwood@arm.com>
17518 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
17519 rather than an int. Use plus_constant.
17520 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
17521 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
17523 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17524 Alan Hayward <alan.hayward@arm.com>
17525 David Sherwood <david.sherwood@arm.com>
17527 * calls.c (emit_call_1, expand_call): Change struct_value_size from
17528 a HOST_WIDE_INT to a poly_int64.
17530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17531 Alan Hayward <alan.hayward@arm.com>
17532 David Sherwood <david.sherwood@arm.com>
17534 * calls.c (load_register_parameters): Cope with polynomial
17535 mode sizes. Require a constant size for BLKmode parameters
17536 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
17537 forces a parameter to be padded at the lsb end in order to
17538 fill a complete number of words, require the parameter size
17539 to be ordered wrt UNITS_PER_WORD.
17541 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17542 Alan Hayward <alan.hayward@arm.com>
17543 David Sherwood <david.sherwood@arm.com>
17545 * reload1.c (spill_stack_slot_width): Change element type
17546 from unsigned int to poly_uint64_pod.
17547 (alter_reg): Treat mode sizes as polynomial.
17549 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17550 Alan Hayward <alan.hayward@arm.com>
17551 David Sherwood <david.sherwood@arm.com>
17553 * reload.c (complex_word_subreg_p): New function.
17554 (reload_inner_reg_of_subreg, push_reload): Use it.
17556 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17557 Alan Hayward <alan.hayward@arm.com>
17558 David Sherwood <david.sherwood@arm.com>
17560 * lra-constraints.c (process_alt_operands): Reject matched
17561 operands whose sizes aren't ordered.
17562 (match_reload): Refer to this check here.
17564 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17565 Alan Hayward <alan.hayward@arm.com>
17566 David Sherwood <david.sherwood@arm.com>
17568 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
17569 that the mode size is in the set {1, 2, 4, 8, 16}.
17571 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17572 Alan Hayward <alan.hayward@arm.com>
17573 David Sherwood <david.sherwood@arm.com>
17575 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
17576 Use plus_constant instead of gen_rtx_PLUS.
17578 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17579 Alan Hayward <alan.hayward@arm.com>
17580 David Sherwood <david.sherwood@arm.com>
17582 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
17583 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
17584 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
17585 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
17586 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
17587 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
17588 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
17589 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
17590 * config/i386/i386.c (ix86_push_rounding): ...this new function.
17591 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
17593 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
17594 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
17595 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
17596 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
17597 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
17598 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
17599 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
17600 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
17601 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
17602 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
17604 * expr.c (emit_move_resolve_push): Treat the input and result
17605 of PUSH_ROUNDING as a poly_int64.
17606 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
17607 (emit_push_insn): Likewise.
17608 * lra-eliminations.c (mark_not_eliminable): Likewise.
17609 * recog.c (push_operand): Likewise.
17610 * reload1.c (elimination_effects): Likewise.
17611 * rtlanal.c (nonzero_bits1): Likewise.
17612 * calls.c (store_one_arg): Likewise. Require the padding to be
17613 known at compile time.
17615 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17616 Alan Hayward <alan.hayward@arm.com>
17617 David Sherwood <david.sherwood@arm.com>
17619 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
17620 Use plus_constant instead of gen_rtx_PLUS.
17622 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17623 Alan Hayward <alan.hayward@arm.com>
17624 David Sherwood <david.sherwood@arm.com>
17626 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
17627 rather than an int.
17629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17630 Alan Hayward <alan.hayward@arm.com>
17631 David Sherwood <david.sherwood@arm.com>
17633 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
17634 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
17635 via stack temporaries. Treat the mode size as polynomial too.
17637 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17638 Alan Hayward <alan.hayward@arm.com>
17639 David Sherwood <david.sherwood@arm.com>
17641 * expr.c (expand_expr_real_2): When handling conversions involving
17642 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
17643 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
17644 as a poly_uint64 too.
17646 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17647 Alan Hayward <alan.hayward@arm.com>
17648 David Sherwood <david.sherwood@arm.com>
17650 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
17652 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17653 Alan Hayward <alan.hayward@arm.com>
17654 David Sherwood <david.sherwood@arm.com>
17656 * combine.c (can_change_dest_mode): Handle polynomial
17657 REGMODE_NATURAL_SIZE.
17658 * expmed.c (store_bit_field_1): Likewise.
17659 * expr.c (store_constructor): Likewise.
17660 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
17661 and polynomial REGMODE_NATURAL_SIZE.
17662 (gen_lowpart_common): Likewise.
17663 * reginfo.c (record_subregs_of_mode): Likewise.
17664 * rtlanal.c (read_modify_subreg_p): Likewise.
17666 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17667 Alan Hayward <alan.hayward@arm.com>
17668 David Sherwood <david.sherwood@arm.com>
17670 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
17671 numbers of elements.
17673 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17674 Alan Hayward <alan.hayward@arm.com>
17675 David Sherwood <david.sherwood@arm.com>
17677 * match.pd: Cope with polynomial numbers of vector elements.
17679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17680 Alan Hayward <alan.hayward@arm.com>
17681 David Sherwood <david.sherwood@arm.com>
17683 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
17684 in a POINTER_PLUS_EXPR.
17686 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17687 Alan Hayward <alan.hayward@arm.com>
17688 David Sherwood <david.sherwood@arm.com>
17690 * omp-simd-clone.c (simd_clone_subparts): New function.
17691 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
17692 (ipa_simd_modify_function_body): Likewise.
17694 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17695 Alan Hayward <alan.hayward@arm.com>
17696 David Sherwood <david.sherwood@arm.com>
17698 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
17699 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
17700 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
17701 (expand_vector_condition, vector_element): Likewise.
17702 (subparts_gt): New function.
17703 (get_compute_type): Use subparts_gt.
17704 (count_type_subparts): Delete.
17705 (expand_vector_operations_1): Use subparts_gt instead of
17706 count_type_subparts.
17708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17709 Alan Hayward <alan.hayward@arm.com>
17710 David Sherwood <david.sherwood@arm.com>
17712 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
17713 (vect_compile_time_alias): ...this new function. Do the calculation
17714 on poly_ints rather than trees.
17715 (vect_prune_runtime_alias_test_list): Update call accordingly.
17717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17718 Alan Hayward <alan.hayward@arm.com>
17719 David Sherwood <david.sherwood@arm.com>
17721 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
17723 (vect_schedule_slp_instance): Likewise.
17725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17726 Alan Hayward <alan.hayward@arm.com>
17727 David Sherwood <david.sherwood@arm.com>
17729 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
17730 constant and extern definitions for variable-length vectors.
17731 (vect_get_constant_vectors): Note that the number of units
17732 is known to be constant.
17734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17735 Alan Hayward <alan.hayward@arm.com>
17736 David Sherwood <david.sherwood@arm.com>
17738 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
17739 of units as polynomial. Choose between WIDE and NARROW based
17742 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17743 Alan Hayward <alan.hayward@arm.com>
17744 David Sherwood <david.sherwood@arm.com>
17746 * tree-vect-stmts.c (simd_clone_subparts): New function.
17747 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
17749 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17750 Alan Hayward <alan.hayward@arm.com>
17751 David Sherwood <david.sherwood@arm.com>
17753 * tree-vect-stmts.c (vectorizable_call): Treat the number of
17754 vectors as polynomial. Use build_index_vector for
17755 IFN_GOMP_SIMD_LANE.
17757 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17758 Alan Hayward <alan.hayward@arm.com>
17759 David Sherwood <david.sherwood@arm.com>
17761 * tree-vect-stmts.c (get_load_store_type): Treat the number of
17762 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
17763 for variable-length vectors.
17764 (vectorizable_mask_load_store): Treat the number of units as
17765 polynomial, asserting that it is constant if the condition has
17766 already been enforced.
17767 (vectorizable_store, vectorizable_load): Likewise.
17769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17770 Alan Hayward <alan.hayward@arm.com>
17771 David Sherwood <david.sherwood@arm.com>
17773 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
17774 of units as polynomial. Punt if we can't tell at compile time
17775 which vector contains the final result.
17777 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17778 Alan Hayward <alan.hayward@arm.com>
17779 David Sherwood <david.sherwood@arm.com>
17781 * tree-vect-loop.c (vectorizable_induction): Treat the number
17782 of units as polynomial. Punt on SLP inductions. Use an integer
17783 VEC_SERIES_EXPR for variable-length integer reductions. Use a
17784 cast of such a series for variable-length floating-point
17787 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17788 Alan Hayward <alan.hayward@arm.com>
17789 David Sherwood <david.sherwood@arm.com>
17791 * tree.h (build_index_vector): Declare.
17792 * tree.c (build_index_vector): New function.
17793 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
17794 of units as polynomial, forcibly converting it to a constant if
17795 vectorizable_reduction has already enforced the condition.
17796 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
17797 to create a {1,2,3,...} vector.
17798 (vectorizable_reduction): Treat the number of units as polynomial.
17799 Choose vectype_in based on the largest scalar element size rather
17800 than the smallest number of units. Enforce the restrictions
17803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17804 Alan Hayward <alan.hayward@arm.com>
17805 David Sherwood <david.sherwood@arm.com>
17807 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
17808 number of units as polynomial.
17810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17811 Alan Hayward <alan.hayward@arm.com>
17812 David Sherwood <david.sherwood@arm.com>
17814 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
17815 * target.def (autovectorize_vector_sizes): Return the vector sizes
17816 by pointer, using vector_sizes rather than a bitmask.
17817 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
17818 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
17819 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
17821 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
17822 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
17823 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
17824 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
17825 * omp-general.c (omp_max_vf): Likewise.
17826 * omp-low.c (omp_clause_aligned_alignment): Likewise.
17827 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
17828 * tree-vect-loop.c (vect_analyze_loop): Likewise.
17829 * tree-vect-slp.c (vect_slp_bb): Likewise.
17830 * doc/tm.texi: Regenerate.
17831 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
17833 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
17834 the vector size as a poly_uint64 rather than an unsigned int.
17835 (current_vector_size): Change from an unsigned int to a poly_uint64.
17836 (get_vectype_for_scalar_type): Update accordingly.
17837 * tree.h (build_truth_vector_type): Take the size and number of
17838 units as a poly_uint64 rather than an unsigned int.
17839 (build_vector_type): Add a temporary overload that takes
17840 the number of units as a poly_uint64 rather than an unsigned int.
17841 * tree.c (make_vector_type): Likewise.
17842 (build_truth_vector_type): Take the number of units as a poly_uint64
17843 rather than an unsigned int.
17845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17846 Alan Hayward <alan.hayward@arm.com>
17847 David Sherwood <david.sherwood@arm.com>
17849 * target.def (get_mask_mode): Take the number of units and length
17850 as poly_uint64s rather than unsigned ints.
17851 * targhooks.h (default_get_mask_mode): Update accordingly.
17852 * targhooks.c (default_get_mask_mode): Likewise.
17853 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
17854 * doc/tm.texi: Regenerate.
17856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17857 Alan Hayward <alan.hayward@arm.com>
17858 David Sherwood <david.sherwood@arm.com>
17860 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
17861 * omp-general.c (omp_max_vf): Likewise.
17862 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
17863 (expand_omp_simd): Handle polynomial safelen.
17864 * omp-low.c (omplow_simd_context): Add a default constructor.
17865 (omplow_simd_context::max_vf): Change from int to poly_uint64.
17866 (lower_rec_simd_input_clauses): Update accordingly.
17867 (lower_rec_input_clauses): Likewise.
17869 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17870 Alan Hayward <alan.hayward@arm.com>
17871 David Sherwood <david.sherwood@arm.com>
17873 * tree-vectorizer.h (vect_nunits_for_cost): New function.
17874 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
17875 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
17876 (vect_analyze_slp_cost): Likewise.
17877 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
17878 (vect_model_load_cost): Likewise.
17880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17881 Alan Hayward <alan.hayward@arm.com>
17882 David Sherwood <david.sherwood@arm.com>
17884 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
17885 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
17886 from an unsigned int * to a poly_uint64_pod *.
17887 (calculate_unrolling_factor): New function.
17888 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
17890 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17891 Alan Hayward <alan.hayward@arm.com>
17892 David Sherwood <david.sherwood@arm.com>
17894 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
17895 from an unsigned int to a poly_uint64.
17896 (_loop_vec_info::slp_unrolling_factor): Likewise.
17897 (_loop_vec_info::vectorization_factor): Change from an int
17899 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
17900 (vect_get_num_vectors): New function.
17901 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
17902 (vect_get_num_copies): Use vect_get_num_vectors.
17903 (vect_analyze_data_ref_dependences): Change max_vf from an int *
17904 to an unsigned int *.
17905 (vect_analyze_data_refs): Change min_vf from an int * to a
17907 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17908 than an unsigned HOST_WIDE_INT.
17909 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
17910 (vect_analyze_data_ref_dependence): Change max_vf from an int *
17911 to an unsigned int *.
17912 (vect_analyze_data_ref_dependences): Likewise.
17913 (vect_compute_data_ref_alignment): Handle polynomial vf.
17914 (vect_enhance_data_refs_alignment): Likewise.
17915 (vect_prune_runtime_alias_test_list): Likewise.
17916 (vect_shift_permute_load_chain): Likewise.
17917 (vect_supportable_dr_alignment): Likewise.
17918 (dependence_distance_ge_vf): Take the vectorization factor as a
17919 poly_uint64 rather than an unsigned HOST_WIDE_INT.
17920 (vect_analyze_data_refs): Change min_vf from an int * to a
17922 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
17923 vfm1 as a poly_uint64 rather than an int. Make the same change
17924 for the returned bound_scalar.
17925 (vect_gen_vector_loop_niters): Handle polynomial vf.
17926 (vect_do_peeling): Likewise. Update call to
17927 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
17928 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
17930 * tree-vect-loop.c (vect_determine_vectorization_factor)
17931 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
17932 (vect_get_known_peeling_cost): Likewise.
17933 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
17934 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
17935 (vect_transform_loop): Likewise. Use the lowest possible VF when
17936 updating the upper bounds of the loop.
17937 (vect_min_worthwhile_factor): Make static. Return an unsigned int
17938 rather than an int.
17939 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
17940 polynomial unroll factors.
17941 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
17942 (vect_make_slp_decision): Likewise.
17943 (vect_supported_load_permutation_p): Likewise, and polynomial
17945 (vect_analyze_slp_cost): Handle polynomial vf.
17946 (vect_slp_analyze_node_operations): Likewise.
17947 (vect_slp_analyze_bb_1): Likewise.
17948 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17949 than an unsigned HOST_WIDE_INT.
17950 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
17951 (vectorizable_load): Handle polynomial vf.
17952 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
17954 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
17956 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17957 Alan Hayward <alan.hayward@arm.com>
17958 David Sherwood <david.sherwood@arm.com>
17960 * match.pd: Handle bit operations involving three constants
17961 and try to fold one pair.
17963 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17965 * tree-vect-loop-manip.c: Include gimple-fold.h.
17966 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
17967 niters_maybe_zero parameters. Handle other cases besides a step of 1.
17968 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
17969 Add a path that uses a step of VF instead of 1, but disable it
17971 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
17972 and niters_no_overflow parameters. Update calls to
17973 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
17974 Create a new SSA name if the latter choses to use a ste other
17975 than zero, and return it via niters_vector_mult_vf_var.
17976 * tree-vect-loop.c (vect_transform_loop): Update calls to
17977 vect_do_peeling, vect_gen_vector_loop_niters and
17978 slpeel_make_loop_iterate_ntimes.
17979 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
17980 (vect_gen_vector_loop_niters): Update declarations after above changes.
17982 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
17984 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
17985 128-bit round to integer instructions.
17986 (ceil<mode>2): Likewise.
17987 (btrunc<mode>2): Likewise.
17988 (round<mode>2): Likewise.
17990 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17992 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
17993 unaligned VSX load/store on P8/P9.
17994 (expand_block_clear): Allow the use of unaligned VSX
17995 load/store on P8/P9.
17997 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17999 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
18001 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
18002 swap associated with both a load and a store.
18004 2018-01-02 Andrew Waterman <andrew@sifive.com>
18006 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
18007 * config/riscv/riscv.md (clear_cache): Use it.
18009 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
18011 * web.c: Remove out-of-date comment.
18013 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18015 * expr.c (fixup_args_size_notes): Check that any existing
18016 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
18017 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
18018 (emit_single_push_insn): ...here.
18020 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18022 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
18023 (const_vector_encoded_nelts): New function.
18024 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
18025 (const_vector_int_elt, const_vector_elt): Declare.
18026 * emit-rtl.c (const_vector_int_elt_1): New function.
18027 (const_vector_elt): Likewise.
18028 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
18029 of CONST_VECTOR_ELT.
18031 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18033 * expr.c: Include rtx-vector-builder.h.
18034 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
18035 directly on the tree encoding.
18036 (const_vector_from_tree): Likewise.
18037 * optabs.c: Include rtx-vector-builder.h.
18038 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
18039 sequence of "u" values.
18040 * vec-perm-indices.c: Include rtx-vector-builder.h.
18041 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
18042 directly on the vec_perm_indices encoding.
18044 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18046 * doc/rtl.texi (const_vector): Describe new encoding scheme.
18047 * Makefile.in (OBJS): Add rtx-vector-builder.o.
18048 * rtx-vector-builder.h: New file.
18049 * rtx-vector-builder.c: Likewise.
18050 * rtl.h (rtx_def::u2): Add a const_vector field.
18051 (CONST_VECTOR_NPATTERNS): New macro.
18052 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
18053 (CONST_VECTOR_DUPLICATE_P): Likewise.
18054 (CONST_VECTOR_STEPPED_P): Likewise.
18055 (CONST_VECTOR_ENCODED_ELT): Likewise.
18056 (const_vec_duplicate_p): Check for a duplicated vector encoding.
18057 (unwrap_const_vec_duplicate): Likewise.
18058 (const_vec_series_p): Check for a non-duplicated vector encoding.
18059 Say that the function only returns true for integer vectors.
18060 * emit-rtl.c: Include rtx-vector-builder.h.
18061 (gen_const_vec_duplicate_1): Delete.
18062 (gen_const_vector): Call gen_const_vec_duplicate instead of
18063 gen_const_vec_duplicate_1.
18064 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
18065 (gen_const_vec_duplicate): Use rtx_vector_builder.
18066 (gen_const_vec_series): Likewise.
18067 (gen_rtx_CONST_VECTOR): Likewise.
18068 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
18069 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18070 Build a new vector rather than modifying a CONST_VECTOR in-place.
18071 (handle_special_swappables): Update call accordingly.
18072 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
18073 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18074 Build a new vector rather than modifying a CONST_VECTOR in-place.
18075 (handle_special_swappables): Update call accordingly.
18077 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18079 * simplify-rtx.c (simplify_const_binary_operation): Use
18080 CONST_VECTOR_ELT instead of XVECEXP.
18082 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18084 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
18085 the selector elements to be different from the data elements
18086 if the selector is a VECTOR_CST.
18087 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
18088 ssizetype for the selector.
18090 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18092 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
18093 before testing each element individually.
18094 * tree-vect-generic.c (lower_vec_perm): Likewise.
18096 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18098 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
18099 * selftest-run-tests.c (selftest::run_tests): Call it.
18100 * vector-builder.h (vector_builder::operator ==): New function.
18101 (vector_builder::operator !=): Likewise.
18102 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
18103 (vec_perm_indices::all_from_input_p): New function.
18104 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18105 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
18106 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
18107 instead of reading the VECTOR_CST directly. Detect whether both
18108 vector inputs are the same before constructing the vec_perm_indices,
18109 and update the number of inputs argument accordingly. Use the
18110 utility functions added above. Only construct sel2 if we need to.
18112 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18114 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
18115 the broadcast of the low byte.
18116 (expand_mult_highpart): Use an explicit encoding for the permutes.
18117 * optabs-query.c (can_mult_highpart_p): Likewise.
18118 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
18119 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18120 (vectorizable_bswap): Likewise.
18121 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
18122 explicit encoding for the power-of-2 permutes.
18123 (vect_permute_store_chain): Likewise.
18124 (vect_grouped_load_supported): Likewise.
18125 (vect_permute_load_chain): Likewise.
18127 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18129 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
18130 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
18131 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
18132 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18133 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
18134 (vect_gen_perm_mask_any): Likewise.
18136 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18138 * int-vector-builder.h: New file.
18139 * vec-perm-indices.h: Include int-vector-builder.h.
18140 (vec_perm_indices): Redefine as an int_vector_builder.
18141 (auto_vec_perm_indices): Delete.
18142 (vec_perm_builder): Redefine as a stand-alone class.
18143 (vec_perm_indices::vec_perm_indices): New function.
18144 (vec_perm_indices::clamp): Likewise.
18145 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
18146 (vec_perm_indices::new_vector): New function.
18147 (vec_perm_indices::new_expanded_vector): Update for new
18148 vec_perm_indices class.
18149 (vec_perm_indices::rotate_inputs): New function.
18150 (vec_perm_indices::all_in_range_p): Operate directly on the
18151 encoded form, without computing elided elements.
18152 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
18153 encoding. Update for new vec_perm_indices class.
18154 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
18155 the given vec_perm_builder.
18156 (expand_vec_perm_var): Update vec_perm_builder constructor.
18157 (expand_mult_highpart): Use vec_perm_builder instead of
18158 auto_vec_perm_indices.
18159 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
18160 vec_perm_indices instead of auto_vec_perm_indices. Use a single
18161 or double series encoding as appropriate.
18162 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
18163 vec_perm_indices instead of auto_vec_perm_indices.
18164 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18165 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18166 (vect_permute_store_chain): Likewise.
18167 (vect_grouped_load_supported): Likewise.
18168 (vect_permute_load_chain): Likewise.
18169 (vect_shift_permute_load_chain): Likewise.
18170 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
18171 (vect_transform_slp_perm_load): Likewise.
18172 (vect_schedule_slp_instance): Likewise.
18173 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18174 (vectorizable_mask_load_store): Likewise.
18175 (vectorizable_bswap): Likewise.
18176 (vectorizable_store): Likewise.
18177 (vectorizable_load): Likewise.
18178 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
18179 vec_perm_indices instead of auto_vec_perm_indices. Use
18180 tree_to_vec_perm_builder to read the vector from a tree.
18181 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
18182 vec_perm_builder instead of a vec_perm_indices.
18183 (have_whole_vector_shift): Use vec_perm_builder and
18184 vec_perm_indices instead of auto_vec_perm_indices. Leave the
18185 truncation to calc_vec_perm_mask_for_shift.
18186 (vect_create_epilog_for_reduction): Likewise.
18187 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
18188 from auto_vec_perm_indices to vec_perm_indices.
18189 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
18190 instead of changing individual elements.
18191 (aarch64_vectorize_vec_perm_const): Use new_vector to install
18192 the vector in d.perm.
18193 * config/arm/arm.c (expand_vec_perm_d::perm): Change
18194 from auto_vec_perm_indices to vec_perm_indices.
18195 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
18196 instead of changing individual elements.
18197 (arm_vectorize_vec_perm_const): Use new_vector to install
18198 the vector in d.perm.
18199 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
18200 Update vec_perm_builder constructor.
18201 (rs6000_expand_interleave): Likewise.
18202 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
18203 (rs6000_expand_interleave): Likewise.
18205 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18207 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
18208 to qimode could truncate the indices.
18209 * optabs.c (expand_vec_perm_var): Likewise.
18211 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18213 * Makefile.in (OBJS): Add vec-perm-indices.o.
18214 * vec-perm-indices.h: New file.
18215 * vec-perm-indices.c: Likewise.
18216 * target.h (vec_perm_indices): Replace with a forward class
18218 (auto_vec_perm_indices): Move to vec-perm-indices.h.
18219 * optabs.h: Include vec-perm-indices.h.
18220 (expand_vec_perm): Delete.
18221 (selector_fits_mode_p, expand_vec_perm_var): Declare.
18222 (expand_vec_perm_const): Declare.
18223 * target.def (vec_perm_const_ok): Replace with...
18224 (vec_perm_const): ...this new hook.
18225 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
18226 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
18227 * doc/tm.texi: Regenerate.
18228 * optabs.def (vec_perm_const): Delete.
18229 * doc/md.texi (vec_perm_const): Likewise.
18230 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
18231 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
18232 expand_vec_perm for constant permutation vectors. Assert that
18233 the mode of variable permutation vectors is the integer equivalent
18234 of the mode that is being permuted.
18235 * optabs-query.h (selector_fits_mode_p): Declare.
18236 * optabs-query.c: Include vec-perm-indices.h.
18237 (selector_fits_mode_p): New function.
18238 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
18239 is defined, instead of checking whether the vec_perm_const_optab
18240 exists. Use targetm.vectorize.vec_perm_const instead of
18241 targetm.vectorize.vec_perm_const_ok. Check whether the indices
18242 fit in the vector mode before using a variable permute.
18243 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
18244 vec_perm_indices instead of an rtx.
18245 (expand_vec_perm): Replace with...
18246 (expand_vec_perm_const): ...this new function. Take the selector
18247 as a vec_perm_indices rather than an rtx. Also take the mode of
18248 the selector. Update call to shift_amt_for_vec_perm_mask.
18249 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
18250 Use vec_perm_indices::new_expanded_vector to expand the original
18251 selector into bytes. Check whether the indices fit in the vector
18252 mode before using a variable permute.
18253 (expand_vec_perm_var): Make global.
18254 (expand_mult_highpart): Use expand_vec_perm_const.
18255 * fold-const.c: Includes vec-perm-indices.h.
18256 * tree-ssa-forwprop.c: Likewise.
18257 * tree-vect-data-refs.c: Likewise.
18258 * tree-vect-generic.c: Likewise.
18259 * tree-vect-loop.c: Likewise.
18260 * tree-vect-slp.c: Likewise.
18261 * tree-vect-stmts.c: Likewise.
18262 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
18264 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
18265 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
18266 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
18267 (aarch64_vectorize_vec_perm_const): ...this new function.
18268 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18269 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18270 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
18271 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
18272 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18273 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18274 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
18276 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
18277 check for NEON modes.
18278 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
18279 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
18280 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
18281 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
18283 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
18284 the old VEC_PERM_CONST conditions.
18285 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
18286 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
18287 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
18288 (ia64_vectorize_vec_perm_const_ok): Merge into...
18289 (ia64_vectorize_vec_perm_const): ...this new function.
18290 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
18291 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
18292 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
18293 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
18294 * config/mips/mips.c (mips_expand_vec_perm_const)
18295 (mips_vectorize_vec_perm_const_ok): Merge into...
18296 (mips_vectorize_vec_perm_const): ...this new function.
18297 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
18298 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
18299 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
18300 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
18301 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
18302 (rs6000_expand_vec_perm_const): Delete.
18303 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
18305 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18306 (altivec_expand_vec_perm_const_le): Take each operand individually.
18307 Operate on constant selectors rather than rtxes.
18308 (altivec_expand_vec_perm_const): Likewise. Update call to
18309 altivec_expand_vec_perm_const_le.
18310 (rs6000_expand_vec_perm_const): Delete.
18311 (rs6000_vectorize_vec_perm_const_ok): Delete.
18312 (rs6000_vectorize_vec_perm_const): New function.
18313 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18314 an element count and rtx array.
18315 (rs6000_expand_extract_even): Update call accordingly.
18316 (rs6000_expand_interleave): Likewise.
18317 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
18318 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
18319 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
18320 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
18321 (rs6000_expand_vec_perm_const): Delete.
18322 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18323 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18324 (altivec_expand_vec_perm_const_le): Take each operand individually.
18325 Operate on constant selectors rather than rtxes.
18326 (altivec_expand_vec_perm_const): Likewise. Update call to
18327 altivec_expand_vec_perm_const_le.
18328 (rs6000_expand_vec_perm_const): Delete.
18329 (rs6000_vectorize_vec_perm_const_ok): Delete.
18330 (rs6000_vectorize_vec_perm_const): New function. Remove stray
18331 reference to the SPE evmerge intructions.
18332 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18333 an element count and rtx array.
18334 (rs6000_expand_extract_even): Update call accordingly.
18335 (rs6000_expand_interleave): Likewise.
18336 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
18337 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
18339 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18341 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18343 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
18344 vector mode and that that mode matches the mode of the data
18346 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
18347 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
18348 directly using expand_vec_perm_1 when forcing selectors into
18350 (expand_vec_perm_var): New function, split out from expand_vec_perm.
18352 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18354 * optabs-query.h (can_vec_perm_p): Delete.
18355 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
18356 * optabs-query.c (can_vec_perm_p): Split into...
18357 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
18358 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
18359 particular selector is valid.
18360 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18361 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18362 (vect_grouped_load_supported): Likewise.
18363 (vect_shift_permute_load_chain): Likewise.
18364 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
18365 (vect_transform_slp_perm_load): Likewise.
18366 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18367 (vectorizable_bswap): Likewise.
18368 (vect_gen_perm_mask_checked): Likewise.
18369 * fold-const.c (fold_ternary_loc): Likewise. Don't take
18370 implementations of variable permutation vectors into account
18371 when deciding which selector to use.
18372 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
18373 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
18374 with a false third argument.
18375 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
18376 to test whether the constant selector is valid and can_vec_perm_var_p
18377 to test whether a variable selector is valid.
18379 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18381 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
18382 * optabs-query.c (can_vec_perm_p): Likewise.
18383 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
18384 instead of vec_perm_indices.
18385 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
18386 (vect_gen_perm_mask_checked): Likewise,
18387 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
18388 (vect_gen_perm_mask_checked): Likewise,
18390 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18392 * optabs-query.h (qimode_for_vec_perm): Declare.
18393 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
18394 (qimode_for_vec_perm): ...this new function.
18395 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
18397 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18399 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
18400 does not have a conditional at the top.
18402 2018-01-02 Richard Biener <rguenther@suse.de>
18404 * ipa-inline.c (big_speedup_p): Fix expression.
18406 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
18409 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
18412 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
18416 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
18417 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
18418 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
18419 cond_taken_branch_cost 3->4.
18421 2018-01-01 Jakub Jelinek <jakub@redhat.com>
18423 PR tree-optimization/83581
18424 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
18425 TODO_cleanup_cfg if any changes have been made.
18427 PR middle-end/83608
18428 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
18429 convert_modes if target mode has the right side, but different mode
18432 PR middle-end/83609
18433 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
18434 last argument when extracting from CONCAT. If either from_real or
18435 from_imag is NULL, use expansion through memory. If result is not
18436 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
18437 the parts directly to inner mode, if even that fails, use expansion
18440 PR middle-end/83623
18441 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
18442 check for bswap in mode rather than HImode and use that in expand_unop
18445 Copyright (C) 2018 Free Software Foundation, Inc.
18447 Copying and distribution of this file, with or without modification,
18448 are permitted in any medium without royalty provided the copyright
18449 notice and this notice are preserved.