1 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
3 * config/arc/arc.c: Object attributes for core4 not reflected
5 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
8 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
10 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
12 2018-09-17 Martin Liska <mliska@suse.cz>
14 * doc/gcov.texi: Document new option --use-hotness-colors.
15 * gcov.c (struct source_info): Declare new field.
16 (source_info::source_info): Set default for maximum_count.
17 (print_usage): Add new -q option.
18 (process_args): Process it.
19 (accumulate_line_info): Save src->maximum_count.
20 (output_line_beginning): Make color line number if
21 flag_use_hotness_colors is set.
22 (output_line_details): Pass default argument value.
23 (output_lines): Pass src->maximum_count.
25 2018-09-17 Martin Liska <mliska@suse.cz>
27 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
28 Use processor_names table.
29 * config/i386/i386.c (ix86_default_align): Use
30 processor_cost_table for alignment values.
31 (ix86_option_override_internal): Use processor_names.
32 (ix86_function_specific_print): Likewise.
33 * config/i386/i386.h (struct processor_costs):
35 (struct ptt): Remove and replace with const char *.
36 * config/i386/x86-tune-costs.h (struct processor_costs):
37 Declare default alignments for all costs.
39 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
41 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
42 symbolics or VR_VARYING ranges for ABS_EXPR.
43 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
46 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
49 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
50 before and after a JUMP_TABLE_DATA.
52 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
55 * dojump.c (do_compare_and_jump): Canonicalize function pointers
56 when one operand is a function pointer. Use POINTER_TYPE_P and
57 FUNC_OR_METHOD_TYPE_P.
58 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
59 * fold-const.c (build_range_check): Likewise.
60 * match.pd (simple_comparison): Likewise.
62 2018-09-14 David Malcolm <dmalcolm@redhat.com>
65 * spellcheck.c (get_edit_distance_cutoff): New function.
66 (selftest::test_edit_distance_unit_test_oneway): Rename to...
67 (selftest::test_get_edit_distance_one_way): ...this.
68 (selftest::test_get_edit_distance_unit): Rename to...
69 (selftest::test_get_edit_distance_both_ways): ...this.
70 (selftest::test_edit_distances): Move tests to this new function,
71 and test some more pairs of strings. Update for above renaming.
72 (selftest::get_old_cutoff): New function.
73 (selftest::test_get_edit_distance_cutoff): New function.
74 (selftest::assert_suggested_for): New function.
75 (ASSERT_SUGGESTED_FOR): New macro.
76 (selftest::assert_not_suggested_for): New function.
77 (ASSERT_NOT_SUGGESTED_FOR): New macro.
78 (selftest::test_suggestions): New function.
79 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
80 tests to selftest::test_edit_distances and call it. Add calls to
81 selftest::test_get_edit_distance_cutoff and
82 selftest::test_suggestions.
83 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
84 (best_match::consider): Replace hard-coded cutoff calculation with
86 (best_match::get_cutoff): New declaration.
87 (best_match::get_best_meaningful_candidate): Likewise.
89 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
91 * builtins.c (fold_builtin_strlen): Remove TODO comment.
93 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
96 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
98 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
99 terminated string literal.
101 2018-09-14 Martin Sebor <msebor@redhat.com>
103 * builtins.c (unterminated_array): Handle ARRAY_REF.
104 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
105 * builtins.h (unterminated_array): Declare extern.
106 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
108 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
111 2018-09-14 Martin Sebor <msebor@redhat.com>
112 Jeff Law <law@redhat.com>
114 * builtins.c (unterminated_array): New.
115 (expand_builtin_strcpy): Adjust.
116 (expand_builtin_strcpy_args): Detect unterminated arrays.
117 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
119 * gimple-fold.h (get_maxval_strlen): Add argument.
120 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
122 * gimple-fold.c (get_range_strlen): Add argument.
123 (get_maxval_strlen): Adjust.
124 * gimple-fold.h (get_range_strlen): Add argument.
126 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
128 * config/i386/movdirintrin.h: Fix copyright year.
130 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
132 * reg-stack.c: Include regs.h.
133 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
134 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
135 FIRST_STACK_REG, not DFmode.
136 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
137 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
138 (change stack): Default register mode to the reg_raw_mode of
139 FIRST_STACK_REG, not DFmode.
140 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
141 (*swapxf): Rename from swapxf.
143 2018-09-14 Carl Love <cel@us.ibm.com>
145 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
146 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
148 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
151 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
154 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
157 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
159 2018-09-14 Jason Merrill <jason@redhat.com>
161 Fix --enable-gather-detailed-mem-stats.
162 * hash-table.c (hash_table_usage): Change from variable to function.
163 * hash-table.h: Adjust.
164 * Makefile.in: Add missing dependencies on hash-table.h.
166 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
168 PR tree-optimization/87259
170 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
171 execute_cse_reciprocals_1 has tried transforming.
173 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
175 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
176 VR_VARYING for PLUS/MINUS_EXPR.
178 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
180 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
183 2018-09-14 Richard Biener <rguenther@suse.de>
186 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
187 bits for the merged partition.
189 2018-09-13 Martin Sebor <msebor@redhat.com>
190 Bernd Edlinger <bernd.edlinger@hotmail.de>
192 * builtins.h (c_srlen): Add argument.
193 * builtins.c (warn_string_no_nul): New function.
194 (c_strlen): Add argument and use it. Update recursive calls.
195 Pass DECL argument to string_constant to get info on non
196 terminated strings. Update *NONSTR as needed.
197 (fold_builtin_strlen): Add argument to calls to c_strlen.
198 Warn for unterminated arrays.
199 (warn_string_no_null): Add prototype.
200 * expr.c (string_constant): Update arguments. Update recursive
201 calls appropriately. Detect missing NUL terminator and outermost
202 declaration its missing in.
203 Improve checks for arrays with nonzero lower bound or elements
204 that are not a single byte. Simplify offset computation.
205 Simplify checks for non-NUL terminated strings.
206 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
207 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
209 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
211 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
213 * fold-const.c (c_getstr): Fix function comment. Remove unused third
214 argument. Fix range checks.
215 * fold-const.h (c_getstr): Adjust protoype.
216 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
217 string is constant but contains no NUL byte.
219 * expr.c (string_constant): Adjust function comment.
220 Remove bogus check for zero termination.
222 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
224 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
225 (get_constant_size): Don't make STRING_CSTs larger than they are.
226 (check_string_literal): New check function for STRING_CSTs.
227 (output_constant): Use it.
229 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
232 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
234 2018-09-13 Richard Biener <rguenther@suse.de>
236 PR tree-optimization/87263
237 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
238 (struct unwind_state): Add max_rpo field.
239 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
240 Compute max_rpo, the max RPO number a block can be backwards reached
241 from. Re-write non-iterating mode to a RPO ordered worklist approach,
242 separating it from the iterating mode.
244 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
246 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
247 (rfs_decision): New scheduling decision.
249 2018-09-13 Richard Biener <rguenther@suse.de>
252 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
253 (vn_nary_op_insert_pieces_predicated): Do not write useless
254 valid_dominated_by_p entry outside of the allocated storage.
256 2018-09-13 Omar Sandoval <osandov@osandov.com>
257 Tom de Vries <tdevries@suse.de>
260 * dwarf2out.c (is_c): New function.
261 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
263 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
266 * config/aarch64/aarch64.md (*aarch64_bfxil):
268 * config/aarch64/constraints.md (Ulc): Define.
269 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
271 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
274 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
276 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
277 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
278 aarch64_layout_frame call.
279 (aarch64_expand_epilogue): Likewise.
280 (aarch64_initial_elimination_offset): Likewise.
281 (aarch64_get_separate_components): Likewise.
282 (aarch64_use_return_insn_p): Likewise.
283 (aarch64_layout_frame): Remove unneeded check.
285 2018-09-13 Jakub Jelinek <jakub@redhat.com>
287 * configure.ac: Only append
288 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
289 gcc_config_arguments if it was never reconfigured or last reconfigure
290 was with different arguments.
291 * configure: Regenerated.
293 2018-09-13 Jakub Jelinek <jakub@redhat.com>
294 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
297 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
298 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
300 2018-09-13 Jakub Jelinek <jakub@redhat.com>
302 PR tree-optimization/87287
303 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
304 X % C == 0 to X % (unsigned) C == 0 optimization to ...
305 * match.pd (X % C == 0): ... here. New optimization.
307 2018-09-12 Jakub Jelinek <jakub@redhat.com>
310 * expr.h (maybe_optimize_mod_cmp): Declare.
311 * expr.c (mod_inv): New function.
312 (maybe_optimize_mod_cmp): New function.
313 (do_store_flag): Use it.
314 * cfgexpand.c (expand_gimple_cond): Likewise.
316 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
317 Julian Brown <julian@codesourcery.com>
320 * gimplify.c (gimplify_scan_omp_clauses): Set
321 target_firstprivatize_array_bases in OpenACC parallel and kernels
322 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
323 OpenACC data regions.
325 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
327 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
328 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
330 2018-09-12 Richard Biener <rguenther@suse.de>
332 PR tree-optimization/87280
333 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
334 edge but unreachable target.
335 (do_rpo_vn): For conservatively handling a PHI only mark
336 the backedge executable but not the block reachable.
338 2018-09-12 Richard Biener <rguenther@suse.de>
340 PR tree-optimization/87266
341 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
344 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
346 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
348 ("trunc<BFP:mode><DFP_ALL:mode>2")
349 ("trunc<DFP_ALL:mode><BFP:mode>2")
350 ("extend<BFP:mode><DFP_ALL:mode>2")
351 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
352 according to the target operand type.
354 2018-09-12 Jakub Jelinek <jakub@redhat.com>
355 Andreas Krebbel <krebbel@linux.ibm.com>
357 PR tree-optimization/86844
358 * gimple-ssa-store-merging.c
359 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
360 there are any overlapping stores in between them, make sure they are
361 also coalesced or we give up completely.
363 2018-09-12 Jakub Jelinek <jakub@redhat.com>
366 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
367 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
369 2018-09-12 Tom de Vries <tdevries@suse.de>
371 * common.opt (gdescribe-dies): Add option.
372 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
373 attribute for artifical and nameless decls.
374 (dwarf2out_register_external_die): Add description attribute to
375 external reference die.
376 (add_desc_attribute): New functions.
377 (gen_subprogram_die): Add description attribute to
378 DW_TAG_call_site_parameter.
379 * tree-pretty-print.c (print_generic_expr_to_str): New function.
380 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
381 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
383 (@item -gdescribe-dies): Add.
385 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
387 * tree-vrp.c (vrp_shift_undefined_p): Remove.
388 (extract_range_from_binary_expr_1: Call
389 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
390 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
393 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
395 * gimple-ssa-warn-alloca.c
396 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
397 field for ALLOCA_BOUND_*_LARGE.
399 2018-09-11 Nathan Sidwell <nathan@acm.org>
401 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
403 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
405 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
406 for clobbers. Remove obsolete comment.
408 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
410 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
411 mpxchk, mpxld and mpxst types.
412 (define_attr length_immediate): Remove all processing of mpx types.
413 (define_attr prefix_0f): Ditto.
414 (define_attr memory): Ditto.
416 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
418 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
419 (log<mode>2): Change operand 1 predicate to general_operand.
420 Extend operand 1 to XFmode and generate logxf3 insn.
421 (log10<mode>2): Change operand 1 predicate to general_operand.
422 Extend operand 1 to XFmode and generate log10xf3 insn.
423 (log2<mode>2): Change operand 1 predicate to general_operand.
424 Extend operand 1 to XFmode and generate log2xf3 insn.
425 (fyl2xp1_extend<mode>xf3_i387): Remove.
426 (log1p<mode>2): Change operand 1 predicate to general_operand.
427 Extend operand 1 to XFmode and generate log1pxf3 insn.
428 (fxtract_extend<mode>xf3_i387): Remove.
429 (logb<mode>2): Change operand 1 predicate to general_operand.
430 Extend operand 1 to XFmode and generate logbxf3 insn.
431 (ilogb<mode>2): Change operand 1 predicate to general_operand.
432 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
433 (significand<mode>2): Change operand 1 predicate to general_operand.
434 Extend operand 1 to XFmode and generate significandxf3 insn.
436 2018-09-11 Nathan Sidwell <nathan@acm.org>
438 * gcc.c (perror_with_name, pfatal_with_name): Delete.
439 (load_specs): Use fatal_error.
440 (DELETE_IF_ORDINARY, process_command): Use error.
441 (execute, run_attempt): Use fatal_error.
443 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
445 * diagnostic-core.h (sorry_at): New prototype.
446 * diagnostic.c (sorry_at): New function.
448 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
450 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
451 by zero as VR_UNDEFINED.
453 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
455 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
456 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
457 (<sincos>mode2): New expander.
458 (sincos_extend<mode>xf3_i387): Remove insn pattern.
459 (sincos -> sin, cos splitters): Remove splitter patterns.
460 (sincos<mode>3): Change operand 2 predicate to general_operand.
461 Extend operand 2 to XFmode and generate sincosxf3 insn.
462 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
463 Change operand 3 predicate to const1_operand.
464 (fptan_extend<mode>xf4_i387): Remove insn pattern.
465 (tanxf2): Update operands in the call to fptanxf4_i387.
466 (tan<mode>2): Change operand 1 predicate to general_operand.
467 Extend operand 1 to XFmode and generate tanxf3 insn.
468 (atan2xf3): Rename from *fpatanxf3_i387.
469 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
470 (atan2xf3): Remove expander.
471 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
472 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
473 (atan<mode>2): Change operand 1 predicate to general_operand.
474 Extend operand 1 to XFmode and generate atanxf3 insn.
476 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
478 * config/i386/i386.md (x87/SSE constant load splitter): Use
479 memory_operand instead of nonimmediate_operand for input operand
482 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
484 * config/i386/i386.md (float partial SSE register stall splitter): Move
485 splitter near its instruction pattern.
486 (float_extend partial SSE register stall splitter): Ditto.
487 (float_truncate partial SSE register stall splitter): Ditto.
489 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
492 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
493 to speculation_safe_value_not_needed.
496 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
497 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
498 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
499 leaf_function_p, instead use has_hard_reg_initial_val.
501 2018-09-09 Nathan Sidwell <nathan@acm.org>
503 * gcc.h (pfatal_with_name): Don't declare here.
504 * gcc.c (pfatal_with_name): Make static.
506 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
508 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
511 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
513 PR rtl-optimization/85458
514 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
515 priority hook to reduce the priority of EXPR.
517 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
519 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
520 DImode for x87 on 32bit targets. Conditionally disable x87 modes
521 with X87_ENABLE_FLOAT. Remove preparation code.
522 (*float<SWI48:mode><MODEF:mode>2): Rename from
523 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
524 math using "enabled" attribute.
525 (*floatdi<MODEF:mode>2_i387): Rename from
526 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
527 enable for 32bit targets only.
528 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
530 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
531 as operand 1 predicate. Rewrite as define_insn_and_split.
532 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
534 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
536 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
537 to fallthru to FLOAT case.
539 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
542 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
543 around folding of vec_sl to handle out of range shift values.
545 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
547 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
548 Update callers to gen_fix_trunc<mode>_i387_fisttp
549 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
550 nonimmediate_operand.
551 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
552 and corresponding splitters.
553 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
554 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
555 (fix_truncdi_i387_with_temp): Remove insn pattern
556 and corresponding splitters.
557 (fix_trunc<mode>_i387): Change operand 0 predicate to
558 nonimmediate_operand.
559 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
560 and corresponding splitters.
561 (*fistdi2_1): Remove.
563 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
564 (lrintxfdi2): Remove expander. Reimplement as define_insn.
565 (*fist<mode>2_1): Remove.
566 (fist<mode>2): Ditto.
567 (fist<mode>2_with_temp): Remove insn pattern and corresponding
569 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
570 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
571 (fistdi2_<rounding>): Change operand 0 predicate to
572 nonimmediate_operand.
573 (fistdi2_<rounding>_with_temp): Remove insn pattern
574 and corresponding splitters.
575 (fist<mode>2_<rounding>): Change operand 0 predicate to
576 nonimmediate_operand.
577 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
578 and corresponding splitters.
580 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
582 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
584 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
587 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
589 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
590 early gimple folding of vec_splat().
591 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
592 * gimple-fold.h: Add an extern define for tree_vec_extract().
594 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
596 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
597 wrappers around TREE_TYPE comparisons.
599 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
602 * config/s390/predicates.md: Add nonsym_memory_operand.
603 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
604 contains a SYMBOL_REF, load it into an intermediate pseudo.
605 (s390_emit_compare_and_swap): Legitimize operand.
606 * config/s390/s390.md: Use the new nonsym_memory_operand
607 with UNSPECV_CAS patterns.
609 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
612 * config/s390/s390-passes.def: New file.
613 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
615 (make_pass_s390_early_mach): Add declaration.
616 * config/s390/s390.c (make_pass_s390_early_mach):
617 (s390_option_override): Remove dynamic registration.
618 * config/s390/t-s390: Add s390-passes.def.
620 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
622 * config/s390/s390.c (s390_decompose_constant_pool_ref):
623 Remove UNSPEC_LTREL_BASE check.
624 (annotate_constant_pool_refs): Likewise.
625 (find_constant_pool_ref): Likewise.
626 (find_ltrel_base): Removed.
627 (replace_ltrel_base): Removed.
628 (s390_mainpool_finish): Remove replace_ltrel_base call.
629 (s390_chunkify_start): Remove pending LTREL_BASE logic.
630 (s390_chunkify_finish): Remove replace_ltrel_base call.
631 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
633 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
636 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
637 to speculation_safe_value_not_needed.
639 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
640 Bernd Schmidt <bernds_cb1@t-online.de>
642 * config/nvptx/nvptx-opts.h: New file.
643 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
644 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
646 (TARGET_SM35): New macro.
647 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
649 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
652 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
654 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
656 * config/i386/i386.md (truncdfsf2): Remove expander.
657 (truncdfsf2_with_temp): Ditto.
658 (truncxf<mode>2): Ditto.
659 (*truncdfsf_fast_mixed): Remove insn pattern.
660 (*truncdfsf_fast_i387): Ditto.
661 (*truncdfsf_mixed): Ditto.
662 (*truncdfsf_i387): Ditto.
663 (*truncdfsf2_i387_1): Ditto.
664 (*truncxfsf2_mixed): Ditto.
665 (*truncxfdf2_mixed): Ditto.
666 (*truncxf<mode>2_i387_noop): Ditto. Update callers
667 to call gen_truncxf<mode>2 instead.
668 (*truncxf<mode>2_i387): Remove.
669 (reg->reg splitters): Remove splitter pattern.
670 (reg->mem splitters): Ditto.
672 (truncdfsf2): New insn pattern.
673 (truncxf<mode>2): Ditto.
675 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
677 * tree-ssa-math-opts.c (is_mult_by): New function.
678 (is_square_of): Use the above.
679 (optimize_recip_sqrt): New function.
680 (pass_cse_reciprocals::execute): Use the above.
682 2018-09-05 Richard Biener <rguenther@suse.de>
685 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
686 to zero-init the emplaced vec.
688 2018-09-05 Martin Liska <mliska@suse.cz>
690 PR tree-optimization/87205
691 * tree-switch-conversion.c (pass_lower_switch::execute):
692 Group cases for switch statements.
694 2018-09-05 Richard Biener <rguenther@suse.de>
696 PR tree-optimization/87217
697 * tree-ssa-sccvn.c (vuse_valueize): New.
698 (vn_reference_lookup_pieces): Use it.
699 (vn_reference_lookup): Likewise.
701 2018-09-05 Nathan Sidwell <nathan@acm.org>
704 * stor-layout.c (place_field): Scan forwards to check last
705 bitfield when ms_bitfield_placement is in effect.
707 2018-09-05 Richard Biener <rguenther@suse.de>
710 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
713 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
714 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
716 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
717 * config.gcc (extra_objs): Build it.
718 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
720 * config/aarch64/aarch64-passes.def
721 (pass_tag_collision_avoidance): New pass.
722 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
723 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
724 (aarch64_classify_address): Remove static qualifier.
725 (aarch64_address_info, aarch64_address_type): Move to...
726 * config/aarch64/aarch64-protos.h: ... here.
727 (make_pass_tag_collision_avoidance): New function.
728 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
731 2018-09-05 Martin Liska <mliska@suse.cz>
733 * doc/gcov.texi: Update documentation of humar
735 * gcov.c (format_count): Print one decimal place, it provides
736 more fine number of situations like '1G' vs. '1.4G'.
738 2018-09-05 Martin Liska <mliska@suse.cz>
741 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
742 * optc-gen.awk: Allow 'Var' for Deprecated options in order
743 to generate a MASK value.
745 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
748 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
749 if frame pointer isn't used.
750 (compute_frame_pointer_to_fb_displacement): Likewise.
752 2018-09-04 Jakub Jelinek <jakub@redhat.com>
755 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
756 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
757 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
758 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
759 and OPTION_MASK_ISA_XSAVEC_UNSET.
761 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
763 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
764 XOR operations in NAND case.
766 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
768 * wide-int-range.cc (wide_int_range_convert): New.
769 * wide-int-range.h (wide_int_range_convert): New.
770 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
771 code into wide_int_range_convert.
772 (extract_range_into_wide_ints): Do not munge anti range constants
773 into the entire domain. Just return the range back.
775 2018-09-04 Martin Liska <mliska@suse.cz>
777 * genmatch.c (output_line_directive): Add new argument
779 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
781 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
783 * doc/invoke.texi (Option Summary): Add whitespace.
785 * doc/invoke.texi (Option Summary): Add -Waligned-new.
787 2018-09-04 Richard Biener <rguenther@suse.de>
789 PR tree-optimization/87211
790 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
791 backedge value we're supposed to treat as VARYING also number
792 the PHI to VARYING in case it got a different value-number already.
794 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
796 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
797 (extract_range_from_binary_expr_1): Do not call
798 vrp_can_optimize_bit_op.
799 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
801 (wide_int_range_get_mask_and_bounds): New.
802 (wide_int_range_optimize_bit_op): New.
803 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
804 (wide_int_range_bit_and): Same.
805 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
806 (wide_int_range_optimize_bit_op): New.
807 (wide_int_range_get_mask_and_bounds): New.
809 2018-09-04 Richard Biener <rguenther@suse.de>
811 PR tree-optimization/87176
812 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
813 variable. When value-numbering a virtual PHI node make sure
814 to not value-number to the backedge value.
816 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
818 * doc/extend.texi (Long Long, Hex Floats): Document support for
819 long long and hex floats in more recent versions of ISO C++.
821 2018-09-03 Richard Biener <rguenther@suse.de>
823 PR tree-optimization/87177
824 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
827 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
829 * bb-reorder.c (edge_order): Convert to C-qsort-style
830 tri-state comparator.
831 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
833 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
835 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
836 tri-state comparator.
837 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
839 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
841 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
842 (mergesort): ... here as maximum count for using netsort.
843 (gcc_qsort): Set nlim to 3 if stable sort is requested.
844 (gcc_stablesort): New.
845 * system.h (gcc_stablesort): Declare.
847 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
849 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
850 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
851 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
853 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
855 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
856 lxsdx and stxsdx alternatives.
857 (*mov<mode>_hardfloat64): Ditto.
858 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
860 2018-09-03 Richard Biener <rguenther@suse.de>
862 PR tree-optimization/87200
863 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
866 2018-09-03 Martin Liska <mliska@suse.cz>
868 PR tree-optimization/87201
869 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
870 Fix parenthesis in an expression.
872 2018-09-03 Richard Biener <rguenther@suse.de>
874 PR tree-optimization/87197
875 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
876 visited. CSE the VN_INFO hashtable lookup.
878 PR tree-optimization/87169
879 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
880 iterating make sure there's no extra backedges from irreducible
881 regions feeding the header. Mark the destination block
884 2018-09-03 Martin Liska <mliska@suse.cz>
887 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
888 * common/common-targhooks.c (default_get_valid_option_values):
890 * common/common-targhooks.h (default_get_valid_option_values):
892 * common/config/i386/i386-common.c: Move processor_target_table
894 (ix86_get_valid_option_values): New function.
895 (TARGET_GET_VALID_OPTION_VALUES): New macro.
896 * config/i386/i386.c (struct ptt): Move to i386-common.c.
897 (PTA_*): Move all defined masks into i386-common.c.
898 (ix86_function_specific_restore): Use new processor_cost_table.
899 * config/i386/i386.h (struct ptt): Moved from i386.c.
900 (struct pta): Likewise.
901 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
902 * doc/tm.texi.in: Likewise.
903 * opt-suggestions.c (option_proposer::suggest_option):
904 Pass prefix to build_option_suggestions.
905 (option_proposer::get_completions): Likewise.
906 (option_proposer::build_option_suggestions): Use the new target
908 * opts.c (struct option_help_tuple): New struct.
909 (print_filtered_help): Use the new target hook.
911 2018-09-03 Martin Liska <mliska@suse.cz>
914 * predict.c (set_even_probabilities): Add likely_edges
915 argument and handle cases where we have precisely one
917 (combine_predictions_for_bb): Catch also likely_edges.
918 (tree_predict_by_opcode): Handle gswitch statements.
919 * tree-cfg.h (find_case_label_for_value): New declaration.
920 (find_taken_edge_switch_expr): Likewise.
921 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
922 Find pivot in decision tree based on probabily, not by number of
925 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
927 * doc/standards.texi (Standards): Update Objective-C reference.
929 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
931 * doc/install.texi (Prerequisites): Update link for MPC.
933 2018-09-01 Michael Matz <matz@suse.de>
935 PR tree-optimization/87074
936 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
937 PHIs for outer-loop uses.
939 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
941 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
942 * doc/invoke.texi (C Dialect Options): Ditto.
944 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
946 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
948 2018-08-31 Richard Biener <rguenther@suse.de>
950 PR tree-optimization/87168
951 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
952 (rpo_elim::eliminate_avail): When OP was not visited it must
955 2018-08-31 David Malcolm <dmalcolm@redhat.com>
957 * tree-vrp.c (copy_value_range): Convert param "from" from
958 "value_range *" to "const value_range *".
959 (range_is_null): Likewise for param "vr".
960 (range_int_cst_p): Likewise.
961 (range_int_cst_singleton_p): Likewise.
962 (symbolic_range_p): Likewise.
963 (value_ranges_intersect_p): Likewise for both params.
964 (value_range_nonnegative_p): Likewise for param "vr".
965 (value_range_constant_singleton): Likewise.
966 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
967 (extract_range_into_wide_ints): Likewise for param "vr".
968 (extract_range_from_multiplicative_op): Likewise for params "vr0"
970 (vrp_can_optimize_bit_op): Likewise.
971 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
973 (extract_range_from_unary_expr): Likewise.
974 (debug_value_range): Likewise for param "vr".
975 (value_range::dump): Add "const" qualifier.
976 (vrp_prop::check_array_ref): Convert local "vr" from
977 "value_range *" to "const value_range *".
978 (vrp_prop::check_mem_ref): Likewise.
979 (vrp_prop::visit_stmt): Likewise for local "old_vr".
980 (vrp_intersect_ranges_1): Likewise for param "vr_1".
981 (vrp_intersect_ranges): Likewise.
982 (simplify_stmt_for_jump_threading): Likewise for local "vr".
983 (vrp_prop::vrp_finalize): Likewise.
984 * tree-vrp.h (value_range::dump): Add "const" qualifier.
985 (vrp_intersect_ranges): Add "const" qualifier to params as above.
986 (extract_range_from_unary_expr): Likewise.
987 (value_range_constant_singleton): Likewise.
988 (symbolic_range_p): Likewise.
989 (copy_value_range): Likewise.
990 (extract_range_from_binary_expr_1): Likewise.
991 (range_int_cst_p): Likewise.
992 (vrp_set_zero_nonzero_bits): Likewise.
993 (range_int_cst_singleton_p): Likewise.
995 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
997 * config/aarch64/arm_neon.h (vabsd_s64): New.
998 (vnegd_s64): Likewise.
1000 2018-08-31 Martin Jambor <mjambor@suse.cz>
1002 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1004 2018-08-31 Martin Liska <mliska@suse.cz>
1006 * ipa-icf.c (sem_item::add_type): Use
1007 sem_item::m_type_hash_cache.
1008 * ipa-icf.h: Move the cache from sem_item_optimizer
1011 2018-08-31 Nathan Sidwell <nathan@acm.org>
1013 * doc/extend.texi (Backwards Compatibility): Remove implicit
1014 extern C leeway of () being (...).
1016 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1018 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1020 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
1024 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1026 2018-08-31 Jakub Jelinek <jakub@redhat.com>
1029 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1030 gen_int_mode. Formatting fixes.
1032 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
1034 * target.def (custom_function_descriptors): Improve documentation.
1035 * doc/tm.texi.in (Trampolines): Expand discussion of function
1036 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1037 beginning of the section.
1038 * doc/tm.texi: Regenerated.
1040 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
1042 * cfg.h (class auto_edge_flag): Spell out the template-id of the
1043 base class in the initializer list. This is a workaround for
1044 building with older GCC.
1045 (class auto_bb_flag): Likewise.
1047 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1049 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1050 (altivec_vcmpequ<VI_char>_p): Remove star.
1051 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1053 (expand_strncmp_vec_sequence): New function.
1054 (emit_final_str_compare_vec): New function.
1055 (expand_strn_compare): Add support for vector strncmp.
1056 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1057 length specification to bytes.
1058 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1059 (vcmpnezb_p): New pattern.
1060 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1061 for option -mstring-compare-inline-limit.
1063 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
1065 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1066 (PTA_SKYLAKE): Add PTA_AES.
1067 (PTA_GOLDMONT): Likewise.
1069 2018-08-29 Jan Hubicka <jh@suse.cz>
1072 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1073 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1075 2018-08-29 Jan Hubicka <jh@suse.cz>
1077 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1079 (hash_tree): Do not visit TYPE_STUB_DECL.
1080 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1081 stream TYPE_STUB_DECL.
1082 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1083 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1084 after free_lang_data.
1085 (type_in_anonymous_namespace_p): Likewise.
1087 2018-08-29 Jan Hubicka <jh@suse.cz>
1089 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1090 comment that it has to be even number.
1091 (class sreal): Change m_sig type to int32_t.
1092 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1093 int64_t for temporary calculations.
1094 (sreal_verify_basics): Drop one bit from minimum and maximum.
1096 2018-08-30 Richard Biener <rguenther@suse.de>
1098 PR tree-optimization/87147
1099 * tree-ssa-sccvn.c (SSA_VISITED): New function.
1100 (visit_phi): When the degenerate result is from the backedge and
1101 we didn't visit its definition yet drop to VARYING.
1102 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1104 2018-08-29 Jan Hubicka <jh@suse.cz>
1106 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1108 (hash_tree): Likewise.
1110 2018-08-29 Jan Hubicka <jh@suse.cz>
1112 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1113 and TYPE_NEXT_REF_TO.
1115 2018-08-29 Jan Hubicka <jh@suse.cz>
1117 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1118 comment that it has to be even number.
1119 (class sreal): Change m_sig type to int32_t.
1120 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1121 int64_t for temporary calculations.
1122 (sreal_verify_basics): Drop one bit from minimum and maximum.
1124 2018-08-30 Tamar Christina <tamar.christina@arm.com>
1126 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1128 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
1131 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1132 if to_add is negative.
1134 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
1137 * builtins.c (c_strlen): Improve range checks.
1139 2018-08-29 Martin Sebor <msebor@redhat.com>
1140 Jeff Law <law@redhat.com>
1142 PR tree-optimization/86714
1143 PR tree-optimization/86711
1144 * builtins.c (c_strlen): Add arguments to call to string_constant.
1145 * expr.c (string_constant): Add argument. Detect missing nul
1146 terminator and outermost declaration it's missing in.
1147 * expr.h (string_constant): Add argument.
1148 * fold-const.c (read_from_constant_string): Add arguments to call to
1150 (c_getstr): Likewise.
1151 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1153 * tree-ssa-strlen.c (get_stridx): Likewise.
1155 2018-08-29 Jan Hubicka <jh@suse.cz>
1157 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1158 Do not stream DECL_VINDEX.
1159 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1160 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1161 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1163 2018-08-29 Richard Biener <rguenther@suse.de>
1165 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1166 virtual operands that are not default defs to honor region
1168 (rpo_vn_valueize): Remove ineffective code here.
1170 2018-08-29 Richard Biener <rguenther@suse.de>
1172 PR tree-optimization/87132
1173 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1174 when skipping defs reachable over backedges.
1176 2018-08-29 Richard Biener <rguenther@suse.de>
1178 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1179 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1180 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1181 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1182 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1183 (vn_reference_lookup_3): Remove use of const_parms.
1184 (free_rpo_vn): Do not free const_parms.
1185 (do_rpo_vn): Do not call init_const_parms.
1186 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1187 SSA_NAME_POINTS_TO_READONLY_MEMORY.
1188 (call_may_clobber_ref_p_1): Likewise.
1190 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
1193 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1195 (-ftree-scev-cprop): Document.
1197 2018-08-29 Jan Hubicka <jh@suse.cz>
1199 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1201 (sreal constructor): Update.
1202 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1203 sreal:operator/): Update.
1205 2018-08-29 Martin Liska <mliska@suse.cz>
1207 * tree-switch-conversion.c (switch_conversion::expand):
1208 Strenghten assumption about gswitch statements.
1210 2018-08-29 Richard Biener <rguenther@suse.de>
1212 PR tree-optimization/87117
1213 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1214 re-value-number released SSA VDEFs.
1216 2018-08-29 Richard Biener <rguenther@suse.de>
1218 PR tree-optimization/87126
1219 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1221 2018-08-28 Jim Wilson <jimw@sifive.com>
1223 * config/riscv/pic.md: Rewrite.
1224 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1226 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1227 (SOFTF, default_load, softload, softstore): New.
1229 2018-08-28 Jeff Law <law@redhat.com>
1231 * fold-const.c (fold_binary_loc): Remove recently added assert.
1233 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1235 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1236 to OP parmeter of generated function.
1238 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1240 PR tree-optimization/87009
1241 * match.pd: Add boolean optimizations.
1243 2018-08-28 Martin Sebor <msebor@redhat.com>
1246 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1247 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1248 (pass_walloca::gate): Use it.
1249 (alloca_call_type): Same.
1250 (pass_walloca::execute): Same.
1251 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1253 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1255 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1256 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1259 2018-08-28 Richard Biener <rguenther@suse.de>
1261 PR tree-optimization/87124
1262 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1263 constants before looking up avail.
1265 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1268 * calls.c (maybe_warn_nonstring_arg): Punt early if
1269 warn_stringop_overflow is zero. Don't call get_range_strlen
1270 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1271 Swap comparison operands to have constants on rhs. Only use
1272 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1273 increment lenrng[0].
1275 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1277 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1278 use of tree_to_shwi. Remove duplicated test for the size being
1279 a whole number of bytes.
1281 2018-08-28 Richard Biener <rguenther@suse.de>
1283 PR tree-optimization/87117
1284 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1285 Handle removed stmt without LHS (GIMPLE_NOP).
1287 2018-08-28 Richard Biener <rguenther@suse.de>
1289 PR tree-optimization/87117
1290 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1291 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1293 2018-08-28 Richard Biener <rguenther@suse.de>
1295 PR tree-optimization/87117
1296 * tree-ssa-pre.c (compute_avail): Do not make expressions
1297 with predicated values available.
1298 (get_expr_value_id): Assert we do not run into predicated value
1301 2018-08-28 Richard Biener <rguenther@suse.de>
1303 PR tree-optimization/87117
1304 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1305 get virtual operands.
1306 (get_expr_operands): Handle STRING_CST like other decls.
1308 2018-08-28 Martin Liska <mliska@suse.cz>
1310 * tree.h: Update documentation of fndecl_built_in_p
1314 2018-08-27 Jeff Law <law@redhat.com>
1315 PR tree-optimization/87110
1316 * tree-ssa-dse.c (compute_trims): Handle non-constant
1319 2018-08-27 Martin Sebor <msebor@redhat.com>
1321 PR tree-optimization/86914
1322 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1324 2018-08-27 Martin Sebor <msebor@redhat.com>
1326 PR tree-optimization/87112
1327 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1328 the type of the bound argument.
1330 2018-08-27 Jeff Law <law@redhat.com>
1332 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1333 type does not have a TYPE_SIZE_UNIT.
1335 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1337 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1338 with include of backend.h.
1340 2018-08-27 Richard Biener <rguenther@suse.de>
1342 PR tree-optimization/86927
1343 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1344 use const cond reduction code.
1346 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1348 PR tree-optimization/85758
1349 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1351 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1354 * diagnostic-show-locus.c (class layout_range): Update for
1355 conversion of show_caret_p to a tri-state.
1356 (layout_range::layout_range): Likewise.
1357 (make_range): Likewise.
1358 (layout::maybe_add_location_range): Likewise.
1359 (layout::should_print_annotation_line_p): Don't show annotation
1360 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1361 (layout::get_state_at_point): Update for conversion of
1362 show_caret_p to a tri-state. Bail out early for
1363 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1364 underlining or source colorization.
1365 (gcc_rich_location::add_location_if_nearby): Update for conversion
1366 of show_caret_p to a tri-state.
1367 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1368 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1370 (selftest::test_one_liner_labels): Likewise.
1371 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1372 conversion of show_caret_p to a tri-state.
1373 * pretty-print.c (text_info::set_location): Likewise.
1374 * pretty-print.h (text_info::set_location): Likewise.
1375 * substring-locations.c (format_warning_n_va): Likewise.
1376 * tree-diagnostic.c (default_tree_printer): Likewise.
1377 * tree-pretty-print.c (newline_and_indent): Likewise.
1379 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1382 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1383 line above for line-insertion fix-it hints.
1384 (selftest::test_fixit_insert_containing_newline): Update the
1385 expected results, and add a test with line-numbering enabled.
1387 2018-08-27 Martin Liska <mliska@suse.cz>
1390 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1391 params with DECL_HAS_VALUE_EXPR_P.
1393 2018-08-27 Martin Liska <mliska@suse.cz>
1395 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1396 selected expansion strategy.
1398 2018-08-27 Martin Liska <mliska@suse.cz>
1400 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1401 * builtins.c (is_builtin_fn): Likewise.
1402 * attribs.c (diag_attr_exclusions): Use new function
1403 fndecl_built_in_p and remove check for FUNCTION_DECL if
1405 (builtin_mathfn_code): Likewise.
1406 (fold_builtin_expect): Likewise.
1407 (fold_call_expr): Likewise.
1408 (fold_builtin_call_array): Likewise.
1409 (fold_call_stmt): Likewise.
1410 (set_builtin_user_assembler_name): Likewise.
1411 (is_simple_builtin): Likewise.
1412 * calls.c (gimple_alloca_call_p): Likewise.
1413 (maybe_warn_nonstring_arg): Likewise.
1414 * cfgexpand.c (expand_call_stmt): Likewise.
1415 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1416 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1417 (cgraph_node::verify_node): Likewise.
1418 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1419 (cgraph_node::create_clone): Likewise.
1420 * config/arm/arm.c (arm_insert_attributes): Likewise.
1421 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1422 * dse.c (scan_insn): Likewise.
1423 * expr.c (expand_expr_real_1): Likewise.
1424 * fold-const.c (operand_equal_p): Likewise.
1425 (fold_binary_loc): Likewise.
1426 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1427 * gimple-low.c (lower_stmt): Likewise.
1428 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1429 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1430 * gimple.c (gimple_build_call_from_tree): Likewise.
1431 (gimple_call_builtin_p): Likewise.
1432 (gimple_call_combined_fn): Likewise.
1433 * gimplify.c (gimplify_call_expr): Likewise.
1434 (gimple_boolify): Likewise.
1435 (gimplify_modify_expr): Likewise.
1436 (gimplify_addr_expr): Likewise.
1437 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1438 * ipa-cp.c (determine_versionability): Likewise.
1439 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1440 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1441 * ipa-split.c (visit_bb): Likewise.
1442 (split_function): Likewise.
1443 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1444 * lto-cgraph.c (input_node): Likewise.
1445 * lto-streamer-out.c (write_symbol): Likewise.
1446 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1447 (lower_omp_1): Likewise.
1448 * predict.c (strip_predict_hints): Likewise.
1449 * print-tree.c (print_node): Likewise.
1450 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1451 * trans-mem.c (is_tm_irrevocable): Likewise.
1452 (is_tm_load): Likewise.
1453 (is_tm_simple_load): Likewise.
1454 (is_tm_store): Likewise.
1455 (is_tm_simple_store): Likewise.
1456 (is_tm_abort): Likewise.
1457 (tm_region_init_1): Likewise.
1458 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1459 * tree-cfg.c (verify_gimple_call): Likewise.
1460 (move_stmt_r): Likewise.
1461 (stmt_can_terminate_bb_p): Likewise.
1462 * tree-eh.c (lower_eh_constructs_2): Likewise.
1463 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1464 * tree-inline.c (remap_gimple_stmt): Likewise.
1465 (copy_bb): Likewise.
1466 (estimate_num_insns): Likewise.
1467 (fold_marked_statements): Likewise.
1468 * tree-sra.c (scan_function): Likewise.
1469 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1470 (optimize_stack_restore): Likewise.
1471 (pass_fold_builtins::execute): Likewise.
1472 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1473 (mark_all_reaching_defs_necessary_1): Likewise.
1474 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1475 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1476 (pass_forwprop::execute): Likewise.
1477 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1478 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1479 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1480 * tree-ssa-strlen.c (get_string_length): Likewise.
1481 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1482 (find_func_aliases_for_call): Likewise.
1483 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1484 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1485 * tree-tailcall.c (find_tail_calls): Likewise.
1486 * tree.c (need_assembler_name_p): Likewise.
1487 (free_lang_data_in_decl): Likewise.
1488 (get_call_combined_fn): Likewise.
1489 * ubsan.c (is_ubsan_builtin_p): Likewise.
1490 * varasm.c (incorporeal_function_p): Likewise.
1491 * tree.h (DECL_BUILT_IN): Remove and replace with
1493 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1494 (fndecl_built_in_p): New.
1496 2018-08-27 Martin Liska <mliska@suse.cz>
1498 PR tree-optimization/86847
1499 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1500 Dump also subtree probability.
1501 (switch_decision_tree::do_jump_if_equal): New function.
1502 (switch_decision_tree::emit_case_nodes): Handle special
1503 situations in balanced tree that can be emitted much simpler.
1504 Fix calculation of probabilities that happen in tree expansion.
1505 * tree-switch-conversion.h (struct cluster): Add
1507 (struct simple_cluster): Likewise.
1508 (struct case_tree_node): Add new function has_child.
1509 (do_jump_if_equal): New.
1511 2018-08-27 Martin Liska <mliska@suse.cz>
1513 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1514 Add new argument to bit_test_cluster constructor.
1515 (bit_test_cluster::emit): Set bits really number of values
1517 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1518 probability argument.
1519 * tree-switch-conversion.h (struct bit_test_cluster):
1520 Add m_handles_entire_switch.
1522 2018-08-27 Martin Liska <mliska@suse.cz>
1524 PR tree-optimization/86702
1525 * tree-switch-conversion.c (jump_table_cluster::emit):
1526 Make probabilities even for values in jump table
1527 according to number of cases handled.
1528 (switch_decision_tree::compute_cases_per_edge): Pass
1529 argument to reset_out_edges_aux function.
1530 (switch_decision_tree::analyze_switch_statement): Likewise.
1531 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1534 2018-08-27 Martin Liska <mliska@suse.cz>
1536 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1537 cfun argument explicitly.
1538 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1539 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1540 function gimple_switch_default_bb.
1541 (convert_switch_statements):
1543 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1544 * stmt.c (label_to_block_fn): Use label_to_block and pass
1545 cfun argument explicitly and use gimple_switch_label_bb.
1546 (expand_case): Likewise.
1547 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1548 cfun argument explicitly. Likewise.
1549 (make_edges_bb): Likewise.
1550 (make_cond_expr_edges): Likewise.
1551 (get_cases_for_edge): Likewise.
1552 (make_gimple_switch_edges): Likewise.
1553 (label_to_block_fn): Likewise.
1554 (label_to_block): Likewise.
1555 (make_goto_expr_edges): Likewise.
1556 (make_gimple_asm_edges): Likewise.
1557 (main_block_label): Likewise.
1558 (group_case_labels_stmt): Likewise.
1559 (find_taken_edge_computed_goto): Likewise.
1560 (find_taken_edge_switch_expr): Likewise.
1561 (gimple_verify_flow_info): Likewise.
1562 (gimple_redirect_edge_and_branch): Likewise.
1563 (gimple_switch_label_bb): New function.
1564 (gimple_switch_default_bb): Likewise.
1565 (gimple_switch_edge): Likewise.
1566 (gimple_switch_default_edge): Likewise.
1567 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1568 (label_to_block): ... with this.
1569 (gimple_switch_label_bb): New.
1570 (gimple_switch_default_bb): Likewise.
1571 (gimple_switch_edge): Likewise.
1572 (gimple_switch_default_edge): Likewise.
1573 * tree-cfgcleanup.c (convert_single_case_switch): Use
1574 new gimple functions and pass new argument to label_to_block.
1575 (cleanup_control_flow_bb):
1576 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1577 cfun argument explicitly.
1578 (make_eh_edges): Likewise.
1579 (redirect_eh_dispatch_edge): Likewise.
1580 (lower_resx): Likewise.
1581 (lower_eh_dispatch): Likewise.
1582 (maybe_remove_unreachable_handlers): Likewise.
1583 (unsplit_eh): Likewise.
1584 (cleanup_empty_eh): Likewise.
1585 (verify_eh_edges): Likewise.
1586 (verify_eh_dispatch_edge): Likewise.
1587 * tree-ssa-dom.c (record_edge_info): Likewise.
1588 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1589 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1590 (thread_through_normal_block): Likewise.
1591 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1592 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1593 * tree-switch-conversion.c (switch_conversion::collect): Use new
1595 (switch_conversion::check_final_bb): Likewise.
1596 (switch_conversion::gather_default_values): Pass new argument
1598 (switch_conversion::build_constructors): Likewise.
1599 (switch_decision_tree::compute_cases_per_edge): Use new
1600 gimple_switch_edge function.
1601 (switch_decision_tree::analyze_switch_statement): Pass new argument
1603 (switch_decision_tree::try_switch_expansion): Use
1604 gimple_switch_default_edge.
1605 * tree-vrp.c (find_switch_asserts): Pass new argument
1607 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1608 (vr_values::simplify_switch_using_ranges): Likewise.
1610 2018-08-27 Richard Biener <rguenther@suse.de>
1612 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1613 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1615 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1616 (struct vn_nary_op_s): Add unwind_to member. Add
1617 predicated_values flag and put result into a union together
1618 with a linked list of vn_pval.
1619 (struct vn_ssa_aux): Add name member to make maintaining
1620 a map of SSA name to vn_ssa_aux possible. Remove no longer
1621 needed info, dfsnum, low, visited, on_sccstack, use_processed
1622 and range_info_anti_range_p members.
1623 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1624 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1626 (vn_valueize): New global.
1627 (vn_context_bb): Likewise.
1628 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1629 VN_INFO_PTR_INFO): Remove.
1630 * tree-ssa-sccvn.c: ... (rewrite)
1631 (pass_fre::execute): For -O2+ initialize loops and run
1632 RPO VN in optimistic mode (iterating). For -O1 and -Og
1633 run RPO VN in non-optimistic mode.
1634 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1635 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1636 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1637 (rpo-vn-max-loop-depth): Document.
1638 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1639 when valuezing the VUSE signals we walked out of the region.
1640 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1641 (phi_translate): Set VN context block to use for availability
1643 (compute_avail): Likewise.
1644 (pre_valueize): New function.
1645 (pass_pre::execute): Adjust to the RPO VN API.
1647 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1648 (propagate_constants_for_unrolling): Remove.
1649 (tree_unroll_loops_completely): Perform value-numbering
1650 on the unrolled bodies loop parent.
1652 2018-08-27 Richard Biener <rguenther@suse.de>
1654 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1655 for partial antic compute.
1657 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1659 PR rtl-optimization/87065
1660 * combine.c (simplify_if_then_else): Formatting fix.
1661 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1663 (known_cond): Don't return const_true_rtx for vector modes. Use
1664 CONST0_RTX instead of const0_rtx. Formatting fixes.
1666 2018-08-27 Martin Liska <mliska@suse.cz>
1668 PR gcov-profile/87069
1669 * gcov.c (process_file): Record files already processed
1670 and warn about a file being processed multiple times.
1672 2018-08-27 Martin Liska <mliska@suse.cz>
1675 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1676 Set default values for x_aarch64_*_string strings.
1677 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1678 prefix. For -mabi do not print '=ABI' in help and use
1679 <option_value> format for -msve-vector-bits and -moverride
1682 2018-08-26 Jeff Law <law@redhat.com>
1684 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1687 2018-08-26 Marek Polacek <polacek@redhat.com>
1689 PR c++/87029, Implement -Wredundant-move.
1690 * doc/invoke.texi: Document -Wredundant-move.
1692 2018-08-25 Martin Sebor <msebor@redhat.com>
1694 PR tree-optimization/87059
1695 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1696 to the same type as the other.
1697 * fold-const.c (fold_binary_loc): Assert expectation.
1699 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1701 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1702 extraneous parentheses, dead code section and formatting.
1704 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1707 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1708 wide enough for jumps in the line-numbering to be visible.
1709 (layout::print_gap_in_line_numbering): New member function.
1710 (layout::calculate_line_spans): When using line numbering, merge
1711 line spans that are only 1 line apart.
1712 (diagnostic_show_locus): When printing line numbers, show gaps in
1713 line numbering directly, rather than printing headers.
1714 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1715 line-numbering with multiple line spans.
1716 (selftest::test_fixit_insert_containing_newline_2): Add test of
1717 line-numbering, in which the spans are close enough to be merged.
1719 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1721 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1722 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1723 * tree-vrp.c (range_is_nonnull): Remove.
1724 (range_includes_zero_p): Accept value_range instead of min/max.
1725 (extract_range_from_binary_expr_1): Do not early bail on
1727 Use range_includes_zero_p instead of range_is_nonnull.
1728 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1729 of range_is_nonnull.
1730 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1731 special case VR_ANTI_RANGE.
1732 (vrp_finalize): Same.
1733 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1735 (range_is_nonnull): Remove.
1736 * vr-values.c (vrp_stmt_computes_nonzero): Use
1737 range_includes_zero_p instead of range_is_nonnull.
1738 (extract_range_basic): Pass value_range to range_includes_zero_p
1739 instead of range_is_nonnull.
1741 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1743 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1744 * emit-rtl.h (rtl_data): Remove return_bnd.
1745 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1746 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1747 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1748 (POINTER_BOUNDS_MODE): Remove definition.
1749 (make_pointer_bounds_mode): Remove.
1750 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1751 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1752 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1753 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1754 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1755 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1756 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1758 * config/i386/i386-modes.def (BND32, BND64): Remove.
1759 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1760 (dbx64_register_map): Ditto.
1761 (svr4_dbx_register_map): Ditto.
1762 (indirect_thunk_bnd_needed): Remove.
1763 (indirect_thunks_bnd_used): Ditto.
1764 (indirect_return_bnd_needed): Ditto.
1765 (indirect_return_via_cx_bnd): Ditto.
1766 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1767 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1768 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1769 (output_indirect_thunk_function): Remove handling of
1770 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1771 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1772 (ix86_save_reg): Remove handling of crtl->return_bnd.
1773 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1774 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1775 and UNSPEC_BNDLX_ADDR.
1776 (ix86_output_indirect_branch_via_reg): Remove handling of
1777 indirect_thunk_prefix_bnd.
1778 (ix86_output_indirect_branch_via_push): Ditto.
1779 (ix86_output_function_return): Ditto.
1780 (ix86_output_indirect_function_return): Ditto.
1781 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1782 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1783 (CALL_USED_REGISTERS): Ditto.
1784 (REG_ALLOC_ORDER): Update for removal of bound registers.
1785 (HI_REGISTER_NAMES): Ditto.
1786 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1787 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1788 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1789 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1790 (FIRST_PSEUDO_REG): Update.
1791 (BND): Remove mode iterator.
1792 * config/i386/predicates.md (bnd_mem_operator): Remove.
1794 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1796 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1799 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1801 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1802 the case in which the permute needs only a single element and
1803 repeats for every vector of the result. Extend that case to
1804 handle variable-length vectors.
1805 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1807 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1810 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1811 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1813 2018-08-24 Richard Biener <rguenther@suse.de>
1815 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1816 bb_flags_allocated members.
1817 (auto_flag): New RAII class for allocating flags.
1818 (auto_edge_flag): New RAII class for allocating edge flags.
1819 (auto_bb_flag): New RAII class for allocating bb flags.
1820 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1822 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1823 in favor of temporarily allocated BB flag.
1824 * hsa-brig.c: Re-order includes.
1825 * hsa-dump.c: Likewise.
1826 * hsa-regalloc.c: Likewise.
1827 * print-rtl.c: Likewise.
1828 * profile-count.c: Likewise.
1830 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1833 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1836 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1839 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1840 from wide_int_range_multiplicative_op.
1842 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1844 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1847 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1849 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1852 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1854 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1855 full GENERIC expression used for replacement.
1857 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1859 * tree-vrp.c (abs_extent_range): Remove.
1860 (extract_range_into_wide_ints): Pass wide ints by reference.
1861 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1862 Pass wide ints by reference in all calls to
1863 extract_range_into_wide_ints.
1864 * wide-int-range.cc (wide_int_range_div): New.
1865 * wide-int-range.h (wide_int_range_div): New.
1866 (wide_int_range_includes_zero_p): New.
1867 (wide_int_range_zero_p): New.
1869 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1871 * config/aarch64/aarch64.md (arches): New enum.
1872 (arch): New enum attr.
1873 (arch_enabled): New attr.
1874 (enabled): Now uses arch_enabled only.
1875 (simd, sve, fp16): Removed attribute.
1876 (fp): Attr now defined in terms of 'arch'.
1877 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1878 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1879 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1880 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1881 attributes into 'arch'.
1882 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1883 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1884 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1885 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1886 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1887 'simd' attribute into 'arch'.
1888 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1889 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1890 Convert use of 'fp' attribute to 'arch'.
1891 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1892 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1894 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1895 (different modes) Merge 'fp' and 'simd' into 'arch'.
1896 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1899 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1901 PR rtl-optimization/87026
1902 * expmed.c (canonicalize_comparison): If we can no longer create
1903 pseudoregisters, don't.
1905 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1908 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1910 * config/arm/arm.c (speculation_barrier_libfunc): New static
1912 (arm_init_libfuncs): Initialize it.
1913 (arm_emit_speculation_barrier): New function.
1914 * config/arm/arm.md (speculation_barrier): Call
1915 arm_emit_speculation_barrier for architectures that do not have
1917 (speculation_barrier_insn): Only match on Armv7 or later.
1919 2018-08-23 Richard Biener <rguenther@suse.de>
1922 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1925 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1927 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1928 of single-vector TBLs.
1929 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1932 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1935 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1936 aarch64_evpc_tbl guard.
1938 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1940 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1943 2018-08-22 Martin Sebor <msebor@redhat.com>
1946 * tree-pretty-print.c (pretty_print_string): Add argument.
1947 (dump_generic_node): Call to pretty_print_string with string size.
1949 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1951 PR rtl-optimization/86771
1952 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1953 of two SETs into those two SETs, one to be placed at i2, if that SETs
1954 destination is modified between i2 and i3.
1956 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1958 PR tree-optimization/86725
1959 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1961 (vect_analyze_scalar_cycles_1): Check it.
1963 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1965 PR tree-optimization/86725
1966 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1967 an outer loop phi as a double reduction, make sure that the
1968 single user of the phi result is an inner loop phi.
1970 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1972 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1973 grouped stores with gaps to a strided group.
1975 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1977 * tree-vect-stmts.c (get_group_load_store_type)
1978 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1979 first statement in a group.
1981 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1983 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1984 the sequence used in gcc/gcc.c.
1986 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1989 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1992 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1994 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1995 Darwin10-specific unwinder-shim.
1996 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1997 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1998 New to cater for Darwin10 Rosetta.
2000 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2002 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2003 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2005 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2010 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2011 (dwarf2out_switch_text_section): Generate a local label for the
2012 second function sub-section and apply it as the second FDE start
2014 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2015 second sub-section start.
2017 2018-08-22 Richard Biener <rguenther@suse.de>
2019 PR tree-optimization/86988
2020 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2022 2018-08-22 Richard Biener <rguenther@suse.de>
2024 PR tree-optimization/86945
2025 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2027 2018-08-22 Alexandre Oliva <oliva@adacore.com>
2029 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2030 a comment about how uses of r2 for .sdata2 come about.
2032 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
2034 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2036 2018-08-21 Marek Polacek <polacek@redhat.com>
2038 PR c++/86981, Implement -Wpessimizing-move.
2039 * doc/invoke.texi: Document -Wpessimizing-move.
2041 2018-08-21 Jan Hubicka <jh@suse.cz>
2043 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2044 * tree.h (is_redundant_typedef): Remove.
2045 * dwarf2out.c (is_redundant_typedef): Turn into static function.
2047 2018-08-21 Jan Hubicka <jh@suse.cz>
2049 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2052 2018-08-21 Tamar Christina <tamar.christina@arm.com>
2054 * expmed.c (extract_low_bits): Reject invalid subregs early.
2056 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2059 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2062 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2064 * config/vxworks.h: Guard vxworks_asm_out_constructor and
2065 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2066 * config/vxworks.c: Likewise.
2068 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2070 * config/vxworks.c: Set targetm.have_ctors_dtors
2071 if HAVE_INITFINI_ARRAY_SUPPORT.
2072 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2073 if HAVE_INITFINI_ARRAY_SUPPORT.
2075 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2077 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2078 default search path for VxWorks < 7.
2080 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2082 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2083 (get_format_string): Refer to c_getstr.
2085 2018-08-21 Tom de Vries <tdevries@suse.de>
2087 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2088 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2089 (debuginfo_early_stop): Declare.
2090 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2091 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2092 (debuginfo_early_stop): New function.
2093 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2094 and debuginfo_early_stop.
2095 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2096 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2097 (general_init): Call debuginfo_early_init.
2098 (finalize): Call debuginfo_fini.
2099 (do_compile): Call debuginfo_init.
2100 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2102 (@item -fdump-debug, @item -fdump-earlydebug): Add.
2104 2018-08-21 Tom de Vries <tdevries@suse.de>
2106 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2107 flag_dump_noaddr and flag_dump_unnumbered.
2109 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
2111 * wide-int-range.cc (wide_int_range_abs): New.
2112 (wide_int_range_order_set): Rename from wide_int_range_min_max.
2113 * wide-int-range.h (wide_int_range_abs): New.
2114 (wide_int_range_min_max): New.
2115 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2116 case to call wide_int_range_abs.
2117 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2118 (extract_range_from_abs_expr): Delete.
2120 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2123 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2124 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2127 2018-08-20 Nathan Sidwell <nathan@acm.org>
2128 Jeff Law <law@redhat.com>
2130 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2131 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2133 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2136 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2137 (decl_attributes): Likewise.
2138 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2140 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2141 * diagnostic-core.h (class auto_diagnostic_group): New class.
2142 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2143 (diagnostic_report_diagnostic): Handle the first diagnostics within
2145 (emit_diagnostic): Add auto_diagnostic_group instance.
2147 (inform_n): Likewise.
2148 (warning): Likewise.
2149 (warning_at): Likewise.
2150 (warning_n): Likewise.
2151 (pedwarn): Likewise.
2152 (permerror): Likewise.
2154 (error_n): Likewise.
2155 (error_at): Likewise.
2157 (fatal_error): Likewise.
2158 (internal_error): Likewise.
2159 (internal_error_no_backtrace): Likewise.
2160 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2161 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2162 * diagnostic.h (struct diagnostic_context): Add fields
2163 "diagnostic_group_nesting_depth",
2164 "diagnostic_group_emission_count", "begin_group_cb",
2166 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2167 Add auto_diagnostic_group instance(s).
2168 (find_explicit_erroneous_behavior): Likewise.
2169 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2170 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2171 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2172 (gimplify_va_arg_expr): Likewise.
2173 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2174 (HSA_SORRY_AT): Likewise.
2175 * ipa-devirt.c (compare_virtual_tables): Likewise.
2176 (warn_odr): Likewise.
2177 * multiple_target.c (expand_target_clones): Likewise.
2178 * opts-common.c (cmdline_handle_error): Likewise.
2179 * reginfo.c (globalize_reg): Likewise.
2180 * substring-locations.c (format_warning_n_va): Likewise.
2181 * tree-inline.c (expand_call_inline): Likewise.
2182 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2183 * tree-ssa-loop-niter.c
2184 (do_warn_aggressive_loop_optimizations): Likewise.
2185 * tree-ssa-uninit.c (warn_uninit): Likewise.
2186 * tree.c (warn_deprecated_use): Likewise.
2188 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
2191 * config/i386/i386.md (eh_return): Always update EH return
2192 address in word_mode.
2194 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
2196 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2197 TARGET_SPLIT_COMPLEX_ARG is defined.
2199 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2201 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2203 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2206 * expr.c (expand_assignment): Assert that bitpos is positive.
2207 (store_field): Likewise
2208 (expand_expr_real_1): Make sure that bitpos is positive.
2209 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2212 2018-08-20 Nathan Sidwell <nathan@acm.org>
2214 * Makefile.in (CPP_ID_DATA_H): Delete.
2215 (CPP_INTERNAL_H): Don't add it.
2216 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2217 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2219 2018-08-20 Richard Biener <rguenther@suse.de>
2221 PR tree-optimization/78655
2222 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2223 pointer + offset nonnull if either operand is nonnull work.
2225 2018-08-20 Tom de Vries <tdevries@suse.de>
2227 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2228 unless the referenced die describes the added property using
2229 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2230 Otherwise, add a DW_AT_location to the referenced die.
2232 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2235 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2236 register_operand when calling ix86_set_reg_reg_cost.
2237 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2238 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2239 predicate and to 1 otherwise.
2241 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2243 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2244 emit a diagnostic that it is not supported and reset the option.
2245 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2246 supported and consume the option. (ASM_FINAL_SPEC): New.
2248 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2250 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2253 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2255 C-SKY port: Documentation
2257 * doc/extend.texi (C-SKY Function Attributes): New section.
2258 * doc/invoke.texi (Option Summary): Add C-SKY options.
2259 (C-SKY Options): New section.
2260 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2262 2018-08-17 Jojo <jijie_rong@c-sky.com>
2263 Huibin Wang <huibin_wang@c-sky.com>
2264 Sandra Loosemore <sandra@codesourcery.com>
2265 Chung-Lin Tang <cltang@codesourcery.com>
2267 C-SKY port: Backend implementation
2269 * config/csky/*: New.
2270 * common/config/csky/*: New.
2272 2018-08-17 Jojo <jijie_rong@c-sky.com>
2273 Huibin Wang <huibin_wang@c-sky.com>
2274 Sandra Loosemore <sandra@codesourcery.com>
2275 Chung-Lin Tang <cltang@codesourcery.com>
2276 Andrew Jenner <andrew@codesourcery.com>
2278 C-SKY port: Configury
2280 * config.gcc (csky-*-*): New.
2281 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2282 * configure: Regenerated.
2284 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2286 * dump-context.h: Include "dumpfile.h".
2287 (dump_context::dump_printf_va): Convert final param from va_list
2288 to va_list *. Convert from ATTRIBUTE_PRINTF to
2289 ATTRIBUTE_GCC_DUMP_PRINTF.
2290 (dump_context::dump_printf_loc_va): Likewise.
2291 * dumpfile.c: Include "stringpool.h".
2292 (make_item_for_dump_printf_va): Delete.
2293 (make_item_for_dump_printf): Delete.
2294 (class dump_pretty_printer): New class.
2295 (dump_pretty_printer::dump_pretty_printer): New ctor.
2296 (dump_pretty_printer::emit_items): New member function.
2297 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2299 (dump_pretty_printer::emit_item): New member function.
2300 (dump_pretty_printer::stash_item): New member function.
2301 (dump_pretty_printer::format_decoder_cb): New member function.
2302 (dump_pretty_printer::decode_format): New member function.
2303 (dump_context::dump_printf_va): Reimplement in terms of
2304 dump_pretty_printer.
2305 (dump_context::dump_printf_loc_va): Convert final param from va_list
2307 (dump_context::begin_scope): Reimplement call to
2308 make_item_for_dump_printf.
2309 (dump_printf): Update for change to dump_printf_va.
2310 (dump_printf_loc): Likewise.
2311 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2312 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2313 with %T, %E, and %G.
2314 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2315 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2316 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2317 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2318 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2319 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2320 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2321 within a dump_printf_loc call to "%wu".
2322 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2323 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2324 missing space after "=".
2325 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2326 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2327 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2328 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2329 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2330 duplicate "vectorized" from message.
2332 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2334 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2335 polyNxK_t element's TYPE_STRING_FLAG.
2337 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2339 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2340 (they were unnamed before). Fix comments.
2342 2018-08-17 Nathan Sidwell <nathan@acm.org>
2344 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2346 2018-08-17 Richard Biener <rguenther@suse.de>
2348 PR tree-optimization/86841
2349 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2351 2018-08-17 Martin Liska <mliska@suse.cz>
2353 * common.opt: Remove Warn, Init and Report for options with
2354 Ignore/Deprecated flag. Warning is done automatically for
2356 * config/i386/i386.opt: Likewise.
2357 * config/ia64/ia64.opt: Likewise.
2358 * config/rs6000/rs6000.opt: Likewise.
2359 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2360 Remove usage of flag_check_pointer_bounds.
2361 * lto-wrapper.c (merge_and_complain): Do not handle
2362 OPT_fcheck_pointer_bounds.
2363 (append_compiler_options): Likewise.
2364 * opt-functions.awk: Do not handle Deprecated.
2365 * optc-gen.awk: Check that Var, Report and Init are not
2366 used for an option with Ignore/Deprecated flag.
2367 * opts-common.c (decode_cmdline_option): Do not report
2369 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2371 * opts.h (struct cl_option): Remove cl_deprecated flag.
2372 (CL_ERR_DEPRECATED): Remove error enum value.
2374 2018-08-17 Richard Biener <rguenther@suse.de>
2377 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2378 across a va-arg-pack using call adjust its return value accordingly.
2380 2018-08-16 Martin Sebor <msebor@redhat.com>
2382 PR tree-optimization/86853
2383 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2384 (struct fmtresult): Add member and initialize it in ctors.
2385 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2386 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2387 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2388 (parse_directive): Handle %C same as %c.
2389 (sprintf_dom_walker::compute_format_length): Adjust.
2390 (is_call_safe): Adjust.
2392 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2394 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2395 for determining how to count the elements.
2396 * builtins.h (c_strlen): Adjust prototype.
2397 * expr.c (string_constant): Add new parameter mem_size.
2398 Set *mem_size appropriately.
2399 * expr.h (string_constant): Adjust protoype.
2400 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2401 * gimple-fold.h (get_range_strlen): Adjust prototype.
2402 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2403 (format_string): Call get_string_length with eltsize.
2405 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2407 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2408 to emit the span, rather than setting it as the prefix.
2410 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2412 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2413 "margin_char" parameter, defaulting to space. Use it in place
2414 of pp_space for the initial part of the margin.
2415 (layout::print_leading_fixits): Use '+' when filling the margin
2416 of line-insertion fix-it hints.
2418 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2420 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2423 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2425 * config/rs6000/altivec.md: Don't set length attribute to the default
2427 * config/rs6000/darwin.md: Ditto.
2428 * config/rs6000/dfp.md: Ditto.
2429 * config/rs6000/htm.md: Ditto.
2430 * config/rs6000/rs6000.md: Ditto.
2431 * config/rs6000/sync.md: Ditto.
2432 * config/rs6000/vsx.md: Ditto.
2434 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2436 * config/rs6000/altivec.md: Don't set length attribute to the default
2437 value, for branch instructions.
2438 * config/rs6000/darwin.md: Ditto.
2439 * config/rs6000/rs6000.md: Ditto.
2441 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2443 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2444 (unnamed conditional branch define_insn): Set length to 4 or 8
2445 depending on offset.
2446 (<bd>_<mode>): Similar, for alternative 0.
2447 (<bd>tf_<mode>): Ditto.
2449 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2451 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2453 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2455 * doc/rtl.texi: Replace old RTX class names with new names.
2458 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2460 * expmed.h (canonicalize_comparison): New declaration.
2461 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2462 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2463 * optabs.c (prepare_cmp_insn): Likewise.
2464 * rtl.h (unsigned_condition_p): New function which checks if a
2465 comparison operator is unsigned.
2467 2018-08-16 Nathan Sidwell <nathan@acm.org>
2469 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2470 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2472 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2475 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2476 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2477 (mov<mov>): ..this and enable unconditionally.
2479 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2481 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2483 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2485 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2486 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2487 "Common" with "Target".
2489 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2491 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2492 * doc/invoke.texi (mmitigate-rop): Remove.
2493 * config/i386/i386.c: Do not include "regrename.h".
2494 (ix86_rop_should_change_byte_p, reg_encoded_number)
2495 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2497 (ix86_reorg): Remove call to ix86_mitigate_rop.
2498 * config/i386/i386.md (attr "modrm_class"): Remove.
2499 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2500 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2501 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2503 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2505 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2506 allow folding of mergeh() and mergel() for the float and double types.
2507 (fold_mergehl_helper): Rework to handle building a permute tree
2510 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2512 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2515 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2517 * common.opt (fdiagnostics-show-labels): New option.
2518 * diagnostic-show-locus.c (class layout_range): Add field
2520 (class layout): Add field "m_show_labels_p".
2521 (layout_range::layout_range): Add param "label" and use it to
2523 (make_range): Pass in NULL for new "label" param of layout_range's
2525 (layout::layout): Initialize m_show_labels_p.
2526 (layout::maybe_add_location_range): Pass in loc_range->m_label
2527 when constructing layout_range instances.
2528 (struct line_label): New struct.
2529 (layout::print_any_labels): New member function.
2530 (layout::print_line): Call it if label-printing is enabled.
2531 (selftest::test_one_liner_labels): New test.
2532 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2533 * diagnostic.c (diagnostic_initialize): Initialize
2534 context->show_labels_p.
2535 * diagnostic.h (struct diagnostic_context): Add field
2537 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2538 -fno-diagnostics-show-labels.
2539 * dwarf2out.c (gen_producer_string): Add
2540 OPT_fdiagnostics_show_labels to the ignored options.
2541 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2543 (gcc_rich_location::maybe_add_expr): Likewise.
2544 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2545 label" param, defaulting to NULL.
2546 (gcc_rich_location::add_expr): Add "label" param.
2547 (gcc_rich_location::maybe_add_expr): Likewise.
2548 (class text_range_label): New class.
2549 (class range_label_for_type_mismatch): New class.
2550 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2551 of format_warning_va.
2552 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2553 * lto-wrapper.c (merge_and_complain): Add
2554 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2555 (append_compiler_options): Likewise to the dropped options.
2556 (append_diag_options): Likewise to the passed-on options.
2557 * opts.c (common_handle_option): Handle the new option.
2558 * selftest-diagnostic.c
2559 (test_diagnostic_context::test_diagnostic_context): Enable
2561 * substring-locations.c: Include "gcc-rich-location.h".
2562 (format_warning_n_va): Add "fmt_label" and "param_label" params
2563 and use them as appropriate.
2564 (format_warning_va): Add "fmt_label" and "param_label" params,
2565 passing them on to format_warning_n_va.
2566 (format_warning_at_substring): Likewise.
2567 (format_warning_at_substring_n): Likewise.
2568 * substring-locations.h (format_warning_va): Add "fmt_label" and
2569 "param_label" params.
2570 (format_warning_n_va): Likewise.
2571 (format_warning_at_substring): Likewise.
2572 (format_warning_at_substring_n): Likewise.
2573 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2575 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2578 * builtins.c (expand_builtin_memcmp): Do not expand the call
2579 when overflow is detected.
2581 2018-08-15 Martin Sebor <msebor@redhat.com>
2583 PR tree-optimization/71625
2584 * config/aarch64/aarch64-builtins.c
2585 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2587 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2589 * config/s390/s390.c (s390_reorg): Remove loop.
2591 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2594 (darwin_function_switched_text_sections): Delete.
2595 * gcc/config/darwin.h
2596 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2598 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2601 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2602 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2603 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2605 2018-08-15 Martin Liska <mliska@suse.cz>
2607 PR tree-optimization/86925
2608 * predict.c (expr_expected_value_1): When taking
2609 later predictor, assign also probability.
2610 Use fold_build2_initializer_loc in order to fold
2611 the expression in -frounding-math.
2613 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2615 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2617 (expand_vec_perm_1): Try the new method.
2619 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2622 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2623 Check whether lra_live_max_point is 0 before dividing.
2625 2018-08-14 Martin Sebor <msebor@redhat.com>
2627 PR tree-optimization/86650
2628 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2629 (vrp_prop::check_mem_ref): Same.
2631 2018-08-13 Liu Hao <lh_mouse@126.com>
2633 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2634 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2635 and clear it thereafter, as it only works for DBCS.
2637 2018-08-13 Liu Hao <lh_mouse@126.com>
2639 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2640 handle returned by _get_osf_handle().
2642 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2644 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2645 for folding vec_perm.
2647 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2649 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2650 Add support for gimple-folding of vec_pack() and vec_unpack()
2653 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2655 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2656 vec_xst variants to the list.
2657 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2658 vector loads and stores.
2660 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2662 * config.gcc (rs6000-ibm-aix4.x): Delete.
2663 (rs6000-ibm-aix5.1): Delete.
2664 (rs6000-ibm-aix5.2): Delete.
2665 (rs6000-ibm-aix5.3): Delete.
2666 * config/rs6000/aix43.h: Delete.
2667 * config/rs6000/aix51.h: Delete.
2668 * config/rs6000/aix52.h: Delete.
2669 * config/rs6000/t-aix43: Delete.
2671 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2673 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2675 (s390_decompose_address): Factor out constant pool ref
2678 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2680 * config/nds32/nds32-predicates.c
2681 (nds32_can_use_bclr_p): Change return type as bool.
2682 (nds32_can_use_bset_p): Ditto.
2683 (nds32_can_use_btgl_p): Ditto.
2684 (nds32_can_use_bitci_p): Ditto.
2685 * config/nds32/nds32-protos.h
2686 (nds32_can_use_bclr_p): Change declaration.
2687 (nds32_can_use_bset_p): Ditto.
2688 (nds32_can_use_btgl_p): Ditto.
2689 (nds32_can_use_bitci_p): Ditto.
2691 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2693 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2694 Support -msched-prolog-epilog option.
2695 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2697 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2699 * common/config/nds32/nds32-common.c
2700 (nds32_option_optimization_table): Enalbe -malways-align.
2702 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2704 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2706 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2707 OPT_misr_secure_ case.
2708 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2709 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2710 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2712 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2713 (nds32_isr_info): New field security_level.
2714 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2715 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2716 * config/nds32/nds32.opt (misr-secure): New option.
2717 * config/nds32/nds32_init.inc: New file.
2718 * config/nds32/nds32_isr.h: New file.
2720 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2722 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2723 Update comment for atomic instructions.
2724 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2725 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2727 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2728 load for __ATOMIC_SEQ_CST model.
2729 (atomic_loaddi_1): Remove float register target.
2730 (atomic_storedi): Handle CONST_INT values.
2731 (atomic_storedi_1): Remove float register source. Add special case
2733 (memory_barrier): New expander and insn.
2735 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2737 PR tree-optimization/86835
2738 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2739 new_stmt after def_gsi, make sure to insert new_square_stmt after
2740 that stmt, not 2 stmts before it.
2742 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2745 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2748 2018-08-10 Martin Liska <mliska@suse.cz>
2751 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2753 * builtins.c (expand_builtin_expect_with_probability):
2755 (expand_builtin_expect_with_probability): New function.
2756 (build_builtin_expect_predicate): Add new argumnet probability
2757 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2758 (fold_builtin_expect):
2761 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2762 * builtins.h (fold_builtin_expect): Set new argument.
2763 * doc/extend.texi: Document __builtin_expect_with_probability.
2764 * doc/invoke.texi: Likewise.
2765 * gimple-fold.c (gimple_fold_call): Pass new argument.
2766 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2767 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2768 * predict.c (get_predictor_value): New function.
2769 (expr_expected_value): Add new argument probability. Assume
2770 that predictor and probability are always non-null.
2771 (expr_expected_value_1): Likewise. For __builtin_expect and
2772 __builtin_expect_with_probability set probability. Handle
2773 combination in binary expressions.
2774 (tree_predict_by_opcode): Simplify code by simply calling
2775 get_predictor_value.
2776 (pass_strip_predict_hints::execute): Add handling of
2777 BUILT_IN_EXPECT_WITH_PROBABILITY.
2778 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2780 * tree.h (DECL_BUILT_IN_P): New function.
2782 2018-08-10 Martin Liska <mliska@suse.cz>
2784 PR tree-optimization/85799
2785 * passes.def: Add argument for pass_strip_predict_hints.
2786 * predict.c (class pass_strip_predict_hints): Add new argument
2788 (strip_predictor_early): New function.
2789 (pass_strip_predict_hints::execute): Call the function to
2791 (strip_predict_hints): New function.
2792 * predict.def: Fix comment.
2794 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2796 * Makefile.in: Clarify which tm.texi to copy over to assert the
2797 right to grant a GFDL license for all.
2799 2018-08-09 Jeff Law <law@redhat.com>
2801 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2804 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2806 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2809 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2811 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2812 reductions for variable-length vectors.
2814 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2817 * common.opt (fdiagnostics-show-line-numbers): New option.
2818 * diagnostic-show-locus.c (class layout): Add fields
2819 "m_show_line_numbers_p" and "m_linenum_width";
2820 (num_digits): New function.
2821 (test_num_digits): New function.
2822 (layout::layout): Initialize new fields. Update m_x_offset
2823 logic to handle any left margin.
2824 (layout::print_source_line): Print line number when requested.
2825 (layout::start_annotation_line): New member function.
2826 (layout::print_annotation_line): Call it.
2827 (layout::print_leading_fixits): Likewise.
2828 (layout::print_trailing_fixits): Likewise. Update calls to
2829 move_to_column for new parameter.
2830 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2831 it to potentially call start_annotation_line.
2832 (layout::show_ruler): Call start_annotation_line.
2833 (selftest::test_line_numbers_multiline_range): New selftest.
2834 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2835 and selftest::test_line_numbers_multiline_range.
2836 * diagnostic.c (diagnostic_initialize): Initialize
2837 show_line_numbers_p.
2838 * diagnostic.h (struct diagnostic_context): Add field
2839 "show_line_numbers_p".
2840 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2841 -fno-diagnostics-show-line-numbers.
2842 * dwarf2out.c (gen_producer_string): Add
2843 OPT_fdiagnostics_show_line_numbers to the ignored options.
2844 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2845 one setting" options.
2846 (append_compiler_options): Likewise to the dropped options.
2847 (append_diag_options): Likewise to the passed-on options.
2848 * opts.c (common_handle_option): Handle the new option.
2849 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2851 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2853 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2854 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2855 third argument of type "const signed char" to descriptions of
2856 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2857 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2858 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2859 __builtin_bcdsub_ov functions.
2861 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2863 PR tree-optimization/86858
2864 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2865 flow_bb_inside_loop_p calls.
2867 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2869 PR tree-optimization/86871
2870 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2871 instead of gimple_assign_lhs.
2873 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2876 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2877 register constraint to operand 0.
2878 (add<mode>3_carryinC): Likewise.
2879 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2881 2018-08-09 Martin Liska <mliska@suse.cz>
2884 * common.opt: Remove extra line.
2886 2018-08-09 Martin Liska <mliska@suse.cz>
2888 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2889 at the end of a line, make first letter capital and end up
2890 a sentence with a dot.
2891 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2892 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2893 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2894 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2895 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2896 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2897 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2898 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2899 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2900 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2901 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2902 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2903 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2904 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2905 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2906 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2907 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2908 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2910 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2913 * config/s390/s390.c (s390_option_override_internal): Reduce the
2914 stack-clash-protection-probe-interval param if it would be too big
2917 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2920 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2921 * config/m68k/m68k.c (handle_move_double): Don't call
2922 m68k_final_prescan_insn.
2923 (m68k_adjust_decorated_operand): Renamed from
2924 m68k_final_prescan_insn, remove first and third operand and
2926 (print_operand): Call it.
2927 (print_operand_address): Call it.
2929 2018-08-08 Nathan Sidwell <nathan@acm.org>
2931 * diagnostic.c (diagnostic_report_current_module): Use
2932 linemap_included_from & linemap_included_from_linemap.
2934 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2936 * config/aarch64/aarch64-cores.def: Add phecda core.
2937 * config/aarch64/aarch64-tune.md: Regenerate.
2938 * doc/invoke.texi: Add phecda core.
2940 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2943 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2945 * config/s390/s390.md ("movti"): Add more alternatives for
2946 constant to GPR copies.
2948 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2950 * config/s390/s390.c: Fix whitespace damage throughout the file.
2951 * config/s390/s390.h: Likewise.
2952 * config/s390/tpf.h: Likewise.
2954 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2956 * config/s390/s390.c (s390_loadrelative_operand_p):
2957 Remove TARGET_CPU_ZARCH usages.
2958 (s390_rtx_costs): Likewise.
2959 (s390_legitimate_constant_p): Likewise.
2960 (s390_cannot_force_const_mem): Likewise.
2961 (legitimate_reload_constant_p): Likewise.
2962 (s390_preferred_reload_class): Likewise.
2963 (legitimize_pic_address): Likewise.
2964 (legitimize_tls_address): Likewise.
2965 (s390_split_branches): Removed.
2966 (s390_add_execute): Removed.
2967 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2968 (s390_mainpool_start): Likewise.
2969 (s390_mainpool_finish): Likewise.
2970 (s390_mainpool_cancel): Removed.
2971 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2972 (s390_chunkify_cancel): Likewise.
2973 (s390_return_addr_rtx): Likewise.
2974 (s390_register_info): Remove split_branches_pending_p uages.
2975 (s390_optimize_register_info): Likewise.
2976 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2977 split_branches_pending_p usages.
2978 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2979 (s390_load_got): Likewise.
2980 (s390_expand_split_stack_prologue): Likewise.
2981 (output_asm_nops): Likewise.
2982 (s390_function_profiler): Likewise.
2983 (s390_emit_call): Likewise.
2984 (s390_conditional_register_usage): Likewise.
2985 (s390_optimize_prologue): Likewise.
2986 (s390_reorg): Remove TARGET_CPU_ZARCH and
2987 split_branches_pending_p usages.
2988 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2990 (s390_output_indirect_thunk_function): Likewise.
2991 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2992 (TARGET_CPU_ZARCH_P): Removed.
2993 (struct machine_function): Remove split_branches_pending_p.
2994 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2996 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2998 * common/config/s390/s390-common.c (processor_flags_table):
3000 * config.gcc: Remove with_arch/with_tune support.
3001 * config/s390/2064.md: Remove cpu attribute comparisons.
3002 * config/s390/driver-native.c (s390_host_detect_local_cpu):
3004 * config/s390/linux.h (ASM_SPEC):
3005 Remove -march support.
3006 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3007 Use a table to get an arch level.
3008 * config/s390/s390-opts.h (enum processor_type):
3010 * config/s390/s390.c
3011 (processor_table): Remove entries, add arch_level values.
3012 (s390_issue_rate): Remove cases.
3013 (s390_option_override): Adjust
3014 s390_option_override_internal() call.
3015 (s390_option_override_internal): Remove deprecation warning.
3016 (s390_valid_target_attribute_tree): Adjust
3017 s390_option_override_internal() call.
3018 * config/s390/s390.h (struct s390_processor):
3019 Share with s390-c.c, add arch_level field.
3020 * config/s390/s390.md:
3021 Remove occurrences in cpu attribute.
3022 * config/s390/s390.opt: Remove -march/-mtune support.
3023 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3024 * doc/invoke.texi: Remove deprecation warning.
3026 2018-08-08 Luis Machado <luis.machado@linaro.org>
3028 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3030 (qdf24xx_tunings): Set vector cost structure to
3031 qdf24xx_vector_cost.
3033 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3034 <register_sextend>: Set to 3.
3036 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
3039 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3040 * config/aarch64/aarch64-simd.md
3041 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3042 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3043 (aarch64_frecpx<mode>): ...this new pattern.
3044 * config/aarch64/aarch64-simd-builtins.def: Remove comment
3045 about aarch64_frecp<FRECP:frecp_suffix><mode>.
3047 2018-08-07 Martin Liska <mliska@suse.cz>
3050 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3051 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3052 * predict.def (PRED_MALLOC_NONNULL): New predictor.
3053 * doc/extend.texi: Document that malloc attribute adds
3056 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
3059 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3060 Define to speculation_safe_value_not_needed.
3062 2018-08-06 Jeff Law <law@redhat.com>
3064 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3065 the vr_values instance to cprop_into_stmt.
3066 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3067 (cprop_operand): Also query EVRP to determine if OP is a constant.
3069 2018-08-06 Nathan Sidwell <nathan@acm.org>
3071 * diagnostic.c (diagnostic_report_current_module): Reroll
3072 included-at loop. Translate text.
3074 2018-08-06 David Malcolm <dmalcolm@redhat.com>
3076 * function-tests.c (selftest::test_expansion_to_rtl): Call
3077 free_after_compilation.
3079 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3081 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3083 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
3085 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3086 loops with memory block operations from getting unrolled.
3088 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
3091 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3092 Define to speculation_safe_value_not_needed.
3094 2018-08-06 Jeff Law <law@redhat.com>
3096 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3099 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3102 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3103 with all enabled __intN types.
3105 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3107 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3109 * alias.c (record_set): Check for clobber high.
3110 * cfgexpand.c (expand_gimple_stmt): Likewise.
3111 * combine-stack-adj.c (single_set_for_csa): Likewise.
3112 * combine.c (find_single_use_1): Likewise.
3113 (set_nonzero_bits_and_sign_copies): Likewise.
3114 (get_combine_src_dest): Likewise.
3115 (is_parallel_of_n_reg_sets): Likewise.
3116 (try_combine): Likewise.
3117 (record_dead_and_set_regs_1): Likewise.
3118 (reg_dead_at_p_1): Likewise.
3119 (reg_dead_at_p): Likewise.
3120 * dce.c (deletable_insn_p): Likewise.
3121 (mark_nonreg_stores_1): Likewise.
3122 (mark_nonreg_stores_2): Likewise.
3123 * df-scan.c (df_find_hard_reg_defs): Likewise.
3124 (df_uses_record): Likewise.
3125 (df_get_call_refs): Likewise.
3126 * dwarf2out.c (mem_loc_descriptor): Likewise.
3127 * haifa-sched.c (haifa_classify_rtx): Likewise.
3128 * ira-build.c (create_insn_allocnos): Likewise.
3129 * ira-costs.c (scan_one_insn): Likewise.
3130 * ira.c (equiv_init_movable_p): Likewise.
3131 (rtx_moveable_p): Likewise.
3132 (interesting_dest_for_shprep): Likewise.
3133 * jump.c (mark_jump_label_1): Likewise.
3134 * postreload-gcse.c (record_opr_changes): Likewise.
3135 * postreload.c (reload_cse_simplify): Likewise.
3136 (struct reg_use): Add source expr.
3137 (reload_combine): Check for clobber high.
3138 (reload_combine_note_use): Likewise.
3139 (reload_cse_move2add): Likewise.
3140 (move2add_note_store): Likewise.
3141 * print-rtl.c (print_pattern): Likewise.
3142 * recog.c (decode_asm_operands): Likewise.
3143 (store_data_bypass_p): Likewise.
3144 (if_test_bypass_p): Likewise.
3145 * regcprop.c (kill_clobbered_value): Likewise.
3146 (kill_set_value): Likewise.
3147 * reginfo.c (reg_scan_mark_refs): Likewise.
3148 * reload1.c (maybe_fix_stack_asms): Likewise.
3149 (eliminate_regs_1): Likewise.
3150 (elimination_effects): Likewise.
3151 (mark_not_eliminable): Likewise.
3152 (scan_paradoxical_subregs): Likewise.
3153 (forget_old_reloads_1): Likewise.
3154 * reorg.c (find_end_label): Likewise.
3155 (try_merge_delay_insns): Likewise.
3156 (redundant_insn): Likewise.
3157 (own_thread_p): Likewise.
3158 (fill_simple_delay_slots): Likewise.
3159 (fill_slots_from_thread): Likewise.
3160 (dbr_schedule): Likewise.
3161 * resource.c (update_live_status): Likewise.
3162 (mark_referenced_resources): Likewise.
3163 (mark_set_resources): Likewise.
3164 * rtl.c (copy_rtx): Likewise.
3165 * rtlanal.c (reg_referenced_p): Likewise.
3166 (single_set_2): Likewise.
3167 (noop_move_p): Likewise.
3168 (note_stores): Likewise.
3169 * sched-deps.c (sched_analyze_reg): Likewise.
3170 (sched_analyze_insn): Likewise.
3172 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3174 * cse.c (invalidate_reg): New function extracted from...
3175 (invalidate): ...here.
3176 (canonicalize_insn): Check for clobber high.
3177 (invalidate_from_clobbers): invalidate clobber highs.
3178 (invalidate_from_sets_and_clobbers): Likewise.
3179 (count_reg_usage): Check for clobber high.
3180 (insn_live_p): Likewise.
3181 * cselib.c (cselib_expand_value_rtx_1):Likewise.
3182 (cselib_invalidate_regno): Check for clobber in setter.
3183 (cselib_invalidate_rtx): Pass through setter.
3184 (cselib_invalidate_rtx_note_stores):
3185 (cselib_process_insn): Check for clobber high.
3186 * cselib.h (cselib_invalidate_rtx): Add operand.
3188 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3190 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3191 (mark_not_eliminable): Likewise.
3192 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3193 * lra-lives.c (process_bb_lives): Check for clobber high.
3194 * lra.c (new_insn_reg): Remember clobber highs.
3195 (collect_non_operand_hard_regs): Check for clobber high.
3196 (lra_set_insn_recog_data): Likewise.
3197 (add_regs_to_insn_regno_info): Likewise.
3198 (lra_update_insn_regno_info): Likewise.
3200 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3202 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3203 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3205 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3207 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3208 (copy_insn_1): Likewise.
3209 (gen_hard_reg_clobber_high): New gen function.
3210 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3211 * genemit.c (gen_exp): Likewise.
3212 (gen_emit_seq): Pass through info.
3213 (gen_insn): Check for CLOBBER_HIGH.
3214 (gen_expand): Pass through info.
3215 (gen_split): Likewise.
3216 (output_add_clobbers): Likewise.
3217 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3218 (remove_clobbers): Likewise.
3219 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3221 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3223 * doc/rtl.texi (clobber_high): Add.
3224 (parallel): Add in clobber high
3225 * rtl.c (rtl_check_failed_code3): Add function.
3226 * rtl.def (CLOBBER_HIGH): Add expression.
3227 * rtl.h (RTL_CHECKC3): Add macro.
3228 (rtl_check_failed_code3): Add declaration.
3229 (XC3EXP): Add macro.
3231 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3234 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3235 cfun->machine->max_used_stack_alignment if needed.
3237 2018-08-04 Martin Sebor <msebor@redhat.com>
3239 PR tree-optimization/86571
3240 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3243 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3246 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3249 2018-08-03 Jeff Law <law@redhat.com>
3252 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3253 Define to speculation_safe_value_not_needed.
3255 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3257 * doc/gcov.texi (-x): Remove duplicate "to".
3258 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3259 (-Wif-not-aligned): Remove duplicate "is".
3260 (-flto): Remove duplicate "the".
3261 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3262 duplicate "v5.00.b".
3263 (MSP430 Options): Remove duplicate "and" from the description
3264 of "-mgprel-sec=regexp".
3265 (x86 Options): Remove duplicate copies of "vmldLog102" and
3266 vmlsLog104 from description of "-mveclibabi=type".
3268 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3270 * internal-fn.h (first_commutative_argument): Declare.
3271 * internal-fn.c (first_commutative_argument): New function.
3272 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3273 restrictions for pattern statements. Use first_commutative_argument
3274 to look for commutative operands in calls to internal functions.
3276 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3278 * Makefile.in (wide-int-range.o): New.
3279 * tree-vrp.c: Move all the wide_int_* functions to...
3280 * wide-int-range.cc: ...here.
3281 * tree-vrp.h: Move all the wide_int_* prototypes to...
3282 * wide-int-range.h: ...here.
3284 2018-08-03 Tom de Vries <tdevries@suse.de>
3286 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3288 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3289 * except.c (output_function_exception_table): Do early exit if
3290 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3292 2018-08-03 Martin Liska <mliska@suse.cz>
3294 * predict.c (dump_prediction): Change to 2 digits
3297 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3299 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3301 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3303 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3305 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3306 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3307 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3308 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3309 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3311 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3313 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3314 pp_take_prefix when saving the existing prefix.
3315 * diagnostic.c (diagnostic_append_note): Likewise.
3316 * langhooks.c (lhd_print_error_function): Likewise.
3317 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3318 param's type. Free the existing prefix.
3319 (pp_take_prefix): New function.
3320 (pretty_printer::pretty_printer): Drop the prefix parameter.
3321 Rename the length parameter to match the comment.
3322 (pretty_printer::~pretty_printer): Free the prefix.
3323 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3325 (struct pretty_printer): Drop the "const" from "prefix" field's
3326 type and clarify memory management.
3327 (pp_set_prefix): Drop the "const" from the 2nd param.
3328 (pp_take_prefix): New decl.
3330 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3332 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3333 for word_mode_ok here instead of passing as argument.
3334 (expand_block_compare): Change select_block_compare_mode() call.
3335 (expand_strncmp_gpr_sequence): New function.
3336 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3338 2018-08-02 Jeff Law <law@redhat.com>
3341 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3342 Define to speculation_safe_value_not_needed.
3345 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3346 Define to speculation_safe_value_not_needed.
3348 2018-08-02 Tom de Vries <tdevries@suse.de>
3351 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3352 function. Return UI_TARGET unconditionally.
3353 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3354 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3356 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3358 * genemit.c (print_overload_test): Fix typo.
3360 2018-08-02 Richard Biener <rguenther@suse.de>
3362 PR tree-optimization/86816
3363 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3364 which checks for value availability before querying it.
3365 (gvn_uses_equal): Use it.
3366 (same_succ_hash): Likewise.
3367 (gimple_equal_p): Likewise.
3369 2018-08-02 Nick Clifton <nickc@redhat.com>
3372 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3373 Define to speculation_safe_value_not_needed.
3376 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3377 Define to speculation_safe_value_not_needed.
3380 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3381 Define to speculation_safe_value_not_needed.
3384 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3385 Define to speculation_safe_value_not_needed.
3388 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3389 Define to speculation_safe_value_not_needed.
3392 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3393 Define to speculation_safe_value_not_needed.
3396 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3397 Define to speculation_safe_value_not_needed.
3400 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3401 Define to speculation_safe_value_not_needed.
3404 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3405 speculation_safe_value_not_needed.
3408 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3409 to speculation_safe_value_not_needed.
3411 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3413 * doc/md.texi: Expand the documentation of instruction names
3414 to mention port-local uses. Document '@' in pattern names.
3415 * read-md.h (overloaded_instance, overloaded_name): New structs.
3417 (md_reader::handle_overloaded_name): New member function.
3418 (md_reader::get_overloads): Likewise.
3419 (md_reader::m_first_overload): New member variable.
3420 (md_reader::m_next_overload_ptr): Likewise.
3421 (md_reader::m_overloads_htab): Likewise.
3422 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3423 m_next_overload_ptr and m_overloads_htab.
3424 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3425 (get_mode_token, get_code_token, get_int_token): New functions.
3426 (map_attr_string): Add an optional argument that passes back
3427 the associated iterator.
3428 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3429 (md_reader::handle_overloaded_name, add_overload_instance): New
3431 (apply_iterators): Handle '@' names. Report an error if '@'
3432 is used without iterators.
3433 (initialize_iterators): Initialize the new iterator_group fields.
3434 * genopinit.c (handle_overloaded_code_for)
3435 (handle_overloaded_gen): New functions.
3436 (main): Use them to print declarations of maybe_code_for_* and
3437 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3438 * genemit.c (print_overload_arguments, print_overload_test)
3439 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3440 (main): Use it to print definitions of maybe_code_for_* and
3441 maybe_gen_* functions.
3442 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3443 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3444 instead of explicit mode checks.
3445 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3446 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3447 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3448 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3449 (aarch64_expand_compare_and_swap): Likewise
3450 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3451 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3452 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3453 (aarch64_constant_pool_reload_icode): Delete.
3454 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3455 instead of aarch64_constant_pool_reload_icode. Use
3456 code_for_aarch64_reload_mov instead of explicit mode checks.
3457 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3458 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3459 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3460 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3461 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3462 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3463 (aarch64_atomic_load_op_code): Delete.
3464 (aarch64_emit_atomic_load_op): Likewise.
3465 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3466 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3467 instead of aarch64_emit_atomic_load_op.
3468 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3469 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3470 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3471 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3472 character before the pattern name.
3473 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3474 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3475 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3476 (aarch64_frecps<mode>): Likewise.
3477 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3478 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3479 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3480 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3481 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3483 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3485 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3486 Allow HFmode constants if TARGET_FP_F16INST.
3488 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3491 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3492 No longer check last store for clobber of address register.
3494 2018-08-02 Martin Liska <mliska@suse.cz>
3496 PR gcov-profile/86817
3497 * gcov.c (process_all_functions): New function.
3499 (process_file): Move functions processing to
3500 process_all_functions.
3502 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3504 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3505 "const" to the "gimple *" and "rtx_insn *" parameters.
3506 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3508 (dump_location_t::dump_location_t): Likewise.
3510 2018-08-01 Martin Sebor <msebor@redhat.com>
3512 PR tree-optimization/86650
3513 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3514 rather than a "gcall *". Directly pass the data of interest
3515 to percent_K_format, rather than building a temporary CALL_EXPR
3517 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3518 (gimple_fold_builtin_strncat): Adjust.
3519 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3520 gcall* argument with gimple*.
3521 * gimple-ssa-warn-restrict.c (check_call): Same.
3522 (wrestrict_dom_walker::before_dom_children): Same.
3523 (builtin_access::builtin_access): Same.
3524 (check_bounds_or_overlap): Same
3525 (maybe_diag_overlap): Same.
3526 (maybe_diag_offset_bounds): Same.
3527 * tree-diagnostic.c (default_tree_printer): Move usage of
3528 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3530 * tree-pretty-print.c (percent_K_format): Add argument.
3531 * tree-pretty-print.h: Add argument.
3532 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3533 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3534 (maybe_diag_stxncpy_trunc): Same.
3535 (handle_builtin_stxncpy): Same.
3536 (handle_builtin_strcat): Same.
3538 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3540 * match.pd: Optimise pointer range checks.
3542 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3544 PR tree-optimization/86758
3545 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3546 to remove pattern statements.
3548 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3550 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3551 result of dfs_enumerate_from when constructing stmt_vec_infos,
3552 instead of additionally calling get_loop_body.
3554 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3556 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3558 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3559 When creating an iv, assert that the step is not known to be zero.
3560 (vect_setup_realignment): Update call accordingly.
3561 * tree-vect-stmts.c (vectorizable_store): Likewise.
3562 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3564 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3566 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3567 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3568 (vectorizable_reduction): Likewise.
3569 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3570 (vect_detect_hybrid_slp_stmts): Likewise.
3571 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3573 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3575 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3576 (wide_int_set_zero_nonzero_bits): ...this.
3577 (zero_nonzero_bits_from_vr): Rename to...
3578 (vrp_set_zero_nonzero_bits): ...this.
3579 (extract_range_from_multiplicative_op_1): Abstract wide int
3581 (wide_int_range_multiplicative_op): ...here.
3582 (extract_range_from_binary_expr_1): Extract wide int binary
3583 operations into their own functions.
3584 (wide_int_range_lshift): New.
3585 (wide_int_range_can_optimize_bit_op): New.
3586 (wide_int_range_shift_undefined_p): New.
3587 (wide_int_range_bit_xor): New.
3588 (wide_int_range_bit_ior): New.
3589 (wide_int_range_bit_and): New.
3590 (wide_int_range_trunc_mod): New.
3591 (extract_range_into_wide_ints): New.
3592 (vrp_shift_undefined_p): New.
3593 (extract_range_from_multiplicative_op): New.
3594 (vrp_can_optimize_bit_op): New.
3595 * tree-vrp.h (value_range::dump): New.
3596 (wide_int_range_multiplicative_op): New.
3597 (wide_int_range_lshift):New.
3598 (wide_int_range_shift_undefined_p): New.
3599 (wide_int_range_bit_xor): New.
3600 (wide_int_range_bit_ior): New.
3601 (wide_int_range_bit_and): New.
3602 (wide_int_range_trunc_mod): New.
3603 (zero_nonzero_bits_from_bounds): Rename to...
3604 (wide_int_set_zero_nonzero_bits): ...this.
3605 (zero_nonzero_bits_from_vr): Rename to...
3606 (vrp_set_zero_nonzero_bits): ...this.
3607 (range_easy_mask_min_max): Rename to...
3608 (wide_int_range_can_optimize_bit_op): this.
3609 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3610 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3612 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3614 * tree-vectorizer.h (vect_orig_stmt): New function.
3615 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3616 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3617 (vect_create_epilog_for_reduction): Likewise.
3618 (vectorizable_live_operation): Likewise.
3619 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3620 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3621 * tree-vect-stmts.c (vectorizable_call): Likewise.
3622 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3624 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3626 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3628 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3629 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3630 (vect_transform_loop): Likewise.
3631 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3633 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3635 * tree-vectorizer.h (vect_schedule_slp): Return void.
3636 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3637 (vect_schedule_slp): Likewise.
3639 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3641 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3643 (vect_transform_loop): Update calls accordingly. Schedule SLP
3644 instances before the main loop, if any exist.
3646 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3648 PR tree-optimization/86749
3649 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3650 If the lhs is used in a COND_EXPR, check that it is being used
3651 as the "then" or "else" value.
3653 2018-08-01 Tom de Vries <tdevries@suse.de>
3656 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3657 speculation_safe_value_not_needed.
3659 2018-08-01 Richard Biener <rguenther@suse.de>
3661 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3664 2018-08-01 Martin Liska <mliska@suse.cz>
3666 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3667 format how successful transformation is dumped.
3668 (gimple_mod_pow2_value_transform): Likewise.
3669 (gimple_mod_subtract_transform): Likewise.
3670 (gimple_stringops_transform): Likewise.
3672 2018-08-01 Martin Liska <mliska@suse.cz>
3675 * value-prof.c (interesting_stringop_to_profile_p):
3676 Simplify the code and add BUILT_IN_MEMMOVE.
3677 (gimple_stringops_transform): Likewise.
3679 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3681 * config/aarch64/aarch64-simd.md
3682 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3683 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3684 use GPI iterator instead of SI mode.
3686 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3688 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3689 rs6000_speculation_barrier.
3690 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3691 new barrier pattern name.
3693 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3695 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3696 (speculation_barrier): New insn.
3698 2018-08-01 Richard Biener <rguenther@suse.de>
3701 * graphite.h: Include isl/id.h and isl/space.h to allow build
3704 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3707 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3708 mode for COFF targets.
3709 * defaults.h (TARGET_COFF): Define.
3710 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3711 TARGET_COFF): Define.
3712 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3713 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3714 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3716 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3718 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3719 * gimple-streamer-out.c (output_bb): Save it.
3720 * lto-streamer-in.c (input_struct_function_base): Restore
3721 instance discriminator if available. Create map on demand.
3722 * lto-streamer-out.c (output_struct_function_base): Save it if
3724 * final.c (decl_to_instance_map): Document LTO strategy.
3726 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3727 Olivier Hainque <hainque@adacore.com>
3729 * debug.h (decl_to_instance_map_t): New type.
3730 (decl_to_instance_map): Declare.
3731 (maybe_create_decl_to_instance_map): New inline function.
3732 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3733 to track basic block discriminators.
3734 (final_start_function_1): Initialize them.
3735 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3737 (decl_to_instance_map): New variable.
3738 (map_decl_to_instance, maybe_set_discriminator): New functions.
3739 (notice_source_line): Set discriminator.
3741 2018-07-31 Ian Lance Taylor <iant@golang.org>
3743 * targhooks.c (default_have_speculation_safe_value): Add
3746 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3748 * dump-context.h: Include "pretty-print.h".
3749 (dump_context::refresh_dumps_are_enabled): New decl.
3750 (dump_context::emit_item): New decl.
3751 (class dump_context): Add fields "m_test_pp" and
3753 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3754 (temp_dump_context::get_dumped_text): New decl.
3755 (class temp_dump_context): Add field "m_pp".
3756 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3757 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3759 (set_dump_file): Update for above change.
3760 (set_alt_dump_file): Likewise.
3761 (dump_loc): New overload, taking a pretty_printer *.
3762 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3763 to any test pretty-printer.
3764 (make_item_for_dump_gimple_stmt): New function, adapted from
3765 optinfo::add_gimple_stmt.
3766 (dump_context::dump_gimple_stmt): Call it, and use the result,
3767 eliminating the direct usage of dump_file and alt_dump_file in
3768 favor of indirectly using them via emit_item.
3769 (make_item_for_dump_gimple_expr): New function, adapted from
3770 optinfo::add_gimple_expr.
3771 (dump_context::dump_gimple_expr): Call it, and use the result,
3772 eliminating the direct usage of dump_file and alt_dump_file in
3773 favor of indirectly using them via emit_item.
3774 (make_item_for_dump_generic_expr): New function, adapted from
3776 (dump_context::dump_generic_expr): Call it, and use the result,
3777 eliminating the direct usage of dump_file and alt_dump_file in
3778 favor of indirectly using them via emit_item.
3779 (make_item_for_dump_printf_va): New function, adapted from
3780 optinfo::add_printf_va.
3781 (make_item_for_dump_printf): New function.
3782 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3783 and use the result, eliminating the direct usage of dump_file and
3784 alt_dump_file in favor of indirectly using them via emit_item.
3785 (make_item_for_dump_dec): New function.
3786 (dump_context::dump_dec): Call it, and use the result,
3787 eliminating the direct usage of dump_file and alt_dump_file in
3788 favor of indirectly using them via emit_item.
3789 (make_item_for_dump_symtab_node): New function, adapted from
3790 optinfo::add_symtab_node.
3791 (dump_context::dump_symtab_node): Call it, and use the result,
3792 eliminating the direct usage of dump_file and alt_dump_file in
3793 favor of indirectly using them via emit_item.
3794 (dump_context::begin_scope): Reimplement, avoiding direct usage
3795 of dump_file and alt_dump_file in favor of indirectly using them
3797 (dump_context::emit_item): New member function.
3798 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3799 Set up test pretty-printer on the underlying context. Call
3800 refresh_dumps_are_enabled.
3801 (temp_dump_context::~temp_dump_context): Call
3802 refresh_dumps_are_enabled.
3803 (temp_dump_context::get_dumped_text): New member function.
3804 (selftest::verify_dumped_text): New function.
3805 (ASSERT_DUMPED_TEXT_EQ): New macro.
3806 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3807 and then without optinfo enabled. Add uses of
3808 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3809 * dumpfile.h: Update comment for the dump_* API.
3810 * optinfo-emit-json.cc
3811 (selftest::test_building_json_from_dump_calls): Update for new
3812 param for temp_dump_context ctor.
3813 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3814 and "m_owned" field.
3815 (optinfo_item::~optinfo_item): Likewise.
3816 (optinfo::add_item): New member function.
3817 (optinfo::emit): Update comment.
3818 (optinfo::add_string): Delete.
3819 (optinfo::add_printf): Delete.
3820 (optinfo::add_printf_va): Delete.
3821 (optinfo::add_gimple_stmt): Delete.
3822 (optinfo::add_gimple_expr): Delete.
3823 (optinfo::add_tree): Delete.
3824 (optinfo::add_symtab_node): Delete.
3825 (optinfo::add_dec): Delete.
3826 * optinfo.h (class dump_context): New forward decl.
3827 (optinfo::add_item): New decl.
3828 (optinfo::add_string): Delete.
3829 (optinfo::add_printf): Delete.
3830 (optinfo::add_printf_va): Delete.
3831 (optinfo::add_gimple_stmt): Delete.
3832 (optinfo::add_gimple_expr): Delete.
3833 (optinfo::add_tree): Delete.
3834 (optinfo::add_symtab_node): Delete.
3835 (optinfo::add_dec): Delete.
3836 (optinfo::add_poly_int): Delete.
3837 (optinfo_item::optinfo_item): Remove "owned" param.
3838 (class optinfo_item): Remove field "m_owned".
3840 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3843 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3844 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3845 requested variable alignment.
3846 (expand_one_ssa_partition): Likewise.
3847 (expand_one_var): Likewise.
3849 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3851 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3852 to speculation_safe_value_not_needed.
3854 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3856 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3857 * targhooks.c (speculation_safe_value_not_needed): New function.
3858 * target.def (have_speculation_safe_value): Update documentation.
3859 * doc/tm.texi: Regenerated.
3861 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3863 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3864 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3866 (despeculate_copy<ALLI:mode>_insn): New insn.
3867 (despeculate_copyti_insn): New insn.
3868 (despeculate_simple<ALLI:mode>): New insn
3869 (despeculate_simpleti): New insn.
3870 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3872 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3873 aarch64_speculation_safe_value.
3874 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3876 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3878 * config/aarch64/aarch64-speculation.cc: New file.
3879 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3880 before pass_reorder_blocks.
3881 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3883 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3884 X14 and X15 when tracking speculation.
3885 * config/aarch64/aarch64.md (register name constants): Add
3886 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3887 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3888 (speculation_barrier): New insn attribute.
3889 (cmp<mode>): Allow SP in comparisons.
3890 (speculation_tracker): New insn.
3891 (speculation_barrier): Add speculation_barrier attribute.
3892 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3893 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3894 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3896 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3898 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3899 aarch64_track_speculation is true.
3900 (tb<optab><mode>1): Likewise.
3901 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3902 generate CB[N]Z when tracking speculation.
3903 (aarch64_split_compare_and_swap): Likewise.
3904 (aarch64_split_atomic_op): Likewise.
3906 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3908 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3910 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3912 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3913 (speculation_barrier): New insn.
3915 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3917 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3918 * config/arm/arm.md (speculation_barrier): New expand.
3919 (speculation_barrier_insn): New pattern.
3921 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3923 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3924 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3925 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3926 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3928 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3929 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3930 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3931 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3932 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3933 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3934 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3935 * builtins.c (expand_speculation_safe_value): New function.
3936 (expand_builtin): Call it.
3937 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3938 * doc/extend.texi: Document __builtin_speculation_safe_value.
3939 * doc/md.texi: Document "speculation_barrier" pattern.
3940 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3941 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3942 * doc/tm.texi: Regenerated.
3943 * target.def (have_speculation_safe_value, speculation_safe_value): New
3945 * targhooks.c (default_have_speculation_safe_value): New function.
3946 (default_speculation_safe_value): New function.
3947 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3948 (default_speculation_safe_value): Add prototype.
3950 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3952 * dump-context.h (dump_context::dump_loc): New decl.
3953 * dumpfile.c (dump_context::dump_loc): New member function.
3954 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3955 and dump_gimple_stmt.
3956 (dump_context::dump_gimple_expr_loc): Likewise, using
3958 (dump_context::dump_generic_expr_loc): Likewise, using
3960 (dump_context::dump_printf_loc_va): Likewise, using
3962 (dump_context::begin_scope): Explicitly using the global function
3963 "dump_loc", rather than the member function.
3965 2018-07-31 Martin Sebor <msebor@redhat.com>
3967 PR tree-optimization/86741
3968 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3970 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3972 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3973 depend on whether prefetch instructions will be emitted or not.
3974 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3975 will be emitted or not.
3976 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3977 (TARGET_SETMEM_PFD): New macros.
3979 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3981 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3982 (NULL_STMT_VEC_INFO): Delete.
3983 (stmt_vec_info::operator*): Likewise.
3984 (stmt_vec_info::operator gimple *): Likewise.
3985 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3986 of NULL_STMT_VEC_INFO.
3987 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3988 (vect_reassociating_reduction_p): Likewise.
3989 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3990 (vectorizable_store): Likewise.
3991 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3992 (vec_info::free_stmt_vec_infos): Likewise.
3994 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3996 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3997 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3999 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4001 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4002 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4003 (vec_info::free_stmt_vec_info): New private member functions.
4004 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4005 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4006 * tree-parloops.c (gather_scalar_reductions): Remove calls to
4007 set_stmt_vec_info_vec and free_stmt_vec_infos.
4008 * tree-vect-loop.c (_loop_vec_info): Remove call to
4009 set_stmt_vec_info_vec.
4010 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4011 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4012 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4013 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4014 (vec_info::free_stmt_vec_info): ...these new functions. Remove
4015 assignments in {vec_info::,}new_stmt_vec_info that are redundant
4016 with the clearing in the xcalloc.
4017 (stmt_vec_info_vec): Delete.
4018 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4019 (vectorize_loops): Likewise.
4020 (vec_info::~vec_info): Remove argument from call to
4021 free_stmt_vec_infos.
4022 (vec_info::add_stmt): Remove vinfo argument from call to
4025 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4027 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4028 rather than a gimple stmt.
4029 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
4030 information for pattern statements when passed the original
4031 statement; instead wait to be passed the pattern statement itself.
4032 Don't call set_vinfo_for_stmt here.
4033 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4034 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4035 stmt_vec_infos here.
4036 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4037 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4038 stmt_vec_infos entry.
4040 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4042 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4043 * tree-vectorizer.c (vec_info::replace_stmt): New function.
4044 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4045 * tree-vect-stmts.c (vectorizable_call): Likewise.
4046 (vectorizable_simd_clone_call): Likewise.
4048 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4050 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4051 * tree-vectorizer.c (vec_info::remove_stmt): New function.
4052 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4053 * tree-vect-loop.c (vect_transform_loop): Likewise.
4054 * tree-vect-slp.c (vect_schedule_slp): Likewise.
4055 * tree-vect-stmts.c (vect_remove_stores): Likewise.
4057 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4059 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4060 (vect_dr_stmt): Delete.
4061 * tree-vectorizer.c (vec_info::lookup_dr): New function.
4062 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4064 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4065 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4066 (vect_verify_datarefs_alignment, vect_peeling_supportable)
4067 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4068 (vect_analyze_data_refs): Likewise.
4069 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
4071 (vect_find_same_alignment_drs): Likewise.
4072 (vect_slp_analyze_node_dependences): Update calls accordingly.
4073 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4074 instead of DR_VECT_AUX.
4075 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4076 of a vector data references. Use vec_info::lookup_dr instead of
4078 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4079 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4080 instead of DR_VECT_AUX.
4082 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4084 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4086 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4088 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4089 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4090 (vect_gen_prolog_loop_niters): Likewise.
4092 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4094 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4095 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4096 (vect_known_alignment_in_bytes, vect_dr_behavior)
4097 (vect_get_scalar_dr_size): Take references as dr_vec_infos
4098 instead of data_references. Update calls to other routines for
4099 which the same change has been made.
4100 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4101 dr_vec_infos instead of stmt_vec_infos.
4102 (vect_analyze_data_ref_dependence): Update call accordingly.
4103 (vect_slp_analyze_data_ref_dependence)
4104 (vect_record_base_alignments): Use DR_VECT_AUX.
4105 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4106 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4107 (vector_alignment_reachable_p, vect_get_data_access_cost)
4108 (vect_peeling_supportable, vect_analyze_group_access_1)
4109 (vect_analyze_group_access, vect_analyze_data_ref_access)
4110 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4111 (vect_compile_time_alias, vect_small_gap_p)
4112 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4113 (vect_supportable_dr_alignment): Take references as dr_vec_infos
4114 instead of data_references. Update calls to other routines for
4115 which the same change has been made.
4116 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4117 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4118 (vect_slp_analyze_and_verify_node_alignment)
4119 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4120 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4121 (vect_setup_realignment): Use dr_vec_infos. Update calls after
4123 (_vect_peel_info::dr): Replace with...
4124 (_vect_peel_info::dr_info): ...this new field.
4125 (vect_peeling_hash_get_most_frequent)
4126 (vect_peeling_hash_choose_best_peeling): Update accordingly.
4127 (vect_peeling_hash_get_lowest_cost):
4128 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
4129 routines for which the same change has been made.
4130 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
4132 * tree-vect-loop-manip.c (get_misalign_in_elems)
4133 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
4135 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4136 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4137 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4138 (get_group_load_store_type, get_negative_load_store_type)
4139 (vect_get_data_ptr_increment, vectorizable_store)
4140 (vectorizable_load): Likewise.
4141 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4142 Update calls to other routines for which the same change has been made.
4144 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4146 * tree-vectorizer.h (vec_info::move_dr): New member function.
4147 (dataref_aux): Rename to...
4148 (dr_vec_info): ...this and add "dr" and "stmt" fields.
4149 (_stmt_vec_info::dr_aux): Update accordingly.
4150 (_stmt_vec_info::data_ref_info): Delete.
4151 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4152 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4153 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4154 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4156 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
4157 (STMT_VINFO_DR_INFO): New macro.
4158 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4159 (set_dr_misalignment): Update after rename of dataref_aux.
4160 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
4161 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4162 initialization of STMT_VINFO_DATA_REF.
4163 * tree-vectorizer.c (vec_info::move_dr): New function.
4164 * tree-vect-patterns.c (vect_recog_bool_pattern)
4165 (vect_recog_mask_conversion_pattern)
4166 (vect_recog_gather_scatter_pattern): Use it.
4167 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4168 the "dr" and "stmt" fields of dr_vec_info instead of
4169 STMT_VINFO_DATA_REF.
4171 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4173 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4174 (is_pattern_stmt_p): Use it.
4175 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4176 on pattern statements.
4178 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4180 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4181 original stmt as a stmt_vec_info rather than a gimple stmt.
4182 (vect_pattern_recog_1): Take the statement directly as a
4183 stmt_vec_info, rather than via a gimple_stmt_iterator.
4184 Update call to vect_mark_pattern_stmts.
4185 (vect_pattern_recog): Update calls accordingly.
4187 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4189 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4190 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4191 a vect_def_type for the first argument.
4192 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4193 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
4194 operand if it isn't defined by a vectorized statement.
4195 (vect_build_gather_load_calls): Remove the mask_dt argument and
4196 update calls to vect_get_vec_def_for_stmt_copy.
4197 (vectorizable_bswap): Likewise the dt argument.
4198 (vectorizable_call): Update calls to vectorizable_bswap and
4199 vect_get_vec_def_for_stmt_copy.
4200 (vectorizable_simd_clone_call, vectorizable_assignment)
4201 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4202 (vectorizable_comparison): Update calls to
4203 vect_get_vec_def_for_stmt_copy.
4204 (vectorizable_store): Likewise. Remove now-unnecessary calls to
4206 (vect_get_loop_based_defs): Remove dt argument and update call
4207 to vect_get_vec_def_for_stmt_copy.
4208 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4209 and vect_get_vec_def_for_stmt_copy.
4210 (vectorizable_load): Update calls to vect_build_gather_load_calls
4211 and vect_get_vec_def_for_stmt_copy.
4212 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4213 (vectorizable_reduction, vectorizable_live_operation): Update calls
4214 to vect_get_vec_def_for_stmt_copy.
4216 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4218 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4219 and gimple stmt arguments with a stmt_vec_info.
4220 (vect_record_base_alignments): Update calls accordingly.
4221 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4222 and gimple stmt arguments with a stmt_vec_info.
4223 (vect_build_slp_tree_1): Remove vinfo argument and update call
4224 to vect_record_max_nunits.
4225 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4226 and vect_record_max_nunits.
4228 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4230 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4231 file and take a stmt_vec_info instead of a gimple stmt.
4232 (supportable_widening_operation, vect_finish_replace_stmt)
4233 (vect_finish_stmt_generation, vect_get_store_rhs)
4234 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4235 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4236 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4237 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4238 (vect_create_data_ref_ptr, bump_vector_ptr)
4239 (vect_permute_store_chain, vect_setup_realignment)
4240 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4241 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4242 (vectorizable_reduction, vectorizable_induction)
4243 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4244 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4245 than gimple stmts as arguments.
4246 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4247 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4248 (can_group_stmts_p, vect_check_gather_scatter)
4249 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4250 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4251 (vect_permute_load_chain, vect_shift_permute_load_chain)
4252 (vect_transform_grouped_load)
4253 (vect_record_grouped_load_vectors): Likewise.
4254 * tree-vect-loop.c (vect_fixup_reduc_chain)
4255 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4256 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4257 (vectorizable_reduction, vectorizable_induction)
4258 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4259 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4260 (vect_get_load_store_mask): Likewise.
4261 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4262 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4263 * tree-vect-stmts.c (vect_mark_relevant)
4264 (is_simple_and_all_uses_invariant)
4265 (exist_non_indexing_operands_for_use_p, process_use)
4266 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4267 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4268 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4269 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4270 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4271 (get_negative_load_store_type, get_load_store_type)
4272 (vect_check_load_store_mask, vect_check_store_rhs)
4273 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4274 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4275 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4276 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4277 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4278 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4279 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4280 (supportable_widening_operation): Likewise.
4282 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4284 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4285 a stmt_vec_info instead of a gcall.
4286 (vect_check_gather_scatter): Update call accordingly.
4287 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4289 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4290 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4291 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4292 instead of a gimple stmt.
4293 (vect_transform_loop): Update calls accordingly.
4294 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4295 stmt_vec_infos instead of gimple stmts.
4296 (vect_analyze_slp_instance): Update use accordingly.
4297 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4298 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4299 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4300 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4301 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4302 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4303 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4304 down to subroutines.
4306 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4308 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4309 of the worklist from a vector of gimple stmts to a vector of
4311 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4312 (vect_mark_stmts_to_be_vectorized): Likewise
4314 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4316 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4317 statement before passing it to vect_analyze_stmt.
4318 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4319 the chain of phi vector definitions. Track the exit phi via its
4321 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4322 STMT_VINFO_REDUC_DEF.
4323 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4324 stmt_vec_infos to handle the statement chains.
4325 (vect_get_slp_defs): Record the first statement in the node
4326 using a stmt_vec_info.
4327 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4328 statements here and pass their stmt_vec_info down to subroutines.
4329 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4330 down to vect_finish_stmt_generation.
4331 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4332 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4333 stmt_vec_infos to subroutines.
4334 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4337 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4339 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4340 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4341 (vect_permute_store_chain, vect_setup_realignment)
4342 (vect_permute_load_chain, vect_shift_permute_load_chain)
4343 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4344 stmts internally, and when passing values to other vectorizer routines.
4345 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4346 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4347 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4348 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4349 (vectorizable_reduction, vectorizable_induction)
4350 (vectorizable_live_operation, vect_transform_loop_stmt)
4351 (vect_transform_loop): Likewise.
4352 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4353 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4354 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4355 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4356 (vect_slp_analyze_node_operations_1): Likewise.
4357 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4358 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4359 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4360 (vect_finish_stmt_generation_1, get_group_load_store_type)
4361 (get_load_store_type, vect_build_gather_load_calls)
4362 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4363 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4364 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4365 (vectorizable_store, vectorizable_load, vectorizable_condition)
4366 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4367 (supportable_widening_operation): Likewise.
4368 (vect_get_vector_types_for_stmt): Likewise.
4369 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4371 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4373 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4374 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4375 (vect_permute_store_chain, vect_permute_load_chain)
4376 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4377 repeated stmt_vec_info lookups.
4378 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4379 (vect_update_ivs_after_vectorizer): Likewise.
4380 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4381 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4382 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4383 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4384 (vect_bb_slp_scalar_cost): Likewise.
4385 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4387 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4389 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4390 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4391 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4392 to get gassigns and gcalls, rather than operating on generc gimple
4394 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4395 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4396 (vectorizable_load, vect_analyze_stmt): Likewise.
4397 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4399 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4401 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4402 return stmt_vec_infos rather than gimple stmts. Do not accept
4404 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4406 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4407 Update use of get_later_stmt.
4408 (vect_get_constant_vectors): Update call accordingly.
4409 (vect_schedule_slp_instance): Likewise
4410 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4411 (vect_slp_analyze_instance_dependence): Likewise.
4412 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4414 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4416 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4417 (stmt_info_for_cost::stmt_info): ...this new field.
4418 (add_stmt_costs): Update accordingly.
4419 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4420 (vect_get_known_peeling_cost): Likewise.
4421 (vect_estimate_min_profitable_iters): Likewise.
4422 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4424 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4426 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4427 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4428 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4430 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4432 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4434 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4435 a gimple stmt to a stmt_vec_info.
4436 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4438 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4440 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4441 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4442 (_loop_vec_info::reduction_chains): Likewise.
4443 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4445 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4447 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4449 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4450 a gimple stmt to a stmt_vec_info.
4451 (_stmt_vec_info::next_element): Likewise.
4452 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4453 (vect_slp_analyze_and_verify_node_alignment)
4454 (vect_analyze_group_access_1, vect_analyze_group_access)
4455 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4456 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4457 (vect_supportable_dr_alignment): Update accordingly.
4458 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4459 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4460 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4461 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4462 * tree-vect-slp.c (vect_build_slp_tree_1)
4463 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4464 (vect_split_slp_store_group, vect_analyze_slp_instance)
4465 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4466 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4467 (get_group_load_store_type, get_load_store_type)
4468 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4469 (vect_transform_stmt, vect_remove_stores): Likewise.
4471 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4473 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4475 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4476 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4477 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4478 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4479 (vector_alignment_reachable_p, vect_get_data_access_cost)
4480 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4481 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4482 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4483 (vect_analyze_group_access_1, vect_analyze_group_access)
4484 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4485 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4486 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4487 result of vect_dr_stmt and use the stmt_vec_info instead of
4488 the associated gimple stmt.
4489 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4490 (vect_gen_prolog_loop_niters): Likewise.
4491 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4493 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4495 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4496 to a vec<stmt_vec_info>.
4497 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4498 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4500 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4501 to a vec<stmt_vec_info>.
4502 (bst_traits::value_type, bst_traits::value_type): Likewise.
4503 (bst_traits::hash): Update accordingly.
4504 (vect_get_and_check_slp_defs): Change the stmts parameter from
4505 a vec<gimple *> to a vec<stmt_vec_info>.
4506 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4507 (vect_build_slp_tree): Likewise.
4508 (vect_build_slp_tree_2): Likewise. Update uses of
4509 SLP_TREE_SCALAR_STMTS.
4510 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4511 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4512 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4513 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4514 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4515 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4516 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4517 (vect_get_constant_vectors, vect_get_slp_defs)
4518 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4519 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4520 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4521 instead of gimple stmts.
4522 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4523 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4524 (vect_slp_analyze_instance_dependence): Update uses of
4525 SLP_TREE_SCALAR_STMTS.
4526 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4527 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4528 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4529 (get_initial_defs_for_reduction): Likewise.
4530 (vect_create_epilog_for_reduction): Likewise.
4531 (vectorize_fold_left_reduction): Likewise.
4532 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4533 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4534 (can_vectorize_live_stmts): Likewise.
4536 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4538 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4539 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4540 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4542 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4544 (gather_scalar_reductions): Update after above interface changes.
4545 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4546 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4548 (vect_force_simple_reduction): Likewise.
4549 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4550 LOOP_VINFO_REDUCTIONS.
4551 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4553 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4555 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4556 a gimple stmt to a stmt_vec_info.
4557 * tree-vect-loop.c (vect_active_double_reduction_p)
4558 (vect_force_simple_reduction, vectorizable_reduction): Update
4561 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4563 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4564 vec<gimple *> to a vec<stmt_vec_info>.
4565 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4566 the reduction_phis argument from a vec<gimple *> to a
4568 (vectorizable_reduction): Likewise the phis local variable that
4569 is passed to vect_create_epilog_for_reduction. Update for new type
4570 of SLP_TREE_VEC_STMTS.
4571 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4572 (vectorizable_live_operation): Likewise.
4573 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4574 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4576 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4578 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4579 a gimple stmt to a stmt_vec_info.
4580 (vectorizable_condition, vectorizable_live_operation)
4581 (vectorizable_reduction, vectorizable_induction): Pass back the
4582 vectorized statement as a stmt_vec_info.
4583 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4584 use of STMT_VINFO_VEC_STMT.
4585 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4586 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4587 as stmt_vec_infos rather than gimple stmts.
4588 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4590 (vectorizable_live_operation): Likewise.
4591 (vectorizable_reduction, vectorizable_induction): Likewise,
4592 updating use of STMT_VINFO_VEC_STMT.
4593 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4594 of STMT_VINFO_VEC_STMT.
4595 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4596 (vectorizable_simd_clone_call, vectorizable_conversion)
4597 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4598 (vectorizable_store, vectorizable_load, vectorizable_condition)
4599 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4600 from a gimple stmt to a stmt_vec_info.
4601 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4602 pointer to a stmt_vec_info to the vectorizable_* routines.
4604 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4606 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4607 a gimple stmt to a stmt_vec_info.
4608 (is_pattern_stmt_p): Update accordingly.
4609 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4610 (vect_record_grouped_load_vectors): Likewise.
4611 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4612 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4613 (vect_model_reduction_cost): Likewise.
4614 (vect_create_epilog_for_reduction): Likewise.
4615 (vectorizable_reduction, vectorizable_induction): Likewise.
4616 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4617 Return the stmt_vec_info for the pattern statement.
4618 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4619 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4620 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4621 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4622 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4623 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4624 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4625 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4627 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4629 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4630 (vect_finish_stmt_generation): Likewise.
4631 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4632 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4633 (vect_build_gather_load_calls): Use the return value of the above
4634 functions instead of a separate call to vinfo_for_stmt. Use narrow
4635 scopes for the input gimple stmt and wider scopes for the associated
4636 stmt_vec_info. Use vec_info::lookup_def when setting these
4637 stmt_vec_infos from an SSA_NAME definition.
4638 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4639 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4640 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4641 (vectorizable_store, vectorizable_load, vectorizable_condition)
4642 (vectorizable_comparison): Likewise.
4643 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4644 (vectorizable_reduction): Likewise.
4646 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4648 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4649 stmt_vec_info * parameter before the optional gimple **.
4650 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4651 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4652 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4653 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4654 (vectorizable_live_operation): Likewise.
4655 * tree-vect-patterns.c (type_conversion_p): Likewise.
4656 (vect_look_through_possible_promotion): Likewise.
4657 (vect_recog_rotate_pattern): Likewise.
4658 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4660 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4662 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4663 a typedef to a wrapper class.
4664 (NULL_STMT_VEC_INFO): New macro.
4665 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4666 (stmt_vec_info::operator*): New function.
4667 (stmt_vec_info::operator gimple *): Likewise.
4668 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4669 (add_stmt_costs): Likewise.
4670 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4671 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4672 (vect_get_known_peeling_cost): Likewise.
4673 (vect_estimate_min_profitable_iters): Likewise.
4674 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4675 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4676 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4677 (vectorizable_store, free_stmt_vec_infos): Likewise.
4678 (new_stmt_vec_info): Change return type of xcalloc to
4681 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4683 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4684 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4685 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4686 a single_imm_use-based sequence.
4687 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4689 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4691 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4692 * tree-vectorizer.c (vec_info::lookup_def): New function.
4693 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4694 (vect_widened_op_tree): Likewise.
4695 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4696 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4697 (vectorizable_reduction): Likewise.
4698 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4700 (vect_is_slp_reduction): Update calls accordingly. Use
4701 vec_info::lookup_def.
4702 (vect_is_simple_reduction): Likewise
4703 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4705 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4707 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4708 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4709 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4711 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4712 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4713 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4714 (vect_is_slp_reduction, vectorizable_induction)
4715 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4716 * tree-vect-patterns.c (vect_init_pattern_stmt):
4717 (vect_determine_min_output_precision_1, vect_determine_precisions)
4718 (vect_pattern_recog): Likewise.
4719 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4720 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4721 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4722 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4723 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4724 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4725 info field from a loop to a loop_vec_info.
4727 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4729 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4730 (vec_info::add_stmt): Declare.
4731 * tree-vectorizer.c (vec_info::add_stmt): New function.
4732 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4733 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4734 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4735 (vectorizable_induction): Likewise.
4736 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4737 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4738 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4739 (vectorizable_load): Likewise.
4740 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4741 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4742 (vect_recog_gather_scatter_pattern): Likewise.
4743 (append_pattern_def_seq): Likewise. Remove a check that is
4744 performed by add_stmt itself.
4746 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4748 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4749 which make_ssa_name was called with new_stmt before new_stmt
4752 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4754 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4756 (vect_is_slp_reduction): ...here...
4757 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4758 that are already known to be false.
4760 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4762 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4763 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4764 STMT_VINFO_NUM_SLP_USES when it's true.
4765 (vect_free_slp_instance): Add a final_p parameter and pass it to
4767 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4768 (vect_analyze_slp_instance): Likewise.
4769 (vect_slp_analyze_operations): Likewise.
4770 (vect_slp_analyze_bb_1): Likewise.
4771 * tree-vectorizer.c (vec_info): Likewise.
4772 * tree-vect-loop.c (vect_transform_loop): Likewise.
4774 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4776 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4777 function is not called for second and subsequent members of
4780 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4782 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4783 cases for nested loops from here to ...
4784 (vect_create_epilog_for_reduction): ...here. Only call
4785 vect_is_simple_use for inner-loop reductions.
4787 2018-07-31 Martin Liska <mliska@suse.cz>
4789 PR gcov-profile/85338
4790 PR gcov-profile/85350
4791 PR gcov-profile/85372
4792 * profile.c (struct location_triplet): New.
4793 (struct location_triplet_hash): Likewise.
4794 (output_location): Do not output a BB that
4795 is already recorded for a line.
4796 (branch_prob): Use streamed_locations.
4798 2018-07-31 Martin Liska <mliska@suse.cz>
4800 PR gcov-profile/85370
4801 * coverage.c (coverage_begin_function): Do not mark target
4802 clones as artificial functions.
4804 2018-07-31 Martin Liska <mliska@suse.cz>
4806 PR gcov-profile/83813
4807 PR gcov-profile/84758
4808 PR gcov-profile/85217
4809 PR gcov-profile/85332
4810 * profile.c (branch_prob): Do not record GOTO expressions
4811 for GIMPLE statements which locations are already streamed.
4813 2018-07-31 Olivier Hainque <hainque@adacore.com>
4815 * gcc.c (handle_spec_function): Accept a soft_matched_part
4816 argument, as do_spec_1. Pass it down to ...
4817 (eval_spec_function): Accept a soft_matched_part argument,
4818 and pass it down to ...
4819 (do_spec_2): Accept a soft_matched_part argument, and pass
4820 it down to do_spec_1.
4821 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4822 (handle_braces): Update call to handle_spec_function.
4823 (driver::set_up_specs): Update calls to do_spec_2.
4824 (compare_debug_dump_opt_spec_function): Likewise.
4825 (compare_debug_self_opt_spec_function): Likewise.
4827 2018-07-31 Olivier Hainque <hainque@adacore.com>
4829 * common.opt (nolibc): New option.
4830 * doc/invoke.texi (Link Options): Document it.
4831 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4832 * config/alpha/linux.h: Likewise.
4833 * config/arc/elf.h: Likewise.
4834 * config/arm/uclinux-elf.h: Likewise.
4835 * config/arm/unknown-elf.h: Likewise.
4836 * config/avr/avrlibc.h: Likewise.
4837 * config/bfin/bfin.h: Likewise.
4838 * config/bfin/linux.h: Likewise.
4839 * config/bfin/uclinux.h: Likewise.
4840 * config/darwin.h: Likewise.
4841 * config/darwin10.h: Likewise.
4842 * config/darwin12.h: Likewise.
4843 * config/gnu-user.h: Likewise.
4844 * config/lm32/uclinux-elf.h: Likewise.
4845 * config/pa/pa-hpux11.h: Likewise.
4846 * config/pa/pa64-hpux.h: Likewise.
4847 * config/sparc/sparc.h: Likewise.
4849 2018-07-31 Olivier Hainque <hainque@adacore.com>
4851 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4852 undefined variables.
4854 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4857 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4860 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4862 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4863 terminated string literal.
4865 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4867 PR rtl-optimization/85160
4868 * combine.c (is_just_move): New function.
4869 (try_combine): Allow combining two instructions into two if neither of
4870 the original instructions was a move.
4872 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4875 * doc/extend.texi (Global Register Variables): Discourage use of type
4877 (Local Register Variables): Likewise.
4879 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4881 PR tree-optimization/86506
4882 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4884 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4887 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4888 hard_regno, make sure no insn between `from` and `to` clobbers it.
4890 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4891 Tom de Vries <tdevries@suse.de>
4893 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4894 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4895 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4896 PTX_DEFAULT_RUNTIME_DIM.
4897 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4899 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4901 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4902 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4903 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4905 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4907 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4909 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4910 predicate to reflect toc fusion has been deleted.
4911 (toc_fusion_mem_raw): Delete, no longer used.
4912 (toc_fusion_mem_wrapped): Likewise.
4913 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4915 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4916 Delete, no longer used.
4917 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4918 meant to be used for toc fusion.
4919 (rs6000_debug_print_mode): Delete toc fusion debugging.
4920 (rs6000_debug_reg_global): Likewise.
4921 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4922 fusion and secondary reload support that were never used.
4923 (rs6000_option_override_internal): Delete TOC fusion, that was only
4924 partially defined, and it did not work unless you also used the
4926 (rs6000_legitimate_address_p): Delete TOC fusion support.
4927 (rs6000_opt_masks): Likewise.
4928 (fusion_wrap_memory_address): Delete function, no longer used.
4929 (fusion_split_address); Delete TOC fusion support.
4930 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4931 longer used with toc fusion being deleted.
4932 (TARGET_TOC_FUSION_FP): Likewise.
4933 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4935 (toc fusion spliter): Delete TOC fusion support.
4936 (toc_fusionload_<mode>): Likewise.
4937 (toc_fusionload_di): Likewise.
4938 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4939 longer needs to be named. Rename predicate to delete TOC fusion.
4940 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4941 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4942 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4943 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4944 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4946 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4948 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4949 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4950 __int128 in built-in function prototypes.
4951 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4952 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4954 2018-07-27 Martin Sebor <msebor@redhat.com>
4956 PR tree-optimization/86696
4957 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4958 types, including enums.
4959 (handle_char_store): Be prepared for the above function to fail.
4961 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4963 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4964 when optimization level is lower than 2 or optimize for size.
4966 2018-07-26 Martin Sebor <msebor@redhat.com>
4968 PR tree-optimization/86043
4969 PR tree-optimization/86042
4970 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4971 (get_string_cst_length): Rename...
4972 (get_min_string_length): ...to this. Add argument.
4973 (handle_char_store): Extend to handle multi-character stores by
4975 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4976 * tree.h (initializer_zerop): Add argument.
4978 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4981 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4982 declare target to variables if they have always,{to,from,tofrom} map
4985 2018-07-26 Martin Liska <mliska@suse.cz>
4988 * lto-wrapper.c: Add linker_output as prefix
4989 for ltrans_output_file.
4991 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4993 PR rtl-optimization/85805
4994 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4995 value for hard registers if that was written in the same mode.
4997 2018-07-26 Martin Liska <mliska@suse.cz>
4999 PR gcov-profile/86536
5000 * gcov.c (format_gcov): Use printf format %.*f directly
5001 and do not handle special values.
5003 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5005 * common/config/arc/arc-common.c (arc_option_optimization_table):
5006 Update default optimizations for size.
5008 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5010 * config/arc/arc.md (movsf_insn): Add short instruction selection.
5011 * config/arc/constraints.md (CfZ): New constraint.
5012 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5013 (subsf3_fpu): Likewise.
5014 (cmpsf_fpu): Likewise.
5015 (cmpsf_fpu_uneq): Likewise.
5017 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5019 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5021 (arc_is_uncached_mem_p): uncached applies to both the variable and
5024 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5026 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5029 2018-07-25 David Malcolm <dmalcolm@redhat.com>
5031 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5032 field "m_scopes" from vec to auto_vec.
5034 2018-07-25 Martin Liska <mliska@suse.cz>
5036 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5039 2018-07-25 Richard Biener <rguenther@suse.de>
5042 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5043 special wrt context_die late.
5044 (gen_subprogram_die): Re-use DIEs in local scope.
5046 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
5048 PR tree-optimization/86644
5049 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
5051 2018-07-25 Martin Liska <mliska@suse.cz>
5054 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5055 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5057 2018-07-25 Martin Liska <mliska@suse.cz>
5060 * params.def: Explain ASan abbreviation and provide
5061 a documentation link.
5063 2018-07-24 Martin Sebor <msebor@redhat.com>
5065 PR tree-optimization/86622
5066 PR tree-optimization/86532
5067 * builtins.h (string_length): Declare.
5068 * builtins.c (c_strlen): Correct handling of non-constant offsets.
5069 (check_access): Be prepared for non-constant length ranges.
5070 (string_length): Make extern.
5071 * expr.c (string_constant): Only handle the minor non-constant
5072 array index. Use string_constant to compute the length of
5073 a generic string constant.
5075 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
5077 PR tree-optimization/86618
5078 * tree-vect-stmts.c (vectorizable_call): Don't take the address
5079 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5081 2018-07-24 David Malcolm <dmalcolm@redhat.com>
5083 PR tree-optimization/86636
5084 * json.cc (json::object::set): Fix comment. Add assertions.
5085 (json::array::append): Move here from json.h. Add comment and an
5087 (json::string::string): Likewise.
5088 * json.h (json::array::append): Move to json.cc.
5089 (json::string::string): Likewise.
5090 * optinfo-emit-json.cc
5091 (optrecord_json_writer::impl_location_to_json): Assert that we
5092 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5093 wrapper around it. Expand the location once, rather than three
5095 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5096 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5098 (optrecord_json_writer::optinfo_to_json): Likewise, in four
5099 places. Fix some overlong lines.
5101 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
5103 * config/aarch64/aarch64-simd.md
5104 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5105 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5106 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5107 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5108 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5109 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5110 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5111 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5112 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5114 2018-07-24 Jakub Jelinek <jakub@redhat.com>
5117 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5118 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
5119 and abs_d == d, do the power of two handling if profitable.
5121 2018-07-24 Richard Biener <rguenther@suse.de>
5123 * match.pd: Add BIT_FIELD_REF canonicalizations.
5125 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5128 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5130 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5132 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5133 terminated STRING_CST object.
5135 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5137 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5139 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5141 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5142 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5143 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5144 the elements into a register.
5145 (rs6000_split_v4si_init_di_reg): Delete.
5146 (rs6000_split_v4si_init): Delete.
5147 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5148 (vsx_init_v4si): Rewrite as a define_expand.
5150 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5152 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5153 zero_extend argument from memory): New.
5155 2018-07-22 Martin Sebor <msebor@redhat.com>
5158 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5159 diagnosing calls with unknown arguments unless -Walloca-larger-than
5160 is restricted to less than PTRDIFF_MAX bytes.
5162 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
5164 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5166 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5168 * pretty-print.c (text_info::set_location): Remove redundant
5169 "line_table" parameter from call to rich_location::set_range.
5171 2018-07-20 Martin Sebor <msebor@redhat.com>
5174 * builtins.c (expand_builtin_alloca): Adjust.
5175 * calls.c (alloc_max_size): Simplify.
5176 * cgraphunit.c (cgraph_node::expand): Adjust.
5177 * common.opt (larger_than_size, warn_frame_larger_than): Remove
5179 (frame_larger_than_size): Same.
5180 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5181 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5183 * doc/invoke.texi (GCC Command Options): Document option arguments.
5184 Explain byte-size arguments and suffixes.
5185 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5186 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5187 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5188 * doc/options.texi (UInteger): Expand.
5189 (Host_Wide_Int, ByteSize): Document new properties.
5190 * final.c (final_start_function_1): Include sizes in an error message.
5191 * function.c (frame_offset_overflow): Same.
5192 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5193 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5194 Diagnose unbounded alloca calls only for limits of less than
5196 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
5197 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
5199 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
5200 only for limits of less than PTRDIFF_MAX.
5201 * langhooks-def.h (lhd_handle_option): Change function argument
5203 * langhooks.c (lhd_handle_option): Same.
5204 * langhooks.h (handle_option): Same.
5205 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5207 (var_type, var_type_struct): Same.
5208 (var_set): Handle ByteSize flag.
5209 * optc-gen.awk: Add comments to output to ease debugging. Make
5210 use of HOST_WIDE_INT where appropriate.
5211 * opts-gen-save.awk: Use %lx to format unsigned long.
5212 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5213 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5214 arguments. Parse bytes-size suffixes.
5215 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5216 (enum_value_to_arg): Same.
5217 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
5218 (handle_option): Adjust.
5219 (generate_option): Change function argument to HOST_WIDE_INT.
5220 (cmdline_handle_error): Adjust.
5221 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5222 (set_option): Change function argument to HOST_WIDE_INT.
5223 (option_enabled): Handle cl_host_wide_int.
5224 (get_option_state): Handle CLVC_SIZE.
5225 (control_warning_option): Same.
5226 * opts.c (common_handle_option): Change function argument to
5227 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5228 OPT_Wvla_larger_than_.
5229 * opts.h (enum cl_var_type): Add an enumerator.
5230 * stor-layout.c (layout_decl): Print a more meaningful warning.
5231 * toplev.c (output_stack_usage): Adjust.
5233 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5235 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5236 call to inline_expand_builtin_string_cmp.
5237 (expand_builtin_strcmp): Likewise.
5238 (expand_builtin_strncmp): Likewise.
5239 (inline_string_cmp): Delete the last parameter, change char_type_node
5240 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5242 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5243 the inlining expansion on target where the type of the call has same or
5244 narrower precision than unsigned char.
5246 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5248 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5249 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5250 * common.opt (fsave-optimization-record): New option.
5251 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5252 * doc/invoke.texi (-fsave-optimization-record): New option.
5253 * dumpfile.c: Include "optinfo-emit-json.h".
5254 (struct kv_pair): Move to coretypes.h.
5255 (optgroup_options): Make non-static.
5256 (dump_context::end_scope): Call
5257 optimization_records_maybe_pop_dump_scope.
5258 * dumpfile.h (optgroup_options): New decl.
5259 * json.cc: New file.
5261 * optinfo-emit-json.cc: New file.
5262 * optinfo-emit-json.h: New file.
5263 * optinfo.cc: Include "optinfo-emit-json.h".
5264 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5265 (optinfo_enabled_p): Check optimization_records_enabled_p.
5266 (optinfo_wants_inlining_info_p): Likewise.
5267 * optinfo.h: Update comment.
5268 * profile-count.c (profile_quality_as_string): New function.
5269 * profile-count.h (profile_quality_as_string): New decl.
5270 (profile_count::quality): New accessor.
5271 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5272 and optinfo_emit_json_cc_tests.
5273 * selftest.h (selftest::json_cc_tests): New decl.
5274 (selftest::optinfo_emit_json_cc_tests): New decl.
5275 * toplev.c: Include "optinfo-emit-json.h".
5276 (compile_file): Call optimization_records_finish.
5277 (do_compile): Call optimization_records_start.
5278 * tree-ssa-live.c: Include optinfo.h.
5279 (remove_unused_scope_block_p): Retain inlining information if
5280 optinfo_wants_inlining_info_p returns true.
5282 2018-07-20 Richard Biener <rguenther@suse.de>
5285 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5286 to cover -flto-partition=none.
5288 2018-07-20 Martin Liska <mliska@suse.cz>
5290 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5291 (get_decl_source_range): Remove unused function.
5293 2018-07-20 Richard Biener <rguenther@suse.de>
5295 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5296 (struct vn_phi_s): Likewise.
5297 (struct vn_reference_s): Likewise.
5298 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5299 for searching the slot of an entry known to be in the hash itself.
5300 (vn_phi_hasher::equal): Likewise.
5301 (vn_reference_hasher::equal): Likewise.
5302 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5304 (optimistic_info, current_info): Remove, keeping only valid_info.
5305 (vn_reference_lookup_1): Remove fallback lookup.
5306 (vn_reference_lookup_2): Likewise.
5307 (vn_nary_op_lookup_1): Likewise.
5308 (vn_phi_lookup): Likewise.
5309 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5311 (vn_reference_insert): Adjust, chain the inserted hash element
5312 at last_inserted_ref.
5313 (vn_reference_insert_pieces): Likewise.
5314 (visit_reference_op_call): Likewise.
5315 (vn_nary_op_insert_into): Chain the inserted hash element at
5317 (vn_nary_op_insert_pieces): Adjust.
5318 (vn_nary_op_insert): Likewise.
5319 (vn_nary_op_insert_stmt): Likewise.
5320 (vn_phi_insert): Adjust, chain the inserted hash element at
5322 (process_scc): Remove clearing and copying the optimistic
5323 table. Instead remove elements inserted during an optimistic
5324 iteration from the single table we maintain.
5325 (init_scc_vn): Adjust.
5326 (free_scc_vn): Likewise.
5327 (sccvn_dom_walker::record_cond): Likewise.
5328 (sccvn_dom_walker::after_dom_children): Likewise.
5330 2018-07-19 Martin Sebor <msebor@redhat.com>
5332 PR tree-optimization/84047
5333 PR tree-optimization/83776
5334 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5335 (check_array_bounds): Call it.
5337 2018-07-19 Martin Sebor <msebor@redhat.com>
5339 * align.h (align_flags): Use member initialization.
5341 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5343 * Makefile.in (OBJS): Add optinfo.o.
5344 * coretypes.h (class symtab_node): New forward decl.
5345 (struct cgraph_node): New forward decl.
5346 (class varpool_node): New forward decl.
5347 * dump-context.h: New file.
5348 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5350 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5351 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5352 (set_alt_dump_file): Likewise.
5353 (dump_context::~dump_context): New dtor.
5354 (dump_gimple_stmt): Move implementation to...
5355 (dump_context::dump_gimple_stmt): ...this new member function.
5356 Add the stmt to any pending optinfo, creating one if need be.
5357 (dump_gimple_stmt_loc): Move implementation to...
5358 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5359 Start a new optinfo and add the stmt to it.
5360 (dump_gimple_expr): Move implementation to...
5361 (dump_context::dump_gimple_expr): ...this new member function.
5362 Add the stmt to any pending optinfo, creating one if need be.
5363 (dump_gimple_expr_loc): Move implementation to...
5364 (dump_context::dump_gimple_expr_loc): ...this new member function.
5365 Start a new optinfo and add the stmt to it.
5366 (dump_generic_expr): Move implementation to...
5367 (dump_context::dump_generic_expr): ...this new member function.
5368 Add the tree to any pending optinfo, creating one if need be.
5369 (dump_generic_expr_loc): Move implementation to...
5370 (dump_context::dump_generic_expr_loc): ...this new member
5371 function. Add the tree to any pending optinfo, creating one if
5373 (dump_printf): Move implementation to...
5374 (dump_context::dump_printf_va): ...this new member function. Add
5375 the text to any pending optinfo, creating one if need be.
5376 (dump_printf_loc): Move implementation to...
5377 (dump_context::dump_printf_loc_va): ...this new member function.
5378 Start a new optinfo and add the stmt to it.
5379 (dump_dec): Move implementation to...
5380 (dump_context::dump_dec): ...this new member function. Add the
5381 value to any pending optinfo, creating one if need be.
5382 (dump_context::dump_symtab_node): New member function.
5383 (dump_context::get_scope_depth): New member function.
5384 (dump_context::begin_scope): New member function.
5385 (dump_context::end_scope): New member function.
5386 (dump_context::ensure_pending_optinfo): New member function.
5387 (dump_context::begin_next_optinfo): New member function.
5388 (dump_context::end_any_optinfo): New member function.
5389 (dump_context::s_current): New global.
5390 (dump_context::s_default): New global.
5391 (dump_scope_depth): Delete global.
5392 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5393 (dump_symtab_node): New function.
5394 (get_dump_scope_depth): Reimplement in terms of dump_context.
5395 (dump_begin_scope): Likewise.
5396 (dump_end_scope): Likewise.
5397 (selftest::temp_dump_context::temp_dump_context): New ctor.
5398 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5399 (selftest::verify_item): New function.
5400 (ASSERT_IS_TEXT): New macro.
5401 (ASSERT_IS_TREE): New macro.
5402 (ASSERT_IS_GIMPLE): New macro.
5403 (selftest::test_capture_of_dump_calls): New test.
5404 (selftest::dumpfile_c_tests): Call it.
5405 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5406 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5407 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5408 descriptive comment.
5409 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5410 (dump_node, dump_bb): Move these unrelated decls.
5411 (class dump_manager): Add leading comment.
5412 * optinfo.cc: New file.
5413 * optinfo.h: New file.
5415 2018-07-19 Michael Collison <michael.collison@arm.com>
5416 Richard Henderson <rth@redhat.com>
5418 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5419 (subti): Handle op1 zero.
5420 (subvti4, usub4ti4): New.
5421 (*sub<GPI>3_compare1_imm): New.
5422 (sub<GPI>3_carryinCV): New.
5423 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5424 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5426 2018-07-19 Michael Collison <michael.collison@arm.com>
5427 Richard Henderson <rth@redhat.com>
5429 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5430 (addti3): Create simpler code if low part is already known to be 0.
5431 (addvti4, uaddvti4): New.
5432 (*add<GPI>3_compareC_cconly_imm): New.
5433 (*add<GPI>3_compareC_cconly): New.
5434 (*add<GPI>3_compareC_imm): New.
5435 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5436 handle constants within this pattern..
5437 (*add<GPI>3_compareV_cconly_imm): New.
5438 (*add<GPI>3_compareV_cconly): New.
5439 (*add<GPI>3_compareV_imm): New.
5440 (add<GPI>3_compareV): New.
5441 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5442 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5443 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5444 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5445 with 'comparison' operator.
5446 (*add<GPI>3_compareV_cconly_imm): Ditto.
5447 (*add<GPI>3_compareV_cconly): Ditto.
5448 (*add<GPI>3_compareV_imm): Ditto.
5449 (add<GPI>3_compareV): Ditto.
5450 (add<mode>3_carryinC): Ditto.
5451 (*add<mode>3_carryinC_zero): Ditto.
5452 (*add<mode>3_carryinC): Ditto.
5453 (add<mode>3_carryinV): Ditto.
5454 (*add<mode>3_carryinV_zero): Ditto.
5455 (*add<mode>3_carryinV): Ditto.
5457 2018-07-19 Michael Collison <michael.collison@arm.com>
5458 Richard Henderson <rth@redhat.com>
5460 * config/aarch64/aarch64-modes.def (CC_V): New.
5461 * config/aarch64/aarch64-protos.h
5462 (aarch64_addti_scratch_regs): Declare
5463 (aarch64_subvti_scratch_regs): Declare.
5464 (aarch64_expand_subvti): Declare.
5465 (aarch64_gen_unlikely_cbranch): Declare
5466 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5467 for signed overflow using CC_Vmode.
5468 (aarch64_get_condition_code_1): Handle CC_Vmode.
5469 (aarch64_gen_unlikely_cbranch): New function.
5470 (aarch64_addti_scratch_regs): New function.
5471 (aarch64_subvti_scratch_regs): New function.
5472 (aarch64_expand_subvti): New function.
5474 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5476 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5478 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5479 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5482 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5485 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5486 address check not strict.
5488 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5490 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5492 (store_pair_lanes<mode>): Likewise.
5493 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5494 enum value 'ADDR_QUERY_LDP_STP_N'.
5495 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5496 (aarch64_print_address_internal): Add declaration.
5497 (aarch64_print_ldpstp_address): Remove.
5498 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5499 (aarch64_print_operand): Change printing of 'y'.
5500 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5501 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5502 'true' rather than '1'.
5503 * config/aarch64/constraints.md (Uml): Likewise.
5504 (Uml): Rename to Umn.
5507 2018-07-19 Richard Biener <rguenther@suse.de>
5509 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5511 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5512 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5513 (vn_reference_hasher): Likewise.
5514 (struct vn_tables_s): Remove obstack and alloc-pool members.
5515 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5516 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5517 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5518 (vn_reference_insert_pieces): Likewise.
5519 (alloc_vn_nary_op_noinit): Adjust.
5520 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5521 (vn_phi_eq): Adjust.
5522 (shared_lookup_phiargs): Remove.
5523 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5524 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5525 (visit_reference_op_call): Likewise.
5526 (copy_nary, copy_phi, copy_reference): Remove.
5527 (process_scc): Rewind the obstack when iterating. Do not
5528 copy the elements to valid_info but just move them from one
5529 hashtable to the other.
5530 (allocate_vn_table): Adjust.
5531 (free_vn_table): Likewise.
5532 (init_scc_vn): Likewise.
5533 (free_scc_vn): Likewise.
5535 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5538 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5539 indirect_return as function type attribute.
5540 (ix86_attribute_table): Change indirect_return to function
5542 * doc/extend.texi: Update indirect_return attribute.
5544 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5546 * wide-int.h (widest2_int): New.
5547 * gimple-fold.c (arith_overflowed_p): Use it.
5548 * tree.h (widest2_int_cst): New.
5549 * tree-vrp.c (wide_int_binop_overflow): Rename from
5550 vrp_int_const_binop.
5551 Rewrite to work on trees.
5552 (extract_range_from_multiplicative_op_1): Abstract code to...
5553 (wide_int_range_min_max): ...here.
5554 (wide_int_range_cross_product): ...and here.
5555 (extract_range_from_binary_expr_1): Abstract overflow code to...
5556 (wide_int_range_mult_wrapping): ...here.
5557 * tree-vrp.h (wide_int_range_cross_product): New.
5558 (wide_int_range_mult_wrapping): New.
5560 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5561 Julia Koval <julia.koval@intel.com>
5563 * config/i386/x86-tune-costs.h (skylake_memcpy,
5564 skylake_memset): Replace rep_prefix with unrolling for size 512.
5566 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5569 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5570 comparision with EQ_EXPR in last stmt.
5572 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5574 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5575 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5576 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5577 previously known as "PowerPC AltiVec Built-in Functions". Move
5578 some material to new subsubsections "PowerPC AltiVec Built-in
5579 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5581 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5582 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5583 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5584 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5586 2018-07-18 Richard Biener <rguenther@suse.de>
5588 PR tree-optimization/86557
5589 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5592 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5594 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5596 2018-07-17 Jeff Law <law@redhat.com>
5598 * config/arm/arm.c (get_label_padding): Update for recent
5599 changes to label_to_alignment.
5601 PR tree-optimization/86010
5602 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5604 * config/mips/mips.c (vr4130_align_insns): Update for recent
5605 changes to label_to_alignment.
5607 * config/frv/frv.c (frv_label_align): Update for recent changes
5608 to label_to_alignment.
5610 * config/nios2/nios2.c (nios2_label_align): Update for recent
5611 changes which dropped ALIGN_LABELS_LOG.
5613 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5615 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5616 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5618 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5620 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5621 deprecated align_labels_log.
5623 2018-07-17 Richard Biener <rguenther@suse.de>
5626 * dwarf2out.c (init_sections_and_labels): Always generate
5627 a debug_line_str_section for early LTO debug.
5628 (dwarf2out_finish): Reset debug_line_str_hash output early.
5629 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5631 (dwarf2out_early_finish): Output debug_line_str.
5633 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5635 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5636 index register on z196 or later.
5638 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5640 * config/s390/s390.c (s390_default_align): Set default function
5642 (s390_override_options_after_change): Call s390_default align.
5643 (s390_option_override_internal): Call s390_default_align.
5644 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5646 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5649 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5650 to _looptemp_ clauses, other than the first two.
5652 2018-07-17 Martin Liska <mliska@suse.cz>
5654 * opts.c: Do not enable OPT_falign_* for -Os.
5656 2018-07-17 Martin Liska <mliska@suse.cz>
5658 * align.h (MAX_CODE_ALIGN): New.
5659 (MAX_CODE_ALIGN_VALUE): New.
5660 * common/config/i386/i386-common.c (ix86_handle_option):
5661 (MAX_CODE_ALIGN): Moved to align.h.
5662 * final.c (MAX_CODE_ALIGN): Likewise.
5663 * opts.c (parse_and_check_align_values):
5664 (MAX_CODE_ALIGN): Likewise.
5665 (MAX_CODE_ALIGN_VALUE): Likewise.
5667 2018-07-17 Martin Liska <mliska@suse.cz>
5669 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5670 in order to fulfil coding style.
5671 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5672 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5673 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5674 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5675 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5676 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5677 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5678 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5679 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5681 2018-07-17 Martin Liska <mliska@suse.cz>
5683 * align.h: New file.
5684 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5686 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5687 align_flags of label_to_alignment.
5688 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5690 * config/m68k/m68k.c: Do not use removed align_labels_value and
5692 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5693 (LOOP_ALIGN): Likewise.
5694 (LABEL_ALIGN): Likewise.
5695 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5696 Remove not used macro.
5697 (rs6000_loop_align): Change return type to align_flags.
5698 (rs6000_loop_align_max_skip): Remove.
5699 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5700 Change return type to align_flags.
5701 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5702 Remove not used macro.
5703 (rs6000_loop_align): Change return type to align_flags.
5704 (rs6000_loop_align_max_skip): Remove.
5705 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5706 * config/rx/rx-protos.h (rx_align_for_label): Make it
5708 * config/rx/rx.c (rx_align_for_label): Change return type
5710 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5712 into align_flags class.
5713 (LABEL_ALIGN): Likewise.
5714 (LOOP_ALIGN): Likewise.
5715 * config/s390/s390.c (s390_label_align): Use align_flags
5717 (s390_asm_output_function_label): Likewise.
5718 * config/sh/sh.c (sh_override_options_after_change):
5719 Use align_flags class directly without macros.
5720 (find_barrier): Likewise.
5721 (barrier_align): Likewise.
5722 (sh_loop_align): Likewise.
5723 * config/spu/spu.c (spu_option_override):
5724 Use align_flags_tuple::get_value instead of removed macros.
5725 (spu_sched_init): Likewise.
5726 * config/spu/spu.h (GTY): Likewise.
5727 * config/visium/visium.c (visium_option_override):
5728 Set "8" as default secondary alignment.
5729 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5730 in order to guarantee secondary alignment of 8.
5731 * coretypes.h: Include align.h header file.
5732 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5733 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5734 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5735 * doc/tm.texi.in: Likewise.
5736 * final.c (struct label_alignment): Remove not used structure.
5737 (LABEL_ALIGN): Change type to align_flags.
5738 (LOOP_ALIGN): Likewise.
5739 (JUMP_ALIGN): Likewise.
5740 (default_loop_align_max_skip): Remove.
5741 (default_label_align_max_skip): Likewise.
5742 (default_jump_align_max_skip): Likewise.
5743 (default_label_align_after_barrier_max_skip):
5744 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5745 (LABEL_TO_MAX_SKIP): Remove.
5746 (label_to_alignment): Return align_flags type instead of integer.
5747 (label_to_max_skip): Remove.
5748 (align_fuzz): Use align_flags type.
5749 (compute_alignments): Use align_flags type and use align_flags::max
5750 to combine multiple alignments.
5751 (grow_label_align): Grow vec instead of C array.
5752 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5753 (shorten_branches): Use align_flags type and use align_flags::max
5754 to combine multiple alignments.
5755 (final_scan_insn_1): Remove usage of secondary alignment that comes
5756 from label alignment, but instead use proper secondary alignment
5757 which is computed in grow_label_align.
5758 * flags.h (struct align_flags_tuple): Move to align.h.
5759 (struct align_flags): Likewise.
5760 (state_align_loops): Rename to align_loops.
5761 (state_align_jumps): Rename to align_jumps.
5762 (state_align_labels): Rename to align_labels.
5763 (state_align_functions): Rename to align_functions.
5764 (align_loops_log): Remove.
5765 (align_jumps_log): Remove.
5766 (align_labels_log): Remove.
5767 (align_functions_log): Remove.
5768 (align_loops_max_skip): Remove.
5769 (align_jumps_max_skip): Remove.
5770 (align_labels_max_skip): Remove.
5771 (align_functions_max_skip): Remove.
5772 (align_loops_value): Remove.
5773 (align_jumps_value): Remove.
5774 (align_labels_value): Remove.
5775 (align_functions_value): Remove.
5776 * output.h (label_to_alignment): Change return type to align_flags.
5777 (label_to_max_skip): Remove.
5778 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5779 jump_align_max_skip macros.
5780 * targhooks.h (default_loop_align_max_skip): Remove.
5781 (default_label_align_max_skip): Likewise.
5782 (default_jump_align_max_skip): Likewise.
5783 (default_label_align_after_barrier_max_skip): Remove.
5784 * toplev.c (read_log_maxskip): Use ::normalize function.
5785 (parse_N_M): Remove not used argument and also call ::normalize.
5786 (parse_alignment_opts): Do not pass unused arguments.
5787 * varasm.c (assemble_start_function): Use directly align_functions
5788 instead of removed macros.
5789 * system.h: Do not poison removed macros.
5791 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5794 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5795 and cond temporaries don't have reference type if iterator has
5796 pointer type. For init use &for_pre_body instead of pre_p if
5797 for_pre_body is non-empty.
5799 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5801 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5802 double-double modes to SFmode directly directly.
5803 (trunc<mode>sf2_fprs): Delete.
5805 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5807 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5808 for conversions between IFmode and the decimal floating point modes.
5809 (init_float128_ieee): Use the correct names for conversions between
5810 KFmode and the decimal floating point modes.
5812 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5814 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5815 for the conversions between TDmode and IFmode.
5816 (init_float128_ieee): Use more correct names for the conversions
5817 between TDmode and KFmode.
5819 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5821 PR tree-optimization/86526
5822 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5823 (inline_expand_builtin_string_cmp): Likewise.
5824 (inline_string_cmp): Likewise. Use c_readstr instead of
5825 builtin_memcpy_read_str. Add unit_mode temporary.
5827 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5830 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5831 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5833 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5835 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5836 Alphabetize prototypes of built-in functions, separating out
5837 built-in functions that are listed in this section but should be
5838 described elsewhere.
5840 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5843 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5844 conditional move when trapping comparison was split to a
5845 non-trapping one (and vice versa).
5847 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5849 * config/s390/s390.c (s390_function_profiler): Generate nops
5850 instead of profiler call sequences.
5851 * config/s390/s390.opt: Add the new option.
5853 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5855 * config/s390/s390.c (s390_function_profiler): Generate
5856 __mcount_loc section.
5857 * config/s390/s390.opt: Add the new option.
5859 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5861 * common.opt: Add the new warning.
5862 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5863 %r0,__fentry__" when -mfentry is specified.
5864 (s390_option_override_internal): Disallow -mfentry for 31-bit
5866 * config/s390/s390.opt: Add the new option.
5868 2018-07-16 Richard Biener <rguenther@suse.de>
5871 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5872 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5874 2018-07-16 Martin Liska <mliska@suse.cz>
5877 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5880 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5882 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5884 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5886 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5888 * config/arc/arc-cpus.def (hs4x): New cpu.
5890 * config/arc/arc-tables.opt: Regenerate.
5891 * config/arc/arc.c (arc_sched_issue_rate): New function.
5892 (TARGET_SCHED_ISSUE_RATE): Define.
5893 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5894 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5896 (attr tune): Add ARCHS4x tune values.
5897 (attr tune_dspmpy): Define.
5898 (*tst): Correct instruction type.
5899 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5900 * config/arc/arcHS4x.md: New file.
5901 * config/arc/fpu.md: Update instruction type attributes.
5902 * config/arc/t-multilib: Regenerate.
5904 2018-07-16 Tom de Vries <tdevries@suse.de>
5907 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5909 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5911 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5914 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5916 PR tree-optimization/86514
5917 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5918 conversion to a boolean type from a type with greater precision.
5920 2018-07-16 Tom de Vries <tdevries@suse.de>
5922 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5923 dump_flags request TDF_SLIM.
5925 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5927 * fold-const.c (int_const_binop_1): Abstract...
5928 (wide_int_binop): ...wide int code here.
5929 (poly_int_binop): ...poly int code here.
5930 Abstract the rest of int_const_binop_1 into int_const_binop.
5931 * fold-const.h (wide_int_binop): New.
5932 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5933 Remove useless PLUS/MINUS_EXPR case.
5934 (zero_nonzero_bits_from_vr): Move wide int code...
5935 (zero_nonzero_bits_from_bounds): ...here.
5936 (extract_range_from_binary_expr_1): Move mask optimization code...
5937 (range_easy_mask_min_max): ...here.
5938 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5939 (range_easy_mask_min_max): New.
5941 2018-07-15 Jeff Law <law@redhat.com>
5944 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5947 2018-07-14 Jim Wilson <jimw@sifive.com>
5949 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5951 2018-07-14 Paul Koning <ni1d@arrl.net>
5953 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5955 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5957 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5960 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5961 Steve Munroe <munroesj52@gmail.com>
5963 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5964 (_mm_andnot_si128): Likewise.
5965 (_mm_or_si128): Likewise.
5966 (_mm_xor_si128): Likewise.
5968 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5971 * builtins.c (expand_builtin_memcmp): Inline the calls first
5972 when result_eq is false.
5973 (expand_builtin_strcmp): Inline the calls first.
5974 (expand_builtin_strncmp): Likewise.
5975 (inline_string_cmp): New routine. Expand a string compare
5976 call by using a sequence of char comparison.
5977 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5978 a call to str(n)cmp/memcmp.
5979 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5981 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5983 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5985 * config/arm/driver-arm.c: Include arm-native.h.
5986 (host_detect_local_cpu): Use auto-generated data tables.
5987 (vendors, arm_cpu_table): Delete. Move part information to ...
5988 * config/arm/arm-cpus.in: ... here.
5989 * config/arm/parsecpu.awk (gen_native): New function.
5990 (vendor, part): New CPU fields.
5991 (END): Add support for building the native CPU detection tables.
5992 * config/arm/t-arm (arm-native.h): Add build rule.
5993 (driver-arm.o): Add dependency on arm-native.h.
5995 2018-07-13 Richard Biener <rguenther@suse.de>
5998 * match.pd (addr1 - addr2): Allow either of the operand to
6001 2018-07-13 Tom de Vries <tdevries@suse.de>
6003 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6006 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
6008 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6009 arrays instead of numbered variables.
6011 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
6013 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6014 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6016 2018-07-13 Richard Biener <rguenther@suse.de>
6019 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6020 instead of get_context_die.
6022 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
6023 Richard Biener <rguenther@suse.de>
6026 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6027 that the loop latch destination where phi is defined.
6029 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
6031 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6032 (riscv_expand_epilogue): Add assertion to check interrupt mode.
6033 (riscv_set_current_function): Extract getting interrupt type to new
6035 (riscv_get_interrupt_type): New function.
6036 (riscv_merge_decl_attributes): New function, checking interrupt type is
6038 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6040 2018-07-12 Paul Koning <ni1d@arrl.net>
6042 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6045 2018-07-12 Paul Koning <ni1d@arrl.net>
6047 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6048 zero reference, add doloop_end instead.
6049 * doc/md.texi (decrement_and_branch_until_zero): Remove.
6050 (Looping patterns): Remove decrement_and_branch_until_zero. Add
6051 detail for doloop_end.
6053 2018-07-12 Martin Sebor <msebor@redhat.com>
6056 * attribs.c (decl_attributes): Reject conflicting attributes before
6057 calling attribute handlers.
6059 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6061 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6063 (gcc::dump_manager::get_dump_file_name): likewise.
6064 (dump_begin): Likewise.
6065 * dumpfile.h (dump_begin): Update prototype.
6066 (gcc::dump_manager::get_dump_file_name,
6067 gcc::dump_manager::get_dump_file_name): Update prototype.
6069 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6071 * internal-fn.h (vectorizable_internal_fn_p): New function.
6072 * tree-vect-slp.c (compatible_calls_p): Likewise.
6073 (vect_build_slp_tree_1): Remove nops argument. Handle calls
6074 to internal functions.
6075 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6077 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6079 * fold-const.h (inverse_conditions_p): Declare.
6080 * fold-const.c (inverse_conditions_p): New function.
6081 * match.pd: Use inverse_conditions_p. Add folds of view_converts
6082 that test the inverse condition of a conditional internal function.
6083 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6084 * internal-fn.c (internal_fn_mask_index): Handle conditional
6086 (vectorized_internal_fn_supported_p): New function.
6087 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6088 (any_pred_load_store): Replace with...
6089 (need_to_predicate): ...this new variable.
6090 (redundant_ssa_names): New variable.
6091 (ifcvt_can_use_mask_load_store): Move initial checks to...
6092 (ifcvt_can_predicate): ...this new function. Handle tree codes
6093 for which a conditional internal function exists.
6094 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6095 instead of ifcvt_can_use_mask_load_store. Update after variable
6097 (predicate_load_or_store): New function, split out from
6098 predicate_mem_writes.
6099 (check_redundant_cond_expr): New function.
6100 (value_available_p): Likewise.
6101 (predicate_rhs_code): Likewise.
6102 (predicate_mem_writes): Rename to...
6103 (predicate_statements): ...this. Use predicate_load_or_store
6104 and predicate_rhs_code.
6105 (combine_blocks, tree_if_conversion): Update after above name changes.
6106 (ifcvt_local_dce): Handle redundant_ssa_names.
6107 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6108 general conditional functions.
6109 * tree-vect-stmts.c (vectorizable_call): Likewise.
6111 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6112 Alan Hayward <alan.hayward@arm.com>
6113 David Sherwood <david.sherwood@arm.com>
6115 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6116 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6117 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6118 plus and minus and convert them into IFN_COND_FMA-based sequences.
6119 (convert_mult_to_fma): Handle conditional plus and minus.
6121 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6123 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6124 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6125 (cond_fnms_optab): New optabs.
6126 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6128 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6129 * internal-fn.h (get_conditional_internal_fn): Declare.
6130 (get_unconditional_internal_fn): Likewise.
6131 * internal-fn.c (cond_ternary_direct): New macro.
6132 (expand_cond_ternary_optab_fn): Likewise.
6133 (direct_cond_ternary_optab_supported_p): Likewise.
6134 (FOR_EACH_COND_FN_PAIR): Likewise.
6135 (get_conditional_internal_fn): New function.
6136 (get_unconditional_internal_fn): Likewise.
6137 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6138 (gimple_match_op::gimple_match_op): Add a new overload for 5
6140 (gimple_match_op::set_op): Likewise.
6141 (gimple_resimplify5): Declare.
6142 * genmatch.c (decision_tree::gen): Generate simplifications for
6144 * gimple-match-head.c (gimple_simplify): Define an overload for
6145 5 operands. Handle calls with 5 arguments in the top-level overload.
6146 (convert_conditional_op): Handle conversions from unconditional
6147 internal functions to conditional ones.
6148 (gimple_resimplify5): New function.
6149 (build_call_internal): Pass a fifth operand.
6150 (maybe_push_res_to_seq): Likewise.
6151 (try_conditional_simplification): Try converting conditional
6152 internal functions to unconditional internal functions.
6153 Handle 3-operand unconditional forms.
6154 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6155 Define ternary equivalents of the current rules for binary conditional
6157 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6159 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6160 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6161 (optab): Handle them.
6162 (SVE_COND_FP_TERNARY): New int iterator.
6163 (sve_fmla_op, sve_fmad_op): New int attributes.
6164 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6165 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6166 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6168 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6170 * target.def (preferred_else_value): New target hook.
6171 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6172 * doc/tm.texi: Regenerate.
6173 * targhooks.h (default_preferred_else_value): Declare.
6174 * targhooks.c (default_preferred_else_value): New function.
6175 * internal-fn.h (conditional_internal_fn_code): Declare.
6176 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6177 (get_conditional_internal_fn): Use it.
6178 (conditional_internal_fn_code): New function.
6179 * gimple-match.h (gimple_match_cond): New struct.
6180 (gimple_match_op): Add a cond member function.
6181 (gimple_match_op::gimple_match_op): Update all forms to take a
6183 * genmatch.c (expr::gen_transform): Use the same condition as res_op
6184 for the suboperation, but don't specify a particular else_value.
6185 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6186 (visit_nary_op, visit_reference_op_load): Pass
6187 gimple_match_cond::UNCOND to the gimple_match_op constructor.
6188 * gimple-match-head.c: Include tree-eh.h
6189 (convert_conditional_op): New function.
6190 (maybe_resimplify_conditional_op): Likewise.
6191 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6192 (gimple_resimplify2): Likewise.
6193 (gimple_resimplify3): Likewise.
6194 (gimple_resimplify4): Likewise.
6195 (maybe_push_res_to_seq): Return null for conditional operations.
6196 (try_conditional_simplification): New function.
6197 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
6199 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6201 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6203 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6205 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6207 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6209 (hash_tree): Do not hash DECL_FCONTEXT
6210 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6211 Do not stream DECL_FCONTEXT.
6212 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6213 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6215 2018-07-12 Richard Biener <rguenther@suse.de>
6218 * dwarf2out.c (gen_block_die): Only output blocks when they have
6219 at least one !DECL_IGNORED_P variable.
6221 2018-07-12 Richard Biener <rguenther@suse.de>
6224 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6225 Remove -mieee-fp handling.
6227 2018-07-12 Richard Biener <rguenther@suse.de>
6229 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6230 left-over from last patch.
6232 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6234 PR tree-optimization/86492
6235 * gimple-ssa-store-merging.c
6236 (imm_store_chain_info::coalesce_immediate_stores): Call
6237 check_no_overlap even for the merge_overlapping case. Formatting fix.
6239 2018-07-12 Richard Biener <rguenther@suse.de>
6242 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6243 move possibly trapping operations into the conditional.
6245 2018-07-12 Richard Biener <rguenther@suse.de>
6247 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6248 (vn_lookup_simplify_result): Remove recursion limit applied
6250 (vn_nary_build_or_lookup_1): Adjust.
6251 (try_to_simplify): Likewise.
6252 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6254 (gimple_resimplify2): Likewise.
6255 (gimple_resimplify3): Likewise.
6256 (gimple_resimplify4): Likewise.
6258 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6260 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6261 Use __mmask64 type instead of __mmask8 for __M argument.
6262 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6263 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6265 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6266 __mmask16 for __M argument.
6267 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6268 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6269 to __mmask16 instead of __mmask8.
6270 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6271 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6272 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6273 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6274 instead of __mmask16 for __U argument.
6275 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6276 __mmask16 instead of __mmask8 for __U argument.
6277 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6279 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6281 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6283 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6285 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6287 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6289 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6291 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6293 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6295 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6297 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6298 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6299 return type as well as __M argument type and all casts from __mmask8
6301 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6302 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6303 return type as well as __M argument type and all casts from __mmask8
6305 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6306 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6307 return type as well as __M argument type and all casts from __mmask8
6309 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6310 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6311 return type as well as __M argument type and all casts from __mmask8
6313 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6314 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6317 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6319 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6320 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6323 2018-07-11 Paul Koning <ni1d@arrl.net>
6325 * doc/md.texi (define_subst): Document how multiple occurrences of
6326 the same argument in the replacement pattern are handled.
6328 2018-07-11 Paul Koning <ni1d@arrl.net>
6330 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6332 (Common Type Attributes): Add "mode" attribute.
6334 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6336 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6337 stream DECL_ORIGINAL_TYPE.
6338 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6339 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6340 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6341 Do not walk original type.
6342 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6344 (write_ts_decl_non_common_tree_pointers): Do not stream
6346 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6347 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6349 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6351 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6352 thread twice from the same starting edge.
6354 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6356 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6357 * gimple.c (gimple_call_nonnull_result_p): ...here...
6358 (gimple_call_nonnull_arg): ...and here.
6359 * gimple.h (gimple_call_nonnull_result_p): New.
6360 (gimple_call_nonnull_arg): New.
6362 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6364 * config/arm/arm-cpus.in: Move information from fpu field of each
6365 cpu definition to the isa field.
6366 * config/arm/parsecpu.awk (fpu): Delete match rule.
6367 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6369 2018-07-11 Richard Biener <rguenther@suse.de>
6372 * dwarf2out.c (init_sections_and_labels): Use
6373 output_asm_line_debug_info consistently.
6374 (dwarf2out_early_finish): Likewise.
6375 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6378 2018-07-11 Richard Biener <rguenther@suse.de>
6380 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6381 Rework father_bb setting in a way to avoid propagating constants
6382 multiple times on a loop body.
6384 2018-07-10 Mark Wielaard <mark@klomp.org>
6387 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6389 2018-07-10 Richard Biener <rguenther@suse.de>
6391 * hash-map.h (hash_map::iterator::operator*): Return
6392 references to key and value.
6394 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6397 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6398 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6399 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6400 (gimplify_omp_for): For composite loops, move outer
6401 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6402 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6403 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6404 TREE_LIST for both the original class iterator and the "last" helper
6405 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6406 loop, remember has_decl_expr from outer composite loops for the
6407 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6409 2018-07-09 Martin Sebor <msebor@redhat.com>
6413 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6414 accessing implicitly initialized array elements.
6415 * expr.c (string_constant): Handle string initializers of
6416 character arrays within aggregates.
6417 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6418 Store element offset. As a special case, handle zero size.
6419 (fold_nonarray_ctor_reference): Same.
6420 (fold_ctor_reference): Add argument. Store subobject offset.
6421 * gimple-fold.h (fold_ctor_reference): Add argument.
6423 2018-07-09 Paul Koning <ni1d@arrl.net>
6425 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6426 (pdp11_insn_cost): New function.
6427 (pdp11_md_asm_adjust): New function.
6428 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6429 (pdp11_rtx_costs): Update to match machine better.
6430 (output_addr_const_pdp11): Correct format mismatch warnings.
6431 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6432 * config/pdp11/pdp11.md: General change to add base_cost and/or
6433 length attributes for use by new pdp11_insn_cost function.
6434 (MIN_BRANCH): Correct definition.
6436 (doloop_end): Use standard pattern name for looping pattern.
6437 (doloop_end_nocc): New.
6438 (movsf): Add another constraint alternative.
6439 (zero_extendqihi2): Add constraint alternatives for not in place
6441 (zero_extendhisi2): Remove.
6442 (shift patterns): Add CC handling variants.
6446 (define_peephole2): New peephole to recognize mov that sets CC for
6449 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6451 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6452 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6455 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6458 * real.c (real_nextafter): Return true if result is denormal.
6460 2018-07-09 Martin Liska <mliska@suse.cz>
6462 * common.opt: Add back wrongly removed attribute.
6464 2018-07-09 Richard Biener <rguenther@suse.de>
6467 * dwarf2out.c (gen_block_die): For an early generated DIE
6468 always output high/low PC attributes.
6470 2018-07-09 Tom de Vries <tdevries@suse.de>
6472 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6473 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6474 onto VAR_DECL with abstract origin.
6476 2018-07-07 Jim Wilson <jimw@sifive.com>
6478 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6480 2018-07-07 Tom de Vries <tdevries@suse.de>
6482 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6484 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6486 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6488 (combine_bound): Use wide-int overflow calculation instead of
6490 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6492 * fold-const.c (int_const_binop_2): Same.
6493 (extract_muldiv_1): Same.
6494 (fold_div_compare): Same.
6495 (fold_abs_const): Same.
6497 * poly-int.h (add): Same.
6501 * predict.c (predict_iv_comparison): Same.
6502 * profile-count.c (slow_safe_scale_64bit): Same.
6503 * simplify-rtx.c (simplify_const_binary_operation): Same.
6504 * tree-chrec.c (tree_fold_binomial): Same.
6505 * tree-data-ref.c (split_constant_offset_1): Same.
6506 * tree-if-conv.c (idx_within_array_bound): Same.
6507 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6508 * tree-ssa-phiopt.c (minmax_replacement): Same.
6509 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6510 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6511 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6512 * wide-int.cc (wi::add_large): Same.
6513 (wi::mul_internal): Same.
6514 (wi::sub_large): Same.
6515 (wi::divmod_internal): Same.
6516 * wide-int.h: Change overflow type to overflow_type for neg, add,
6517 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6518 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6519 mul_internal, divmod_internal.
6520 (overflow_type): New enum.
6521 (accumulate_overflow): New.
6523 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6525 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6526 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6528 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6530 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6531 argument is checked for zero before entering loop, avoid checking again.
6533 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6535 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6536 * gimplify.h (generic_expr_could_trap_p): Likwise.
6537 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6539 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6541 PR tree-optimization/86401
6542 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6543 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6544 (fold_bit_and_mask): ... here. New helper function for match.pd.
6545 * fold-const.h (fold_bit_and_mask): Declare.
6546 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6548 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6551 * target.def (translate_mode_attribute): New hook.
6552 * targhooks.h (default_translate_mode_attribute): Declare.
6553 * targhooks.c (default_translate_mode_attribute): New function.
6554 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6555 * doc/tm.texi: Regenerate.
6556 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6557 (rs6000_translate_mode_attribute): New function.
6559 2018-07-06 Paul Koning <ni1d@arrl.net>
6561 * doc/md.texi (define_split): Document DONE and FAIL.
6562 (define_peephole2): Ditto.
6564 2018-07-05 Jeff Law <law@redhat.com>
6566 PR tree-optimization/86010
6567 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6568 both the head and tail of mem* and str* calls.
6570 2018-07-05 Jim Wilson <jimw@sifive.com>
6572 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6574 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6576 * config/aarch64/aarch64-simd.md: correct flags text for
6577 MIN_EXPR replacement.
6579 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6581 * configure: Regenerated.
6583 2018-07-05 Carl Love <cel@us.ibm.com>
6585 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6586 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6587 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6588 VSX_BUILTIN_DOUBLEL_V4SF.
6590 2018-07-05 Martin Sebor <msebor@redhat.com>
6593 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6594 than its domain to compute its the upper bound of a char array.
6596 2018-07-05 Nathan Sidwell <nathan@acm.org>
6598 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6599 * doc/cpp.texi: Update comment.
6600 * doc/tm.texi: Rebuilt.
6601 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6602 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6603 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6604 headers affected by extern "C".
6605 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6606 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6607 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6608 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6609 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6610 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6611 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6612 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6613 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6614 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6615 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6616 config/sparc/sp64-elf.h, config/spu/spu.h,
6617 config/stormy16/stormy16.h, config/v850/v850.h,
6618 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6619 define NO_IMPLICIT_EXTERN_C.
6620 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6622 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6625 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6626 instead of GET_MODE_SIZE when comparing Units.
6628 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6631 * rtlanal.c (set_noop_p): Constrain on mode change,
6632 include hard-reg-set.h
6634 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6636 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6638 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6641 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6644 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6646 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6648 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6651 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6653 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6655 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6658 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6660 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6662 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6663 neg_*_op* variables.
6665 2018-07-04 Martin Liska <mliska@suse.cz>
6667 * tree-switch-conversion.c: Define
6668 max_ratio_for_speed and max_ratio_for_size constants.
6670 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6671 Martin Liska <mliska@suse.cz>
6676 * common.opt: Rename align options with 'str_' prefix.
6677 * common/config/i386/i386-common.c (set_malign_value): New
6679 (ix86_handle_option): Use it to set -falign-* options/
6680 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6681 type from int to string.
6682 * config/aarch64/aarch64.c: Update default values from int
6684 * config/alpha/alpha.c (alpha_override_options_after_change):
6686 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6687 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6688 max skip conditionally.
6689 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6690 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6691 max skip conditionally.
6692 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6693 max skip conditionally.
6694 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6695 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6696 max skip conditionally.
6697 * config/i386/i386.c (struct ptt): Change type from int to
6699 (ix86_default_align): Set default values.
6700 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6701 max skip conditionally.
6702 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6703 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6704 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6705 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6706 max skip conditionally.
6707 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6708 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6709 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6710 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6711 max skip conditionally.
6712 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6713 * config/ia64/ia64.c (ia64_option_override): Set default values
6714 for alignment options.
6715 * config/m68k/m68k.c: Handle new str_align_* options.
6716 * config/mips/mips.c (mips_set_compression_mode): Change
6718 (mips_option_override): Set default values for options.
6719 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6721 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6723 * config/rx/rx.c (rx_option_override): Likewise.
6724 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6725 (LABEL_ALIGN): Use align_labels_log.
6726 (LOOP_ALIGN): Use align_loops_align.
6727 * config/s390/s390.c (s390_asm_output_function_label): Use new
6729 * config/sh/sh.c (sh_override_options_after_change):
6730 Change type of constants.
6731 * config/spu/spu.c (spu_sched_init): Likewise.
6732 * config/sparc/sparc.c (sparc_option_override): Set default
6734 * config/visium/visium.c (visium_option_override): Likewise.
6735 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6736 emit p2align format with last argument if it's not needed.
6737 * doc/invoke.texi: Document extended format of -falign-*.
6738 * final.c: Use align_labels alignment.
6739 * flags.h (struct target_flag_state): Change type to use
6741 (struct align_flags_tuple): New.
6742 (struct align_flags): Likewise.
6743 (align_loops_log): Redefine macro to use new types.
6744 (align_loops_max_skip): Redefine macro to use new types.
6745 (align_jumps_log): Redefine macro to use new types.
6746 (align_jumps_max_skip): Redefine macro to use new types.
6747 (align_labels_log): Redefine macro to use new types.
6748 (align_labels_max_skip): Redefine macro to use new types.
6749 (align_functions_log): Redefine macro to use new types.
6750 (align_loops): Redefine macro to use new types.
6751 (align_jumps): Redefine macro to use new types.
6752 (align_labels): Redefine macro to use new types.
6753 (align_functions): Redefine macro to use new types.
6754 (align_functions_max_skip): Redefine macro to use new types.
6755 (align_loops_value): New macro.
6756 (align_jumps_value): New macro.
6757 (align_labels_value): New macro.
6758 (align_functions_value): New macro.
6759 * function.c (invoke_set_current_function_hook): Propagate
6760 alignment values from flags to global variables default in
6762 * ipa-icf.c (sem_function::equals_wpa): Use
6763 cl_optimization_option_eq instead of memcmp.
6764 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6766 (cl_optimization_stream_in): Likewise.
6767 * optc-save-gen.awk: Support strings in cl_optimization.
6768 * opth-gen.awk: Likewise.
6769 * opts.c (finish_options): Remove error checking of invalid
6771 (MAX_CODE_ALIGN): Remove.
6772 (MAX_CODE_ALIGN_VALUE): Likewise.
6773 (parse_and_check_align_values): New function.
6774 (check_alignment_argument): Likewise.
6775 (common_handle_option): Use check_alignment_argument.
6776 * opts.h (parse_and_check_align_values): Declare.
6777 * toplev.c (init_alignments): Remove.
6778 (read_log_maxskip): New.
6779 (parse_N_M): Likewise.
6780 (parse_alignment_opts): Likewise.
6781 (backend_init_target): Remove usage of init_alignments.
6782 * toplev.h (parse_alignment_opts): Declare.
6783 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6785 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6786 * tree.c (cl_option_hasher::equal): New.
6787 * varasm.c: Use new global macros.
6789 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6791 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6792 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6793 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6794 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6795 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6796 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6797 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6798 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6799 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6800 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6801 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6802 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6803 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6805 2018-07-04 Martin Liska <mliska@suse.cz>
6806 Jonathan Wakely <jwakely@redhat.com>
6808 * coverage.c: Use correct type.
6809 * doc/invoke.texi: Language correction.
6811 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6814 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6815 ENDBRANCH for non-tail call which may return via indirect branch.
6816 * doc/extend.texi: Document indirect_return attribute.
6818 2018-07-03 Martin Sebor <msebor@redhat.com>
6820 PR tree-optimization/86274
6821 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6823 (format_floating): Correct handling of infinities and NaNs.
6825 2018-07-03 Martin Sebor <msebor@redhat.com>
6827 * print-tree.c (print_real_cst): New function.
6828 (print_node_brief): Call it.
6829 (print_node): Ditto.
6831 2018-07-03 Jeff Law <law@redhat.com>
6833 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6834 into a single pattern.
6836 * config/h8300/h8300.md (ors code_iterator): New.
6837 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6838 a single pattern and single splitter.
6839 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6840 (iorqi3_1, xorqi3_1): Likewise.
6841 (iorqi3, xorqi3 expanders): Similarly.
6843 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6844 (movmd_internal) into a single pattern using the P mode iterator.
6845 (movmd splitters): Similarly.
6846 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6847 (movsd splitters): Similarly.
6849 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6850 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6851 right table based on the size of the operand.
6852 * config/h8300/h8300.md (length_table): Corresponding changes. All
6853 references to "addb", "addw" and "addl" changed to "add".
6854 (btst patterns): Merge two variants into a single pattern.
6855 (tstqi, tsthi): Likewise.
6856 (addhi3_incdec, addsi3_incdec): Likewise.
6857 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6858 (mulhi3, mulsi3): Likewise.
6859 (udivhi3, udivsi3): Likewise.
6860 (divhi3, divsi3): Likewise.
6861 (andorqi3, andorhi3, andorsi3): Likewise.
6863 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6866 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6867 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6869 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6871 PR tree-optimization/85694
6872 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6873 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6875 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6876 (<u>avg<mode>3_ceil): New patterns.
6878 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6880 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6881 scan-tree-dump directive.
6882 * gcc.dg/vect/slp-perm-2.c: Likewise.
6883 * gcc.dg/vect/slp-perm-3.c: Likewise.
6884 * gcc.dg/vect/slp-perm-5.c: Likewise.
6885 * gcc.dg/vect/slp-perm-6.c: Likewise.
6886 * gcc.dg/vect/slp-perm-7.c: Likewise.
6887 * gcc.dg/vect/slp-perm-8.c: Likewise.
6889 2018-07-03 Marek Polacek <polacek@redhat.com>
6892 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6894 2018-07-03 Richard Biener <rguenther@suse.de>
6897 * tree-ssa-structalias.c (find_func_clobbers): Properly
6898 handle indirect calls.
6900 2018-07-03 Jeff Law <law@redhat.com>
6902 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6903 (shifts): New code iterator.
6904 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6905 expander. Fix HImode handling on H8/SX.
6906 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6907 (subqi3, subhi3, subsi3 expanders): Likewise.
6908 (andqi3, andhi3, andsi3 expanders): Likewise.
6909 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6910 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6911 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6912 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6913 (zero_extendqihi2, zero_extendqisi2): Likewise.
6914 (extendqihi2, extendqisi2): Likewise.
6915 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6916 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6917 (rotlqi3_1, rotlhi3_1): Likewise.
6918 (logicalhi3_sn, logicalsi3_sn): Likewise.
6919 (logicalhi3, logicalsi3): Likewise.
6921 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6923 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6924 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6925 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6926 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6927 type to append_pattern_def_seq instead of creating a stmt_vec_info
6929 (build_mask_conversion): Likewise. Remove vinfo argument.
6930 (vect_add_conversion_to_patterm): Likewise, renaming to...
6931 (vect_add_conversion_to_pattern): ...this.
6932 (vect_recog_mask_conversion_pattern): Update call to
6933 build_mask_conversion. Pass the vector type to
6934 append_pattern_def_seq here too.
6935 (vect_recog_gather_scatter_pattern): Update call to
6936 vect_add_conversion_to_pattern.
6938 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6940 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6941 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6942 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6943 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6944 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6945 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6946 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6947 append_pattern_def_seq instead of new_pattern_def_seq.
6948 (vect_recog_divmod_pattern): Do both of the above.
6949 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6952 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6954 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6955 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6956 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6957 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6958 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6959 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6960 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6961 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6962 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6963 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6964 parameter with a single stmt_vec_info.
6965 (vect_recog_func_ptr): Likewise.
6966 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6967 (vect_try_gather_scatter_pattern): ...this.
6968 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6969 the stmt_vec_info of the statement to be matched. Don't clear
6970 STMT_VINFO_RELATED_STMT.
6971 (vect_pattern_recog): Update call accordingly.
6973 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6975 PR tree-optimization/85694
6976 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6977 (uavgM3_ceil): Document new optabs.
6978 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6979 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6981 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6982 (savg_ceil_optab): New optabs.
6983 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6984 (vect_vect_recog_func_ptrs): Add it.
6985 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6986 constant directly from the associated lhs.
6988 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6990 * tree-vect-patterns.c (vect_split_statement): New function.
6991 (vect_convert_input): Use it to try to split an existing cast.
6993 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6995 * poly-int.h (print_hex): New function.
6996 * dumpfile.h (dump_dec, dump_hex): Declare.
6997 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6998 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6999 min_input_precision, operation_precision and operation_sign.
7000 * tree-vect-patterns.c (vect_get_range_info): New function.
7001 (vect_same_loop_or_bb_p, vect_single_imm_use)
7002 (vect_operation_fits_smaller_type): Delete.
7003 (vect_look_through_possible_promotion): Add an optional
7004 single_use_p parameter.
7005 (vect_recog_over_widening_pattern): Rewrite to use new
7006 stmt_vec_info infomration. Handle one operation at a time.
7007 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7008 (vect_truncatable_operation_p, vect_set_operation_type)
7009 (vect_set_min_input_precision): New functions.
7010 (vect_determine_min_output_precision_1): Likewise.
7011 (vect_determine_min_output_precision): Likewise.
7012 (vect_determine_precisions_from_range): Likewise.
7013 (vect_determine_precisions_from_users): Likewise.
7014 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7015 (vect_vect_recog_func_ptrs): Put over_widening first.
7017 (vect_pattern_recog): Call vect_determine_precisions.
7019 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7021 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7022 statements that have been replaced by further pattern statements.
7023 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7025 2018-07-03 Richard Biener <rguenther@suse.de>
7027 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7028 always set *dt. Dump vectype in vectype overload.
7029 * dumpfile.h (dump_gimple_expr): New function.
7030 (dump_gimple_expr_loc): Likewise.
7031 * dumpfile.c (dump_gimple_expr): New function.
7032 (dump_gimple_expr_loc): Likewise.
7034 2018-07-02 Jeff Law <law@redhat.com>
7036 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7037 the H8/300, H8/300H and H8/S variants into a single pattern.
7038 (movhi_h8300, movqi_h8300hs): Similarly.
7039 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7040 (QHI mode iterator): New.
7042 * config/h8300/h8300.md: Remove trailing whitespace.
7044 2018-07-02 Jim Wilson <jimw@sifive.com>
7046 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7047 instead of emit_insn for interrupt returns.
7048 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7049 (riscv_sret, riscv_uret): Likewise.
7051 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7053 * pretty-print.c (selftest::test_pp_format): Move save and restore
7054 of quotes to class auto_fix_quotes, and add an instance.
7055 * selftest.c: Include "intl.h".
7056 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7057 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7058 * selftest.h (selftest::auto_fix_quotes): New class.
7060 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
7062 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7063 (aarch64_sve_prepare_conditional_op): Remove.
7064 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7065 Allow aarch64_simd_reg_or_zero as select operand; remove
7066 the aarch64_sve_prepare_conditional_op call.
7067 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7068 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7069 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7070 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7071 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7072 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7073 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7074 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7075 and a splitters to match all of the *_any patterns.
7076 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7078 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7079 (SVE_COND_FP_BINARY_REV): Remove.
7080 (sve_int_op_rev, sve_fp_op_rev): New.
7081 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7082 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7083 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7084 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7085 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7086 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7087 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7088 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7089 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7091 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7092 Remove match_dup 1 from the inner unspec.
7093 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7095 * config/aarch64/aarch64.md (movprfx): New attr.
7096 (length): Default movprfx to 8.
7097 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7098 (*madd<SVE_I>, *msub<SVE_I): Likewise.
7099 (*<su>mul<SVE_I>3_highpart): Likewise.
7100 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7101 (*v<ASHIFT><SVE_I>3): Likewise.
7102 (*<su><MAXMIN><SVE_I>3): Likewise.
7103 (*<su><MAXMIN><SVE_F>3): Likewise.
7104 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7105 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7106 (*div<SVE_F>4): Likewise.
7108 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
7110 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7113 2018-07-02 Richard Biener <rguenther@suse.de>
7115 PR tree-optimization/86363
7116 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7117 memset argument refers to a non-variable address.
7119 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7121 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7122 {PLUS,MINUS}_EXPR code to...
7123 (adjust_symbolic_bound): ...here,
7124 (combine_bound): ...here,
7125 (set_value_range_with_overflow): ...and here.
7127 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7129 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7131 (extract_range_from_abs_expr): ...here.
7133 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
7135 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7136 -fno-omit-frame-pointer when not optimizing.
7138 2018-07-02 Martin Liska <mliska@suse.cz>
7141 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7142 (propagate_nothrow): Likewise.
7144 2018-07-02 Martin Liska <mliska@suse.cz>
7147 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7149 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7151 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7152 function in r262149, changing "loc" param from source_location to
7153 const dump_location_t &.
7154 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7155 declaration, as above.
7157 2018-07-01 Paul Koning <ni1d@arrl.net>
7159 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7160 -munit-asm, -mgnu-asm, -mdec-asm.
7161 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7162 (pdp11_output_labelref): New.
7163 (pdp11_output_def): New.
7164 (pdp11_output_addr_vec_elt): New.
7165 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
7166 %# and %@ format codes.
7167 (pdp11_option_override): New.
7168 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7169 (pdp11_output_ident): New.
7170 (pdp11_asm_named_section): New.
7171 (pdp11_asm_init_sections): New.
7172 (pdp11_file_start): New.
7173 (pdp11_file_end): New.
7174 (output_ascii): Use .ascii/.asciz for -mdec-asm.
7175 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
7176 %o, like %c but octal.
7177 (pdp11_option_override): New.
7178 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7180 (DATA_SECTION_ASM_OP): Ditto.
7181 (READONLY_DATA_SECTION_ASM_OP): New.
7182 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7183 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7184 (ASM_OUTPUT_LABELREF): Ditto.
7185 (ASM_OUTPUT_DEF): Ditto.
7186 (ASM_OUTPUT_EXTERNAL): New.
7187 (ASM_OUTPUT_SOURCE_FILENAME): New.
7188 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7189 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7190 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
7191 %# and %@ format codes.
7192 * config/pdp11/pdp11.opt (mgnu-asm): New.
7193 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7194 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7195 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7197 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
7199 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7200 dereferencing path[] beyond its length.
7202 (debug_all_paths): New.
7203 (rewire_first_differing_edge): New.
7204 (adjust_paths_after_duplication): New.
7205 (duplicate_thread_path): Call adjust_paths_after_duplication.
7207 (thread_through_all_blocks): Add new argument to
7208 duplicate_thread_path.
7210 2018-06-30 Jim Wilson <jimw@sifive.com>
7212 * config/riscv/predicates.md (p2m1_shift_operand): New.
7213 (high_mask_shift_operand): New.
7214 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7215 pattern using p2m1_shift_operand.
7216 (lshsi3_zero_extend_3+2): New combiner pattern using
7217 high_mask_shift_operand.
7219 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7221 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7223 (vect_recog_rotate_pattern): ...here.
7224 (vect_convert_input): Try to insert casts of invariants in the
7226 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7227 preheader to be empty.
7229 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7231 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7232 vector type. If given, install it in the new statement's
7234 (vect_element_precision): New function.
7235 (vect_unpromoted_value): New struct.
7236 (vect_unpromoted_value::vect_unpromoted_value): New function.
7237 (vect_unpromoted_value::set_op): Likewise.
7238 (vect_look_through_possible_promotion): Likewise.
7239 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7240 (vect_widened_op_tree, vect_convert_input): Likewise.
7241 (vect_convert_inputs, vect_convert_output): Likewise.
7242 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7243 to handle the optional cast of the multiplication result and
7244 vect_widened_op_tree to detect the widened multiplication itself.
7245 Do not require the input and output of promotion casts to have
7246 the same sign, but base the signedness of the operation on the
7247 input rather than the result. If the pattern includes two
7248 promotions, check that those promotions have the same sign.
7249 Do not restrict the MULT_EXPR handling to a double-width result;
7250 handle quadruple-width results and wider. Use vect_convert_inputs
7251 to convert the inputs to the common type.
7252 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7253 to handle the optional cast of the ABS result. Also allow a sign
7254 change or a sign extension between the ABS and MINUS.
7255 Use vect_widened_op_tree to detect the widened subtraction and use
7256 vect_convert_inputs to convert the inputs to the common type.
7257 (vect_handle_widen_op_by_const): Delete.
7258 (vect_recog_widen_op_pattern): New function.
7259 (vect_recog_widen_mult_pattern): Use it.
7260 (vect_recog_widen_shift_pattern): Likewise.
7261 (vect_recog_widen_sum_pattern): Use
7262 vect_look_through_possible_promotion to handle the promoted
7265 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7267 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7268 the containing gimple_seq *.
7269 * gimple-iterator.h (gsi_for_stmt): Declare it.
7270 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7271 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7272 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7273 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7274 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7276 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7278 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7279 statement being replaced is part of an existing pattern
7280 definition sequence, inserting the new pattern statements before
7282 (vect_pattern_recog_1): Don't return a bool. If the statement
7283 is already part of a pattern, instead apply pattern matching
7284 to the pattern definition statements. Don't clear the
7285 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7286 (vect_pattern_recog): Don't break after the first match;
7287 continue processing the pattern definition statements instead.
7288 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7290 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7292 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7293 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7294 (vect_recog_widen_sum_pattern): Use it.
7296 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7298 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7299 phi is not a pattern statement and has not been replaced by
7300 a pattern statement.
7301 * tree-vect-patterns.c (type_conversion_p): Don't check
7302 STMT_VINFO_IN_PATTERN_P.
7303 (vect_recog_vector_vector_shift_pattern): Likewise.
7304 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7305 the pattern statement rather than the original statement; check
7306 directly for a WIDEN_MULT_EXPR here.
7307 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7308 vect_is_simple_use to return the pattern statement rather
7309 than the original statement; use is_pattern_stmt_p to check
7310 for such a pattern statement.
7311 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7312 to return the pattern statement rather than the original statement;
7313 don't do the same transformation here.
7314 (vect_is_simple_use): If the defining statement has been replaced
7315 by a pattern statement, return the pattern statement instead.
7316 Remove the corresponding (local) transformation from the vectype
7319 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7321 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7322 end and default to null.
7323 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7324 (vectorizable_reduction): Update calls accordingly, dropping the
7325 gimple ** argument if the passed-back statement isn't needed.
7326 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7327 (vect_recog_rotate_pattern): Likewise.
7328 (vect_recog_mask_conversion_pattern): Likewise.
7329 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7330 (vect_mask_constant_operand_p): Likewise.
7331 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7332 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7333 (get_group_load_store_type, get_load_store_type): Likewise.
7334 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7335 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7336 (vectorizable_conversion, vectorizable_assignment): Likewise.
7337 (vectorizable_shift, vectorizable_operation): Likewise.
7338 (vectorizable_store, vect_is_simple_cond): Likewise.
7339 (vectorizable_condition, vectorizable_comparison): Likewise.
7340 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7341 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7342 and move it to the end. Cope with null def_stmt_outs.
7344 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7346 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7348 2018-06-29 Jeff Law <law@redhat.com>
7350 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7351 displacements for TARGET_V850E2V3 and newer.
7352 (TARGET_LRA_P): Remove. Defaults to LRA now.
7353 * config/v850/v850.md (sign23byte_load): Remove.
7354 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7355 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7357 2018-06-29 Martin Liska <mliska@suse.cz>
7360 * coverage.c (coverage_init): Mangle full path name.
7361 * doc/invoke.texi: Document the change.
7362 * gcov-io.c (mangle_path): New.
7363 * gcov-io.h (mangle_path): Likewise.
7364 * gcov.c (mangle_name): Use mangle_path for path mangling.
7366 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7368 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7369 if starting source register is not even.
7371 2018-06-29 Martin Liska <mliska@suse.cz>
7373 PR tree-optimization/86263
7374 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7375 Make edge redirection.
7377 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7379 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7380 (dump_scope_depth): New variable.
7381 (get_dump_scope_depth): New function.
7382 (dump_begin_scope): New function.
7383 (dump_end_scope): New function.
7384 * dumpfile.h (get_dump_scope_depth): New declaration.
7385 (dump_begin_scope): New declaration.
7386 (dump_end_scope): New declaration.
7387 (class auto_dump_scope): New class.
7388 (AUTO_DUMP_SCOPE): New macro.
7389 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7392 2018-06-29 Richard Biener <rguenther@suse.de>
7394 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7395 compute_all_dependences succeeds.
7396 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7397 exceed --param loop-max-datarefs-for-datadeps.
7399 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7401 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7403 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7406 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7407 alternative 0 in preferred_for_speed attribute.
7409 2018-06-28 Paul Koning <ni1d@arrl.net>
7411 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7412 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7413 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7414 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7415 for shift insn patterns.
7417 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7419 * cgraph.c (cgraph_node::get_body): Replace assignments to
7420 "dump_file" with calls to set_dump_file.
7421 * dumpfile.c (alt_dump_file): Make static, and group with...
7422 (alt_flags): ...this definition.
7423 (dumps_are_enabled): New variable.
7424 (refresh_dumps_are_enabled): New function.
7425 (set_dump_file): New function.
7426 (set_alt_dump_file): New function.
7427 (gcc::dump_manager::dump_start): Replace assignments to
7428 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7430 (gcc::dump_manager::dump_finish): Likewise.
7431 * dumpfile.h (alt_dump_file): Delete decl.
7432 (dumps_are_enabled): New variable decl.
7433 (set_dump_file): New function decl.
7434 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7436 * tree-nested.c (lower_nested_functions): Replace assignments to
7437 "dump_file" with calls to set_dump_file.
7439 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7441 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7442 goto_locus of each outgoing edge of each basic block.
7444 2018-06-28 Richard Biener <rguenther@suse.de>
7446 * dwarf2out.c (decl_scope_table): Remove.
7447 (push_decl_scope): Likewise.
7448 (pop_decl_scope): Likewise.
7449 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7450 (gen_struct_or_union_type_die): Likewise.
7451 (gen_tagged_type_die): Likewise.
7452 (dwarf2out_init): Do not initialize decl_scope_table.
7453 (dwarf2out_c_finalize): Do not free it.
7455 2018-06-28 Richard Biener <rguenther@suse.de>
7457 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7458 deciding whether to not re-use a DIE.
7460 2018-06-28 Richard Biener <rguenther@suse.de>
7462 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7463 DW_AT_abstract_origin attribute.
7465 2018-06-28 Martin Liska <mliska@suse.cz>
7467 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7468 Use newly introduced constants.
7469 * tree-switch-conversion.h (struct jump_table_cluster):
7470 Define max_ratio_for_size and max_ratio_for_speed.
7472 2018-06-28 Martin Liska <mliska@suse.cz>
7474 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7475 Add new checking assert to catch invalid state.
7476 (jump_table_cluster::can_be_handled): Handle single case
7478 (jump_table_cluster::is_beneficial): Bail out for such case.
7479 (bit_test_cluster::find_bit_tests):
7480 Add new checking assert to catch invalid state.
7481 (bit_test_cluster::can_be_handled): Handle single case
7483 (bit_test_cluster::is_beneficial): Bail out for such case.
7484 (switch_decision_tree::analyze_switch_statement):
7487 2018-06-28 Martin Liska <mliska@suse.cz>
7489 * common.opt: Introduce -completion option.
7490 * gcc.c (driver_handle_option): Handle it.
7491 (driver::main): Print completions if completion
7493 * opt-suggestions.c (option_proposer::get_completions):
7495 (option_proposer::suggest_completion): Likewise.
7496 (option_proposer::find_param_completions): Likewise.
7497 (verify_autocompletions): Likewise.
7498 (test_completion_valid_options): Likewise.
7499 (test_completion_valid_params): Likewise.
7500 (in_completion_p): Likewise.
7501 (empty_completion_p): Likewise.
7502 (test_completion_partial_match): Likewise.
7503 (test_completion_garbage): Likewise.
7504 (opt_proposer_c_tests): Likewise.
7505 * opt-suggestions.h: Declare new functions.
7506 * opts.c (common_handle_option): Handle OPT__completion_.
7507 * selftest-run-tests.c (selftest::run_tests): Add
7508 opt_proposer_c_tests.
7509 * selftest.c (assert_str_startswith): New.
7510 * selftest.h (assert_str_startswith): Likewise.
7511 (opt_proposer_c_tests): New.
7512 (ASSERT_STR_STARTSWITH): Likewise.
7514 2018-06-28 Martin Liska <mliska@suse.cz>
7516 * Makefile.in: Add opt-suggestions.o.
7517 * gcc-main.c: Include opt-suggestions.h.
7518 * gcc.c (driver::driver): Likewise.
7519 (driver::~driver): Remove m_option_suggestions.
7520 (driver::build_option_suggestions): Moved to option_proposer.
7521 (driver::suggest_option): Likewise.
7522 (driver::handle_unrecognized_options): Use option_proposer.
7523 * gcc.h (class driver): Add new memver m_option_proposer.
7524 * opt-suggestions.c: New file.
7525 * opt-suggestions.h: New file.
7527 2018-06-28 Martin Liska <mliska@suse.cz>
7529 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7530 (auto_string_vec::~auto_string_vec): Likewise.
7532 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7534 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7535 prevent_decl_creation_for_types fields up and add reset_location field.
7536 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7537 statement if id->reset_location is true.
7538 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7539 id->reset_location is true.
7540 (copy_phis_for_bb): Force input_location on the arguments if
7541 id->reset_location is true.
7542 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7543 is set on the function to be inlined.
7545 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7547 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7549 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7551 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7552 registers for Pmode.
7553 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7554 hard registers for the clobbered pseudo.
7556 2018-06-27 Paul Koning <ni1d@arrl.net>
7558 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7559 mutually exclusive options.
7560 * config/pdp11/constraints.md (h): New constraint.
7561 (O): Update definition to match shift code generation.
7562 (D): New constraint.
7563 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7565 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7567 (output_jump): Change arguments.
7568 (pdp11_fixed_cc_regs): New function.
7569 (pdp11_cc_mode): Ditto.
7570 (pdp11_expand_shift): Ditto.
7571 (pdp11_assemble_shift): Ditto.
7572 (pdp11_small_shift): Ditto.
7573 (pdp11_branch_cost): Remove.
7574 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7576 (pdp11_register_move_cost): Update for CC registers.
7577 (pdp11_rtx_costs): Add case for LSHIFTRT.
7578 (pdp11_output_jump): Add CCNZ mode conditional branches.
7579 (notice_update_cc_on_set): Remove.
7580 (pdp11_cc_mode): New function.
7581 (simple_memory_operand): Correct pre/post decrement case.
7582 (no_side_effect_operand): New function.
7583 (pdp11_regno_reg_class): Add CC_REGS class.
7584 (pdp11_fixed_cc_regs): New function.
7585 (pdp11_small_shift): New function.
7586 (pdp11_expand_shift): New function to expand shift insns.
7587 (pdp11_assemble_shift): New function to output shifts.
7588 (pdp11_branch_cost): Remove.
7589 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7590 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7591 (WCHAR_TYPE): Ditto.
7592 (PTRDIFF_TYPE): Ditto.
7593 (ADJUST_INSN_LENGTH): New macro.
7594 (FIXED_REGISTERS): Add CC registers.
7595 (CALL_USED_REGISTERS): Ditto.
7597 (REG_CLASS_NAMES): Ditto.
7598 (REG_CLASS_CONTENTS): Ditto.
7599 (SELECT_CC_MODE): Use new function.
7600 (TARGET_FLAGS_REGNUM): New macro.
7601 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7602 (cc0_reg_rtx): Remove.
7603 (CC_STATUS_MDEP): Remove.
7604 (CC_STATUS_MDEFP_INIT): Remove.
7605 (CC_IN_FPU): Remove.
7606 (NOTICE_UPDATE_CC): Remove.
7607 (REGISTER_NAMES): Add CC registers.
7608 (BRANCH_COST): Change to constant 1.
7609 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7611 * config/pdp11/pdp11.opt (mbcopy): Remove.
7612 (mbcopy-builtin): Remove.
7613 (mbranch-cheap): Remove.
7614 (mbranch-expensive): Remove.
7615 * config/pdp11/predicates.md (expand_shift_operand): Update to
7616 match shift code generation.
7617 (ccnz_operator): New predicate.
7618 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7619 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7620 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7622 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7623 description of O constraint.
7625 2018-06-27 Jeff Law <law@redhat.com>
7626 Austin Law <austinklaw@gmail.com>
7628 * config/v850/v850.md (addsi3_set_flags): New pattern.
7629 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7630 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7631 (zero_extendhisi2_v850_set_flags): Likewise.
7632 (zero_extendqisi2_v850_set_flags): Likewise.
7633 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7634 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7635 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7637 * config/v850/v850-protos.h (notice_update_cc): Remove.
7638 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7639 (v850_print_operand): Handle 'D' and "d".
7640 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7641 Add handling of arithmetic/logical operations compared against zero.
7642 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7643 Do not look at v850_compare_op, instead get mode from last argument.
7644 (v850_gen_compare): Remove
7645 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7646 after reload for prologue insns.
7647 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7649 (construct_save_jarl): Likewise.
7650 (TARGET_FLAGS_REGNUM): Define.
7651 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7652 (NOTICE_UPDATE_CC): Remove.
7653 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7654 than cc0. Conditionalize on reload_completed.
7655 (cmpsi_insn, setfcc_insn): Likewise.
7656 (tst1 splitter): Turn into define_and_split which sets the flags
7658 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7659 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7660 (cstoresf4, cstoredf4): Clobber the flags.
7661 (cmpsi, cmpsf, cmpdf): Remove expanders.
7662 (setf_insn): Remove pattern.
7663 (addsi3): Turn into define_and_split which clobbers the flags after
7664 reload and a suitable pattern (addsi3_clobber_flags) for use after
7666 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7667 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7668 (ashrsi3, ashrsi3_v850e2): Likewise.
7669 (bins): Clobber the flags.
7670 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7671 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7672 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7673 (call_value_internal_short, call_value_internal_long): Likewise.
7674 (callt_save_interrupt, callt_return_interrupt): Likewise.
7675 (save_interrupt, return_interrupt): Likewise.
7676 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7677 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7678 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7679 (All FP comparisons): Only allow after reload has completed.
7681 (divh, divhu): Tweak output template.
7682 (branch_z_normal, branch_z_invert): Remove
7683 (branch_nz_normal, branch_nz_invert): Likewise.
7684 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7686 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7687 * config/v850/v850.c (notice_update_cc): Remove.
7688 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7689 (CC_NO_CARRY): Likewise.
7690 (NOTICE_UPDATE_CC): Define to nothing.
7691 * config/v850/v850.md: Remove block comment on cc0 handling
7692 Remove "cc" attribute from all patterns. Remove cc_status handling
7693 from all patterns. Minor formatting fixes.
7695 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7697 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7698 (cortex-a76.cortex-a55): Likewise.
7699 * config/aarch64/aarch64-tune.md: Regenerate.
7700 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7701 cortex-a76.cortex-a55.
7703 2018-06-27 Jeff Law <law@redhat.com>
7705 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7706 (MULTILIB_DIRNAMES): Similarly.
7708 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7710 * gimple.h (gimple_return_retbnd): Delete.
7711 (gimple_return_set_retbnd): Likewise.
7712 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7713 gimple_return_set_retbnd.
7714 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7715 gimple_return_retbnd and adjust.
7716 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7717 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7718 Explicitly return NULL in a couple more cases. Move assertion
7719 on debug statements and remove unreachable code.
7720 (reset_debug_binding): Do not test id->retbnd.
7721 (expand_call_inline): Do not set it.
7723 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7725 * configure.ac: Add --disable-gcov option.
7726 * configure: Regenerate.
7727 * Makefile.in: Honour @enable_gcov@.
7728 * doc/install.texi: Document --disable-gcov.
7730 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7732 * config/arm/arm-cpus.in (cortex-a76): New entry.
7733 (cortex-a76.cortex-a55): Likewise.
7734 * config/arm/arm-tables.opt: Regenerate.
7735 * config/arm/arm-tune.md: Likewise.
7736 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7737 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7738 cortex-a76.cortex-a55.
7740 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7743 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7745 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7747 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7749 (EPILOGUE_USES): Likewise.
7751 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7753 * tree-inline.c (remap_location): New function extracted from...
7754 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7755 (copy_phis_for_bb): ...here. Call remap_location.
7756 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7758 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7760 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7761 unaligned vsx for 16B memset.
7763 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7766 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7767 ieee128_float_type_node to long_double_type_node unless
7768 TARGET_LONG_DOUBLE_128 is set.
7770 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7772 * cfgloop.c (get_loop_location): Convert return type from
7773 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7774 by implicit construction from rtx_insn *, and using
7775 dump_user_location_t::from_function_decl for the fallback case.
7776 * cfgloop.h (get_loop_location): Convert return type from
7777 location_t to dump_user_location_t.
7778 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7779 dump_printf_loc to pass in a dump_location_t rather than a
7780 location_t, via the gimple stmt.
7781 * coverage.c (get_coverage_counts): Update calls to
7782 dump_printf_loc to pass in dump_location_t rather than a
7784 * doc/optinfo.texi (Dump types): Convert example of
7785 dump_printf_loc from taking "locus" to taking "insn". Update
7786 description of the "_loc" calls to cover dump_location_t.
7787 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7789 (dump_user_location_t::dump_user_location_t): New constructors,
7790 from gimple *stmt and rtx_insn *.
7791 (dump_user_location_t::from_function_decl): New function.
7792 (dump_loc): Make static.
7793 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7794 const dump_location_t &.
7795 (dump_generic_expr_loc): Delete.
7796 (dump_printf_loc): Convert param "loc" from location_t to
7797 const dump_location_t &.
7798 (selftest::test_impl_location): New function.
7799 (selftest::dumpfile_c_tests): New function.
7800 * dumpfile.h: Include "profile-count.h".
7801 (class dump_user_location_t): New class.
7802 (struct dump_impl_location_t): New struct.
7803 (class dump_location_t): New class.
7804 (dump_printf_loc): Convert 2nd param from source_location to
7805 const dump_location_t &.
7806 (dump_generic_expr_loc): Delete.
7807 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7808 const dump_location_t &.
7809 * gimple-fold.c (fold_gimple_assign): Update call to
7810 dump_printf_loc to pass in a dump_location_t rather than a
7811 location_t, via the gimple stmt.
7812 (gimple_fold_call): Likewise.
7813 * gimple-loop-interchange.cc
7814 (loop_cand::analyze_iloop_reduction_var): Update for change to
7815 check_reduction_path.
7816 (tree_loop_interchange::interchange): Update for change to
7818 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7819 change in return-type of find_loop_location.
7820 (graphite_regenerate_ast_isl): Likewise.
7821 * graphite-optimize-isl.c (optimize_isl): Likewise.
7822 * graphite.c (graphite_transform_loops): Likewise.
7823 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7824 pass in a dump_location_t rather than a location_t, via the
7826 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7827 * ipa.c (walk_polymorphic_call_targets): Likewise.
7828 * loop-unroll.c (report_unroll): Convert "locus" param from
7829 location_t to dump_location_t.
7830 (decide_unrolling): Update for change to get_loop_location's
7832 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7833 location_t to dump_user_location_t.
7834 (grid_find_single_omp_among_assignments_1): Updates calls to
7835 dump_printf_loc to pass in a dump_location_t rather than a
7836 location_t, via the gimple stmt.
7837 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7838 location_t to dump_location_t. Updates calls to dump_printf_loc
7839 to pass in a dump_location_t rather than a location_t, via the
7841 (grid_inner_loop_gridifiable_p): Likewise.
7842 (grid_dist_follows_simple_pattern): Likewise.
7843 (grid_gfor_follows_tiling_pattern): Likewise.
7844 (grid_target_follows_gridifiable_pattern): Likewise.
7845 (grid_attempt_target_gridification): Convert initialization
7846 of local "grid" from memset to zero-initialization; FIXME: does
7847 this require C++11? Update call to dump_printf_loc to pass in a
7848 optinfo_location rather than a location_t, via the gimple stmt.
7849 * profile.c (read_profile_edge_counts): Updates call to
7850 dump_printf_loc to pass in a dump_location_t rather than a
7852 (compute_branch_probabilities): Likewise.
7853 * selftest-run-tests.c (selftest::run_tests): Call
7855 * selftest.h (dumpfile_c_tests): New decl.
7856 * tree-loop-distribution.c (pass_loop_distribution::execute):
7857 Update for change in return type of find_loop_location.
7858 * tree-parloops.c (parallelize_loops): Likewise.
7859 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7860 "locus" from location_t to dump_user_location_t.
7861 (canonicalize_loop_induction_variables): Likewise.
7862 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7863 for change in return type of find_loop_location.
7864 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7865 to dump_printf_loc to pass in a dump_location_t rather than a
7866 location_t, via the stmt.
7867 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7869 * tree-vect-loop-manip.c (find_loop_location): Convert return
7870 type from source_location to dump_user_location_t.
7871 (vect_do_peeling): Update for above change.
7872 (vect_loop_versioning): Update for change in type of
7874 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7875 from location_t to dump_user_location_t.
7876 (vect_estimate_min_profitable_iters): Update for change in type
7878 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7879 location_t to dump_location_t.
7880 (vect_slp_bb): Update for change in type of vect_location.
7881 * tree-vectorizer.c (vect_location): Convert from source_location
7882 to dump_user_location_t.
7883 (try_vectorize_loop_1): Update for change in vect_location's type.
7884 (vectorize_loops): Likewise.
7885 (increase_alignment): Likewise.
7886 * tree-vectorizer.h (vect_location): Convert from source_location
7887 to dump_user_location_t.
7888 (find_loop_location): Convert return type from source_location to
7889 dump_user_location_t.
7890 (check_reduction_path): Convert 1st param from location_t to
7891 dump_user_location_t.
7892 * value-prof.c (check_counter): Update call to dump_printf_loc to
7893 pass in a dump_user_location_t rather than a location_t; update
7894 call to error_at for change in type of "locus".
7895 (check_ic_target): Update call to dump_printf_loc to
7896 pass in a dump_user_location_t rather than a location_t, via the
7899 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7901 * config/s390/s390.h (enum processor_flags): Do not use
7902 default tune parameter when -march was specified.
7904 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7907 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7908 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7911 2018-06-26 Richard Biener <rguenther@suse.de>
7913 PR tree-optimization/86287
7915 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7916 (vect_analyze_loop): Initialize n_stmts.
7918 2018-06-26 Richard Biener <rguenther@suse.de>
7921 * fold-const.c (fold_convertible_p): Pointer extension
7924 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7927 * dwarf2out.c (loc_list_has_views): Adjust comments.
7928 (dw_loc_list): Split single cross-partition range with
7931 2018-06-25 Jeff Law <law@redhat.com>
7933 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7934 on -mbig-switch by default.
7936 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7938 (const_float_0_operand): Remove unused predicate.
7939 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7940 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7941 (recipsf2): New expander. Original pattern now called
7943 (recipdf2, recipdf2_insn): Similarly.
7944 (rsqrtsf2, rsqrtsf2_insn): Similarly
7945 (rsqrtdf2, rsqrtdf2_insn): Similarly
7947 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7949 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7950 Simplify logic for FreeBSD (twice).
7952 2018-06-25 Martin Sebor <msebor@redhat.com>
7954 PR tree-optimization/86204
7955 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7956 a strnlen result if it's less than the length of the string.
7958 2018-06-25 Martin Sebor <msebor@redhat.com>
7960 PR tree-optimization/85700
7961 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7962 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7963 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7965 2018-06-25 Martin Sebor <msebor@redhat.com>
7967 * doc/extend.texi (Zero-length arrays): Update and clarify.
7969 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7971 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7972 added IEEE/IBM long double multilib support on PowerPC little
7973 endian Linux systems.
7974 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7975 (MULTILIB_DEFAULTS): Likewise.
7976 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7978 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7979 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7980 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7982 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7985 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7986 (REORDER_45): Likewise.
7988 2018-06-25 Jeff Law <law@redhat.com>
7990 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7991 dividend to 32 bits. Adjust length.
7992 (udivmodhi4): Cleanup output template. Fix length.
7994 2018-06-25 Carl Love <cel@us.ibm.com>
7996 * config/rs6000/vsx.md: Change word selector to prefered location.
7998 2018-06-25 Richard Biener <rguenther@suse.de>
8000 PR tree-optimization/86304
8001 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8002 epilogue-if-converted loops as well.
8004 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
8006 * lto-section-out.c (lto_begin_section): Do not print section
8007 name for noaddr and unnumbered dumps.
8009 2018-06-25 Richard Biener <rguenther@suse.de>
8011 * tree-vectorizer.h (struct vec_info_shared): New structure
8012 with parts split out from struct vec_info and loop_nest from
8013 struct _loop_vec_info.
8014 (struct vec_info): Adjust accordingly.
8015 (struct _loop_vec_info): Likewise.
8016 (LOOP_VINFO_LOOP_NEST): Adjust.
8017 (LOOP_VINFO_DATAREFS): Likewise.
8018 (LOOP_VINFO_DDRS): Likewise.
8019 (struct _bb_vec_info): Likewise.
8020 (BB_VINFO_DATAREFS): Likewise.
8021 (BB_VINFO_DDRS): Likewise.
8022 (struct _stmt_vec_info): Add dr_aux member.
8023 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8024 (DR_MISALIGNMENT_UNINITIALIZED): New.
8025 (set_dr_misalignment): Adjust.
8026 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8027 (vect_analyze_loop): Adjust prototype.
8028 (vect_analyze_loop_form): Likewise.
8029 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8030 Compute dependences lazily.
8031 (vect_record_base_alignments): Use shared datarefs/ddrs.
8032 (vect_verify_datarefs_alignment): Likewise.
8033 (vect_analyze_data_refs_alignment): Likewise.
8034 (vect_analyze_data_ref_accesses): Likewise.
8035 (vect_analyze_data_refs): Likewise.
8036 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8037 constructor parameter for shared part.
8038 (vect_analyze_loop_form): Pass in shared part and adjust.
8039 (vect_analyze_loop_2): Pass in storage for the number of
8040 stmts. Move loop nest finding to the caller. Compute
8042 (vect_analyze_loop): Pass in shared part.
8043 (vect_transform_loop): Verify shared datarefs are unchanged.
8044 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8045 constructor parameter for shared part.
8046 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8047 (vect_slp_bb): Verify shared datarefs are unchanged before
8049 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8051 (new_stmt_vec_info): Initialize DR_AUX misalignment to
8052 DR_MISALIGNMENT_UNINITIALIZED.
8053 * tree-vectorizer.c (vec_info::vec_info): Add constructor
8054 parameter for shared part.
8055 (vec_info::~vec_info): Adjust.
8056 (vec_info_shared::vec_info_shared): New.
8057 (vec_info_shared::~vec_info_shared): Likewise.
8058 (vec_info_shared::save_datarefs): Likewise.
8059 (vec_info_shared::check_datarefs): Likewise.
8060 (try_vectorize_loop_1): Construct shared part live for analyses
8061 of a single loop for multiple vector sizes.
8062 * tree-parloops.c (gather_scalar_reductions): Adjust.
8064 2018-06-25 Richard Biener <rguenther@suse.de>
8066 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8067 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8068 (vect_analyze_data_refs): Remove similar code from here and
8069 simplify accordingly.
8071 2018-06-25 Richard Biener <rguenther@suse.de>
8073 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8074 for reverse storage order accesses rather than asserting
8075 they cannot happen here.
8077 2018-06-25 Tom de Vries <tdevries@suse.de>
8080 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8081 Use data16 instead of .byte for insn prefix.
8083 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
8086 * parser.c (make_char_string_pack): Pass this literal chars
8087 through cpp_interpret_string.
8088 (cp_parser_userdef_numeric_literal): Check the result of
8089 make_char_string_pack.
8091 2018-06-24 Maya Rashish <coypu@sdf.org>
8093 * ginclude/stddef.h: Simplify conditions around avoiding
8094 re-definition of __size_t.
8096 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8098 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8099 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8101 2018-06-22 Maya Rashish <coypu@sdf.org>
8103 * doc/invoke.texi (mno-fancy-math-387): Update for changes
8104 made to OpenBSD and NetBSD through the years.
8106 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8108 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8109 behavior of vec_pack (vector double, vector double) to match
8110 behavior of vec_float2 (vector double, vector double).
8112 2018-06-22 Olivier Hainque <hainque@adacore.com>
8114 * gimplify.c (gimplify_function_tree): Prevent creation
8115 of a trampoline for the address of the current function
8116 passed to entry/exit instrumentation hooks.
8118 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
8121 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8124 2018-06-22 Martin Liska <mliska@suse.cz>
8126 PR tree-optimization/86263
8127 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8128 Bail out if is_enabled is false.
8129 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8131 (jump_table_cluster::is_enabled): New function.
8133 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8135 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8136 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8137 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8138 (lto_input_ts_binfo_tree_pointers): Likewise.
8139 * tree-streamer-out.c (streamer_write_tree_bitfields,
8140 write_ts_binfo_tree_pointers): Likewise.
8141 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8143 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8145 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8147 2018-06-22 Martin Liska <mliska@suse.cz>
8149 * symbol-summary.h (get): Make it pure and inline move
8150 functionality from ::get function.
8151 (get): Remove and inline into ::get and ::get_create.
8152 (get_create): Move code from ::get function.
8154 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8157 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8158 -x assembler-with-cpp.
8160 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8162 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8163 _FILE_OFFSET_BITS=64 for C++.
8165 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
8167 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8168 conversion insn that shows up when pr85657-3.c is compiled using
8169 IEEE 128-bit long double.
8170 (neg<mode>2_internal): Use the correct mode to check whether the
8171 mode is IBM extended.
8172 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8173 multiply and divide external functions from being created more
8176 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8178 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8180 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
8181 the edge can be forwarded.
8182 (cfg_layout_merge_blocks): Likewise.
8184 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8186 * except.c (finish_eh_generation): Commit edge insertions only after
8187 the EH edges have been redirected from post-landing to landing pads.
8189 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8191 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8192 create_tmp_var_for to create the FRAME decl.
8193 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8195 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8197 * tree-inline.c (copy_edges_for_bb): Minor tweak.
8198 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8199 debug statement when resetting its value.
8200 (expand_call_inline): Copy the locus of the call onto the assignment
8201 of the return value, if any. Use local variable in more cases.
8203 2018-06-21 Martin Liska <mliska@suse.cz>
8205 * ipa-pure-const.c (propagate_nothrow): Use
8206 funct_state_summaries->get.
8207 (dump_malloc_lattice): Likewise.
8208 (propagate_malloc): Likewise.
8210 2018-06-21 Richard Biener <rguenther@suse.de>
8212 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8213 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8214 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8216 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8217 BLOCK_ABSTRACT_ORIGIN unconditionally.
8219 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8221 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8223 * ipa-reference.c (ipa_reference_c_finalize): Delete
8224 ipa_ref_opt_sum_summaries and set it to NULL.
8226 2018-06-21 Tom de Vries <tdevries@suse.de>
8228 PR tree-optimization/85859
8229 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8230 test with comment from bb_no_side_effects_p.
8232 2018-06-21 Richard Biener <rguenther@suse.de>
8234 PR tree-optimization/86232
8235 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8236 max for constant niter.
8238 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8240 * config/aarch64/aarch64-simd.md
8241 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8243 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8245 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8246 Make opernads of the unspec commutative.
8248 2018-06-21 Richard Biener <rguenther@suse.de>
8250 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8251 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8252 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8253 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8255 (vect_record_base_alignments): Do not record base alignment
8256 for gathers or scatters.
8257 (vect_compute_data_ref_alignment): Drop return value that is always
8258 true. Bail out early for gathers or scatters.
8259 (vect_enhance_data_refs_alignment): Bail out early for gathers
8261 (vect_find_same_alignment_drs): Likewise.
8262 (vect_analyze_data_refs_alignment): Remove dead code.
8263 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8264 (vect_analyze_data_refs): For possible gathers or scatters do
8265 not create an alternate DR, just check their possible validity
8266 and mark them. Adjust DECL_NONALIASED handling to not rely
8268 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8269 update inits of gathers or scatters.
8270 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8271 Also copy gather/scatter flag to pattern vinfo.
8273 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8275 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8276 behavior of vec_packsu (vector unsigned long long, vector unsigned
8277 long long) to match behavior of vec_packs with same signature.
8279 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8280 Thomas Schwinge <thomas@codesourcery.com>
8281 Cesar Philippidis <cesar@codesourcery.com>
8283 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8284 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8285 (gimplify_adjust_omp_clauses): Likewise.
8286 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8287 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8288 (gimplify_omp_target_update): Update handling of acc update and
8290 * omp-low.c (install_var_field): Remove unused parameter
8291 base_pointers_restrict.
8292 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8293 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8295 (omp_target_base_pointers_restrict_p): Delete.
8296 (scan_omp_target): Update call to scan_sharing_clauses.
8297 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8299 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8300 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8301 (convert_local_omp_clauses): Likewise.
8302 * tree-pretty-print.c (dump_omp_clause): Likewise.
8303 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8305 (omp_clause_code_name): Likewise.
8307 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8310 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8313 PR tree-optimization/86231
8314 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8315 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8317 2018-06-20 Tom de Vries <tdevries@suse.de>
8319 PR tree-optimization/86097
8320 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8321 iv type if signedness of iv type is not the same as that of *nit.
8323 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8325 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8326 EDGE_EH edges, verify they are all EDGE_EH.
8328 2018-06-20 Maya Rashish <coypu@sdf.org>
8330 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8332 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8334 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8335 * config/aarch64/aarch64.c (xgene1_tunings): Add
8336 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8337 (aarch64_mode_valid_for_sched_fusion_p):
8338 Allow 16-byte modes.
8339 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8340 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8342 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8344 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8345 * config/aarch64/iterators.md (VQ2): New mode iterator.
8347 2018-06-20 Martin Liska <mliska@suse.cz>
8349 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8350 Change default ratio from 10 to 8.
8352 2018-06-20 Martin Liska <mliska@suse.cz>
8354 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8356 (bit_test_cluster::find_bit_tests): Likewise.
8357 (switch_decision_tree::analyze_switch_statement): Find clusters.
8358 * tree-switch-conversion.h (struct jump_table_cluster): Document
8361 2018-06-20 Martin Liska <mliska@suse.cz>
8363 * tree-switch-conversion.c (switch_conversion::collect):
8364 Record m_uniq property.
8365 (switch_conversion::expand): Bail out for special conditions.
8366 (group_cluster::~group_cluster): New.
8367 (group_cluster::group_cluster): Likewise.
8368 (group_cluster::dump): Likewise.
8369 (jump_table_cluster::emit): New.
8370 (switch_decision_tree::fix_phi_operands_for_edges): New.
8371 (struct case_node): Remove struct.
8372 (jump_table_cluster::can_be_handled): New.
8373 (case_values_threshold): Moved to header.
8374 (reset_out_edges_aux): Likewise.
8375 (jump_table_cluster::is_beneficial): New.
8376 (bit_test_cluster::can_be_handled): Likewise.
8377 (add_case_node): Remove.
8378 (bit_test_cluster::is_beneficial): New.
8379 (case_bit_test::cmp): New.
8380 (bit_test_cluster::emit): New.
8381 (expand_switch_as_decision_tree_p): Remove.
8382 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8383 (fix_phi_operands_for_edge): Likewise.
8384 (switch_decision_tree::analyze_switch_statement): New.
8385 (compute_cases_per_edge): Move ...
8386 (switch_decision_tree::compute_cases_per_edge): ... here.
8387 (try_switch_expansion): Likewise.
8388 (switch_decision_tree::try_switch_expansion): Likewise.
8389 (record_phi_operand_mapping): Likewise.
8390 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8391 (emit_case_decision_tree): Likewise.
8392 (switch_decision_tree::emit): Likewise.
8393 (balance_case_nodes): Likewise.
8394 (switch_decision_tree::balance_case_nodes): Likewise.
8395 (dump_case_nodes): Likewise.
8396 (switch_decision_tree::dump_case_nodes): Likewise.
8397 (emit_jump): Likewise.
8398 (switch_decision_tree::emit_jump): Likewise.
8399 (emit_cmp_and_jump_insns): Likewise.
8400 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8401 (emit_case_nodes): Likewise.
8402 (switch_decision_tree::emit_case_nodes): Likewise.
8403 (conditional_probability): Remove.
8404 * tree-switch-conversion.h (enum cluster_type): New.
8406 (struct cluster): Likewise.
8407 (cluster::cluster): Likewise.
8408 (struct simple_cluster): Likewise.
8409 (simple_cluster::simple_cluster): Likewise.
8410 (struct group_cluster): Likewise.
8411 (struct jump_table_cluster): Likewise.
8412 (struct bit_test_cluster): Likewise.
8413 (struct min_cluster_item): Likewise.
8414 (struct case_tree_node): Likewise.
8415 (case_tree_node::case_tree_node): Likewise.
8416 (jump_table_cluster::case_values_threshold): Likewise.
8417 (struct case_bit_test): Likewise.
8418 (struct switch_decision_tree): Likewise.
8419 (struct switch_conversion): Likewise.
8420 (switch_decision_tree::reset_out_edges_aux): Likewise.
8422 2018-06-20 Martin Liska <mliska@suse.cz>
8424 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8425 (hoist_edge_and_branch_if_true): Likewise.
8426 (expand_switch_using_bit_tests_p): Likewise.
8427 (struct case_bit_test): Likewise.
8428 (case_bit_test_cmp): Likewise.
8429 (emit_case_bit_tests): Likewise.
8430 (switch_conversion::switch_conversion): New class.
8431 (struct switch_conv_info): Remove old struct.
8432 (collect_switch_conv_info): More to ...
8433 (switch_conversion::collect): ... this.
8434 (check_range): Likewise.
8435 (switch_conversion::check_range): Likewise.
8436 (check_all_empty_except_final): Likewise.
8437 (switch_conversion::check_all_empty_except_final): Likewise.
8438 (check_final_bb): Likewise.
8439 (switch_conversion::check_final_bb): Likewise.
8440 (create_temp_arrays): Likewise.
8441 (switch_conversion::create_temp_arrays): Likewise.
8442 (free_temp_arrays): Likewise.
8443 (gather_default_values): Likewise.
8444 (switch_conversion::gather_default_values): Likewise.
8445 (build_constructors): Likewise.
8446 (switch_conversion::build_constructors): Likewise.
8447 (constructor_contains_same_values_p): Likewise.
8448 (switch_conversion::contains_same_values_p): Likewise.
8449 (array_value_type): Likewise.
8450 (switch_conversion::array_value_type): Likewise.
8451 (build_one_array): Likewise.
8452 (switch_conversion::build_one_array): Likewise.
8453 (build_arrays): Likewise.
8454 (switch_conversion::build_arrays): Likewise.
8455 (gen_def_assigns): Likewise.
8456 (switch_conversion::gen_def_assigns): Likewise.
8457 (prune_bbs): Likewise.
8458 (switch_conversion::prune_bbs): Likewise.
8459 (fix_phi_nodes): Likewise.
8460 (switch_conversion::fix_phi_nodes): Likewise.
8461 (gen_inbound_check): Likewise.
8462 (switch_conversion::gen_inbound_check): Likewise.
8463 (process_switch): Use the newly created class.
8464 (switch_conversion::expand): New.
8465 (switch_conversion::~switch_conversion): New.
8466 * tree-switch-conversion.h: New file.
8468 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8470 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8471 tree-vect-patterns.c.
8472 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8473 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8474 (vect_recog_sad_pattern): Likewise.
8475 (vect_recog_widen_sum_pattern): Likewise.
8476 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8477 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8478 (vect_recog_rotate_pattern): Likewise.
8479 (vect_recog_mult_pattern): Likewise.
8480 (vect_recog_vector_vector_shift_pattern): Likewise.
8481 (vect_recog_divmod_pattern): Likewise.
8482 (vect_recog_mixed_size_cond_pattern): Likewise.
8483 (vect_recog_bool_pattern): Likewise.
8484 (vect_recog_mask_conversion_pattern): Likewise.
8485 (vect_try_gather_scatter_pattern): Likewise.
8486 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8487 (vect_recog_over_widening_pattern): Likewise.
8488 (vect_recog_gather_scatter_pattern): Likewise.
8489 (vect_recog_func_ptr): Move from tree-vectorizer.h
8490 (vect_vect_recog_func_ptrs): Move further down the file.
8491 (vect_recog_func): Likewise. Remove the third argument.
8492 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8493 (vect_pattern_recog_1): Expect the pattern function to do any
8494 necessary target tests. Also expect it to provide a vector type.
8495 Remove the type_in handling.
8497 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8499 * tree-vect-patterns.c (vect_pattern_detected): New function.
8500 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8501 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8502 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8503 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8504 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8505 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8506 (vect_recog_mask_conversion_pattern)
8507 (vect_try_gather_scatter_pattern): Likewise.
8509 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8511 * tree-vect-patterns.c (vect_get_internal_def): New function.
8512 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8513 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8514 (search_type_for_mask_1): Use it.
8516 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8518 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8519 redundant WIDEN_SUM_EXPR handling.
8520 (vect_recog_sad_pattern): Likewise.
8522 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8524 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8525 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8526 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8527 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8528 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8530 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8532 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8533 use the stmt_vec_info of the original bb statement for the
8534 new zero assignment, even if the call is part of a pattern.
8536 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8538 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8539 that the sequence is attached to the original statement rather
8540 than the pattern statement.
8541 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8542 PATTERN_DEF_SEQ from the original statement rather than
8543 the main pattern statement.
8544 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8545 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8546 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8548 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8550 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8551 definition statements before the early exit for statements that aren't
8553 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8555 (vect_transform_loop): ...here. Process pattern definition
8556 statements without first checking whether the main pattern
8557 statement is live or relevant.
8559 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8561 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8562 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8564 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8566 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8567 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8568 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8569 (expand_block_compare): Change select_block_compare_mode call.
8570 (expand_strncmp_align_check): Use new functions, fix comment.
8571 (emit_final_str_compare_gpr): New function.
8572 (expand_strn_compare): Refactor and clean up code.
8573 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8575 2018-06-19 Tony Reix <tony.reix@atos.com>
8576 Damien Bergamini <damien.bergamini@atos.com>
8577 David Edelsohn <dje.gcc@gmail.com>
8579 * collect2.c (static_obj): New variable.
8580 (static_libs): New variable.
8581 (is_in_list): Uncomment declaration.
8582 (main): Track AIX libraries linked statically.
8583 (is_in_list): Uncomment definition.
8584 (scan_prog_file): Don't add AIX shared libraries initializer
8585 to constructor list if linking statically.
8587 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8589 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8591 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8593 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8595 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8598 2018-06-19 Martin Liska <mliska@suse.cz>
8600 * config/i386/i386.c (ix86_can_inline_p): Do not use
8601 ipa_fn_summaries::get_create.
8602 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8604 (devirtualization_time_bonus): Likewise.
8605 (ipcp_propagate_stage): Likewise.
8606 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8607 (edge_set_predicate): Likewise.
8608 (evaluate_conditions_for_known_args): Likewise.
8609 (evaluate_properties_for_edge): Likewise.
8610 (ipa_call_summary::reset): Tranform to ...
8611 (ipa_call_summary::~ipa_call_summary): ... this.
8612 (ipa_fn_summary::reset): Transform to ...
8613 (ipa_fn_summary::~ipa_fn_summary): ... this.
8614 (ipa_fn_summary_t::remove): Rename to ...
8615 (ipa_fn_summary_t::remove_callees): ... this.
8616 (ipa_fn_summary_t::duplicate): Use placement new
8617 instead of memory copy.
8618 (ipa_call_summary_t::duplicate): Likewise.
8619 (ipa_call_summary_t::remove): Remove.
8620 (dump_ipa_call_summary): Change get_create to get.
8621 (ipa_dump_fn_summary): Dump only when summary exists.
8622 (analyze_function_body): Use symbol_summary::get instead
8624 (compute_fn_summary): Likewise.
8625 (estimate_edge_devirt_benefit): Likewise.
8626 (estimate_edge_size_and_time): Likewise.
8627 (inline_update_callee_summaries): Likewise.
8628 (remap_edge_change_prob): Likewise.
8629 (remap_edge_summaries): Likewise.
8630 (ipa_merge_fn_summary_after_inlining): Likewise.
8631 (write_ipa_call_summary): Likewise.
8632 (ipa_fn_summary_write): Likewise.
8633 (ipa_free_fn_summary): Likewise.
8634 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8635 (struct ipa_call_summary): Likewise.
8636 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8638 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8639 (estimate_size_after_inlining): Likewise.
8640 (estimate_growth): Likewise.
8641 (growth_likely_positive): Likewise.
8642 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8643 (inline_call): Likewise.
8644 * ipa-inline.c (caller_growth_limits): Likewise.
8645 (can_inline_edge_p): Likewise.
8646 (can_inline_edge_by_limits_p): Likewise.
8647 (compute_uninlined_call_time): Likewise.
8648 (compute_inlined_call_time): Likewise.
8649 (want_inline_small_function_p): Likewise.
8650 (edge_badness): Likewise.
8651 (update_caller_keys): Likewise.
8652 (update_callee_keys): Likewise.
8653 (inline_small_functions): Likewise.
8654 (inline_to_all_callers_1): Likewise.
8655 (dump_overall_stats): Likewise.
8656 (early_inline_small_functions): Likewise.
8657 (early_inliner): Likewise.
8658 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8659 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8660 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8661 * ipa-split.c (execute_split_functions): Likewise.
8662 * symbol-summary.h: Likewise.
8663 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8665 2018-06-19 Richard Biener <rguenther@suse.de>
8667 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8668 (vectorize_loops): ... here. Fix dbgcnt handling.
8669 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8671 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8674 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8675 ieee128 argument takes up only one (vector) register, not two (floating
8678 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8680 * gimplify.c (gimplify_init_constructor): Really never clear for an
8681 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8683 2018-06-19 Richard Biener <rguenther@suse.de>
8685 PR tree-optimization/86179
8686 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8687 after failed recognition.
8689 2018-06-18 Martin Sebor <msebor@redhat.com>
8692 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8693 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8694 Handle integer subtraction.
8695 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8696 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8698 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8700 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8701 param from rtx to rtx_insn *.
8702 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8704 (frv_ifcvt_modify_insn): Likwise.
8705 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8706 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8707 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8708 as_a <rtx_insn *> cast to local "unprotected_region" once
8709 it's been established that it's not NULL or pc_rtx.
8710 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8711 param "sethi" from rtx to rtx_insn *.
8712 (nds32_group_float_insns): Likewise for param "insn".
8713 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8715 (vax_output_int_subtract): Likewise.
8716 * config/vax/vax.c (vax_output_int_add): Likewise for param
8718 (vax_output_int_subtract): Likewise.
8719 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8720 (emit_pattern_after): Likewise for param "after".
8721 (emit_insn_after): Likewise.
8722 (emit_jump_insn_after): Likewise.
8723 (emit_call_insn_after): Likewise.
8724 (emit_debug_insn_after): Likewise.
8725 (emit_pattern_before): Likewise for param "before".
8726 (emit_insn_before): Likewise.
8727 (emit_jump_insn_before): Likewise.
8728 * final.c (get_insn_template): Likewise for param "insn", removing
8730 * output.h (get_insn_template): Likewise for 2nd param.
8731 * rtl.h (emit_insn_before): Likewise.
8732 (emit_jump_insn_before): Likewise.
8733 (emit_debug_insn_before_noloc): Likewise.
8734 (emit_insn_after): Likewise.
8735 (emit_jump_insn_after): Likewise.
8736 (emit_call_insn_after): Likewise.
8737 (emit_debug_insn_after): Likewise.
8738 (set_insn_deleted): Likewise for param.
8740 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8743 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8744 floating point modes, so that IFmode is numerically greater than
8745 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8746 to declare the ordering. This prevents IFmode from being
8747 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8748 machine. Include rs6000-modes.h to share the fractional values
8749 between genmodes* and the rest of the compiler.
8753 * config/rs6000/rs6000-modes.h: New file.
8754 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8755 meaning of rs6000_long_double_size so that 126..128 selects an
8756 appropriate 128-bit floating point type.
8757 (rs6000_option_override_internal): Likewise.
8758 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8759 (TARGET_LONG_DOUBLE_128): Change the meaning of
8760 rs6000_long_double_size so that 126..128 selects an appropriate
8761 128-bit floating point type.
8762 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8763 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8764 source and destination to match the standard usage.
8765 (truncifkf2): Likewise.
8766 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8767 ISA 2.07 to use an explicit clobber, instead of passing in a
8769 (copysign<mode>3_soft): Likewise.
8771 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8773 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8774 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8775 (vect_slp_analyze_instance_dependence): Likewise.
8776 (vect_enhance_data_refs_alignment): Likewise.
8777 (vect_analyze_data_refs_alignment): Likewise.
8778 (vect_slp_analyze_and_verify_instance_alignment
8779 (vect_analyze_data_ref_accesses): Likewise.
8780 (vect_prune_runtime_alias_test_list): Likewise.
8781 (vect_analyze_data_refs): Likewise.
8782 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8783 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8784 (vect_analyze_scalar_cycles_1): Likewise.
8785 (vect_get_loop_niters): Likewise.
8786 (vect_analyze_loop_form_1): Likewise.
8787 (vect_update_vf_for_slp): Likewise.
8788 (vect_analyze_loop_operations): Likewise.
8789 (vect_analyze_loop): Likewise.
8790 (vectorizable_induction): Likewise.
8791 (vect_transform_loop): Likewise.
8792 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8793 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8794 (vect_make_slp_decision): Likewise.
8795 (vect_detect_hybrid_slp): Likewise.
8796 (vect_slp_analyze_operations): Likewise.
8797 (vect_slp_bb): Likewise.
8798 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8799 (vectorizable_bswap): Likewise.
8800 (vectorizable_call): Likewise.
8801 (vectorizable_simd_clone_call): Likewise.
8802 (vectorizable_conversion): Likewise.
8803 (vectorizable_assignment): Likewise.
8804 (vectorizable_shift): Likewise.
8805 (vectorizable_operation): Likewise.
8806 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8808 2018-06-18 Martin Sebor <msebor@redhat.com>
8810 PR tree-optimization/81384
8811 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8812 * builtins.c (expand_builtin_strnlen): New function.
8813 (expand_builtin): Call it.
8814 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8815 * builtins.def (BUILT_IN_STRNLEN): New.
8816 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8817 Warn for bounds in excess of maximum object size.
8818 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8819 single-value ranges. Handle strnlen.
8820 (handle_builtin_strlen): Handle strnlen.
8821 (strlen_check_and_optimize_stmt): Same.
8822 * doc/extend.texi (Other Builtins): Document strnlen.
8824 2018-06-18 Maya Rashish <coypu@sdf.org>
8826 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8827 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8828 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8830 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8832 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8834 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8836 * tree.c (escaped_string::escape): Replace cast to char * by
8837 const_cast<char *> (unescaped).
8839 2018-06-18 Nick Clifton <nickc@redhat.com>
8842 * tree.c (escaped_string): New class. Converts an unescaped
8843 string into its escaped equivalent.
8844 (warn_deprecated_use): Use the new class to convert the
8845 deprecation message, if present.
8846 (test_escaped_strings): New self test.
8847 (test_c_tests): Add test_escaped_strings.
8848 * doc/extend.texi (deprecated): Add a note that the
8849 deprecation message is affected by the -fmessage-length
8850 option, and that control characters will be escaped.
8851 (#pragma GCC error): Document this pragma.
8852 (#pragma GCC warning): Likewise.
8853 * doc/invoke.texi (-fmessage-length): Document this option's
8854 effect on the #warning and #error preprocessor directives and
8855 the deprecated attribute.
8857 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8859 * tree.c (decl_value_expr_lookup): Revert latest change.
8860 (decl_value_expr_insert): Likewise.
8862 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8864 * gimplify.c (nonlocal_vlas): Delete.
8865 (nonlocal_vla_vars): Likewise.
8866 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8868 (gimplify_body): Do not create and destroy nonlocal_vlas.
8869 * tree-nested.c: Include diagnostic.h.
8870 (use_pointer_in_frame): Tweak.
8871 (lookup_field_for_decl): Add assertion and declare the transformation.
8872 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8873 internal error when the reference is in a wrong context. Do not
8874 create a debug decl by default.
8875 (note_nonlocal_block_vlas): Delete.
8876 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8877 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8878 create a debug decl by default.
8879 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8880 call is in a wrong context.
8881 (fixup_vla_decls): New function.
8882 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8883 debug variables were created.
8884 * tree.c (decl_value_expr_lookup): Add checking assertion.
8885 (decl_value_expr_insert): Likewise.
8887 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8890 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8891 * tree-scalar-evolution.c (interpret_expr): Likewise.
8892 (expression_expensive_p): Likewise.
8893 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8894 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8895 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8896 (ssa_defined_by_minus_one_stmt_p): New.
8898 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8901 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8902 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8903 * dojump.c (do_jump): Likewise.
8904 * expr.c (expand_expr_real_2): Check operand type's sign.
8905 * fold-const.c (const_unop): Handle ABSU_EXPR.
8906 (fold_abs_const): Likewise.
8907 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8908 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8909 (strip_sign_op_1): Likesise.
8910 * match.pd: Add new pattern to generate ABSU_EXPR.
8911 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8912 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8913 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8914 * tree-inline.c (estimate_operator_cost): Likewise.
8915 * tree-pretty-print.c (dump_generic_node): Likewise.
8916 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8917 * tree.def (ABSU_EXPR): New.
8919 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8922 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8923 documented as preserved for backward compatibility only.
8924 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8926 PR rtl-optimization/86108
8927 * bb-reorder.c (create_forwarder_block): Renamed to ...
8928 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8929 jump from new landing pad to the second part.
8930 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8933 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8936 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8937 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8938 Only call store_expr for halves if the mode is the same.
8941 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8942 Fix up comment formatting.
8944 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8946 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8947 (typed_splay_tree::closure,
8948 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8949 (typed_splay_tree::typed_splay_tree,
8950 typed_splay_tree::operator =): Declared private.
8951 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8952 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8953 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8954 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8955 typed_splay_tree::splay_tree_splay,
8956 typed_splay_tree::splay_tree_foreach_helper,
8957 typed_splay_tree::splay_tree_insert,
8958 typed_splay_tree::splay_tree_remove,
8959 typed_splay_tree::splay_tree_lookup,
8960 typed_splay_tree::splay_tree_predecessor,
8961 typed_splay_tree::splay_tree_successor,
8962 typed_splay_tree::splay_tree_min,
8963 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8964 (typed_splay_tree::root, typed_splay_tree::comp,
8965 typed_splay_tree::delete_key,
8966 typed_splay_tree::delete_value): New data members.
8967 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8968 typed_splay_tree::remove.
8970 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8972 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8973 -mginv and -mno-ginv to the assembler.
8974 * config/mips/mips.opt (-mcrc): New option.
8976 * doc/invoke.text (-mcrc): Document.
8979 2018-06-15 Nick Clifton <nickc@redhat.com>
8982 * tree.c (escaped_string): New class. Converts an unescaped
8983 string into its escaped equivalent.
8984 (warn_deprecated_use): Use the new class to convert the
8985 deprecation message, if present.
8986 (test_escaped_strings): New self test.
8987 (test_c_tests): Add test_escaped_strings.
8988 * doc/extend.texi (deprecated): Add a note that the
8989 deprecation message is affected by the -fmessage-length
8990 option, and that control characters will be escaped.
8991 (#pragma GCC error): Document this pragma.
8992 (#pragma GCC warning): Likewise.
8993 * doc/invoke.texi (-fmessage-length): Document this option's
8994 effect on the #warning and #error preprocessor directives and
8995 the deprecated attribute.
8997 2018-06-15 Richard Biener <rguenther@suse.de>
8999 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9000 here, also noting vector size used.
9001 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
9002 size used in MSG_OPTIMIZED_LOCATIONS dump.
9003 (pass_slp_vectorize::execute): Adjust.
9005 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
9008 * config/arc/arc.c (arc_return_address_register): Fix
9011 2018-06-15 Richard Biener <rguenther@suse.de>
9014 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9015 leave useless conversion stripping to force_gimple_operand_gsi.
9016 (gimplify_build2): Likewise.
9017 (gimplify_build1): Likewise.
9019 2018-06-15 Richard Biener <rguenther@suse.de>
9022 * tree-cfg.c (move_stmt_op): unshare invariant addresses
9023 before adjusting their block.
9025 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
9027 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9028 multilibs for *-*-rtems*.
9029 * config/riscv/t-rtems: New file.
9031 2018-06-14 Jakub Jelinek <jakub@redhat.com>
9034 * match.pd ((A +- CST1) +- CST2): Punt if last resort
9035 unsigned_type_for returns NULL.
9038 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9039 subregs of multi-word pseudos unless the float mode has word size.
9041 2018-06-14 Richard Biener <rguenther@suse.de>
9044 * tree-vect-generic.c (build_word_mode_vector_type): Remove
9045 duplicate and harmful type_hash_canon.
9046 * tree.c (type_hash_canon): Assert we didn't find ourselves.
9048 2018-06-14 Richard Biener <rguenther@suse.de>
9051 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9054 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
9056 * config/rtems.h (STDINT_LONG32): Define.
9058 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
9059 Prachi Godbole <prachi.godbole@imgtec.com>
9061 * config/mips/mips-cpus.def: Define P6600.
9062 * config/mips/mips-tables.opt: Regenerate.
9063 * config/mips/mips.c (mips_ucbranch_type): New enum.
9064 (mips_rtx_cost_data): Add support for P6600.
9065 (mips_issue_rate): Likewise.
9066 (mips_multipass_dfa_lookahead): Likewise.
9067 (mips_avoid_hazard): Likewise.
9068 (mips_reorg_process_insns): Likewise.
9069 (mips_classify_branch_p6600): New function.
9070 * config/mips/mips.h (TUNE_P6600): New define.
9071 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9072 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9073 * config/mips/mips.md: Include p6600.md.
9074 (processor): Add p6600.
9075 * config/mips/p6600.md: New file.
9076 * doc/invoke.texi: Add p6600 to supported architectures.
9078 2018-06-13 Martin Sebor <msebor@redhat.com>
9080 PR tree-optimization/86114
9081 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9083 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9085 2018-06-13 Richard Biener <rguenther@suse.de>
9087 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9088 Properly set vector type of the intermediate stmt.
9089 * tree-vect-stmts.c (vectorizable_operation): The destination
9090 var always has vectype_out type.
9092 2018-06-13 Jeff Law <law@redhat.com>
9094 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9095 integer 0 for argument to print_rtl_with_bb.
9096 (rl78_reorg): Likewise.
9098 2018-06-13 David Malcolm <dmalcolm@redhat.com>
9100 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9101 from rtx to rtx_insn *.
9102 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9104 (add_sched_insns_for_speculation): Likewise for local "target",
9105 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9106 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9107 from rtx_insn ** to rtx_code_label **.
9108 (reorg_emit_nops): Likewise.
9109 (c6x_reorg): Likewise for local "call_labels".
9110 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9112 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9113 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9114 the loops over LABEL_REFS.
9115 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9117 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9118 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9119 (split_branches): Strengthen local "olabel" from rtx to
9120 rtx_insn *, adding a safe_as_a cast.
9121 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9123 (add_insn_after): Likewise for first two params.
9124 (add_insn_before): Likewise.
9125 (remove_insn): Likewise for param.
9126 (emit_pattern_before_noloc): Likewise for second and third params.
9127 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9128 (emit_call_insn_before_noloc): Likewise.
9129 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9131 (emit_barrier_before): Likewise.
9132 (emit_label_before): Strengthen "label" param from "rtx" to
9133 "rtx_code_label *". Strengthen "before" param from "rtx" to
9135 (emit_insn_after_1): Strengthen "after" param from "rtx" to
9137 (emit_pattern_after_noloc): Likewise.
9138 (emit_insn_after_noloc): Likewise.
9139 (emit_jump_insn_after_noloc): Likewise.
9140 (emit_call_insn_after_noloc): Likewise.
9141 (emit_debug_insn_after_noloc): Likewise.
9142 (emit_barrier_after): Likewise.
9143 (emit_label_after): Likewise for both params.
9144 (emit_pattern_after_setloc): Likewise for "after" param. Convert
9145 "loc" param from "int" to "location_t".
9146 (emit_insn_after_setloc): Likewise.
9147 (emit_jump_insn_after_setloc): Likewise.
9148 (emit_call_insn_after_setloc): Likewise.
9149 (emit_debug_insn_after_setloc): Likewise.
9150 (emit_pattern_before_setloc): Likewise for "before" param. Convert
9151 "loc" param from "int" to "location_t".
9152 (emit_pattern_before): Convert NULL_RTX to NULL.
9153 (emit_insn_before_setloc): Convert "loc" param from "int" to
9155 (emit_jump_insn_before_setloc): Likewise.
9156 (emit_call_insn_before_setloc): Likewise.
9157 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9158 rtx_insn *. Convert "loc" param from "int" to "location_t".
9159 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9160 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9161 Convert 3rd param from "int" to "location_t".
9162 (emit_barrier_before, emit_barrier_after, next_real_insn):
9163 Strengthen param from rtx to rtx_insn *.
9164 (emit_label_before): Strengthen 1st param from "rtx" to
9165 "rtx_code_label *". Strengthen 2nd param from "rtx" to
9167 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9168 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9169 Strengthen 2nd param from "rtx" to "rtx_insn *".
9170 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9171 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9172 Likewise. Convert 3rd param from "int" to "location_t".
9173 (emit_label_after): Strengthen 1st param from "rtx" to
9175 (next_real_insn, remove_insn): Strengthen param from "rtx" to
9177 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9178 from "rtx" to "rtx_insn *".
9180 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
9182 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9183 bodies streamed in with -Q.
9184 * dumpfile.c (dump_files): Add lto-stream-out dump file.
9185 * dumpfile.h (tree_dump_index): Add lto_stream_out.
9186 * gimple-streamer-out.c: Include gimple-pretty-print.h
9187 (output_bb): Dump stmts streamed.
9188 * lto-section-out.c: Include print-tree.h
9189 (lto_begin_section): Dump sections created.
9190 (lto_output_decl_index): Dump decl encoded.
9191 * lto-streamer-out.c: Include print-tree.h
9192 (create_output_block): Dump output block created.
9193 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9194 (output_function): Dump function output.
9195 (output_constructor): Dump constructor streamed.
9196 (write_global_stream): Output indexes encoded.
9197 (produce_asm_for_decls): Dump streams encoded.
9198 * lto-streamer.c (streamer_dump_file): New global var.
9199 * lto-streamer.h (streamer_dump_file): Declare.
9200 * passes.c (ipa_write_summaries): Initialize streamer dump.
9201 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9204 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
9207 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9208 offsets for register save directives. Emit a second batch of save
9209 directives, if need be, when the function accesses prior frames.
9211 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9213 * config/arc/fpu.md (fmasf4): Force operand to register.
9214 (fnmasf4): Likewise.
9216 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9218 * config/arc/arc-protos.h (arc_pad_return): Remove.
9219 * config/arc/arc.c (machine_function): Remove force_short_suffix
9221 (arc_print_operand): Adjust printing of '&'.
9222 (arc_verify_short): Remove conditional printing of short suffix.
9223 (arc_final_prescan_insn): Remove reference to size_reason.
9224 (pad_return): New function.
9225 (arc_reorg): Call pad_return.
9226 (arc_pad_return): Remove.
9227 (arc_init_machine_status): Remove reference to force_short_suffix.
9228 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9229 (attr length): When attribute iscompact is true force to 2
9230 regardless; in the case of maybe check if we want to force the
9231 instruction to have 4 bytes length.
9232 (nopv): Change it to generate 4 byte long nop as well.
9233 (blockage): New pattern.
9234 (simple_return): Remove call to arc_pad_return.
9235 (p_return_i): Likewise.
9237 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9239 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9241 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9243 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9246 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9248 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9249 for ARC700 and ARCv2.
9251 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9254 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9255 operands[2] instead of operands[1].
9258 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9260 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9261 case, check whether the outer register overlaps an unallocatable
9262 register, not just whether it fits the required class.
9264 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9266 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9268 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9269 (memrefs_conflict_p): Likewise.
9270 (init_alias_analysis): Likewise.
9271 * cfgexpand.c (expand_debug_expr): Likewise.
9272 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9273 * cse.c (fold_rtx): Likewise.
9274 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9275 * expr.c (emit_block_move_hints): Likewise.
9276 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9277 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9278 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9279 (emit_group_store): Likewise.
9280 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9281 to read the PRE/POST_MODIFY increment.
9282 * calls.c (store_one_arg): Use strip_offset.
9283 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9285 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9287 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9288 (simplify_binary_operation_1): Extend CONST_INT handling to
9290 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9291 than a HOST_WIDE_INT.
9292 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9294 (adjust_mems, add_stores): Update accodingly.
9295 (vt_canonicalize_addr): Track polynomial offsets.
9296 (emit_note_insn_var_location): Likewise.
9297 (vt_add_function_parameter): Likewise.
9298 (vt_initialize): Likewise.
9300 2018-06-12 Jeff Law <law@redhat.com>
9302 * config.gcc (alpha*-*-freebsd*): Remove.
9303 * config/alpha/freebsd.h: Remove.
9305 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9308 * spellcheck-tree.c (levenshtein_distance): Rename to...
9309 (get_edit_distance): ...this, and update for underlying renaming.
9310 * spellcheck-tree.h (levenshtein_distance): Rename to...
9311 (get_edit_distance): ...this.
9312 * spellcheck.c (levenshtein_distance): Rename to...
9313 (get_edit_distance): ...this. Convert from Levenshtein distance
9314 to Damerau-Levenshtein distance by supporting transpositions of
9315 adjacent characters. Rename "v1" to "v_next" and "v0" to
9317 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9318 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9319 update for underlying renaming.
9320 (selftest::levenshtein_distance_unit_test): Rename to...
9321 (selftest::test_get_edit_distance_unit): ...this, and update for
9322 underlying renaming.
9323 (selftest::test_find_closest_string): Add example from PR 69968
9324 where transposition helps
9325 (selftest::test_metric_conditions): Update for renaming.
9326 (selftest::test_metric_conditions): Likewise.
9327 (selftest::spellcheck_c_tests): Likewise.
9328 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9329 (get_edit_distance): ...this.
9330 (best_match::consider): Update for renaming.
9332 2018-06-12 Martin Sebor <msebor@redhat.com>
9334 PR tree-optimization/85259
9335 * builtins.c (compute_objsize): Handle constant offsets.
9336 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9337 true iff a warning has been issued.
9338 * gimple.h (gimple_nonartificial_location): New function.
9339 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9340 gimple_nonartificial_location and handle -Wno-system-headers.
9341 (handle_builtin_stxncpy): Same.
9343 2018-06-12 Martin Sebor <msebor@redhat.com>
9346 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9348 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9350 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9351 BUILTIN_VEC_XST entries for pointer to double and long long.
9353 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9356 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9358 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9361 2018-06-12 Martin Liska <mliska@suse.cz>
9363 * doc/options.texi: Document IntegerRange.
9365 2018-06-12 Martin Liska <mliska@suse.cz>
9367 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9368 * opt-functions.awk: Handle Deprecated flag.
9369 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9371 (read_cmdline_option): Report warning for a deprecated option.
9372 * opts.h (struct cl_option): Add new field cl_deprecated.
9373 (CL_ERR_DEPRECATED): New.
9375 2018-06-12 Martin Liska <mliska@suse.cz>
9377 * doc/options.texi: Document Deprecated option flag.
9379 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9381 * config/arc/arc-arch.h (arc_extras): New enum.
9382 (arc_cpu_t):Add field extra.
9383 (arc_cpu_types): Consider the extras.
9384 * config/arc/arc-cpus.def: Add extras info.
9385 * config/arc/arc-opts.h (processor_type): Consider extra field.
9386 * config/arc/arc.c (arc_override_options): Handle extra field.
9388 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9390 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9391 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9393 * config/arc/arc.c (arc_init): Update pic warning.
9394 (irq_range): Update irq range parsing warnings.
9395 (arc_override_options): Update various warning messages.
9396 (arc_handle_aux_attribute): Likewise.
9398 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9400 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9402 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9404 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9405 compiler messages directives.
9407 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9409 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9410 * config/mips/mips-tables.opt: Regenerate.
9411 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9413 * doc/invoke.texi: Document -march=i6500.
9415 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9417 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9418 (i6400_gpmul): Add cpu_unit.
9419 (i6400_gpdiv): Likewise.
9420 (i6400_msa_add_d): Update reservations.
9421 (i6400_msa_int_add) Likewise.
9422 (i6400_msa_short_logic3) Likewise.
9423 (i6400_msa_short_logic2) Likewise.
9424 (i6400_msa_short_logic) Likewise.
9425 (i6400_msa_move) Likewise.
9426 (i6400_msa_cmp) Likewise.
9427 (i6400_msa_short_float2) Likewise.
9428 (i6400_msa_div_d) Likewise.
9429 (i6400_msa_long_logic1) Likewise.
9430 (i6400_msa_long_logic2) Likewise.
9431 (i6400_msa_mult) Likewise.
9432 (i6400_msa_long_float2) Likewise.
9433 (i6400_msa_long_float4) Likewise.
9434 (i6400_msa_long_float5) Likewise.
9435 (i6400_msa_long_float8) Likewise.
9436 (i6400_fpu_fadd): Include frint type.
9437 (i6400_fpu_store): New define_insn_reservation.
9438 (i6400_fpu_load): Likewise.
9439 (i6400_fpu_move): Likewise.
9440 (i6400_fpu_fcmp): Likewise.
9441 (i6400_fpu_fmadd): Likewise.
9442 (i6400_int_mult): Include imul3nc type and update reservation.
9443 (i6400_int_div): Include idiv3 type and update reservation.
9444 (i6400_int_load): Update to check type not move_type.
9445 (i6400_int_store): Likewise.
9446 (i6400_int_prefetch): Set zero latency.
9448 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9450 * gcc.c: Document new %@{...} sequence.
9451 (LINK_COMMAND_SPEC): Use it for the -L switches.
9452 (cpp_unique_options): Use it for the -I switches.
9453 (at_file_argbuf): New global variable.
9454 (in_at_file): Likewise.
9455 (alloc_args): Create at_file_argbuf.
9456 (clear_args): Truncate at_file_argbuf.
9457 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9458 (open_at_file): New function.
9459 (close_at_file): Likewise.
9460 (create_at_file): Delete.
9461 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9464 (validate_switches_from_spec): Deal with %@{...} sequence.
9465 (validate_switches): Likewise.
9466 (driver::finalize): Call clear_args.
9468 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9470 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9472 2018-06-11 Martin Sebor <msebor@redhat.com>
9474 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9475 (Wno-class-memaccess): Add @opindex.
9476 (Wno-templates, Wno-multiple-inheritance): Same.
9477 (Wno-virtual-inheritance, Wno-namespaces): Same.
9478 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9479 (Wno-format-overflow, Wno-format-truncation): Same.
9480 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9481 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9482 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9483 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9484 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9485 (Wno-misspelled-isr): Same.
9487 2018-06-11 Martin Sebor <msebor@redhat.com>
9489 * PR tree-optimization/86083
9490 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9492 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9494 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9496 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9499 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9500 on the correct operand.
9501 (*movdi_internal64): Ditto.
9503 2018-06-11 Martin Liska <mliska@suse.cz>
9505 PR tree-optimization/86089
9506 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9508 2018-06-11 Julia Koval <julia.koval@intel.com>
9510 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9511 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9512 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9514 2018-06-11 Olivier Hainque <hainque@adacore.com>
9516 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9517 for Ada with strict dwarf2.
9519 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9522 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9525 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9527 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9529 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9531 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9534 2018-06-08 Martin Liska <mliska@suse.cz>
9536 * tree-cfg.h (debug_function): Fix argument type to match
9539 2018-06-08 Martin Liska <mliska@suse.cz>
9541 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9542 Remove usage of MPX-related (and removed) fields.
9543 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9545 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9547 * cfg.c (debug): Use TDF_NONE rather than 0.
9548 * cfghooks.c (debug): Likewise.
9549 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9550 (struct dump_option_value_info): Convert to...
9551 (struct kv_pair): ...this template type.
9552 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9554 (optinfo_verbosity_options): Likewise.
9555 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9557 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9558 than int for "optgroup_flags" param.
9559 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9561 (dump_dec): Likewise.
9562 (dump_finish): Use TDF_NONE rather than 0.
9563 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9564 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9565 than 0. Update for change to option_ptr.
9566 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9567 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9568 0. Update for changes to optinfo_verbosity_options and
9570 (opt_info_switch_p): Convert optgroup_flags from int to
9572 (dump_basic_block): Use dump_flags_t rather than int
9573 for "dump_kind" param.
9574 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9575 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9576 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9577 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9578 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9579 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9580 TDF_NONE): Convert from macros to...
9581 (enum dump_flag): ...this new enum.
9582 (dump_flags_t): Update to use enum.
9583 (operator|, operator&, operator~, operator|=, operator&=):
9584 Implement for dump_flags_t.
9585 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9586 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9587 Convert from macros to...
9588 (enum optgroup_flag): ...this new enum.
9589 (optgroup_flags_t): New typedef.
9590 (operator|, operator|=): Implement for optgroup_flags_t.
9591 (struct dump_file_info): Convert field "alt_flags" to
9592 dump_flags_t. Convert field "optgroup_flags" to
9594 (dump_basic_block): Use dump_flags_t rather than int for param.
9595 (dump_generic_expr_loc): Likewise.
9596 (dump_dec): Likewise.
9597 (dump_register): Convert param "optgroup_flags" to
9599 (opt_info_enable_passes): Likewise.
9600 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9602 * gimple-pretty-print.c (debug): Likewise.
9603 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9604 (merged_store_group::apply_stores): Likewise.
9605 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9606 * gimple.c (verify_gimple_pp): Likewise.
9607 * graphite-poly.c (print_pbb_body): Likewise.
9608 * passes.c (pass_manager::register_one_dump_file): Convert
9609 local "optgroup_flags" to optgroup_flags_t.
9610 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9612 (debug_body): Likewise.
9613 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9614 to optgroup_flags_t.
9615 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9617 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9618 (convert_mult_to_fma): Likewise.
9619 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9620 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9621 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9622 "dump_kind" to dump_flags_t.
9624 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9626 * config/rs6000/rs6000.c (min, max): Delete.
9628 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9630 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9631 -mabi=spe and -mabi=no-spe.
9633 2018-06-08 Martin Liska <mliska@suse.cz>
9635 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9636 where we expect an existing summary.
9638 2018-06-08 Martin Liska <mliska@suse.cz>
9640 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9641 * ipa-inline.h (estimate_edge_growth): Likewise.
9643 2018-06-08 Martin Liska <mliska@suse.cz>
9645 * cgraph.c (function_version_hasher::hash): Use
9646 cgraph_node::get_uid ().
9647 (function_version_hasher::equal):
9648 * cgraph.h (cgraph_node::get_uid): New method.
9649 * ipa-inline.c (update_caller_keys): Use
9650 cgraph_node::get_uid ().
9651 (update_callee_keys): Likewise.
9652 * ipa-utils.c (searchc): Likewise.
9653 (ipa_reduced_postorder): Likewise.
9654 * lto-cgraph.c (input_node): Likewise.
9655 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9656 * symbol-summary.h (symtab_insertion): Likewise.
9657 (symtab_removal): Likewise.
9658 (symtab_duplication): Likewise.
9659 * tree-pretty-print.c (dump_function_header): Likewise.
9660 * tree-sra.c (convert_callers_for_node): Likewise.
9662 2018-06-08 Martin Liska <mliska@suse.cz>
9664 * cgraph.c (symbol_table::create_edge): Always assign a new
9666 (symbol_table::free_edge): Do not recycle numbers.
9667 * cgraph.h (cgraph_edge::get): New method.
9668 * symbol-summary.h (symtab_removal): Use it.
9669 (symtab_duplication): Likewise.
9670 (call_summary::hashable_uid): Remove.
9672 2018-06-08 Martin Liska <mliska@suse.cz>
9674 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9675 (initialize_growth_caches): Remove.
9676 (free_growth_caches): Likewise.
9677 (do_estimate_edge_time): Use edge_growth_cache.
9678 (do_estimate_edge_size): Likewise.
9679 (do_estimate_edge_hints): Likewise.
9680 * ipa-inline.c (reset_edge_caches): Likewise.
9681 (recursive_inlining): Likewise.
9682 (inline_small_functions): Likewise.
9683 * ipa-inline.h (initialize_growth_caches): Remove.
9684 (estimate_edge_size): Likewise.
9685 (estimate_edge_time): Likewise.
9686 (estimate_edge_hints): Likewise.
9687 (reset_edge_growth_cache): Likewise.
9688 * symbol-summary.h (call_summary::remove): New method.
9690 2018-06-08 Martin Liska <mliska@suse.cz>
9692 * ipa-cp.c (class edge_clone_summary): New summary.
9693 (grow_edge_clone_vectors): Remove.
9694 (ipcp_edge_duplication_hook): Remove.
9695 (class edge_clone_summary_t): New call_summary class.
9696 (ipcp_edge_removal_hook): Remove.
9697 (edge_clone_summary_t::duplicate): New function.
9698 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9699 (create_specialized_node): Likewise.
9700 (ipcp_driver): Initialize edge_clone_summaries and do not
9703 2018-06-08 Martin Liska <mliska@suse.cz>
9705 * symbol-summary.h (get): New function.
9706 (call_summary::m_initialize_when_cloning): New class member.
9708 2018-06-08 Martin Liska <mliska@suse.cz>
9710 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9711 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9712 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9713 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9714 (remove_cgraph_node_from_order): Use the removed_nodes set.
9715 (do_per_function_toporder): Likwise.
9716 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9717 instead of summary_uid.
9718 (symtab_removal): Likewise.
9719 (symtab_duplication): Likewise.
9721 2018-06-08 Martin Liska <mliska@suse.cz>
9723 * ipa-cp.c (ipcp_store_bits_results): Use
9724 ipcp_transformation_sum.
9725 (ipcp_store_vr_results): Likewise.
9726 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9728 (ipcp_transformation_initialize): ... this.
9729 (ipa_set_node_agg_value_chain):
9730 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9731 (write_ipcp_transformation_info): Likewise.
9732 (read_ipcp_transformation_info): Likewise.
9733 (ipcp_update_bits): Likewise.
9734 (ipcp_update_vr): Likewise.
9735 (ipcp_transform_function): Likewise.
9736 * ipa-prop.h: Rename ipcp_transformation_summary to
9737 ipcp_transformation.
9738 (class ipcp_transformation_t): New function summary.
9739 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9740 (ipa_get_agg_replacements_for_node): Likewise.
9742 2018-06-08 Martin Liska <mliska@suse.cz>
9744 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9746 (class funct_state_summary_t): New function_summary class.
9747 (has_function_state): Remove.
9748 (get_function_state): Likewise.
9749 (set_function_state): Likewise.
9750 (add_new_function): Likewise.
9751 (funct_state_summary_t::insert): New function.
9752 (duplicate_node_data): Remove.
9753 (remove_node_data): Remove.
9754 (funct_state_summary_t::duplicate): New function.
9755 (register_hooks): Create new funct_state_summaries.
9756 (pure_const_generate_summary): Use it.
9757 (pure_const_write_summary): Likewise.
9758 (pure_const_read_summary): Likewise.
9759 (propagate_pure_const): Likewise.
9760 (propagate_nothrow): Likewise.
9761 (dump_malloc_lattice): Likewise.
9762 (propagate_malloc): Likewise.
9763 (execute): Do not register hooks, just remove summary
9765 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9768 2018-06-08 Martin Liska <mliska@suse.cz>
9770 * ipa-reference.c (remove_node_data): Remove.
9771 (duplicate_node_data): Likewise.
9772 (class ipa_ref_var_info_summary_t): New class.
9773 (class ipa_ref_opt_summary_t): Likewise.
9774 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9775 (get_reference_optimization_summary): Use
9776 ipa_ref_opt_sum_summaries.
9777 (set_reference_vars_info): Remove.
9778 (set_reference_optimization_summary): Likewise.
9779 (ipa_init): Create summaries.
9780 (init_function_info): Use function summary.
9781 (ipa_ref_opt_summary_t::duplicate): New function.
9782 (ipa_ref_opt_summary_t::remove): New function.
9783 (get_read_write_all_from_node): Fix GNU coding style.
9784 (propagate): Use function summary.
9785 (write_node_summary_p): Fix GNU coding style.
9786 (stream_out_bitmap): Likewise.
9787 (ipa_reference_read_optimization_summary): Use function summary.
9788 (ipa_reference_c_finalize): Do not release hooks.
9790 2018-06-08 Martin Liska <mliska@suse.cz>
9792 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9793 (analyze_function_body): Extract multiple calls of get_create.
9794 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9795 * ipa-inline.c (recursive_inlining): Use ::get method.
9796 * ipa-inline.h (estimate_edge_growth): Likewise.
9798 2018-06-08 Martin Liska <mliska@suse.cz>
9800 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9802 (hsa_function_summary::hsa_function_summary): Use the new enum
9804 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9805 * hsa-gen.c (hsa_get_host_function): Likewise.
9806 (get_brig_function_name): Likewise.
9807 * ipa-hsa.c (process_hsa_functions): Likewise.
9808 (ipa_hsa_write_summary): Likewise.
9809 * symbol-summary.h (symtab_duplication): Use ::get function/
9810 (get): New function.
9812 2018-06-08 Martin Liska <mliska@suse.cz>
9814 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9816 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9817 (hsa_register_kernel): Likewise.
9818 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9819 * hsa-gen.c (hsa_get_host_function): Likewise.
9820 (get_brig_function_name): Likewise.
9821 (generate_hsa): Likewise.
9822 (pass_gen_hsail::execute): Likewise.
9823 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9824 (devirtualization_time_bonus): Likewise.
9825 (ipcp_propagate_stage): Likewise.
9826 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9827 (edge_set_predicate): Likewise.
9828 (evaluate_conditions_for_known_args): Likewise.
9829 (evaluate_properties_for_edge): Likewise.
9830 (ipa_fn_summary::reset): Likewise.
9831 (ipa_fn_summary_t::duplicate): Likewise.
9832 (dump_ipa_call_summary): Likewise.
9833 (ipa_dump_fn_summary): Likewise.
9834 (analyze_function_body): Likewise.
9835 (compute_fn_summary): Likewise.
9836 (estimate_edge_devirt_benefit): Likewise.
9837 (estimate_edge_size_and_time): Likewise.
9838 (estimate_calls_size_and_time): Likewise.
9839 (estimate_node_size_and_time): Likewise.
9840 (inline_update_callee_summaries): Likewise.
9841 (remap_edge_change_prob): Likewise.
9842 (remap_edge_summaries): Likewise.
9843 (ipa_merge_fn_summary_after_inlining): Likewise.
9844 (ipa_update_overall_fn_summary): Likewise.
9845 (read_ipa_call_summary): Likewise.
9846 (inline_read_section): Likewise.
9847 (write_ipa_call_summary): Likewise.
9848 (ipa_fn_summary_write): Likewise.
9849 (ipa_free_fn_summary): Likewise.
9850 * ipa-hsa.c (process_hsa_functions): Likewise.
9851 (ipa_hsa_write_summary): Likewise.
9852 (ipa_hsa_read_section): Likewise.
9853 * ipa-icf.c (sem_function::merge): Likewise.
9854 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9855 (do_estimate_edge_time): Likewise.
9856 (estimate_size_after_inlining): Likewise.
9857 (estimate_growth): Likewise.
9858 (growth_likely_positive): Likewise.
9859 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9860 (inline_call): Likewise.
9861 * ipa-inline.c (caller_growth_limits): Likewise.
9862 (can_inline_edge_p): Likewise.
9863 (can_inline_edge_by_limits_p): Likewise.
9864 (compute_uninlined_call_time): Likewise.
9865 (compute_inlined_call_time): Likewise.
9866 (want_inline_small_function_p): Likewise.
9867 (edge_badness): Likewise.
9868 (update_caller_keys): Likewise.
9869 (update_callee_keys): Likewise.
9870 (recursive_inlining): Likewise.
9871 (inline_small_functions): Likewise.
9872 (inline_to_all_callers_1): Likewise.
9873 (dump_overall_stats): Likewise.
9874 (early_inline_small_functions): Likewise.
9875 (early_inliner): Likewise.
9876 * ipa-inline.h (estimate_edge_growth): Likewise.
9877 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9878 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9879 * ipa-prop.h (IPA_NODE_REF): Likewise.
9880 (IPA_EDGE_REF): Likewise.
9881 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9882 (propagate_malloc): Likewise.
9883 * ipa-split.c (execute_split_functions): Likewise.
9884 * symbol-summary.h: Rename get to get_create.
9886 (get_create): Likewise.
9887 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9889 2018-06-08 Martin Liska <mliska@suse.cz>
9891 * symbol-summary.h (release): Move definition out of class
9893 (symtab_removal): Likewise.
9894 (symtab_duplication): Likewise.
9896 2018-06-08 Martin Liska <mliska@suse.cz>
9898 * symbol-summary.h (function_summary): Move constructor
9899 implementation out of class declaration.
9900 (release): Likewise.
9901 (symtab_insertion): Likewise.
9902 (symtab_removal): Likewise.
9903 (symtab_duplication): Likewise.
9906 2018-06-08 Martin Liska <mliska@suse.cz>
9908 * Makefile.in: Remove support for MPX (macros, related functions,
9909 fields in cgraph_node, ...).
9910 * builtin-types.def (BT_BND): Likewise.
9911 (BT_FN_BND_CONST_PTR): Likewise.
9912 (BT_FN_CONST_PTR_BND): Likewise.
9913 (BT_FN_VOID_PTR_BND): Likewise.
9914 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9915 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9916 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9917 (expand_builtin_mempcpy_with_bounds): Likewise.
9918 (expand_builtin_memset_with_bounds): Likewise.
9919 (expand_builtin_memset_args): Likewise.
9920 (std_expand_builtin_va_start): Likewise.
9921 (expand_builtin): Likewise.
9922 (expand_builtin_with_bounds): Likewise.
9923 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9924 (DEF_LIB_BUILTIN_CHKP): Likewise.
9925 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9926 (DEF_CHKP_BUILTIN): Likewise.
9927 (BUILT_IN_MEMCPY): Likewise.
9928 (BUILT_IN_MEMMOVE): Likewise.
9929 (BUILT_IN_MEMPCPY): Likewise.
9930 (BUILT_IN_MEMSET): Likewise.
9931 (BUILT_IN_STPCPY): Likewise.
9932 (BUILT_IN_STRCAT): Likewise.
9933 (BUILT_IN_STRCHR): Likewise.
9934 (BUILT_IN_STRCPY): Likewise.
9935 (BUILT_IN_STRLEN): Likewise.
9936 (BUILT_IN_MEMCPY_CHK): Likewise.
9937 (BUILT_IN_MEMMOVE_CHK): Likewise.
9938 (BUILT_IN_MEMPCPY_CHK): Likewise.
9939 (BUILT_IN_MEMSET_CHK): Likewise.
9940 (BUILT_IN_STPCPY_CHK): Likewise.
9941 (BUILT_IN_STRCAT_CHK): Likewise.
9942 (BUILT_IN_STRCPY_CHK): Likewise.
9943 * calls.c (store_bounds): Likewise.
9944 (emit_call_1): Likewise.
9945 (special_function_p): Likewise.
9946 (maybe_warn_nonstring_arg): Likewise.
9947 (initialize_argument_information): Likewise.
9948 (finalize_must_preallocate): Likewise.
9949 (compute_argument_addresses): Likewise.
9950 (expand_call): Likewise.
9951 * cfgexpand.c (expand_call_stmt): Likewise.
9952 (expand_return): Likewise.
9953 (expand_gimple_stmt_1): Likewise.
9954 (pass_expand::execute): Likewise.
9955 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9956 (cgraph_node::remove): Likewise.
9957 (cgraph_node::dump): Likewise.
9958 (cgraph_node::verify_node): Likewise.
9959 * cgraph.h (chkp_function_instrumented_p): Likewise.
9960 (symtab_node::get_alias_target): Likewise.
9961 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9962 (cgraph_local_p): Likewise.
9963 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9964 (cgraph_edge::rebuild_references): Likewise.
9965 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9966 (walk_polymorphic_call_targets): Likewise.
9967 (cgraph_node::expand_thunk): Likewise.
9968 (symbol_table::output_weakrefs): Likewise.
9969 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9970 (ix86_handle_option): Likewise.
9971 * config/i386/constraints.md: Likewise.
9972 * config/i386/i386-builtin-types.def (BND): Likewise.
9976 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9977 (BDESC_FIRST): Likewise.
9979 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9980 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9981 * config/i386/i386.c (enum reg_class): Likewise.
9982 (ix86_target_string): Likewise.
9983 (ix86_option_override_internal): Likewise.
9984 (ix86_conditional_register_usage): Likewise.
9985 (ix86_valid_target_attribute_inner_p): Likewise.
9986 (ix86_set_indirect_branch_type): Likewise.
9987 (ix86_set_current_function): Likewise.
9988 (ix86_function_arg_regno_p): Likewise.
9989 (init_cumulative_args): Likewise.
9990 (ix86_function_arg_advance): Likewise.
9991 (ix86_function_arg): Likewise.
9992 (ix86_pass_by_reference): Likewise.
9993 (ix86_function_value_regno_p): Likewise.
9994 (ix86_function_value_1): Likewise.
9995 (ix86_function_value_bounds): Likewise.
9996 (ix86_return_in_memory): Likewise.
9997 (ix86_setup_incoming_vararg_bounds): Likewise.
9998 (ix86_va_start): Likewise.
9999 (indirect_thunk_need_prefix): Likewise.
10000 (print_reg): Likewise.
10001 (ix86_print_operand): Likewise.
10002 (ix86_expand_call): Likewise.
10003 (ix86_output_function_return): Likewise.
10004 (reg_encoded_number): Likewise.
10005 (BDESC_VERIFYS): Likewise.
10006 (ix86_init_mpx_builtins): Likewise.
10007 (ix86_init_builtins): Likewise.
10008 (ix86_emit_cmove): Likewise.
10009 (ix86_emit_move_max): Likewise.
10010 (ix86_expand_builtin): Likewise.
10011 (ix86_builtin_mpx_function): Likewise.
10012 (ix86_get_arg_address_for_bt): Likewise.
10013 (ix86_load_bounds): Likewise.
10014 (ix86_store_bounds): Likewise.
10015 (ix86_load_returned_bounds): Likewise.
10016 (ix86_store_returned_bounds): Likewise.
10017 (ix86_class_likely_spilled_p): Likewise.
10018 (ix86_hard_regno_mode_ok): Likewise.
10019 (x86_order_regs_for_local_alloc): Likewise.
10020 (ix86_mitigate_rop): Likewise.
10021 (ix86_bnd_prefixed_insn_p): Likewise.
10022 (ix86_mpx_bound_mode): Likewise.
10023 (ix86_make_bounds_constant): Likewise.
10024 (ix86_initialize_bounds): Likewise.
10025 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10026 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10027 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10028 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10029 (TARGET_CHKP_BOUND_MODE): Likewise.
10030 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10031 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10032 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10033 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10034 * config/i386/i386.h (TARGET_MPX): Likewise.
10035 (TARGET_MPX_P): Likewise.
10036 (VALID_BND_REG_MODE): Likewise.
10037 (FIRST_BND_REG): Likewise.
10038 (LAST_BND_REG): Likewise.
10039 (enum reg_class): Likewise.
10040 (BND_REG_P): Likewise.
10041 (BND_REGNO_P): Likewise.
10042 (BNDmode): Likewise.
10043 (ADJUST_INSN_LENGTH): Likewise.
10044 * config/i386/i386.md: Likewise.
10045 * config/i386/i386.opt: Likewise.
10046 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10047 (defined): Likewise.
10048 (LINK_MPX): Likewise.
10049 (MPX_SPEC): Likewise.
10050 (LIBMPX_SPEC): Likewise.
10051 (LIBMPXWRAPPERS_SPEC): Likewise.
10052 (CHKP_SPEC): Likewise.
10053 * config/i386/predicates.md: Likewise.
10054 * dbxout.c (dbxout_type): Likewise.
10055 * doc/extend.texi: Likewise.
10056 * doc/invoke.texi: Likewise.
10057 * doc/md.texi: Likewise.
10058 * doc/tm.texi: Likewise.
10059 * doc/tm.texi.in: Likewise.
10060 * dwarf2out.c (is_base_type): Likewise.
10061 (gen_formal_types_die): Likewise.
10062 (gen_subprogram_die): Likewise.
10063 (gen_type_die_with_usage): Likewise.
10064 (gen_decl_die): Likewise.
10065 (dwarf2out_late_global_decl): Likewise.
10066 * expr.c (expand_assignment): Likewise.
10067 (emit_storent_insn): Likewise.
10068 (store_expr_with_bounds): Likewise.
10069 (store_expr): Likewise.
10070 (expand_expr_real_1): Likewise.
10071 * expr.h (store_expr_with_bounds): Likewise.
10072 * function.c (use_register_for_decl): Likewise.
10073 (struct bounds_parm_data): Likewise.
10074 (assign_parms_augmented_arg_list): Likewise.
10075 (assign_parm_find_entry_rtl): Likewise.
10076 (assign_parm_is_stack_parm): Likewise.
10077 (assign_parm_load_bounds): Likewise.
10078 (assign_bounds): Likewise.
10079 (assign_parms): Likewise.
10080 (expand_function_start): Likewise.
10081 * gcc.c (CHKP_SPEC): Likewise.
10082 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10083 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10084 (wrestrict_dom_walker::check_call): Likewise.
10085 * gimple.c (gimple_build_call_from_tree): Likewise.
10086 * gimple.h (enum gf_mask): Likewise.
10087 (gimple_call_with_bounds_p): Likewise.
10088 (gimple_call_set_with_bounds): Likewise.
10089 * gimplify.c (gimplify_init_constructor): Likewise.
10090 * ipa-cp.c (initialize_node_lattices): Likewise.
10091 (propagate_constants_across_call): Likewise.
10092 (find_more_scalar_values_for_callers_subset): Likewise.
10093 * ipa-hsa.c (process_hsa_functions): Likewise.
10094 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10095 * ipa-icf.c (sem_function::merge): Likewise.
10096 * ipa-inline.c (early_inliner): Likewise.
10097 * ipa-pure-const.c (warn_function_noreturn): Likewise.
10098 (warn_function_cold): Likewise.
10099 (propagate_pure_const): Likewise.
10100 * ipa-ref.h (enum GTY): Likewise.
10101 * ipa-split.c (find_retbnd): Likewise.
10102 (consider_split): Likewise.
10103 (split_function): Likewise.
10104 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10105 * ipa.c (walk_polymorphic_call_targets): Likewise.
10106 (symbol_table::remove_unreachable_nodes): Likewise.
10107 (process_references): Likewise.
10108 (cgraph_build_static_cdtor_1): Likewise.
10109 * lto-cgraph.c (lto_output_node): Likewise.
10110 (output_refs): Likewise.
10111 (compute_ltrans_boundary): Likewise.
10112 (input_overwrite_node): Likewise.
10113 (input_node): Likewise.
10114 (input_cgraph_1): Likewise.
10115 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10116 * passes.c (pass_manager::execute_early_local_passes): Likewise.
10117 (class pass_chkp_instrumentation_passes): Likewise.
10118 (make_pass_chkp_instrumentation_passes): Likewise.
10119 * passes.def: Likewise.
10120 * rtl.h (struct GTY): Likewise.
10121 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10122 * stor-layout.c (layout_type): Likewise.
10123 * symtab.c: Likewise.
10124 * target.def: Likewise.
10125 * targhooks.c (default_chkp_bound_type): Likewise.
10126 (default_chkp_bound_mode): Likewise.
10127 (default_builtin_chkp_function): Likewise.
10128 (default_chkp_function_value_bounds): Likewise.
10129 (default_chkp_make_bounds_constant): Likewise.
10130 (default_chkp_initialize_bounds): Likewise.
10131 * targhooks.h (default_chkp_bound_type): Likewise.
10132 (default_chkp_bound_mode): Likewise.
10133 (default_builtin_chkp_function): Likewise.
10134 (default_chkp_function_value_bounds): Likewise.
10135 (default_chkp_make_bounds_constant): Likewise.
10136 (default_chkp_initialize_bounds): Likewise.
10137 * toplev.c (compile_file): Likewise.
10138 (process_options): Likewise.
10139 * tree-core.h (DEF_BUILTIN): Likewise.
10140 (DEF_BUILTIN_CHKP): Likewise.
10141 * tree-inline.c (declare_return_variable): Likewise.
10142 (remap_gimple_stmt): Likewise.
10143 (copy_bb): Likewise.
10144 (initialize_inlined_parameters): Likewise.
10145 (expand_call_inline): Likewise.
10146 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10147 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10148 (make_pass_ipa_chkp_produce_thunks): Likewise.
10149 (make_pass_chkp): Likewise.
10150 (make_pass_chkp_opt): Likewise.
10151 (make_pass_chkp_instrumentation_passes): Likewise.
10152 * tree-pretty-print.c (dump_generic_node): Likewise.
10153 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10154 * tree-ssa-dce.c (propagate_necessity): Likewise.
10155 (eliminate_unnecessary_stmts): Likewise.
10156 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10157 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10158 * tree-ssa-sccvn.h: Likewise.
10159 * tree-ssa-strlen.c (get_string_length): Likewise.
10160 (valid_builtin_call): Likewise.
10161 (adjust_last_stmt): Likewise.
10162 (handle_builtin_strchr): Likewise.
10163 (handle_builtin_strcpy): Likewise.
10164 (handle_builtin_stxncpy): Likewise.
10165 (handle_builtin_memcpy): Likewise.
10166 (handle_builtin_strcat): Likewise.
10167 (strlen_check_and_optimize_stmt): Likewise.
10168 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10169 * tree-streamer-in.c: Likewise.
10170 * tree-streamer.c (record_common_node): Likewise.
10171 * tree.c (tree_code_size): Likewise.
10172 (wide_int_to_tree_1): Likewise.
10173 (type_contains_placeholder_1): Likewise.
10174 (build_common_tree_nodes): Likewise.
10175 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10176 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10177 (POINTER_BOUNDS_P): Likewise.
10178 (BOUNDED_TYPE_P): Likewise.
10179 (BOUNDED_P): Likewise.
10180 (CALL_WITH_BOUNDS_P): Likewise.
10181 (pointer_bounds_type_node): Likewise.
10182 * value-prof.c (gimple_ic): Likewise.
10183 * var-tracking.c (vt_add_function_parameters): Likewise.
10184 * varasm.c (make_decl_rtl): Likewise.
10185 (assemble_start_function): Likewise.
10186 (output_constant): Likewise.
10187 (maybe_assemble_visibility): Likewise.
10188 * varpool.c (ctor_for_folding): Likewise.
10189 * chkp-builtins.def: Remove.
10190 * ipa-chkp.c: Remove.
10191 * ipa-chkp.h: Remove.
10192 * rtl-chkp.c: Remove.
10193 * rtl-chkp.h: Remove.
10194 * tree-chkp-opt.c: Remove.
10195 * tree-chkp.c: Remove.
10196 * tree-chkp.h: Remove.
10198 2018-06-07 Carl Love <cel@us.ibm.com>
10200 * config/rs6000/vsx.md (vextract_fp_from_shorth,
10201 vextract_fp_from_shortl): Add BE support.
10203 2018-06-07 Paul Koning <ni1d@arrl.net>
10205 * compare-elim.c (try_merge_compare): Don't merge compare if
10206 address contains a side effect.
10207 (try_eliminate_compare): Likewise.
10209 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
10211 * config.gcc: Support "tremont".
10212 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10213 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10215 * config/i386/i386.c (m_TREMONT): Define.
10216 (processor_target_table): Add "tremont".
10217 (PTA_TREMONT): Define.
10218 (ix86_lea_outperforms): Add TARGET_TREMONT.
10219 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10220 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10221 and M_INTEL_GOLDMONT_PLUS.
10222 (fold_builtin_cpu): Add "tremont".
10223 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10224 (ix86_option_override_internal): Add "tremont".
10225 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10226 (processor_type): Add PROCESSOR_TREMONT.
10227 * config/i386/x86-tune.def: Add m_TREMONT.
10228 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10230 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10232 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10233 symbol defined for msp430i* devices to be lower case.
10235 2018-06-07 Richard Biener <rguenther@suse.de>
10237 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10238 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10239 Properly wrap signed arithmetic if overflow wraps.
10241 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10243 PR tree-optimization/69615
10244 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10245 of a cast from a same precision integral SSA_NAME in a bb dominated
10246 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10247 cast to utype if rhs2 has already a compatible type.
10249 2018-06-07 Richard Biener <rguenther@suse.de>
10251 PR tree-optimization/85935
10252 * graphite-scop-detection.c (find_params_in_bb): Analyze
10253 condition operands with respect to the correct loop. Assert
10254 the analysis doesn't fail.
10256 2018-06-04 Carl Love <cel@us.ibm.com>
10258 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10259 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10260 as it is slightly cheaper.
10261 (first_match_or_eos_index_<mode>):
10262 Calculate index using natural element order.
10263 (first_match_index_<mode>):
10264 Calculate index using natural element order.
10265 (first_match_or_eos_index_<mode>):
10266 Calculate index using natural order.
10267 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10268 for BE and LE modes.
10269 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10270 P9V_BUILTIN_VCLZLSBB_V16QI.
10271 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10274 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10276 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10277 indentation and line wrap for many prototypes. Add missing
10278 @smallexample directives around block of prototypes for vec_xl and
10281 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10283 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10284 track if we pass or return IEEE 128-bit floating point.
10285 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10286 C++ mangling that is compatible with GCC 8.1.
10287 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10288 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10289 floating point types.
10290 (rs6000_function_arg_advance_1): Likewise.
10291 (rs6000_mangle_type): Optionally generate mangled names that match
10292 what GCC 8.1 generated for IEEE 128-bit floating point types.
10293 (rs6000_globalize_decl_name): If we have an external function that
10294 passes or returns IEEE 128-bit types, generate a weak reference
10295 from the mangled name used in GCC 8.1 to the current mangled
10297 (rs6000_init_builtins): Make __ibm128 use the long double type if
10298 long double is IBM extended double. Make __float128 use the long
10299 double type if long double is IEEE 128-bit.
10302 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10303 macro for __ibm128 built-in functions.
10304 (PACK_IF): Add __ibm128 pack/unpack functions.
10305 (UNPACK_IF): Likewise.
10306 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10307 enable long double built-in functions if long double is IEEE
10308 128-bit floating point.
10309 (rs6000_invalid_builtin): Update long double built-in function
10311 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10312 functions, adjust the built-in function to use the long double
10313 built-in function if __ibm128 and long double are the same type.
10314 * doc/extend.texi (PowerPC builtins): Update documention for
10315 __builtin_{,un}pack_longdouble. Add documentation for
10316 __builtin_{,un}pack_ibm128.
10318 2018-06-06 Jim Wilson <jimw@sifive.com>
10320 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10321 (struct machine_function): New field interrupt_mode.
10322 (riscv_handle_type_attribute): New function. Add forward declaration.
10323 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10324 (riscv_expand_epilogue): Check interrupt_mode field.
10325 (riscv_set_current_function): Check interrupt attribute args and
10326 set interrupt_mode field.
10327 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10328 (riscv_sret, riscv_uret): New.
10329 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10330 new arguments to interrupt attribute.
10332 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10335 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10336 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10338 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10340 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10341 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10342 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10343 several redundant entries.
10345 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10347 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10348 type from "rtx" to "rtx_insn *".
10349 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10350 for local "call_insn", removing cast.
10351 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10353 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10355 PR tree-optimization/86066
10356 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10357 for BIT_INSERT_EXPR stores.
10359 2018-06-06 Richard Biener <rguenther@suse.de>
10361 PR tree-optimization/86062
10362 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10363 component refs ontop
10364 of to be offsetted base.
10366 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10368 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10369 to be static and remove check on interrupt attribute name.
10371 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10373 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10374 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10376 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10379 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10381 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10382 Remove second argument, change how error is called.
10383 (aarch64_layout_arg): Remove second argument from
10384 aarch64_err_no_fpadvsimd call.
10385 (aarch64_init_cumulative_args): Ditto.
10386 (aarch64_gimplify_va_arg_expr): Ditto.
10387 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10389 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10391 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10392 (*simple_return_indirect_internal<mode>): Rename from
10393 simple_return_indirect_internal. Use W mode iterator.
10394 (rstorssp): New expander.
10395 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10396 (clrssbsy): New expander.
10397 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10399 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10401 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10403 (cmse_check_pointed_object): Likewise.
10405 2018-06-05 Martin Liska <mliska@suse.cz>
10407 PR gcov-profile/47618
10408 * doc/invoke.texi: Document how -fprofile-dir format
10411 2018-06-05 Richard Biener <rguenther@suse.de>
10413 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10414 removal pretend DOM info isn't available so we do not update
10415 it and only remove edges, not dominated blocks. Actually free
10416 DOM info in case we removed something. Remove unreachable blocks.
10417 (mfb_keep_latches): Work with either DOM info or marked backedges.
10418 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10419 first. Mark backedges if DOM info isn't available.
10420 (Re-)compute DOM info after cleanup_control_flow_pre.
10422 2018-06-05 Richard Biener <rguenther@suse.de>
10424 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10425 (locus_discrim_hasher::hash): Adjust.
10426 (locus_discrim_hasher::equal): Likewise.
10427 (next_discriminator_for_locus): Work on line directly.
10428 (same_line_p): Pass in expanded locus1 as well.
10429 (assign_discriminators): Avoid redundant location expansions.
10431 2018-06-05 Richard Biener <rguenther@suse.de>
10433 PR tree-optimization/86046
10434 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10435 if required after clearing TREE_ADDRESSABLE.
10437 2018-06-05 Richard Biener <rguenther@suse.de>
10439 PR tree-optimization/86047
10440 * tree-ssa-loop.c (for_each_index): Glob handling of all
10441 decls and constants and really handle all of them.
10443 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10446 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10447 qualifier_void_pointer and qualifier_const_void_pointer.
10448 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10449 (arm_init_builtins): Handle the above.
10450 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10451 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10452 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10455 2018-06-05 Martin Liska <mliska@suse.cz>
10457 * auto-profile.c (read_autofdo_file): Do not use
10458 gcov_ctr_summary struct.
10459 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10460 * coverage.c (struct counts_entry): Likewise.
10461 (read_counts_file): Read just single summary entry.
10462 (get_coverage_counts): Use gcov_summary struct.
10463 * coverage.h (get_coverage_counts): Likewise.
10464 * gcov-dump.c (dump_working_sets): Likewise.
10465 (tag_summary): Dump just single summary.
10466 * gcov-io.c (gcov_write_summary): Write just histogram
10468 (gcov_read_summary): Read just single summary.
10469 (compute_working_sets): Use gcov_summary struct.
10470 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10471 of GCOV_COUNTERS_SUMMABLE.
10472 (GCOV_COUNTERS_SUMMABLE): Remove.
10473 (GCOV_FIRST_VALUE_COUNTER): Replace with
10474 GCOV_COUNTER_V_INTERVAL.
10475 (struct gcov_ctr_summary): Remove.
10476 (struct gcov_summary): Directly use fields of former
10478 (compute_working_sets): Use gcov_summary struct.
10479 * gcov.c (read_count_file): Do not use ctrs fields.
10480 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10482 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10484 * profile.c: Likewise.
10485 * profile.h: Likewise.
10487 2018-06-05 Martin Liska <mliska@suse.cz>
10489 PR gcov-profile/84846
10490 * gcov.c (output_lines): Print working directory only
10491 in intermediate format.
10493 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10495 * config/s390/s390-builtin-types.def: Add void function type.
10496 * config/s390/s390-builtins.def: Use the function type for the
10499 2018-06-04 Jim Wilson <jimw@sifive.com>
10501 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10503 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10504 and maybe_eh_return. Change regno to unsigned int. Use new args to
10505 handle EH_RETURN_DATA_REGNO registers properly.
10506 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10507 (riscv_expand_epilogue): Update comment. Change argument name and
10508 type. Update code to use new name and type. Pass new args to
10509 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10511 * config/riscv/riscv.md (NORMAL_RETURN): New.
10512 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10513 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10514 (eh_return): Call gen_eh_return_internal and emit barrier.
10515 (eh_return_internal): Call riscv_expand_epilogue.
10517 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10519 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10520 bit_insertion field and declare can_be_merged_into method.
10521 (merged_store_group::can_be_merged_into): New method.
10522 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10523 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10524 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10526 2018-06-04 Richard Biener <rguenther@suse.de>
10528 PR tree-optimization/85955
10529 * builtins.c (fold_builtin_sincos): Convert pointers to
10530 destination to appropriate type before dereferencing.
10532 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10534 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10536 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10538 * expr.c (expand_expr_real_1): Force the operand into memory if
10539 its TYPE_MODE is BLKmode and if there is no integer mode for
10540 the number of bits being extracted.
10542 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10546 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10547 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10549 2018-06-04 Richard Biener <rguenther@suse.de>
10551 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10552 (cleanup_tree_cfg_noloop): ... single caller. Do
10553 start_recording_case_labels later.
10555 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10557 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10558 to _IMMINTRIN_H_INCLUDED.
10559 * config/i386/pconfigintrin.h: Ditto.
10560 * config/i386/waitpkgintrin.h: Ditto.
10561 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10562 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10563 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10564 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10565 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10566 waitpkgintrin.h and cldemoteintrin.h.
10568 2018-06-04 Richard Biener <rguenther@suse.de>
10570 PR tree-optimization/86038
10571 * tracer.c (find_best_successor): Check probability for
10572 being initialized, bail out if not.
10574 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10577 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10578 of bits to ignore when comparing architectures.
10580 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10582 PR tree-optimization/69615
10583 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10584 maximum or minimum of the type, try to merge it also as if
10585 range1 is + [-, x - 1] or + [x + 1, -].
10588 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10590 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10592 PR tree-optimization/86034
10593 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10594 the unsigned bitfield type in a bit insertion sequence if it does not
10595 have a larger precision than the bitfield size.
10596 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10598 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10600 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10602 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10604 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10605 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10606 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10607 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10609 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10611 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10612 Disable -fdelete-null-pointer-checks for ELF toolchain.
10614 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10615 Kito Cheng <kito.cheng@gmail.com>
10617 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10618 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10619 (nds32*-*-*): Add glibc and uclibc conditions.
10620 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10621 (TARGET_EXCEPT_UNWIND_INFO): Define.
10622 * config/nds32/elf.h: New file.
10623 * config/nds32/linux.h: New file.
10624 * config/nds32/nds32-elf.opt: New file.
10625 * config/nds32/nds32-linux.opt: New file.
10626 * config/nds32/nds32-fp-as-gp.c
10627 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10628 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10630 (nds32_asm_file_end): Ditto.
10631 (nds32_print_operand): Ditto.
10632 (nds32_insert_attributes): Ditto.
10633 (nds32_init_libfuncs): New function.
10634 (TARGET_HAVE_TLS): Define.
10635 (TARGET_INIT_LIBFUNCS): Define.
10636 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10638 (TARGET_ELF): Apply different mcmodel setting.
10639 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10640 been migrated into elf.h and linux.h files.
10641 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10642 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10643 (mcmodel): The content has been migrated into nds32-elf.opt and
10644 nds32-linux.opt files.
10645 * config/nds32/t-elf: New file.
10646 * config/nds32/t-linux: New file.
10648 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10649 Shiva Chen <shiva0217@gmail.com>
10651 * config/nds32/constants.md (unspec_volatile_element): Add
10652 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10653 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10655 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10656 (make_pass_nds32_fp_as_gp): Declare.
10657 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10659 (nds32_asm_function_end_prologue): Remove unused asm output.
10660 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10661 (nds32_asm_file_start): Output necessary fp_as_gp information.
10662 (nds32_option_override): Adjust register usage.
10663 (nds32_expand_prologue): Consider fp_as_gp situation.
10664 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10665 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10668 (simple_return): Ditto.
10669 (omit_fp_begin): Output special directive for fp_as_gp.
10670 (omit_fp_end): Output special directive for fp_as_gp.
10671 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10672 mforbid-fp-as-gp): New options.
10674 2018-06-01 Mark Wielaard <mark@klomp.org>
10676 * dwarf2out.c (dwarf2out_finish): Remove generation of
10677 DW_AT_loclists_base.
10679 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10681 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10682 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10683 (struct merged_store_group): Add bit_insertion field.
10684 (dump_char_array): Use standard hexadecimal format.
10685 (merged_store_group::merged_store_group): Set bit_insertion to false.
10686 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10687 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10688 also print the mask in the dump file.
10689 (pass_store_merging::gate): Minor tweak.
10690 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10691 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10692 stores with INTEGER_CST stores.
10693 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10694 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10695 and use it throughout. Generate bit insertion sequences if need be.
10696 (pass_store_merging::process_store): Remove redundant condition.
10697 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10699 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10701 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10702 the 128-bit floating point types. Fix function comment.
10704 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10706 * config/aarch64/aarch64-simd.md
10707 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10709 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10712 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10714 PR tree-optimization/85989
10715 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10717 (backprop::intersect_uses): Check it when deciding whether this
10718 is a backedge reference.
10719 (backprop::process_block): Add each phi to m_visited_phis
10720 after visiting it, then clear it at the end.
10722 2018-06-01 Richard Biener <rguenther@suse.de>
10724 * tree-vectorizer.h (vect_dr_stmt): New function.
10725 (vect_get_load_cost): Adjust.
10726 (vect_get_store_cost): Likewise.
10727 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10728 Use vect_dr_stmt instead of DR_SMTT.
10729 (vect_record_base_alignments): Likewise.
10730 (vect_calculate_target_alignment): Likewise.
10731 (vect_compute_data_ref_alignment): Likewise and make static.
10732 (vect_update_misalignment_for_peel): Likewise.
10733 (vect_verify_datarefs_alignment): Likewise.
10734 (vector_alignment_reachable_p): Likewise.
10735 (vect_get_data_access_cost): Likewise. Pass down
10736 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10737 (vect_get_peeling_costs_all_drs): Likewise.
10738 (vect_peeling_hash_get_lowest_cost): Likewise.
10739 (vect_enhance_data_refs_alignment): Likewise.
10740 (vect_find_same_alignment_drs): Likewise.
10741 (vect_analyze_data_refs_alignment): Likewise.
10742 (vect_analyze_group_access_1): Likewise.
10743 (vect_analyze_group_access): Likewise.
10744 (vect_analyze_data_ref_access): Likewise.
10745 (vect_analyze_data_ref_accesses): Likewise.
10746 (vect_vfa_segment_size): Likewise.
10747 (vect_small_gap_p): Likewise.
10748 (vectorizable_with_step_bound_p): Likewise.
10749 (vect_prune_runtime_alias_test_list): Likewise.
10750 (vect_analyze_data_refs): Likewise.
10751 (vect_supportable_dr_alignment): Likewise.
10752 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10753 (vect_gen_prolog_loop_niters): Likewise.
10754 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10755 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10757 (vect_recog_mask_conversion_pattern): Likewise.
10758 (vect_try_gather_scatter_pattern): Likewise.
10759 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10760 to vect_get_store_cost.
10761 (vect_get_store_cost): Get stmt_info instead of DR.
10762 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10763 (vect_get_load_cost): Get stmt_info instead of DR.
10765 2018-06-01 Richard Biener <rguenther@suse.de>
10767 PR middle-end/86017
10768 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10769 vars wrapped in MEM_REFs.
10771 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10773 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10774 Fix subreg tests so that we only return a choice between
10775 GENERAL_REGS and FP_REGS if the original classes included both.
10777 2018-06-01 Richard Biener <rguenther@suse.de>
10780 * tree-ssa-structalias.c (get_function_part_constraint):
10781 Handle NULL fi->decl.
10782 (find_func_aliases_for_call): Properly handle indirect
10783 fi from direct call.
10784 (find_func_clobbers): Likewise.
10785 (ipa_pta_execute): Likewise.
10786 (create_variable_info_for): For functions that are ifunc_resolver
10787 resolve to a varinfo that contains the result of the resolver call.
10788 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10791 2018-05-31 Michael Collison <michael.collison@arm.com>
10793 * config/aarch64/aarch64.md:
10794 (*fix_to_zero_extenddfdi2): New pattern.
10795 * gcc.target/aarch64/fix_extend1.c: New testcase.
10797 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10799 PR middle-end/78809
10800 PR middle-end/83026
10801 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10802 and BUILT_IN_STRNCMP_EQ.
10803 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10804 BUILT_IN_STRNCMP_EQ.
10805 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10806 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10807 (gimple_fold_builtin): Likewise.
10808 * tree-ssa-strlen.c (compute_string_length): New function.
10809 (determine_min_obsize): New function.
10810 (handle_builtin_string_cmp): New function to handle calls to
10811 string compare functions.
10812 (strlen_optimize_stmt): Add handling to builtin string compare
10814 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10815 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10816 * tree.c (build_common_builtin_nodes): Add new defines of
10817 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10819 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10822 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10823 functions with naked attribute.
10825 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10827 * config/i386/sse.md (avx_vec_concat<mode>):
10828 Substitute concat_tg_mode mode attribute with xtg_mode.
10829 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10830 (concat_tg_mode): Remove mode attribute.
10832 2018-05-31 Martin Sebor <msebor@redhat.com>
10835 * calls.c (alloc_max_size): Correct a logic error/typo.
10836 Treat excessive arguments as infinite. Warn for invalid arguments.
10837 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10839 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10842 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10843 and movx for Haswell.
10845 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10846 Cesar Philippidis <cesar@codesourcery.com>
10848 PR middle-end/85879
10849 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10850 when emitting error on private/firstprivate reductions.
10851 * omp-low.c (lower_omp_target): Avoid reference-type processing
10852 on pointers for firstprivate clause.
10854 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10856 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10859 * config/aarch64/aarch64-simd.md
10860 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10861 (aarch64_ld1_x3_<mode>): Likewise
10862 (aarch64_st1x2<VALLDIF:mode>): Likewise
10863 (aarch64_st1_x2_<mode>): Likewise
10864 (aarch64_st1x3<VALLDIF:mode>): Likewise
10865 (aarch64_st1_x3_<mode>): Likewise
10866 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10867 (vld1_s8_x3): Likewise.
10868 (vld1_u16_x3): Likewise.
10869 (vld1_s16_x3): Likewise.
10870 (vld1_u32_x3): Likewise.
10871 (vld1_s32_x3): Likewise.
10872 (vld1_u64_x3): Likewise.
10873 (vld1_s64_x3): Likewise.
10874 (vld1_f16_x3): Likewise.
10875 (vld1_f32_x3): Likewise.
10876 (vld1_f64_x3): Likewise.
10877 (vld1_p8_x3): Likewise.
10878 (vld1_p16_x3): Likewise.
10879 (vld1_p64_x3): Likewise.
10880 (vld1q_u8_x3): Likewise.
10881 (vld1q_s8_x3): Likewise.
10882 (vld1q_u16_x3): Likewise.
10883 (vld1q_s16_x3): Likewise.
10884 (vld1q_u32_x3): Likewise.
10885 (vld1q_s32_x3): Likewise.
10886 (vld1q_u64_x3): Likewise.
10887 (vld1q_s64_x3): Likewise.
10888 (vld1q_f16_x3): Likewise.
10889 (vld1q_f32_x3): Likewise.
10890 (vld1q_f64_x3): Likewise.
10891 (vld1q_p8_x3): Likewise.
10892 (vld1q_p16_x3): Likewise.
10893 (vld1q_p64_x3): Likewise.
10894 (vst1_s64_x2): Likewise.
10895 (vst1_u64_x2): Likewise.
10896 (vst1_f64_x2): Likewise.
10897 (vst1_s8_x2): Likewise.
10898 (vst1_p8_x2): Likewise.
10899 (vst1_s16_x2): Likewise.
10900 (vst1_p16_x2): Likewise.
10901 (vst1_s32_x2): Likewise.
10902 (vst1_u8_x2): Likewise.
10903 (vst1_u16_x2): Likewise.
10904 (vst1_u32_x2): Likewise.
10905 (vst1_f16_x2): Likewise.
10906 (vst1_f32_x2): Likewise.
10907 (vst1_p64_x2): Likewise.
10908 (vst1q_s8_x2): Likewise.
10909 (vst1q_p8_x2): Likewise.
10910 (vst1q_s16_x2): Likewise.
10911 (vst1q_p16_x2): Likewise.
10912 (vst1q_s32_x2): Likewise.
10913 (vst1q_s64_x2): Likewise.
10914 (vst1q_u8_x2): Likewise.
10915 (vst1q_u16_x2): Likewise.
10916 (vst1q_u32_x2): Likewise.
10917 (vst1q_u64_x2): Likewise.
10918 (vst1q_f16_x2): Likewise.
10919 (vst1q_f32_x2): Likewise.
10920 (vst1q_f64_x2): Likewise.
10921 (vst1q_p64_x2): Likewise.
10922 (vst1_s64_x3): Likewise.
10923 (vst1_u64_x3): Likewise.
10924 (vst1_f64_x3): Likewise.
10925 (vst1_s8_x3): Likewise.
10926 (vst1_p8_x3): Likewise.
10927 (vst1_s16_x3): Likewise.
10928 (vst1_p16_x3): Likewise.
10929 (vst1_s32_x3): Likewise.
10930 (vst1_u8_x3): Likewise.
10931 (vst1_u16_x3): Likewise.
10932 (vst1_u32_x3): Likewise.
10933 (vst1_f16_x3): Likewise.
10934 (vst1_f32_x3): Likewise.
10935 (vst1_p64_x3): Likewise.
10936 (vst1q_s8_x3): Likewise.
10937 (vst1q_p8_x3): Likewise.
10938 (vst1q_s16_x3): Likewise.
10939 (vst1q_p16_x3): Likewise.
10940 (vst1q_s32_x3): Likewise.
10941 (vst1q_s64_x3): Likewise.
10942 (vst1q_u8_x3): Likewise.
10943 (vst1q_u16_x3): Likewise.
10944 (vst1q_u32_x3): Likewise.
10945 (vst1q_u64_x3): Likewise.
10946 (vst1q_f16_x3): Likewise.
10947 (vst1q_f32_x3): Likewise.
10948 (vst1q_f64_x3): Likewise.
10949 (vst1q_p64_x3): Likewise.
10951 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10953 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10954 user_label_prefix to name.
10956 * tree-core.h: Update comment about the format of NAME string
10957 passed to handler in attribute_spec.
10959 * config/msp430/msp430.md: Remove erroneous subreg expression from
10960 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10961 zero_extend{q,h}isi2.
10963 2018-05-30 Borislav Petkov <bp@suse.de>
10965 * doc/extend.texi: Document some architecture specific
10966 constraints and sort entries.
10968 2018-05-30 Martin Sebor <msebor@redhat.com>
10970 PR middle-end/85369
10971 * builtins.c (expand_builtin_stpcpy_1): New function.
10972 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10973 only if the former succeeds.
10975 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10977 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10980 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10982 * doc/invoke.texi (-flinker-output): Document
10984 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10986 * passes.c (ipa_write_summaries): Only modify statements if body
10988 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10989 incrementally linking.
10990 (ipa_passes): Likewise.
10991 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10992 pass down resolution info.
10993 * common.opt (flag_incremental_link): Update info.
10994 * gcc.c (plugin specs): Turn flinker-output=* to
10995 -plugin-opt=-linker-output-known
10996 * toplev.c (compile_file): Also cut compilation when doing incremental
10998 * flag-types. (enum lto_partition_model): Add
10999 LTO_LINKER_OUTPUT_NOLTOREL.
11000 (invoke.texi): Add -flinker-output docs.
11001 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11002 link same way as WPA; do not stream in dead initializers.
11004 * dwarf2out.c (dwarf2out_die_ref_for_decl,
11005 darf2out_register_external_decl): Support incremental link.
11007 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11009 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11011 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11013 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11014 it down to simple_object_copy_lto_debug_sections.
11015 (run_gcc): Determine incremental LTO link time and configure
11016 lto1 into non-wpa mode, disable renaming of debug sections.
11018 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
11020 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11021 descriptions of various incorrectly documented functions.
11023 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
11026 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11027 address check not strict.
11029 2018-05-30 Richard Biener <rguenther@suse.de>
11031 PR tree-optimization/85964
11032 * tracer.c (better_p): Drop initialized count check, we only
11033 call the function with initialized counts now.
11034 (find_best_successor): Do find a best edge if one
11035 has uninitialized count.
11036 (find_best_predecessor): Likewise. Do BB frequency check only
11037 if count is initialized.
11039 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
11041 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11042 (aarch64_ldrstr_offset_compare): New.
11043 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11044 load/store orderings.
11045 (aarch64_gen_adjusted_ldpstp): Likewise.
11047 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
11049 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11050 Check for subset of GENERAL_REGS and FP_REGS.
11051 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11054 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
11056 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11057 and wi::to_poly_offset. Add the current offset and then check
11058 whether the sum fits, rather than using an unchecked addition of
11059 a checked term. Check for a shwi rather than a uhwi.
11060 * expr.c (get_bit_range): Use tree_to_poly_uint64.
11061 (store_constructor): Use poly_int_tree_p.
11062 (expand_expr_real_1): Likewise.
11063 * function.c (assign_temp): Likewise.
11064 * fold-const.c (const_binop): Use poly_int_tree_p and
11065 wi::to_poly_offset.
11066 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
11068 * ipa-icf-gimple.c (func_checker::compare_operand): Use
11069 to_poly_offset for MEM offsets.
11070 * ipa-icf.c (sem_variable::equals): Likewise.
11071 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11072 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11073 wi::to_poly_offset for BIT_FIELD_REF offsets.
11074 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11075 wi::to_poly_offset.
11076 * var-tracking.c (emit_note_insn_var_location): Use
11077 tree_to_poly_uint64.
11079 2018-05-29 Jim Wilson <jimw@sifive.com>
11081 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11083 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
11086 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11087 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11089 (sse4_1_round<mode>2): Use nonimmediate_operand
11090 for operand 1 predicate.
11092 2018-05-29 Martin Sebor <msebor@redhat.com>
11093 Richard Biener <rguenther@suse.de>
11096 * calls.c (get_size_range): Call determine_value_range instead
11097 of get_value_range..
11098 * tree-vrp.h (determine_value_range): Declared new function.
11099 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11101 2018-05-29 Richard Biener <rguenther@suse.de>
11103 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11104 sure to use non-pattern stmts for get_earlier_stmt arguments.
11105 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11106 called on pattern stmts.
11107 (get_later_stmt): Likewise.
11109 2018-05-29 Martin Liska <mliska@suse.cz>
11111 PR gcov-profile/85759
11112 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11115 2018-05-29 Jakub Jelinek <jakub@redhat.com>
11117 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11119 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11123 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11124 VEC_PACK_FLOAT_EXPR): New tree codes.
11125 * tree-pretty-print.c (op_code_prio): Handle
11126 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11127 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11128 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11129 * tree-inline.c (estimate_operator_cost): Likewise.
11130 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11131 * fold-const.c (const_binop): Likewise.
11132 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11133 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11134 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11135 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11136 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11137 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11138 * expr.c (expand_expr_real_2): Likewise.
11139 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11140 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11141 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11143 * optabs.c (expand_widen_pattern_expr): For
11144 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11145 sign from result type rather than operand's type.
11146 (expand_binop_directly): For vec_packu_float_optab and
11147 vec_packs_float_optab allow result type to be different from operand's
11149 * optabs-tree.c (optab_for_tree_code): Handle
11150 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11151 VEC_PACK_FLOAT_EXPR. Formatting fixes.
11152 * tree-vect-generic.c (expand_vector_operations_1): Handle
11153 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11154 VEC_PACK_FLOAT_EXPR.
11155 * tree-vect-stmts.c (supportable_widening_operation): Handle
11157 (supportable_narrowing_operation): Handle FLOAT_EXPR.
11158 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11159 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11160 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
11161 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11163 (vec_pack<floatprefix>_float_<mode>): New expander.
11164 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11166 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11167 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11168 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11169 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11170 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11172 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11173 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11174 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11175 VEC_PACK_FLOAT_EXPR): Document.
11177 2018-05-29 Richard Biener <rguenther@suse.de>
11179 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11181 (stmt_vec_info_vec): Make pointer.
11182 (init_stmt_vec_info_vec): Remove.
11183 (free_stmt_vec_info_vec): Likewise.
11184 (set_stmt_vec_info_vec): New function.
11185 (free_stmt_vec_infos): Likewise.
11186 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11187 (set_vinfo_for_stmt): Likewise.
11188 (get_earlier_stmt): Likewise.
11189 (get_later_stmt): Likewise.
11190 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11191 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11192 (vec_info::~vec_info): Free stmt_vec_infos.
11193 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11194 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11195 (pass_slp_vectorize::execute): Likewise.
11196 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11197 (free_stmt_vec_info_vec): Likewise.
11198 (set_stmt_vec_info_vec): New function.
11199 (free_stmt_vec_infos): Likewise.
11200 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11201 the global stmt_vec_info_vec.
11202 * tree-parloops.c (gather_scalar_reductions): Use
11203 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11206 2018-05-29 Richard Biener <rguenther@suse.de>
11208 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11210 2018-05-29 Martin Liska <mliska@suse.cz>
11211 David Malcolm <dmalcolm@redhat.com>
11213 * vec.c (test_reverse): New.
11214 (vec_c_tests): Add new test.
11215 * vec.h (vl_ptr>::reverse): New function.
11217 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11219 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11221 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11224 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11226 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11228 2018-05-28 Richard Biener <rguenther@suse.de>
11230 PR tree-optimization/85933
11231 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11232 look at stmts marked as vectorizable.
11234 2018-05-28 Richard Biener <rguenther@suse.de>
11236 PR tree-optimization/85934
11237 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11238 vector boolean check before scalar optimization.
11240 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11242 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11245 2018-05-28 Mark Wielaard <mark@klomp.org>
11247 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11248 if it is an expression containing a minus sign.
11250 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11252 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11254 2018-05-27 Paul Koning <ni1d@arrl.net>
11256 * config/pdp11/pdp11.md (truncsihi2): Remove.
11258 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11259 Chung-Ju Wu <jasonwucj@gmail.com>
11261 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11263 (unaligned_store_dw): Ditto.
11264 * config/nds32/nds32-memory-manipulation.c
11265 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11266 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11267 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11268 (emit_setmem_word_loop): Rename to ...
11269 (emit_setmem_doubleword_loop): ... this.
11270 (nds32_gen_dup_4_byte_to_word_value): New function.
11271 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11272 (nds32_expand_setmem_loop): Refine implementation.
11273 (nds32_expand_setmem_loop_v3m): Ditto.
11274 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11277 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11279 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11281 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11283 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11284 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11285 machine->attr_no_prologue_p.
11286 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11287 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11288 (nds32_expand_epilogue): Consider attr_naked_p.
11289 (nds32_expand_epilogue_v3pop): Likewise.
11290 (nds32_can_use_return_insn): Likewise.
11291 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11292 attr_no_prologue_p fields.
11293 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11295 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11298 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11300 * config/i386/sse.md
11301 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11303 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11305 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11307 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11309 (*<floatsuffix>floatv2div2sf2): Rename to ...
11310 (*float<floatunssuffix>v2div2sf2): ... this.
11311 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11312 (float<floatunssuffix>v2div2sf2_mask): ... this.
11313 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11314 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11315 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11317 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11319 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11321 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11323 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11325 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11327 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11328 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11329 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11330 gen_ufix_truncv8dfv8si2.
11331 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11332 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11333 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11334 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11335 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11336 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11337 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11338 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11340 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11344 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11346 2018-05-25 Jim Wilson <jimw@sifive.com>
11348 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11349 * config/riscv/riscv.c (struct machine_function): Add
11350 interrupt_handler_p and attribute_checked_p fields.
11351 (riscv_attribute_table): Add interrupt.
11352 (riscv_interrupt_type_p): New.
11353 (riscv_save_reg_p): Save extra regs for interrupt handler.
11354 (riscv_use_save_libcall): Return false for interrupt handler.
11355 (riscv_first_stack_step): Add forward declaration.
11356 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11357 for interrupt handler with large frame. Use it for saved reg list.
11358 (riscv_expand_prologue): Move flag_stack_usage_info support to
11359 eliminate duplication.
11360 (riscv_expand_epilogue): Generate mret for interrupt handler.
11361 (riscv_epilogue_uses): New.
11362 (riscv_can_use_return_insn): Return false for interrupt handler.
11363 (riscv_function_ok_for_sibcall): Likewise.
11364 (riscv_set_current_function): Add interrupt handler support.
11365 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11366 * config/riscv/riscv.md (UNSPECV_MRET): New.
11368 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11370 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11372 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11374 PR tree-optimization/85712
11375 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11376 this candidate has already been replaced in-situ by a copy.
11378 2018-05-25 Jason Merrill <jason@redhat.com>
11380 PR c++/80485 - inline function non-zero address.
11381 * symtab.c (nonzero_address): Check DECL_COMDAT.
11383 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11386 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11387 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11388 extension of SImode operation. Use const123_operand predicate.
11389 (*saddsi_1): Remove.
11390 (*saddl_se_1): Ditto.
11391 (*ssubsi_1): Ditto.
11392 (*ssubl_se_1): Ditto.
11393 * config/alpha/predicates.md (const123_operand): New predicate.
11394 * config/alpha/constraints.md (P): Use IN_RANGE.
11396 2018-05-25 Richard Biener <rguenther@suse.de>
11398 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11400 (ref_maybe_used_by_stmt_p): Likewise.
11401 (stmt_may_clobber_ref_p): Likewise.
11402 (stmt_may_clobber_ref_p_1): Likewise.
11403 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11405 (ref_maybe_used_by_stmt_p): Likewise.
11406 (stmt_may_clobber_ref_p): Likewise.
11407 (stmt_may_clobber_ref_p_1): Likewise.
11408 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11409 the alias oracle to disambiguate DRs with stmts DR analysis
11411 (vect_analyze_data_refs): Do not give up on not analyzable
11412 DRs for BB vectorization. Remove code truncating the dataref
11415 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11418 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11419 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11420 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11422 2018-05-25 Richard Biener <rguenther@suse.de>
11424 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11425 function, combining stmt data ref gathering and fatal analysis
11427 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11428 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11429 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11430 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11431 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11433 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11435 PR tree-optimization/85720
11436 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11437 SCC if all partitions are builtins.
11438 (version_loop_by_alias_check): New parameter. Generate cancelable
11439 runtime alias check if all partitions are builtins.
11440 (distribute_loop): Update call to above function.
11442 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11444 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11445 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11446 (parm_default_def_partition_arg): Ditto.
11447 (set_parm_default_def_partition): Ditto.
11448 (get_parm_default_def_partitions): Ditto and make it static.
11449 (get_undefined_value_partitions): Ditto and make it static.
11450 (remove_ssa_form): Refactor call to init_var_map here.
11451 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11452 computation for loop region.
11453 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11454 (register_default_def): Delete.
11455 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11456 (parm_default_def_partition_arg): Ditto.
11457 (set_parm_default_def_partition): Ditto.
11458 (get_parm_default_def_partitions): Ditto and make it static.
11459 (get_undefined_value_partitions): Ditto and make it static.
11460 (coalesce_with_default, coalesce_with_default): Update comment.
11461 (create_coalesce_list_for_region): New func factored out from
11462 create_outofssa_var_map.
11463 (populate_coalesce_list_for_outofssa): New func factored out from
11464 create_outofssa_var_map and coalesce_ssa_name.
11465 (create_outofssa_var_map): Delete.
11466 (coalesce_ssa_name): Refactor to support live range computation.
11467 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11468 (get_parm_default_def_partitions): Delete.
11469 (get_undefined_value_partitions): Ditto.
11470 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11471 computation for loop region.
11472 (new_tree_live_info, loe_visit_block): Ditto.
11473 (live_worklist, set_var_live_on_entry): Ditto.
11474 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11475 * tree-ssa-live.h (struct _var_map): New fields.
11476 (init_var_map): Change decl.
11477 (region_contains_p): New.
11479 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11481 * tree-ssa-live.h (live_merge_and_clear): Delete.
11483 2018-05-25 Richard Biener <rguenther@suse.de>
11486 * tree-dump.c (dequeue_and_dump): Remove access to removed
11487 operand 2 of a SWITCH_EXPR.
11489 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11491 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11492 multiplication and division.
11493 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11494 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11495 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11496 (cond_udiv_optab, cond_umod_optab): New optabs.
11497 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11498 (IFN_COND_RDIV): New internal functions.
11499 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11500 TRUNC_MOD_EXPR and RDIV_EXPR.
11501 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11502 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11504 (SVE_INT_BINARY): Include mult.
11505 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11506 (optab, sve_int_op): Handle mult.
11507 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11509 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11510 for SVE_INT_BINARY_SD.
11512 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11514 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11515 (optab, sve_int_op): Handle div and udiv.
11516 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11517 for SVE_INT_BINARY_SD.
11518 (*<optab><mode>3): New insn for the same.
11520 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11522 * tree-vect-patterns.c: Include predict.h.
11523 (vect_recog_divmod_pattern): Restrict check for division support
11524 to when optimizing for size.
11526 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11528 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11529 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11530 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11531 (gimple_match_op::set_op): Likewise.
11532 (gimple_resimplify4): Declare.
11533 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11534 (expr::gen_transform): Likewise.
11535 (decision_tree::gen): Generate a simplification routine for 4 operands.
11536 * gimple-match-head.c (gimple_simplify): Add an overload for
11537 4 operands. In the top-level function, handle up to 4 call
11538 arguments and call gimple_resimplify4.
11539 (gimple_resimplify4): New function.
11540 (build_call_internal): Pass a fourth operand.
11541 (maybe_push_to_seq): Likewise.
11542 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11543 Fold VEC_COND_EXPRs of an operation and a default value into
11544 an IFN_COND_* function if possible.
11545 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11547 (SVE_COND_FP_BINARY): Include them.
11548 (optab, sve_fp_op): Handle them.
11549 (SVE_INT_BINARY_REV): New code iterator.
11550 (SVE_COND_FP_BINARY_REV): New int iterator.
11551 (commutative): New int attribute.
11552 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11554 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11556 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11557 (*cond_<optab><mode>): New patterns for reversed operands.
11559 2018-05-25 Richard Biener <rguenther@suse.de>
11561 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11562 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11563 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11564 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11565 * tree-vect-data-refs.c (everywhere): Adjust users.
11566 * tree-vect-loop.c (everywhere): Likewise.
11567 * tree-vect-slp.c (everywhere): Likewise.
11568 * tree-vect-stmts.c (everywhere): Likewise.
11569 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11571 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11573 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11575 (gcc_cv_as_section_exclude): ... this.
11576 Try Solaris as #exclude syntax.
11577 * configure: Regenerate.
11578 * config.in: Regenerate.
11579 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11581 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11582 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11584 * varasm.c (default_elf_asm_named_section): Don't check if
11585 HAVE_GAS_SECTION_EXCLUDE is defined.
11587 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11589 * doc/md.texi: Update the documentation of the cond_* optabs
11590 to mention the new final operand. Fix GET_MODE_NUNITS call.
11591 Describe the scalar case too.
11592 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11593 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11595 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11596 (get_conditional_internal_fn): Update comment.
11597 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11598 accumulator value as a final argument to conditional functions.
11599 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11600 a define_expand and add an "else" operand. Assert for now that
11601 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11602 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11603 (*cond_<optab><mode>): New patterns.
11604 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11605 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11606 (UNSPEC_COND_EOR): Delete.
11607 (optab): Remove associated mappings.
11608 (SVE_INT_BINARY): New code iterator.
11609 (sve_int_op): Remove int attribute and add "minus" to the code
11611 (SVE_COND_INT_OP): Delete.
11612 (SVE_COND_FP_OP): Rename to...
11613 (SVE_COND_FP_BINARY): ...this.
11615 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11617 * optabs.c (can_reuse_operands_p): New function.
11618 (maybe_legitimize_operands): Try to reuse the results for
11621 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11623 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11624 Add {q} suffix to insn mnemonic.
11626 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11628 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11629 (msp430_warn_func_return): New.
11631 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11633 * fold-const.c (tree_nonzero_bits): New function.
11634 * fold-const.h (tree_nonzero_bits): Likewise.
11635 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11636 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11638 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11642 * varasm.c (assemble_alias): Check ifunc_resolver only on
11645 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11648 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11649 when memory input operand is handled.
11651 2018-05-24 Luis Machado <luis.machado@linaro.org>
11653 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11655 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11657 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11659 * match.pd: Delay FMA folds until after vectorization.
11661 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11664 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11665 address check not strict.
11667 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11669 * gimple-match.h (gimple_match_op): New class.
11670 (mprts_hook): Replace parameters with a gimple_match_op *.
11671 (maybe_build_generic_op): Likewise.
11672 (gimple_simplified_result_is_gimple_val): Replace parameters with
11673 a const gimple_match_op *.
11674 (gimple_simplify): Replace code_helper * and tree * parameters with
11675 a gimple_match_op * parameter.
11676 (gimple_resimplify1): Replace code_helper *, tree and tree *
11677 parameters with a gimple_match_op * parameter.
11678 (gimple_resimplify2): Likewise.
11679 (gimple_resimplify3): Likewise.
11680 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11681 parameters with a gimple_match_op * parameter.
11682 * gimple-match-head.c (gimple_simplify): Change prototypes of
11683 auto-generated functions to take a gimple_match_op * instead of
11684 separate code_helper * and tree * parameters. Make the same
11685 change in the top-level overload and update calls to the
11686 gimple_resimplify routines. Update calls to the auto-generated
11687 functions and to maybe_push_res_to_seq in the publicly-facing
11688 operation-specific gimple_simplify overloads.
11689 (gimple_match_op::MAX_NUM_OPS): Define.
11690 (gimple_resimplify1): Replace rcode and ops with a single res_op
11691 parameter. Update call to gimple_simplify.
11692 (gimple_resimplify2): Likewise.
11693 (gimple_resimplify3): Likewise.
11694 (mprts_hook): Replace parameters with a gimple_match_op *.
11695 (maybe_build_generic_op): Likewise.
11696 (build_call_internal): Replace type, nargs and ops with
11697 a gimple_match_op *.
11698 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11699 with a single gimple_match_op *. Update calls to mprts_hook,
11700 build_call_internal and gimple_simplified_result_is_gimple_val.
11701 Factor out code that is common to the tree_code and combined_fn cases.
11702 * genmatch.c (expr::gen_transform): Replace tem_code and
11703 tem_ops with a gimple_match_op called tem_op. Update calls
11704 to the gimple_resimplify functions and maybe_push_res_to_seq.
11705 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11706 res_ops. Update call to the gimple_resimplify functions.
11707 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11708 (decision_tree::gen): Make the functions take a gimple_match_op *
11709 called res_op instead of separate res_code and res_ops parameters.
11710 Update call accordingly.
11711 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11712 and ops with a single res_op parameter. Update calls to
11713 maybe_build_generic_op and maybe_push_res_to_seq.
11714 (fold_stmt_1): Update calls to gimple_simplify and
11715 replace_stmt_with_simplification.
11716 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11717 and gimple_simplified_result_is_gimple_val.
11718 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11720 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11721 with a gimple_match_op *.
11722 (vn_nary_build_or_lookup): Likewise. Update call to
11723 vn_nary_build_or_lookup_1.
11724 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11725 gimple_match_op *. Update calls to the gimple_resimplify routines
11726 and to gimple_simplified_result_is_gimple_val.
11727 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11728 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11729 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11730 (visit_nary_op): Likewise.
11731 (visit_reference_op_load): Likewise.
11733 2018-05-23 Luis Machado <luis.machado@linaro.org>
11735 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11736 modifier for printing the step amount.
11738 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11741 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11744 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11746 * doc/sourcebuild.texi (Endianness): New subsubsection.
11748 2018-05-23 Luis Machado <luis.machado@linaro.org>
11750 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11751 <prefetch_dynamic_strides>: New const bool field.
11752 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11753 prefetch_dynamic_strides.
11754 (exynosm1_prefetch_tune): Likewise.
11755 (thunderxt88_prefetch_tune): Likewise.
11756 (thunderx_prefetch_tune): Likewise.
11757 (thunderx2t99_prefetch_tune): Likewise.
11758 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11760 (aarch64_override_options_internal): Update to set
11761 PARAM_PREFETCH_DYNAMIC_STRIDES.
11762 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11763 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11764 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11765 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11766 prefetch-dynamic-strides setting.
11768 2018-05-23 Luis Machado <luis.machado@linaro.org>
11770 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11771 <minimum_stride>: New const int field.
11772 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11773 minimum_stride field defaulting to -1.
11774 (exynosm1_prefetch_tune): Likewise.
11775 (thunderxt88_prefetch_tune): Likewise.
11776 (thunderx_prefetch_tune): Likewise.
11777 (thunderx2t99_prefetch_tune): Likewise.
11778 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11779 <default_opt_level>: Set to 3.
11780 (aarch64_override_options_internal): Update to set
11781 PARAM_PREFETCH_MINIMUM_STRIDE.
11782 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11783 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11784 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11785 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11786 stride is constant and is below the minimum stride threshold.
11788 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11790 * config/arm/arm-cpus.in (mode26): Delete.
11791 (armv4): Delete mode26 reference.
11792 * config/arm/arm.c (arm_configure_build_target): Delete use of
11795 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11797 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11799 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11800 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11802 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11803 (floatunsdidf2): Ditto.
11805 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11807 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11808 (fixuns_trunc<mode>si2_avx512f): Ditto.
11809 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11810 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11811 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11813 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11815 PR rtl-optimization/79985
11816 * df-scan.c (df_insn_refs_collect): Remove special case for
11817 global registers and asm statements.
11819 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11821 * extend.texi (Global Register Variables): Rewrite the bullet list.
11822 Note that the register is available for allocation. Note that access
11823 via inline asm must use constraints. Add note about async-signal
11824 handlers. Remove paragraph about automagic register selection.
11826 2018-05-23 Richard Biener <rguenther@suse.de>
11828 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11829 of fixed offset from memset VN.
11831 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11833 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11834 first_interp field.
11835 (alloc_cand_and_find_basis): Initialize first_interp field.
11836 (slsr_process_mul): Modify first_interp field.
11837 (slsr_process_add): Likewise.
11838 (slsr_process_cast): Modify first_interp field for each new
11840 (slsr_process_copy): Likewise.
11841 (dump_candidate): Dump first_interp field.
11842 (replace_mult_candidate): Process all interpretations, not just
11844 (replace_rhs_if_not_dup): Likewise.
11845 (replace_one_candidate): Likewise.
11847 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11849 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11851 (aarch64_needs_frame_chain): New function.
11852 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11854 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11857 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11858 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11859 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11860 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11861 as true for strict-align.
11862 (aarch64_can_inline_p): Perform checks even when callee has no
11863 attributes to check for strict alignment.
11864 * doc/extend.texi (AArch64 Function Attributes): Document
11866 * doc/invoke.texi: (AArch64 Options): Likewise.
11868 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11870 PR tree-optimization/85853
11871 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11872 the handling of the root of the node to...
11873 (vect_slp_analyze_node_operations_1): ...this new function,
11874 and run the whole thing with the child nodes' def types
11875 set according to their SLP node's def type.
11877 2018-05-23 Richard Biener <rguenther@suse.de>
11879 PR middle-end/85874
11880 * tree-data-ref.c (create_runtime_alias_checks): Defer
11881 and ignore overflow warnings.
11883 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11885 PR tree-optimization/85822
11886 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11889 2018-05-23 Richard Biener <rguenther@suse.de>
11891 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11892 memset constants via native_interpret_expr.
11894 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11897 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11899 (cgraph_node::create_alias): Likewise.
11900 (cgraph_node::get_availability): Check ifunc_resolver instead
11901 of looking up ifunc attribute.
11902 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11903 * varasm.c (do_assemble_alias): Likewise.
11904 (assemble_alias): Likewise.
11905 (default_binds_local_p_3): Likewise.
11906 * cgraph.h (cgraph_node): Add ifunc_resolver.
11907 (cgraph_node::only_called_directly_or_aliased_p): Return false
11908 for IFUNC resolver.
11909 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11911 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11912 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11913 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11914 instead of looking up ifunc attribute.
11916 2018-05-22 Luis Machado <luis.machado@linaro.org>
11918 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11920 2018-05-22 Martin Sebor <msebor@redhat.com>
11922 PR middle-end/85359
11923 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11924 only when expasion succeeds.
11925 (expand_builtin_strcmp): Same.
11926 (expand_builtin_strncmp): Same.
11928 2018-05-22 Martin Sebor <msebor@redhat.com>
11930 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11932 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11933 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11935 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11936 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11938 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11939 Add check for legitimate_address.
11940 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11941 (aarch64_swap_ldrstr_operands): New.
11942 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11945 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11946 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11948 * config/aarch64/aarch64.md: New patterns to generate stp
11950 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11951 single words and double words.
11952 (load_pair_sw, load_pair_dw): Likewise.
11953 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11955 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11957 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11958 for different mode ldpstp and add peephole for merged zero stores.
11959 Likewise for loads.
11960 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11962 (aarch64_gen_store_pair): Rename calls to match new patterns.
11963 (aarch64_gen_load_pair): Rename calls to match new patterns.
11964 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11965 (load_pair<DREG:mode><DREG2:mode>): ... This.
11966 (store_pair<mode>): Rename to...
11967 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11968 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11969 New mode iterators.
11970 (V_INT_EQUIV): Handle SImode.
11971 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11974 2018-05-22 Martin Sebor <msebor@redhat.com>
11977 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11978 or ajust the presumed bound on an operation to avoid unnecessary
11981 2018-05-22 Martin Sebor <msebor@redhat.com>
11983 PR tree-optimization/85826
11984 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11985 assuming that a DECL necesarily has a constant size.
11987 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11989 PR middle-end/85862
11990 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11992 2018-05-22 Richard Biener <rguenther@suse.de>
11994 PR tree-optimization/85834
11995 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11996 non-constant and non-zero memset arguments.
11998 2018-05-22 Martin Liska <mliska@suse.cz>
12001 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12003 2018-05-22 Richard Biener <rguenther@suse.de>
12005 PR tree-optimization/85863
12006 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12007 comparisons when vectype is specified.
12008 (vectorizable_condition): Do not specify vectype for
12009 vect_is_simple_cond when SLP vectorizing.
12011 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
12014 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12015 define __ibm128 as long double.
12016 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12017 as a distinct type when IEEE 128-bit support is enabled.
12018 (init_float128_ieee): Fix up conversions between IFmode and IEEE
12019 128-bit types to use the correct functions.
12020 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12021 convert between 128-bit floating point types that have different
12022 modes but the same representation, instead of using gen_lowpart to
12024 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12026 (IFKF_reg): New attributes to give the register constraints for
12028 (extend<mode>tf2_internal): New insns to mark an explicit
12029 conversion between 128-bit floating point types that have a
12030 different mode but share the same representation.
12032 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
12034 PR tree-optimization/85814
12035 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12036 a null return from get_strinfo when unsharing the next
12037 strinfo in the chain.
12039 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12042 * varasm.c (weak_finish): Clean up weak_decls.
12044 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12046 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12047 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12048 UNSPEC_UADALP values.
12049 * config/aarch64/iterators.md (ABAL): New int iterator.
12052 (sur): Add mappings for the above.
12053 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12055 (aarch64_<sur>abal<mode>_4): Likewise.
12056 (aarch64_<sur>adalp<mode>_3): Likewise.
12057 (<sur>sadv16qi): New define_expand.
12059 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
12061 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12062 (*movdf_internal): Ditto.
12063 (*rcpsf2_sse): Ditto.
12064 (*rsqrtsf2_sse): Ditto.
12065 (*sqrt<mode>2_sse): Ditto.
12067 2018-05-21 Tamar Christina <tamar.christina@arm.com>
12069 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12071 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12072 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12073 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12074 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12076 * config/aarch64/arm_neon.h: Likewise.
12077 * config/aarch64/iterators.md (VQ_I): New.
12079 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
12081 * config.gcc: Add arc/t-multilib-linux to tmake_file for
12083 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12086 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12088 * config/nds32/constraints.md (S): New constraint.
12089 * config/nds32/nds32.md (call_internal): Use constraint S.
12090 (call_value_internal): Likewise.
12091 (sibcall_internal): Likewise.
12092 (sibcall_value_internal): Likewise.
12094 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12095 Chung-Ju Wu <jasonwucj@gmail.com>
12097 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12098 into consideration.
12100 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12101 Chung-Ju Wu <jasonwucj@gmail.com>
12103 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12104 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12105 (nds32_rtx_costs_impl): Simplify.
12106 (nds32_address_cost_impl): Simplify.
12107 (nds32_init_rtx_costs): New function.
12108 (nds32_rtx_costs_speed_prefer): Likewise.
12109 (nds32_rtx_costs_size_prefer): Likewise.
12110 (nds32_address_cost_speed_prefer): Likewise.
12111 (nds32_address_cost_speed_fwprop): Likewise.
12112 (nds32_address_cost_size_prefer): Likewise.
12113 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12114 * config/nds32/nds32.c (nds32_option_override): Use
12115 nds32_init_rtx_costs function.
12117 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12119 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12120 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12121 (TARGET_PIPELINE_N8): Likewise.
12122 (TARGET_PIPELINE_N10): Likewise.
12123 (TARGET_PIPELINE_N13): Likewise.
12124 (TARGET_PIPELINE_GRAYWOLF): Likewise.
12126 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
12128 * config/nds32/nds32-fpu.md: Update copyright year.
12130 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12132 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12134 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12136 * config/nds32/nds32.c
12137 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12138 * config/nds32/nds32.opt (minline-asm-r15): New option.
12140 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12142 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12144 * config/nds32/nds32.md (abssi2): New pattern.
12146 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
12148 * config/i386/i386.md (rex64namesuffix): New mode attribute.
12149 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12150 Merge insn pattern from sse_cvtsi2ss<round_name> and
12151 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12152 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12153 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12154 using SWI48 mode iterator.
12155 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12156 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12157 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12158 pattern from sse_cvttss2si<round_saeonly_name>
12159 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12160 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12161 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12162 using SWI48 mode iterator.
12163 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12164 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12165 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12166 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12167 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12168 using SWI48 mode iterator.
12169 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12170 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12171 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12172 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12173 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12174 SWI48 mode iterator.
12175 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12176 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12177 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12178 pattern from sse_cvttsd2si<round_saeonly_name>
12179 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12181 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12183 * config/nds32/nds32-md-auxiliary.c
12184 (nds32_valid_smw_lwm_base_p): Refine.
12185 (nds32_output_smw_single_word): Refine.
12186 (nds32_output_smw_double_word): New.
12187 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12189 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12191 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12192 (nds32_output_stack_pop): Refine.
12193 (nds32_expand_unaligned_load): Refine.
12194 (nds32_expand_unaligned_store): Refine.
12196 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12197 Chung-Ju Wu <jasonwucj@gmail.com>
12199 * config/nds32/constants.md: Add TP_REGNUM constant.
12200 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12201 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12203 * config/nds32/nds32-doubleword.md: Consider flag_pic.
12204 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12205 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12206 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12207 and PIC code generation.
12208 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12210 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12212 * config/nds32/nds32.md: Support TLS and PIC.
12213 * config/nds32/nds32.c: Support TLS and PIC.
12214 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12215 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12218 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12220 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12221 mode with E_ prefix.
12223 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12224 Chung-Ju Wu <jasonwucj@gmail.com>
12226 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12227 * config/nds32/nds32-md-auxiliary.c
12228 (symbolic_reference_mentioned_p): New.
12229 (nds32_legitimize_ict_address): New.
12230 (nds32_expand_ict_move): New.
12231 (nds32_indirect_call_referenced_p): New.
12232 (nds32_symbol_binds_local_p): Delete.
12233 (nds32_long_call_p): Modify.
12234 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12235 * config/nds32/nds32-protos.h
12236 (symbolic_reference_mentioned_p): Declare.
12237 (nds32_legitimize_ict_address): Declare.
12238 (nds32_expand_ict_move): Declare.
12239 (nds32_indirect_call_referenced_p): Declare.
12240 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12241 (nds32_relax_group): Use nds32_ict_const_p as condition.
12242 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12243 (nds32_asm_file_start): Output ict_model directive in asm code.
12244 (nds32_legitimate_address_p): Consider indirect call.
12245 (nds32_print_operand): Consider indirect call.
12246 (nds32_print_operand_address): Consider indirect call.
12247 (nds32_insert_attributes): Handle "indirect_call" attribute.
12248 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12249 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12250 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12251 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12252 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12253 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12254 (TARGET_ICT_MODEL_SMALL): Define.
12255 (TARGET_ICT_MODEL_LARGE): Define.
12256 * config/nds32/nds32.md (movsi): Consider ict model.
12257 (call, call_value): Consider ict model.
12258 (sibcall, sibcall_value): Consider ict model.
12259 * config/nds32/nds32.opt (mict-model): New option.
12260 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12263 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12264 Monk Chiang <sh.chiang04@gmail.com>
12265 Jim Wilson <jimw@sifive.com>
12267 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12268 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12269 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12270 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12271 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12272 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12273 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12274 compute save_libcall_adjustment properly.
12275 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12276 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12277 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12278 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12279 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12280 (ABI_SPEC): Handle mabi=ilp32e.
12281 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12282 (RVE): Add RVE mask.
12283 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12284 <-march>: Add rv32e as an example.
12286 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12289 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12290 (intra_create_variable_infos): Handle C++ constructors.
12292 2018-05-18 Martin Liska <mliska@suse.cz>
12294 * passes.def: Remove a redundant pass.
12296 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12299 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12301 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12303 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12305 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12307 (armv2, armv2a, armv3, armv3m): Delete architectures.
12308 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12309 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12310 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12312 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12313 (*mulsidi3adddi): Likewise.
12314 (mulsidi3): Likewise.
12315 (*mulsidi3_nov6): Likewise.
12316 (umulsidi3): Likewise.
12317 (umulsidi3_nov6): Likewise.
12318 (umaddsidi4): Likewise.
12319 (*umulsidi3adddi): Likewise.
12320 (smulsi3_highpart): Likewise.
12321 (*smulsi3_highpart_nov6): Likewise.
12322 (umulsi3_highpart): Likewise.
12323 (*umulsi3_highpart_nov6): Likewise.
12324 * config/arm/arm.h (arm_arch3m): Delete.
12325 * config/arm/arm.c (arm_arch3m): Delete.
12326 (arm_option_override_internal): Update armv3-related comment.
12327 (arm_configure_build_target): Delete use of isa_bit_mode32.
12328 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12329 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12330 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12331 (mulsa3): Likewise.
12332 (mulusa3): Likewise.
12333 * config/arm/arm-protos.h (arm_arch3m): Delete.
12334 * config/arm/arm-tables.opt: Regenerate.
12335 * config/arm/arm-tune.md: Likewise.
12336 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12337 deleted architectures.
12339 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12341 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12342 (armv5t, armv5te): New features.
12343 (ARMv5, ARMv5e): Delete fgroups.
12344 (ARMv5t, ARMv5te): Adjust for above changes.
12345 (ARMv6m): Likewise.
12346 (armv5, armv5e): Delete arches.
12347 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12349 (*call_reg_arm): Likewise.
12350 (*call_value_reg_armv5): Likewise.
12351 (*call_value_reg_arm): Likewise.
12352 (*call_symbol): Likewise.
12353 (*call_value_symbol): Likewise.
12354 (*sibcall_insn): Likewise.
12355 (*sibcall_value_insn): Likewise.
12356 (clzsi2): Likewise.
12357 (prefetch): Likewise.
12358 (define_split and define_peephole2 dependent on arm_arch5):
12360 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12362 (TARGET_ARM_QBIT): Likewise.
12363 (TARGET_DSP_MULTIPLY): Likewise.
12364 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12365 (arm_arch5, arm_arch5e): Delete.
12366 (arm_arch5t, arm_arch5te): Declare.
12367 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12368 (arm_arch5t): Declare.
12369 (arm_option_reconfigure_globals): Update for the above.
12370 (arm_options_perform_arch_sanity_checks): Update comment, replace
12371 use of arm_arch5 with arm_arch5t.
12372 (use_return_insn): Likewise.
12373 (arm_emit_call_insn): Likewise.
12374 (output_return_instruction): Likewise.
12375 (arm_final_prescan_insn): Likewise.
12376 (arm_coproc_builtin_available): Likewise.
12377 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12378 arm_arch5e with arm_arch5t and arm_arch5te.
12379 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12380 (arm_arch5t, arm_arch5te): Declare.
12381 * config/arm/arm-tables.opt: Regenerate.
12382 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12383 * config/arm/t-multilib: Likewise.
12384 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12385 instead of arm_arch5.
12386 (*call_reg_thumb1): Likewise.
12387 (*call_value_reg_thumb1_v5): Likewise.
12388 (*call_value_reg_thumb1): Likewise.
12389 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12391 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12393 2018-05-18 Martin Liska <mliska@suse.cz>
12395 PR gcov-profile/84846
12396 * doc/gcov.texi: Document -t option of gcov tool.
12398 2018-05-18 Martin Liska <mliska@suse.cz>
12400 PR gcov-profile/84846
12401 * gcov.c (print_usage): Add new -t option.
12402 (process_args): Handle the option.
12403 (generate_results): Use stdout as output when requested by
12406 2018-05-18 Martin Liska <mliska@suse.cz>
12408 PR gcov-profile/84846
12409 * coverage.c (coverage_init): Write PWD to .gcno file.
12410 * doc/gcov.texi: Document how working directory is printed.
12411 * gcov-dump.c (dump_gcov_file): Print PWD.
12412 * gcov.c (output_intermediate_file): Likewise.
12413 (read_graph_file): Read PWD string.
12414 (output_lines): Print PWD.
12416 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12418 PR middle-end/85817
12419 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12420 for retval and return false if all args to phi are zero.
12422 2018-05-18 Richard Biener <rguenther@suse.de>
12424 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12426 (evrp_dom_walker::before_dom_children): Call it.
12428 2018-05-18 Richard Biener <rguenther@suse.de>
12430 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12431 results when processing array refs with variable index.
12433 2018-05-18 Toon Moene <toon@moene.org>
12435 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12436 directly after that of -floop-interchange. Indicate that both
12437 options are enabled by default when specifying -O3.
12439 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12441 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12442 iterator. Delete separate integer-mode vec_set<mode> expander.
12443 (aarch64_simd_vec_setv2di): Delete.
12444 (vec_setv2di): Delete.
12445 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12446 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12447 the "w, r" alternative.
12449 2018-05-18 Martin Liska <mliska@suse.cz>
12451 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12452 * tree-pass.h (make_pass_lower_switch_O0): New function.
12453 * tree-switch-conversion.c (node_has_low_bound): Remove.
12454 (node_has_high_bound): Likewise.
12455 (node_is_bounded): Likewise.
12456 (class pass_lower_switch): Make it a template type and create
12458 (pass_lower_switch::execute): Add template argument.
12459 (make_pass_lower_switch): New function.
12460 (make_pass_lower_switch_O0): New function.
12461 (do_jump_if_equal): Remove.
12462 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12463 all the hard work to tree optimization passes.
12465 2018-05-18 Martin Liska <mliska@suse.cz>
12467 * dbgcnt.c (limit_low): Renamed from limit.
12468 (limit_high): New variable.
12469 (dbg_cnt_is_enabled): Check for upper limit.
12470 (dbg_cnt): Adjust dumping.
12471 (dbg_cnt_set_limit_by_index): Add new argument for high
12473 (dbg_cnt_set_limit_by_name): Likewise.
12474 (dbg_cnt_process_single_pair): Parse new format.
12475 (dbg_cnt_process_opt): Use strtok.
12476 (dbg_cnt_list_all_counters): Remove 'value' and add
12478 * doc/invoke.texi: Document changes.
12480 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12482 * doc/sourcebuild.texi (scalar_all_fma): Document.
12483 * tree.def (FMA_EXPR): Delete.
12484 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12485 * internal-fn.c (ternary_direct): New macro.
12486 (expand_ternary_optab_fn): Likewise.
12487 (direct_ternary_optab_supported_p): Likewise.
12488 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12489 * builtins.c (fold_builtin_fma): Delete.
12490 (fold_builtin_3): Don't call it.
12491 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12492 * expr.c (expand_expr_real_2): Likewise.
12493 * fold-const.c (operand_equal_p): Likewise.
12494 (fold_ternary_loc): Likewise.
12495 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12496 * gimple.c (DEFTREECODE): Likewise.
12497 * gimplify.c (gimplify_expr): Likewise.
12498 * optabs-tree.c (optab_for_tree_code): Likewise.
12499 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12500 * tree-eh.c (operation_could_trap_p): Likewise.
12501 (stmt_could_throw_1_p): Likewise.
12502 * tree-inline.c (estimate_operator_cost): Likewise.
12503 * tree-pretty-print.c (dump_generic_node): Likewise.
12504 (op_code_prio): Likewise.
12505 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12506 * tree-ssa-operands.c (get_expr_operands): Likewise.
12507 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12508 * fold-const-call.h (fold_fma): Delete.
12509 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12510 CFN_FNMA and CFN_FNMS.
12511 (fold_fma): Delete.
12512 * genmatch.c (combined_fn): New enum.
12513 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12514 (commutative_op): New function.
12515 (commutate): Use it. Handle more than 2 operands.
12516 (dt_operand::gen_gimple_expr): Use commutative_op.
12517 (parser::parse_expr): Allow :c to be used with non-binary
12518 operators if the commutative operand is known.
12519 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12520 CFN_FMS, CFN_FNMA and CFN_FNMS.
12521 (backprop::process_assign_use): Remove FMA_EXPR handling.
12522 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12523 (gen_hsa_fma): New function.
12524 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12525 IFN_FNMA and IFN_FNMS.
12526 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12527 * gimple-fold.h (follow_all_ssa_edges): Declare.
12528 * gimple-fold.c (follow_all_ssa_edges): New function.
12529 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12530 gimple_build interface and use follow_all_ssa_edges to fold the result.
12531 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12532 instead of checking for optabs directly.
12533 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12534 rather than FMA_EXPRs.
12535 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12536 call to IFN_FMA instead of an FMA_EXPR.
12538 2018-05-17 Jim Wilson <jimw@sifive.com>
12540 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12541 sign extended promoted subreg, and the range does not have the sign bit
12542 set, then do a sign extend.
12544 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12545 test, check for sign extended subreg and/or constant operands, and
12546 do a sign extend in that case.
12548 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12550 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12551 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12553 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12554 Change logics_shift_reg to logics_shift_imm.
12555 (thunderx2t99_fp_loadpair_basic): Delete.
12556 (thunderx2t99_fp_storepair_basic): Delete.
12557 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12558 (thunderx2t99_asimd_polynomial): Delete.
12559 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12560 and neon_fp_mul_d_scalar_q.
12561 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12562 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12563 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12564 (thunderx2t99_asimd_lut): Add missing tbl types.
12565 (thunderx2t99_asimd_ext): Delete.
12566 (thunderx2t99_asimd_load1_1_mult): Delete.
12567 (thunderx2t99_asimd_load1_2_mult): Delete.
12568 (thunderx2t99_asimd_load1_ldp): New.
12569 (thunderx2t99_asimd_load1): New.
12570 (thunderx2t99_asimd_load2): Add missing *load2* types.
12571 (thunderx2t99_asimd_load3): New.
12572 (thunderx2t99_asimd_load4): New.
12573 (thunderx2t99_asimd_store1_1_mult): Delete.
12574 (thunderx2t99_asimd_store1_2_mult): Delete.
12575 (thunderx2t99_asimd_store2_mult): Delete.
12576 (thunderx2t99_asimd_store2_onelane): Delete.
12577 (thunderx2t99_asimd_store_stp): New.
12578 (thunderx2t99_asimd_store1): New.
12579 (thunderx2t99_asimd_store2): New.
12580 (thunderx2t99_asimd_store3): New.
12581 (thunderx2t99_asimd_store4): New.
12583 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12585 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12586 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12588 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12589 Segher Boessenkool <segher@kernel.crashing.org>
12592 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12595 2018-05-17 Richard Biener <rguenther@suse.de>
12597 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12598 for pruning loop and prune defs feeding only already visited PHIs.
12600 2018-05-17 Richard Biener <rguenther@suse.de>
12602 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12604 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12605 Richard Biener <rguenther@suse.de>
12607 PR tree-optimization/85793
12608 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12609 for VMAT_ELEMENTWISE.
12611 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12613 * internal-fn.h (lookup_internal_fn): Declare
12614 * internal-fn.c (lookup_internal_fn): New function.
12615 * gimple.c (gimple_build_call_from_tree): Handle calls to
12616 internal functions.
12617 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12618 internal function names.
12619 * tree-pretty-print.c (dump_generic_node): Likewise.
12620 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12622 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12624 * gimple-fold.h (gimple_build): Make the function forms take
12625 combined_fn rather than built_in_function.
12626 (gimple_simplify): Likewise.
12627 * gimple-match-head.c (gimple_simplify): Likewise.
12628 * gimple-fold.c (gimple_build): Likewise.
12629 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12630 rather than gimple_build_call_internal.
12631 (get_initial_defs_for_reduction): Likewise.
12632 (vect_create_epilog_for_reduction): Likewise.
12633 (vectorizable_live_operation): Likewise.
12635 2018-05-17 Martin Liska <mliska@suse.cz>
12637 * gimple-ssa-sprintf.c (format_directive): Do not use
12638 space in between 'G_' and '('.
12640 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12643 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12644 even if the mask is not all ones.
12647 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12649 (ix86_gimple_fold_builtin): Likewise.
12652 * config/i386/i386.c: Include tree-vector-builder.h.
12653 (ix86_vector_shift_count): New function.
12654 (ix86_fold_builtin): Fold shift builtins by scalar count.
12655 (ix86_gimple_fold_builtin): Likewise.
12657 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12658 _mm512_setzero): New intrinsics.
12660 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12661 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12663 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12664 code generation for cases where splatting a value is not useful.
12665 * simplify-rtx.c (simplify_ternary_operation): Simplify
12666 vec_merge across a vec_duplicate and a paradoxical subreg forming
12667 a vector mode to a vec_concat.
12669 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12671 * config.gcc: Support "goldmont-plus".
12672 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12674 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12675 PROCESSOR_GOLDMONT_PLUS.
12676 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12677 (processor_target_table): Add "goldmont-plus".
12678 (PTA_GOLDMONT_PLUS): Define.
12679 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12680 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12681 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12682 (fold_builtin_cpu): Add "goldmont-plus".
12683 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12684 (ix86_option_override_internal): Add "goldmont-plus".
12685 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12686 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12687 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12688 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12690 2018-05-17 Richard Biener <rguenther@suse.de>
12692 PR tree-optimization/85757
12693 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12694 remove defs that only feed that PHI from further processing.
12696 2018-05-16 Jim Wilson <jimw@sifive.com>
12698 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12700 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12702 2018-05-16 Mark Wielaard <mark@klomp.org>
12704 * dwarf2out.c (count_index_strings): New function.
12705 (output_indirect_strings): Call count_index_strings and generate
12706 header for dwarf_version >= 5.
12708 2018-05-16 Mark Wielaard <mark@klomp.org>
12710 * dwarf2out.c (dwarf_FORM): New function.
12711 (set_indirect_string): Use dwarf_FORM.
12712 (reset_indirect_string): Likewise.
12713 (size_of_die): Likewise.
12714 (value_format): Likewise.
12715 (output_die): Likewise.
12716 (add_skeleton_AT_string): Likewise.
12717 (output_macinfo_op): Likewise.
12718 (index_string): Likewise.
12719 (output_index_string_offset): Likewise.
12720 (output_index_string): Likewise.
12721 (count_index_strings): Likewise.
12723 2018-05-16 Carl Love <cel@us.ibm.com>
12725 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12726 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12728 2018-05-16 Martin Jambor <mjambor@suse.cz>
12730 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12731 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12733 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12735 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12736 (fnma<mode>4): Likewise.
12737 (fms<mode>4): Likewise.
12738 (fnms<mode>4): Likewise.
12739 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12740 (aarch64_fnma<mode>4): Likewise.
12741 (aarch64_fms<mode>4): Likewise.
12742 (aarch64_fnms<mode>4): Likewise.
12743 (aarch64_fnmadd<mode>4): Likewise.
12745 2018-05-16 Jason Merrill <jason@redhat.com>
12747 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12749 2018-05-16 Richard Biener <rguenther@suse.de>
12751 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12752 (dump_stmt_cost): Declare.
12753 (add_stmt_cost): Dump cost we add.
12754 (add_stmt_costs): New function.
12755 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12756 No longer exported.
12757 (vect_analyze_stmt): Adjust prototype.
12758 (vectorizable_condition): Likewise.
12759 (vectorizable_live_operation): Likewise.
12760 (vectorizable_reduction): Likewise.
12761 (vectorizable_induction): Likewise.
12762 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12763 cost vector to pass to vectorizable_ and record afterwards.
12764 (vect_model_reduction_cost): Take cost vector argument and adjust.
12765 (vect_model_induction_cost): Likewise.
12766 (vectorizable_reduction): Likewise.
12767 (vectorizable_induction): Likewise.
12768 (vectorizable_live_operation): Likewise.
12769 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12770 SLP_TREE_NUMBER_OF_VEC_STMTS.
12771 (vect_analyze_slp_cost_1): Remove.
12772 (vect_analyze_slp_cost): Likewise.
12773 (vect_slp_analyze_node_operations): Take visited args and
12774 a target cost vector. Avoid processing already visited stmt sets.
12775 (vect_slp_analyze_operations): Use a local cost vector to gather
12776 costs and register those of non-discarded instances.
12777 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12778 (vect_schedule_slp_instance): Remove copying of
12779 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12781 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12782 adding cost. Record cost entry location.
12783 (vect_prologue_cost_for_slp_op): Function to compute cost of
12784 a constant or invariant generated for SLP vect in the prologue,
12785 split out from vect_analyze_slp_cost_1.
12786 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12787 (vect_model_promotion_demotion_cost): Likewise.
12788 (vect_model_store_cost): Likewise, make static.
12789 (vect_model_load_cost): Likewise.
12790 (vectorizable_bswap): Add cost vector arg and adjust.
12791 (vectorizable_call): Likewise.
12792 (vectorizable_simd_clone_call): Likewise.
12793 (vectorizable_conversion): Likewise.
12794 (vectorizable_assignment): Likewise.
12795 (vectorizable_shift): Likewise.
12796 (vectorizable_operation): Likewise.
12797 (vectorizable_store): Likewise.
12798 (vectorizable_load): Likewise.
12799 (vectorizable_condition): Likewise.
12800 (vectorizable_comparison): Likewise.
12801 (can_vectorize_live_stmts): Likewise.
12802 (vect_analyze_stmt): Likewise.
12803 (vect_transform_stmt): Adjust calls to vectorizable_*.
12804 * tree-vectorizer.c: Include gimple-pretty-print.h.
12805 (dump_stmt_cost): New function.
12807 2018-05-16 Richard Biener <rguenther@suse.de>
12809 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12810 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12811 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12812 (check_name): New callback.
12813 (dse_classify_store): Track cycles via a visited bitmap of PHI
12814 defs and simplify handling of in-loop and across loop dead stores
12815 and properly fail for loop-variant refs. Handle byte-tracking with
12816 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12819 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12821 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12822 (vect_get_mask_type_for_stmt): Likewise.
12823 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12825 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12826 to determine the statement's vector type and the vector type that
12827 should be used for calculating nunits. Deal with cases in which
12828 the type has to be deferred.
12829 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12830 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12831 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12832 (vect_determine_vf_for_stmt): New functions, split out from...
12833 (vect_determine_vectorization_factor): ...here.
12834 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12835 (vect_get_mask_type_for_stmt): New functions, split out from
12836 vect_determine_vectorization_factor.
12838 2018-05-16 Richard Biener <rguenther@suse.de>
12840 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12841 verify the [VEC_]COND_EXPR embedded comparison.
12843 2018-05-15 Martin Sebor <msebor@redhat.com>
12845 PR tree-optimization/85753
12846 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12847 RECORD_TYPE in addition to ARRAY_TYPE.
12849 2018-05-15 Martin Sebor <msebor@redhat.com>
12851 PR middle-end/85643
12852 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12854 2018-05-15 Richard Biener <rguenther@suse.de>
12856 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12857 add by_clobber_p one. Change algorithm to collect all defs
12858 representing uses we need to walk and try reducing them to
12859 a single one before failing.
12860 (dse_dom_walker::dse_optimize_stmt): Adjust.
12862 2018-05-13 Mark Wielaard <mark@klomp.org>
12864 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12865 (size_of_loc_descr): Likewise.
12866 (output_loc_operands): Likewise.
12867 (output_loc_operands_raw): Likewise.
12868 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12869 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12870 (hash_loc_operands): Likewise.
12871 (compare_loc_operands): Likewise.
12873 2018-05-14 Mark Wielaard <mark@klomp.org>
12875 * dwarf2out.c (count_index_addrs): New function.
12876 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12878 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12880 PR tree-optimization/83648
12881 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12882 return value as malloc candidate.
12884 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12887 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12888 param as true in call to suggest_attribute.
12890 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12892 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12893 -mreadonly-in-sdata.
12895 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12897 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12899 (aarch64_crypto_aesd_fused): Likewise.
12901 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12903 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12904 (movsi_aarch64): Likewise.
12905 (load_pairsi): Likewise.
12906 (load_pairdi): Likewise.
12907 (store_pairsi): Likewise.
12908 (store_pairdi): Likewise.
12909 (load_pairsf): Likewise.
12910 (load_pairdf): Likewise.
12911 (store_pairsf): Likewise.
12912 (store_pairdf): Likewise.
12913 (zero_extend): Likewise.
12914 (trunc): Swap alternatives.
12915 (fcvt_target): Add '?' to prefer w over r.
12917 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12920 * config/i386/i386.md: Disallow non-commutative arithmetics in
12921 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12922 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12923 in the peephole2 before it.
12925 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12927 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12928 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12929 (ix86_handle_option): Handle -mcldemote.
12930 * config.gcc: New header.
12931 * config/i386/cldemoteintrin.h: New file.
12932 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12933 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12935 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12936 OPTION_MASK_ISA_CLDEMOTE.
12937 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12938 (ix86_valid_target_attribute_inner_p): Ditto.
12939 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12940 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12941 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12942 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12943 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12945 * config/i386/i386.opt: Add -mcldemote.
12946 * config/i386/x86intrin.h: New header.
12947 * doc/invoke.texi: Add -mcldemote.
12949 2018-05-14 Richard Biener <rguenther@suse.de>
12951 * doc/match-and-simplify.texi: Adjust :s documentation.
12953 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12955 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12956 intended memcpy size.
12957 (REORDER_45): Likewise.
12959 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12961 * sort.cc: New file.
12962 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12963 * vec.c (qsort_chk): Use gcc_qsort.
12964 * Makefile.in (OBJS-libcommon): Add sort.o.
12965 (build/sort.o): New target. Use it...
12966 (BUILD_RTL): ... here, and...
12967 (build/gencfn-macros): ... here, and...
12968 (build/genmatch): ... here.
12970 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12971 Chung-Ju Wu <jasonwucj@gmail.com>
12973 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12974 * config/nds32/nds32-graywolf.md: New file.
12975 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12976 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12978 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12979 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12980 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12981 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12982 * config/nds32/pipelines.md: Include n15 settings.
12984 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12985 Chung-Ju Wu <jasonwucj@gmail.com>
12987 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12988 * config/nds32/nds32-n13.md: New file.
12989 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12990 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12992 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12993 * config/nds32/nds32.md (pipeline_model): Add n13.
12994 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12995 * config/nds32/pipelines.md: Include n13 settings.
12997 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12998 Chung-Ju Wu <jasonwucj@gmail.com>
13000 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13001 * config/nds32/nds32-n10.md: New file.
13002 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13003 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13005 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13006 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13007 * config/nds32/nds32.md (pipeline_model): Add n10.
13008 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13009 * config/nds32/pipelines.md: Include n10 settings.
13011 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
13012 Kito Cheng <kito.cheng@gmail.com>
13013 Chung-Ju Wu <jasonwucj@gmail.com>
13015 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13016 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13017 Add enum values for DSP extension instructions.
13018 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13020 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13021 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13022 New code iterators.
13023 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13024 * config/nds32/nds32-dspext.md: New file for DSP implementation.
13025 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13026 * config/nds32/nds32-intrinsic.md: Likewise.
13027 * config/nds32/nds32_intrinsic.h: Likewise.
13028 * config/nds32/nds32-md-auxiliary.c: Likewise.
13029 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13030 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13031 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13032 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13033 * config/nds32/nds32-protos.h: New declarations for DSP extension.
13034 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13035 TYPE_DMAC in switch statement.
13036 * config/nds32/nds32.c: New checking and implementation for DSP
13037 extension instructions.
13038 * config/nds32/nds32.h: Likewise.
13039 * config/nds32/nds32.md: Likewise.
13040 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13041 * config/nds32/predicates.md: Implement new predicates for DSP
13044 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13046 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13047 Reformat alternatives and attributes so it is easier to identify
13048 which constraints/attributes go with which instruction.
13049 (mov<mode>_hardfloat32, FMOVE64): Likewise.
13050 (mov<mode>_softfloat32, FMOVE64): Likewise.
13051 (mov<mode>_hardfloat64, FMOVE64): Likewise.
13052 (mov<mode>_softfloat64, FMOVE64): Likewise.
13054 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
13056 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13058 (Basic PowerPC Built-in Functions): The new name of the
13059 subsection previously known as "PowerPC Built-in Functions".
13060 (Basic PowerPC Built-in Functions Available on all Configurations):
13062 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13063 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13064 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13065 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13067 2018-05-11 Martin Jambor <mjambor@suse.cz>
13070 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13073 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13076 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13078 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
13080 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13081 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13082 (ix86_handle_option): Handle -mwaitpkg.
13083 * config.gcc: New header.
13084 * config/i386/cpuid.h (bit_WAITPKG): New bit.
13085 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13086 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13088 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13089 OPTION_MASK_ISA_WAITPKG.
13090 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13091 (ix86_option_override_internal): Add PTA_WAITPKG.
13092 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13093 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13094 IX86_BUILTIN_TPAUSE.
13095 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13096 __builtin_ia32_umwait and __builtin_ia32_tpause.
13097 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13098 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13099 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13100 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13101 UNSPECV_TPAUSE): New.
13102 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13103 * config/i386/i386.opt: Add -mwaitpkg.
13104 * config/i386/waitpkgintrin.h: New file.
13105 * config/i386/x86intrin.h: New header.
13106 * doc/invoke.texi: Add -mwaitpkg.
13108 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13111 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13113 (cortex-m0): Use armv6s-m isa.
13114 (cortex-m0plus): Likewise.
13115 (cortex-m1): Likewise.
13116 (cortex-m0.small-multiply): Likewise.
13117 (cortex-m0plus.small-multiply): Likewise.
13118 (cortex-m1.small-multiply): Likewise.
13120 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
13121 Jakub Jelinek <jakub@redhat.com>
13123 PR tree-optimization/85692
13124 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13125 source permute as well.
13127 2018-05-11 Martin Liska <mliska@suse.cz>
13130 * doc/extend.texi: Document LLVM style format for no_sanitize
13133 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13135 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13136 mode_supports_vsx_dform_quad to mode_supports_dq_form.
13137 (mode_supports_vsx_dform_quad): Likewise.
13138 (mode_supports_vmx_dform): Move these functions to be next to the
13139 other mode_supports functions.
13140 (mode_supports_dq_form): Likewise.
13141 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13142 mode_supports_dq_form.
13143 (reg_offset_addressing_ok_p): Likewise.
13144 (offsettable_ok_by_alignment): Likewise.
13145 (rs6000_legitimate_offset_address_p): Likewise.
13146 (legitimate_lo_sum_address_p): Likewise.
13147 (rs6000_legitimize_address): Likewise.
13148 (rs6000_legitimize_reload_address): Likewise.
13149 (rs6000_secondary_reload_inner): Likewise.
13150 (rs6000_preferred_reload_class): Likewise.
13151 (rs6000_output_move_128bit): Likewise.
13153 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13155 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13156 Generate SImode target register for null target.
13157 <case IX86_BUILTIN_XGETBV>: Ditto.
13158 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13159 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13161 2018-05-10 Carl Love <cel@us.ibm.com>
13163 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13164 dcbtt and dcbtstt if operands[2] is 0.
13166 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13169 * config/i386/sse.md (usadv64qi): New expander.
13171 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
13173 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13174 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13175 -maltivec=be support.
13176 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13177 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13178 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13179 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13180 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13181 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13182 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13183 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13184 altivec_vsumsws): Adjust.
13185 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13186 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13187 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13189 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13190 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13191 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13192 (altivec_lve<VI_char>x): Delete expand.
13193 (*altivec_lve<VI_char>x_internal): Rename to...
13194 (altivec_lve<VI_char>x): ... this.
13195 (altivec_lvxl_<mode>): Delete expand.
13196 (*altivec_lvxl_<mode>_internal): Rename to ...
13197 (altivec_lvxl_<mode>): ... this.
13198 (altivec_stvxl_<mode>): Delete expand.
13199 (*altivec_stvxl_<mode>_internal): Rename to ...
13200 (altivec_stvxl_<mode>): ... this.
13201 (altivec_stve<VI_char>x): Delete expand.
13202 (*altivec_stve<VI_char>x_internal): Rename to ...
13203 (altivec_stve<VI_char>x): ... this.
13204 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13205 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13206 reduc_plus_scal_<mode>): Adjust.
13207 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13209 (rs6000_cpu_cpp_builtins): Adjust.
13210 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13211 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13212 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13213 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13214 -maltivec=be support.
13215 (rs6000_split_vec_extract_var): Adjust.
13216 (rs6000_split_v4si_init): Adjust.
13217 (swap_selector_for_mode): Delete.
13218 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13219 altivec_expand_stvex_be): Delete.
13220 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13221 -maltivec=be support.
13222 (rs6000_gimple_fold_builtin): Ditto.
13223 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13225 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13226 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13227 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13228 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13229 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13230 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13231 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13232 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13233 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13234 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13235 anonymous split): Adjust.
13236 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13237 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13239 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13241 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13242 when --with-gxx-include-dir is also specified.
13243 * configure: Regenerate.
13245 2018-05-09 Jim Wilson <jimw@sifive.com>
13248 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13249 * config/riscv/t-withmultilib: New.
13250 * config/riscv/withmultilib.h: New.
13251 * doc/install.texi: Document RISC-V --with-multilib-list support.
13253 2018-05-09 Richard Biener <rguenther@suse.de>
13255 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13257 (vect_bb_vectorization_profitable_p): Adjust. Compute
13258 actual scalar cost using the cost vector and the add_stmt_cost
13261 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13263 PR rtl-optimization/85645
13264 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13265 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13267 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13269 PR rtl-optimization/85645
13270 * shrink-wrap.c (spread_components): Return a boolean saying if
13271 anything was changed.
13272 (try_shrink_wrapping_separate): Iterate spread_components until
13273 nothing changes anymore.
13275 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13277 PR rtl-optimization/85645
13278 * regrename.c (build_def_use): Also kill the chains that include the
13279 destination of a REG_CFA_REGISTER note.
13281 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13283 PR rtl-optimization/85645
13284 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13285 insn that has a REG_CFA_REGISTER note.
13287 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13289 * cfgexpand.c (expand_clobber): New function.
13290 (expand_gimple_stmt_1): Use it.
13291 * tree-vect-stmts.c (vect_clobber_variable): New function,
13293 (vectorizable_simd_clone_call): ...here.
13294 (vectorizable_store): Emit a clobber either side of an
13295 IFN_STORE_LANES sequence.
13296 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13298 2018-05-09 Tom de Vries <tom@codesourcery.com>
13301 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13302 (define_insn "trap_if_false"): Add exit after trap.
13304 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13306 PR rtl-optimization/85638
13307 * bb-reorder.c: Include common/common-target.h.
13308 (create_forwarder_block): New function extracted from...
13309 (fix_up_crossing_landing_pad): ...here. Rename into...
13310 (dw2_fix_up_crossing_landing_pad): ...this.
13311 (sjlj_fix_up_crossing_landing_pad): New function.
13312 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13313 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13314 from both partitions and exit the loop after one iteration.
13316 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13319 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13321 (Basic PowerPC Built-in Functions): The new name of the
13322 subsection previously known as "PowerPC Built-in Functions".
13323 (Basic PowerPC Built-in Functions Available on all Configurations):
13325 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13327 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13329 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13331 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13334 2018-05-08 Jim Wilson <jimw@sifive.com>
13336 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13337 (LD_EMUL_SUFFIX): New.
13338 (LINK_SPEC): Use it.
13340 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13342 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13344 (Basic PowerPC Built-in Functions): The new name of the
13345 subsection previously known as "PowerPC Built-in Functions".
13346 (Basic PowerPC Built-in Functions Available on all Configurations):
13348 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13350 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13352 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13354 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13357 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13360 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13361 after cmpelim optimization.
13363 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13365 * config.gcc: Support "goldmont".
13366 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13367 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13368 PROCESSOR_GOLDMONT.
13369 * config/i386/i386.c (m_GOLDMONT): Define.
13370 (processor_target_table): Add "goldmont".
13371 (PTA_GOLDMONT): Define.
13372 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13373 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13374 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13375 (fold_builtin_cpu): Add "goldmont".
13376 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13377 (ix86_option_override_internal): Add "goldmont".
13378 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13379 (processor_type): Add PROCESSOR_GOLDMONT.
13380 * config/i386/i386.md: Add CPU "glm".
13381 * config/i386/glm.md: New file.
13382 * config/i386/x86-tune.def: Add m_GOLDMONT.
13383 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13385 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13388 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13390 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13391 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13392 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13395 * config/i386/i386.c (ix86_fold_builtin): Handle
13396 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13399 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13400 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13402 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13405 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13406 (check_arch): Likewise.
13407 (check_fpu): Return the result rather than printing it.
13408 (end arch): Fix operator precedence.
13409 (end cpu): Likewise.
13410 (END): Print the result from check_fpu.
13412 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13413 Alan Hayward <alan.hayward@arm.com>
13414 David Sherwood <david.sherwood@arm.com>
13416 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13417 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13418 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13419 (*fcmuo<mode>_and): New patterns.
13421 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13423 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13424 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13425 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13426 (cmp_op, sve_imm_con): New code attributes.
13427 (SVE_COND_INT_CMP, imm_con): Delete.
13428 (cmp_op): Remove above unspecs from int attribute.
13429 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13431 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13432 comparison-specific unspecs.
13433 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13434 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13435 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13436 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13437 (*vec_fcm<cmp_op><mode>): Rename to...
13438 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13439 (*vec_fcmuo<mode>): Rename to...
13440 (*fcmuo<mode>): ...this and adjust likewise.
13441 (*pred_fcm<cmp_op><mode>): New pattern.
13442 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13443 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13445 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13447 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13448 (aarch64_emit_sve_predicated_cond): New function.
13449 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13450 (aarch64_emit_unspec_cond_or): Replace with...
13451 (aarch64_emit_sve_or_conds): ...this new function. Use
13452 aarch64_emit_sve_ptrue_op for the individual comparisons and
13453 aarch64_emit_binop to OR them together.
13454 (aarch64_emit_inverted_unspec_cond): Replace with...
13455 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13456 aarch64_emit_sve_ptrue_op for the comparison and
13457 aarch64_emit_unop to invert the result.
13458 (aarch64_expand_sve_vec_cmp_float): Update after the above
13459 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13461 2018-05-07 Nathan Sidwell <nathan@acm.org>
13463 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13464 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13465 (Backwards Compatibility): Likewise.
13467 2018-05-07 Luis Machado <luis.machado@linaro.org>
13471 2018-05-07 Luis Machado <luis.machado@linaro.org>
13473 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13474 <prefetch_dynamic_strides>: New const bool field.
13475 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13476 prefetch_dynamic_strides.
13477 (exynosm1_prefetch_tune): Likewise.
13478 (thunderxt88_prefetch_tune): Likewise.
13479 (thunderx_prefetch_tune): Likewise.
13480 (thunderx2t99_prefetch_tune): Likewise.
13481 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13483 (aarch64_override_options_internal): Update to set
13484 PARAM_PREFETCH_DYNAMIC_STRIDES.
13485 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13486 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13487 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13488 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13489 prefetch-dynamic-strides setting.
13491 2018-05-07 Luis Machado <luis.machado@linaro.org>
13493 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13494 <minimum_stride>: New const int field.
13495 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13496 minimum_stride field.
13497 (exynosm1_prefetch_tune): Likewise.
13498 (thunderxt88_prefetch_tune): Likewise.
13499 (thunderx_prefetch_tune): Likewise.
13500 (thunderx2t99_prefetch_tune): Likewise.
13501 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13502 (aarch64_override_options_internal): Update to set
13503 PARAM_PREFETCH_MINIMUM_STRIDE.
13504 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13505 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13506 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13507 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13508 stride is constant and is below the minimum stride threshold.
13510 2018-05-07 Luis Machado <luis.machado@linaro.org>
13512 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13515 2018-05-07 Luis Machado <luis.machado@linaro.org>
13517 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13518 <prefetch_dynamic_strides>: New const bool field.
13519 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13520 prefetch_dynamic_strides.
13521 (exynosm1_prefetch_tune): Likewise.
13522 (thunderxt88_prefetch_tune): Likewise.
13523 (thunderx_prefetch_tune): Likewise.
13524 (thunderx2t99_prefetch_tune): Likewise.
13525 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13527 (aarch64_override_options_internal): Update to set
13528 PARAM_PREFETCH_DYNAMIC_STRIDES.
13529 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13530 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13531 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13532 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13533 prefetch-dynamic-strides setting.
13535 2018-05-07 Luis Machado <luis.machado@linaro.org>
13537 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13538 <minimum_stride>: New const int field.
13539 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13540 minimum_stride field.
13541 (exynosm1_prefetch_tune): Likewise.
13542 (thunderxt88_prefetch_tune): Likewise.
13543 (thunderx_prefetch_tune): Likewise.
13544 (thunderx2t99_prefetch_tune): Likewise.
13545 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13546 (aarch64_override_options_internal): Update to set
13547 PARAM_PREFETCH_MINIMUM_STRIDE.
13548 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13549 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13550 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13551 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13552 stride is constant and is below the minimum stride threshold.
13554 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13557 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13558 the type is addressable. Don't force op into register if it has
13561 2018-05-05 Roland McGrath <mcgrathr@google.com>
13564 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13565 any section for which we don't know a specific type it should have,
13566 regardless of name. Previously this was done only for the exact
13567 names ".init_array", ".fini_array", and ".preinit_array".
13568 (default_elf_asm_named_section): Add comment about
13569 relationship with default_section_type_flags and SECTION_NOTYPE.
13570 (get_section): Don't consider it a type conflict if one side has
13571 SECTION_NOTYPE and the other doesn't, as long as neither has the
13572 SECTION_BSS et al used in the default_section_type_flags logic.
13574 2018-05-05 Tom de Vries <tom@codesourcery.com>
13577 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13578 (workaround_barsyncs): New function.
13579 (nvptx_reorg): Use workaround_barsyncs.
13580 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13581 (define_expand "nvptx_membar_cta"): New define_expand.
13582 (define_insn "*nvptx_membar_cta"): New insn.
13584 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13586 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13587 To improve optimization opportunities.
13588 * builtin-types.def: The new needed builtin types for the above.
13590 2018-05-04 Richard Biener <rguenther@suse.de>
13592 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13593 * gimple-ssa-store-merging.c
13594 (imm_store_chain_info::output_merged_store): Remove redundant create,
13595 release split_store vector contents on failure.
13596 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13597 scalar stmt vector on cache hit.
13599 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13601 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13603 * config.gcc (powerpc-xilinx-eabi*): Remove.
13604 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13606 (fusion_addis_mem_combo_load): Ditto.
13607 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13609 (rs6000_cpu_cpp_builtins): Ditto.
13610 * config/rs6000/rs6000-linux.c
13611 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13612 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13613 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13615 (rs6000_setup_reg_addr_masks): Ditto.
13616 (rs6000_init_hard_regno_mode_ok): Ditto.
13617 (rs6000_option_override_internal): Ditto.
13618 (legitimate_lo_sum_address_p): Ditto.
13619 (rs6000_legitimize_address): Ditto.
13620 (rs6000_legitimize_reload_address): Ditto.
13621 (rs6000_legitimate_address_p): Ditto.
13622 (abi_v4_pass_in_fpr): Ditto.
13623 (setup_incoming_varargs): Ditto.
13624 (rs6000_gimplify_va_arg): Ditto.
13625 (rs6000_split_multireg_move): Ditto.
13626 (rs6000_savres_strategy): Ditto.
13627 (rs6000_emit_prologue_components): Ditto.
13628 (rs6000_emit_epilogue_components): Ditto.
13629 (rs6000_emit_prologue): Ditto.
13630 (rs6000_emit_epilogue): Ditto.
13631 (rs6000_elf_file_end): Ditto.
13632 (rs6000_function_value): Ditto.
13633 (rs6000_libcall_value): Ditto.
13634 * config/rs6000/rs6000.h: Ditto.
13635 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13636 (TARGET_MINMAX): ... this. New.
13637 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13638 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13639 (*movsi_internal1_single): Delete.
13640 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13641 mfpu=, mxilinx-fpu): Delete.
13642 * config/rs6000/singlefp.h: Delete.
13643 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13644 * config/rs6000/t-rs6000: Ditto.
13645 * config/rs6000/t-xilinx: Delete.
13646 * config/rs6000/titan.md: Adjust for fp_type removal.
13647 * config/rs6000/vsx.md: Remove Xilinx FP support.
13648 (VStype_simple): Delete.
13649 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13650 * config/rs6000/xfpu.h: Delete.
13651 * config/rs6000/xfpu.md: Delete.
13652 * config/rs6000/xilinx.h: Delete.
13653 * config/rs6000/xilinx.opt: Delete.
13654 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13655 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13657 2018-05-04 Tom de Vries <tom@codesourcery.com>
13660 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13663 2018-05-04 Richard Biener <rguenther@suse.de>
13665 PR middle-end/85627
13666 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13667 (expand_complex_div_wide): Likewise.
13668 (expand_complex_operations_1): Likewise.
13669 (expand_complex_libcall): Preserve EH info of the original stmt.
13670 (tree_lower_complex): Handle removed blocks.
13671 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13672 on complex multiplication and division libcall builtins.
13674 2018-05-04 Richard Biener <rguenther@suse.de>
13676 PR middle-end/85574
13677 * fold-const.c (negate_expr_p): Restrict negation of operand
13678 zero of a division to when we know that can happen without
13680 (fold_negate_expr_1): Likewise.
13682 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13685 * real.h (real_nextafter): Declare.
13686 * real.c (real_nextafter): New function.
13687 * fold-const-call.c (fold_const_nextafter): New function.
13688 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13689 CASE_CFN_NEXTTOWARD.
13690 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13691 even when arg1_mode is different from arg0_mode.
13693 2018-05-03 Nathan Sidwell <nathan@acm.org>
13695 * doc/extend.texi (Deprecated Features): Remove
13696 -ffriend-injection.
13697 (Backwards Compatibility): Likewise.
13698 * doc/invoke.texi (C++ Language Options): Likewise.
13699 (C++ Dialect Options): Likewise.
13701 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13704 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13705 _mm512_mask_mullox_epi64): New intrinsics.
13707 2018-05-03 Tom de Vries <tom@codesourcery.com>
13710 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13711 dump files): Add offload-tree.
13713 2018-05-03 Richard Biener <rguenther@suse.de>
13715 PR tree-optimization/85615
13716 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13717 to loops not nested in BBs loop father to avoid creating multi-entry
13720 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13722 PR tree-optimization/70291
13723 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13724 arguments. Change return type to tree. Emit libcall as a new
13725 statement rather than replacing existing one when inplace_p is true.
13726 (expand_complex_multiplication_components): New function.
13727 (expand_complex_multiplication): Expand floating-point complex
13728 multiplication using the above.
13729 (expand_complex_division): Rename inner_type parameter to type.
13730 Update expand_complex_libcall call-site.
13731 (expand_complex_operations_1): Update expand_complex_multiplication
13732 and expand_complex_division call-sites.
13734 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13737 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13738 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13739 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13740 the highest significant bit of the shift count mask is clear. In
13741 check whether and[sq]i3 is needed verify that all significant bits
13742 of the shift count other than the highest are set.
13744 2018-05-02 Tom de Vries <tom@codesourcery.com>
13747 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13748 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13749 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13750 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13751 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13752 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13753 __builtin_goacc_parlevel_size.
13755 2018-05-02 Richard Biener <rguenther@suse.de>
13757 PR tree-optimization/85597
13758 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13759 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13762 2018-05-02 Tom de Vries <tom@codesourcery.com>
13765 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13766 dump files): Add ltrans-tree.
13768 2018-05-02 Tom de Vries <tom@codesourcery.com>
13771 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13772 dump files): Add wpa-ipa.
13774 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13776 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13777 powerpc*-*-linux*paired* target.
13778 * config/rs6000/750cl.h: Delete.
13779 * config/rs6000/paired.h: Delete.
13780 * config/rs6000/paired.md: Delete.
13781 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13783 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13784 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13785 comment. Remove paired float support.
13786 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13787 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13789 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13790 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13792 * config/rs6000/rs6000.c: Remove paired float support.
13793 (paired_expand_vector_init, paired_expand_vector_move,
13794 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13795 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13796 paired_expand_builtin, paired_expand_predicate_builtin,
13797 paired_init_builtins): Delete.
13798 * config/rs6000/rs6000.h: Remove paired float support.
13799 * config/rs6000/rs6000.md: Remove paired float support.
13800 (move_from_CR_ov_bit): Delete.
13801 * config/rs6000/rs6000.opt (mpaired): Delete.
13802 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13803 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13805 2018-05-02 Richard Biener <rguenther@suse.de>
13807 PR middle-end/85567
13808 * gimplify.c (gimplify_save_expr): When in SSA form allow
13809 SAVE_EXPRs to compute to SSA vars.
13811 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13814 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13815 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13816 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13817 clobber operands[2], instead use a new pseudo. Formatting fixes.
13819 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13821 PR tree-optimization/85586
13822 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13823 exit early for statements in the same group if the accesses are
13826 2018-05-02 Tom de Vries <tom@codesourcery.com>
13829 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13832 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13834 PR tree-optimization/85143
13835 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13837 2018-05-01 Tom de Vries <tom@codesourcery.com>
13840 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13841 not found" error message.
13843 2018-05-01 Tom de Vries <tom@codesourcery.com>
13846 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13847 * vec.c (test_ordered_remove_if): New function.
13848 (vec_c_tests): Call test_ordered_remove_if.
13849 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13850 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13851 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13852 VEC_ORDERED_REMOVE_IF.
13854 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13856 PR tree-optimization/82665
13857 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13858 pointer subtraction where arguments come from a memchr call.
13860 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13862 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13863 --push-state --as-needed and --pop-state instead of --as-needed and
13864 --no-as-needed if ld supports it.
13865 * configure: Regenerated.
13868 * doc/install.texi2html: Replace _002d with - and _002a with * in
13869 generated html files using sed.
13871 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13874 * gcc-rich-location.c (blank_line_before_p): New function.
13875 (use_new_line): New function.
13876 (gcc_rich_location::add_fixit_insert_formatted): New function.
13877 * gcc-rich-location.h
13878 (gcc_rich_location::add_fixit_insert_formatted): New function.
13880 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13882 * selftest.c (assert_streq): Rename "expected" and "actual" to
13883 "val1" and "val2". Extend NULL-handling to cover both inputs
13884 symmetrically, while still requiring both to be non-NULL for a pass.
13885 * selftest.h (assert_streq): Rename "expected" and "actual" to
13887 (ASSERT_EQ): Likewise.
13888 (ASSERT_EQ_AT): Likewise.
13889 (ASSERT_KNOWN_EQ): Likewise.
13890 (ASSERT_KNOWN_EQ_AT): Likewise.
13891 (ASSERT_NE): Likewise.
13892 (ASSERT_MAYBE_NE): Likewise.
13893 (ASSERT_MAYBE_NE_AT): Likewise.
13894 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13895 the assertion to pass.
13896 (ASSERT_STREQ_AT): Likewise.
13898 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13900 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13901 interaction with -pie.
13903 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13905 * selftest.h: Fix alphabetization of per-source-file selftest
13908 2018-04-30 Jason Merrill <jason@redhat.com>
13910 PR c++/61982 - dead stores to destroyed objects.
13911 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13914 2018-04-30 Jason Merrill <jason@redhat.com>
13916 * tree.c (build_clobber): New.
13917 * tree.h: Declare it.
13918 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13920 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13922 * diagnostic-show-locus.c (layout::layout): Update for
13923 location_get_source_line returning a char_span.
13924 (struct char_span): Move to input.h.
13925 (struct correction): Update for fields in char_span becoming
13927 (struct source_line): Update for location_get_source_line
13928 returning a char_span.
13929 (layout::print_line): Likewise.
13930 * edit-context.c (edited_file::print_content): Likewise.
13931 (edited_file::print_diff_hunk): Likewise.
13932 (edited_file::print_run_of_changed_lines): Likewise.
13933 (edited_file::get_num_lines): Likewise.
13934 (edited_line::edited_line): Likewise.
13935 * final.c (asm_show_source): Likewise.
13936 * input.c (location_get_source_line): Convert return type
13937 from const char * to char_span, losing the final "line_len"
13939 (dump_location_info): Update for the above.
13940 (get_substring_ranges_for_loc): Likewise. Use a char_span
13941 when handling the literal within the line.
13942 (test_reading_source_line): Update for location_get_source_line
13943 returning a char_span.
13944 * input.h (class char_span): Move here from
13945 diagnostic-show-locus.c, converting from a struct to a class.
13946 Make data members private.
13947 (char_span::operator bool): New.
13948 (char_span::length): New.
13949 (char_span::get_buffer): New.
13950 (char_span::operator[]): New.
13951 (char_span::subspan): Make const.
13952 (char_span::xstrdup): New.
13953 (location_get_source_line): Convert return type from const char *
13954 to char_span, losing the final "line_size" param.
13956 2018-04-30 Jan Hubicka <jh@suse.cz>
13958 * lto-wrapper.c (ltrans_priorities): New static var.
13959 (cmp_priority): New.
13960 (run_gcc): Read priorities and if doing parallel build order
13961 the Makefile by them.
13963 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13965 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13967 2018-04-30 Richard Biener <rguenther@suse.de>
13969 * tree-cfg.c (verify_address): Remove base argument, add
13970 flag whether to check TREE_ADDRESSABLE and do that.
13971 (verify_expr): Remove.
13972 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13973 (verify_gimple_assign_single): Likewise.
13974 (verify_gimple_switch): Likewise.
13975 (verify_expr_location_1): Dereference tp once. Add (disabled)
13976 piece from verify_expr.
13977 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13979 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13981 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13983 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13985 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13986 (small_data_pattern): Likewise.
13987 (arc_rewrite_small_data): Likewise.
13988 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13989 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13990 (get_symbol_alignment): New function.
13991 (legitimate_small_data_address_p): Likewise.
13992 (legitimate_scaled_address): Update, call
13993 legitimate_small_data_address_p.
13994 (output_sdata): New static variable.
13995 (arc_print_operand): Update how we handle small data operands.
13996 (arc_print_operand_address): Likewise.
13997 (arc_legitimate_address_p): Update, use
13998 legitimate_small_data_address_p.
13999 (arc_rewrite_small_data_p): Remove.
14000 (arc_rewrite_small_data_1): Likewise.
14001 (arc_rewrite_small_data): Likewise.
14002 (small_data_pattern): Likewise.
14003 (compact_sda_memory_operand): Update to use
14004 legitimate_small_data_address_p and get_symbol_alignment.
14005 (prepare_move_operands): Don't rewite sdata pattern.
14006 (prepare_extend_operands): Remove.
14007 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14009 (zero_extendqisi2): Likewise.
14010 (zero_extendhisi2): Likewise.
14011 (extendqihi2): Likewise.
14012 (extendqisi2): Likewise.
14013 (extendhisi2): Likewise.
14014 (addsi3): Likewise.
14015 (subsi3): Likewise.
14016 (andsi3): Likewise.
14017 * config/arc/constraints.md (Usd): Change it to memory constraint.
14019 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14021 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14022 as source of std instructions.
14023 * config/arc/arc.md (movsi_insn): Update pattern predicate to
14024 allow 6-bit constants as source for store instructions.
14025 (movdi_insn): Update instruction pattern to allow 6-bit constants
14026 as source for store instructions.
14028 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14030 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14032 2018-04-30 Nathan Sidwell <nathan@acm.org>
14033 Sandra Loosemore <sandra@codesourcery.com>
14035 * dumpfile.c (dump_open): Allow '-' for stdout.
14036 * doc/invoke.texi (Developer Options): Document dump filename
14037 determination early. Document stdin/stdout selection.
14039 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
14041 Microblaze Target: PIC data text relative
14043 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14044 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14046 * config/microblaze/microblaze.h (microblaze_constant_address_p):
14047 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14048 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14049 New addressing mode for data-text relative position indepenedent code.
14050 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14051 'ADDRESS_SYMBOLIC_TXT_REL'.
14052 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14053 (microblaze_legitimate_pic_operand): Exclude function calls from
14054 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14055 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14057 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14058 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14059 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14060 for 'address + offset'.
14061 (microblaze_expand_prologue): Add new function prologue call for
14063 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14064 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14065 table in case of TARGET_PIC_DATA_TEXT_REL.
14066 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14067 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14068 Add new macros 'UNSPEC_TEXT',
14069 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14070 + exclude function calls from 'UNSPEC_PLT' in case of data text
14072 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14073 new target hook for generating address diff vector tables in case of
14075 * doc/tm.texi : Regenerate.
14076 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14077 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14078 of addr diff vector generation.
14079 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14080 target hook definition.
14081 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14082 Add default function for generate_pic_addr_diff_vec -> flag_pic.
14083 * doc/invoke.texi (Add new pic option): Add new microblaze pic
14084 option for data text relative.
14086 2018-04-30 Richard Biener <rguenther@suse.de>
14088 * tree-chrec.h (evolution_function_is_constant_p): Remove
14090 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14092 2018-04-30 Richard Biener <rguenther@suse.de>
14095 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14097 2018-04-30 Richard Biener <rguenther@suse.de>
14099 PR tree-optimization/28364
14100 PR tree-optimization/85275
14101 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14102 copying first exit test.
14104 2018-04-28 Mark Wielaard <mark@klomp.org>
14106 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14107 dwarf_version >= 5.
14108 (dwarf_AT): Handle DW_AT_addr_base.
14109 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14111 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
14114 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14115 (*ashl<dwi>3_doubleword_mask_1): Ditto.
14116 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14117 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14119 2018-04-28 Richard Biener <rguenther@suse.de>
14121 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14122 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14123 to reflect use. Only add interesting stmts.
14125 2018-04-27 Martin Jambor <mjambor@suse.cz>
14128 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14129 the jump function allows for passing through aggregate values.
14131 2018-04-27 David Malcolm <dmalcolm@redhat.com>
14133 * input.h (in_system_header_at): Convert from macro to inline
14135 (from_macro_expansion_at): Likewise.
14136 (from_macro_definition_at): Likewise.
14138 2018-04-27 Jeff Law <law@redhat.com>
14140 * config.gcc: Mark tile* targets as deprecated/obsolete.
14142 2018-04-27 Richard Biener <rguenther@suse.de>
14144 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14147 2018-04-27 Richard Biener <rguenther@suse.de>
14149 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14151 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
14153 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14154 with Yd constraint. Set "preferred_for_speed" attribute from
14155 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14156 with Yd constraint.
14157 (*movdi_internal): Ditto.
14158 (movti_interunit splitters): Remove
14159 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14160 (movdi_interunit splitters): Ditto.
14161 * config/i386/constraints.md (Ye): Remove.
14162 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14164 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14167 * config/aarch64/constraints.md (Usg): Limit to 31.
14168 (Usj): Limit to 63.
14170 2018-04-27 Jakub Jelinek <jakub@redhat.com>
14172 PR tree-optimization/85529
14173 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14174 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14175 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14176 zero extension or masking of the MSB bit.
14177 (optimize_range_tests): Add FIRST_BB argument, pass it through
14178 to optimize_range_tests_var_bound.
14179 (maybe_optimize_range_tests, reassociate_bb): Adjust
14180 optimize_range_tests callers.
14182 2018-04-26 Richard Biener <rguenther@suse.de>
14183 Jakub Jelinek <jakub@redhat.com>
14185 * cgraph.h (symbol_table): Just declare debug method here.
14186 * symtab.c (symbol_table::debug): Define.
14188 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
14190 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14192 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
14194 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14195 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14196 (*movdi_internal): Substitute Yi and Yj constraint with x
14197 and Ym and Yn constraint with y constraint. Update "isa"
14198 attribute and set "preferred_for_speed" attribute from
14199 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14200 (*movsi_internal): Ditto.
14201 (*movdf_internal): Ditto.
14202 (*movsf_internal): Ditto.
14203 (*zero_extendsidi2): Ditto.
14204 * config/i386/sse.md (vec_set<mode>_0): Ditto.
14205 (sse2_loadld): Ditto.
14206 (*vec_extract<ssevecmodelower>_0): Ditto.
14207 (*vec_extractv4si_0_zext_sse4): Ditto.
14208 (vec_concatv2di): Ditto.
14209 (*vec_dup<mode>): Ditto.
14210 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14211 * config/i386/constraints.md (Yi): Remove.
14216 2018-04-26 Nathan Sidwell <nathan@acm.org>
14218 * dumpfile.c (dump_open): New.
14219 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14220 (dump_finish): Detect stdio/stderr by value not name.
14222 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14224 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14226 2018-04-26 Tom de Vries <tom@codesourcery.com>
14229 * config/nvptx/nvptx.c (verify_neutering_jumps)
14230 (verify_neutering_labels): New function
14231 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14233 2018-04-26 Tom de Vries <tom@codesourcery.com>
14236 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14237 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14240 2018-04-26 Richard Biener <rguenther@suse.de>
14241 Tom de Vries <tom@codesourcery.com>
14244 * lto-streamer-out.c (output_function): Fixup loops if required to match
14245 discovery done in the reader.
14247 2018-04-26 Richard Biener <rguenther@suse.de>
14249 PR tree-optimization/85116
14250 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14251 have a loop exit from the single latch predecessor. Remove
14252 case of header with just condition.
14253 (ch_base::copy_headers): Exclude infinite loops from any
14255 (pass_ch::execute): Record exits.
14257 2018-04-26 Richard Biener <rguenther@suse.de>
14259 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14260 prologue cost vector and pass it to vect_get_load_cost.
14261 (vect_get_peeling_costs_all_drs): Likewise.
14262 (vect_peeling_hash_get_lowest_cost): Likewise.
14263 (vect_enhance_data_refs_alignment): Likewise.
14265 2018-04-26 Richard Biener <rguenther@suse.de>
14267 PR middle-end/85450
14268 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14269 checking of integer<->pointer conversions.
14270 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14271 sign-/zero-extending pointer types.
14272 (expand_omp_for_static_chunk): Likewise.
14274 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14275 Jean Lee <xiaoyur347@gmail.com>
14277 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14278 (TARGET_ASAN_SHADOW_OFFSET): Define.
14279 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14280 true for -fsanitize=address.
14282 2018-04-25 Mark Wielaard <mark@klomp.org>
14284 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14287 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14289 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14290 than "alu", remove explicit "memory" and "imm_disp" attributes.
14291 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14293 PR middle-end/85414
14294 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14295 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14296 gen_lowpart_no_emit.
14298 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14301 * config/i386/i386.c (ix86_expand_builtin): Change memory
14302 operand to XI, extend p0 to Pmode.
14303 * config/i386/i386.md: Change unspec volatile and operand
14304 1 mode to XI, change operand 0 mode to P.
14306 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14308 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14309 GET_MODE_MASK before any checking.
14310 (nds32_can_use_bset_p): Likewise.
14311 (nds32_can_use_btgl_p): Likewise.
14313 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14315 * config/nds32/nds32-doubleword.md: New define_split pattern for
14316 illegal register number.
14318 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14320 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14322 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14324 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14326 2018-04-25 Richard Biener <rguenther@suse.de>
14328 * lto-streamer.h (LTO_major_version): Bump to 8.
14330 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14332 * BASE-VER: Set to 9.0.0.
14334 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14336 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14337 in __abskf2 and __powikf2.
14339 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14342 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14343 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14344 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14345 Use the above on operand 2. Reindent.
14346 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14348 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14351 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14353 * config/i386/i386.opt (mcet): Removed.
14354 * doc/install.texi: Remove -mcet documentation.
14355 * doc/invoke.texi: Likewise.
14357 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14360 * doc/install.texi: Remove -mcet from bootstrap-cet.
14362 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14365 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14366 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14370 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14371 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14372 containing a CONST_VECTOR.
14374 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14376 * doc/install.texi: Update newlib dependency for nvptx.
14378 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14381 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14382 instead of INTVAL when shifting x left.
14384 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14386 PR tree-optimization/85478
14387 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14388 vect_grouped_store_supported for single element vectors.
14390 2018-04-24 Richard Biener <rguenther@suse.de>
14393 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14394 load cost increase to the case of non-constant step.
14396 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14399 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14400 destination if any_malformed_asm.
14402 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14404 PR middle-end/85496
14405 * expr.c (store_field): In the bitfield case, if the value comes from
14406 a function call and is returned in registers by means of a PARALLEL,
14407 do not change the mode of the temporary unless BLKmode and VOIDmode.
14409 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14411 PR rtl-optimization/85423
14412 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14413 dependencies to debug insns when the previous insn is non-debug.
14415 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14417 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14418 enums into a single definition.
14419 (fls): Fix predicates and printing.
14422 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14424 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14425 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14426 and short u6 immediate.
14427 (check_if_valid_sleep_operand): Remove.
14428 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14430 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14432 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14433 flag_always_save_lp condition.
14434 * config/nds32/nds32.opt (malways-save-lp): New option.
14436 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14438 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14439 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14440 * config/nds32/nds32.h
14441 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14442 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14444 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14446 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14447 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14449 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14450 Chung-Ju Wu <jasonwucj@gmail.com>
14452 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14454 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14455 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14457 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14459 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14461 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14463 * config/nds32/nds32-protos.h (nds32_data_alignment,
14464 nds32_local_alignment): Declare.
14465 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14466 nds32_local_alignment): New functions.
14467 (TARGET_CONSTANT_ALIGNMENT): Define.
14468 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14470 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14472 * config/nds32/nds32.c
14473 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14474 (TARGET_MODES_TIEABLE_P): Likewise.
14476 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14478 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14479 level Ofast and Og.
14481 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14482 Chung-Ju Wu <jasonwucj@gmail.com>
14484 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14485 for unaligned access.
14486 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14488 * config/nds32/nds32-intrinsic.md: Likewise.
14489 * config/nds32/nds32_intrinsic.h: Likewise.
14490 * config/nds32/nds32.h (nds32_builtins): Likewise.
14491 * config/nds32/nds32.opt (munaligned-access): New option.
14492 * config/nds32/nds32.c (nds32_asm_file_start): Display
14493 flag_unaligned_access status.
14495 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14497 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14498 -mno-relax is present.
14499 * config/riscv/linux.h (LINK_SPEC): Ditto.
14501 2018-04-20 Martin Sebor <msebor@redhat.com>
14504 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14506 (gimple_fold_builtin_stxcpy_chk): Same.
14507 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14509 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14512 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14513 __powikf2 when long double is IEEE 128-bit.
14515 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14517 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14518 step to make sure stack always aligned.
14520 2018-04-20 Carl Love <cel@us.ibm.com>
14523 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14524 size check for arg0.
14526 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14527 Tom de Vries <tom@codesourcery.com>
14530 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14531 Emit insns for calls too.
14532 (nvptx_find_par): Always look for worker-level predecessor insn.
14533 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14535 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14536 (nvptx_process_pars): Propagate frames for calls.
14538 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14541 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14543 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14544 (ix86_handle_option): Don't handle OPT_mibt.
14545 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14547 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14549 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14550 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14551 (ix86_target_macros): Define __CET__ with flag_cf_protection
14552 for -fcf-protection.
14553 * config/i386/i386.c (isa2_opts): Remove -mibt.
14554 * config/i386/i386.h (TARGET_IBT): Removed.
14555 (TARGET_IBT_P): Likewise.
14556 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14557 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14558 * config/i386/i386.opt (mcet): Update help message.
14559 (mshstk): Likewise.
14561 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14562 -mcet as an alias for -mshstk.
14564 2018-04-20 Richard Biener <rguenther@suse.de>
14566 PR middle-end/85475
14567 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14568 complexity by forcing a single use of the multiply operand.
14570 2018-04-20 Martin Jambor <mjambor@suse.cz>
14573 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14574 recursion dependency to only apply to non-clones.
14576 2018-04-20 Martin Jambor <mjambor@suse.cz>
14579 * ipa-cp.c (create_specialized_node): Check that clones of
14580 self-recursive edges exist during IPA-CP.
14582 2018-04-19 Toon Moene <toon@moene.org>
14584 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14587 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14589 PR tree-optimization/85467
14590 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14591 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14592 VECTOR_CST element to type.
14594 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14597 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14598 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14599 (builtin_longjmp): Likewise.
14600 (save_stack_nonlocal): New pattern.
14601 (restore_stack_nonlocal): Likewise.
14603 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14606 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14607 Replace ASM_OUTPUT_LABEL with fprintf.
14609 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14612 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14613 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14614 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14615 define __IBT__ and __SHSTK__ for -fcf-protection.
14616 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14618 (ix86_trampoline_init): Likewise.
14619 (x86_output_mi_thunk): Likewise.
14620 (ix86_notrack_prefixed_insn_p): Likewise.
14621 (ix86_option_override_internal): Don't disallow -fcf-protection.
14622 * config/i386/i386.md (rdssp<mode>): Also enable for
14624 (incssp<mode>): Likewise.
14625 (nop_endbr): Likewise.
14626 * config/i386/i386.opt (mcet): Change help message to built-in
14629 (mshstk): Likewise.
14630 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14631 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14632 enable CET built-in functions.
14634 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14636 * common/config/i386/i386-common.c
14637 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14638 OPTION_MASK_ISA_MOVDIRI_UNSET,
14639 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14640 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14641 * config.gcc (movdirintrin.h): New header.
14642 * config/i386/cpuid.h (bit_MOVDIRI,
14643 bit_MOVDIR64B): New bits.
14644 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14646 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14647 (VOID, PVOID, PCVOID)): New function types.
14648 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14649 __builtin_ia32_directstoreu_u64,
14650 __builtin_ia32_movdir64b): New builtins.
14651 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14652 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14654 (ix86_valid_target_attribute_inner_p): Ditto.
14655 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14656 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14657 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14658 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14659 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14660 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14661 (movdiri<mode>, movdir64b_<mode>): New.
14662 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14663 * config/i386/immintrin.h: Include movdirintrin.h.
14664 * config/i386/movdirintrin.h: New file.
14665 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14667 2018-04-19 Richard Biener <rguenther@suse.de>
14669 PR middle-end/85455
14670 * cfg.c (clear_bb_flags): When loop state says we have
14671 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14673 2018-04-19 Richard Biener <rguenther@suse.de>
14675 PR tree-optimization/84737
14676 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14677 copying restrict info.
14678 (vect_setup_realignment): Use it.
14679 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14680 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14681 the first DR to all generated stores.
14682 (vectorizable_load): Likewise for loads.
14684 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14686 PR tree-optimization/85446
14687 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14688 the integral and pointer types to have the same precision.
14690 * doc/install.texi: Document --disable-cet being the default and
14693 2018-04-18 Martin Liska <mliska@suse.cz>
14695 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14698 2018-04-18 Martin Liska <mliska@suse.cz>
14701 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14704 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14705 arguments if they are comparable.
14707 2018-04-18 Martin Liska <mliska@suse.cz>
14710 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14713 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14716 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14719 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14720 ENDBR after calling __morestack.
14722 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14725 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14726 by using gcc_base_ver to generate a gcc_driver_version, and use
14727 it when generating GCC_DRIVER_NAME.
14728 * configure: Regenerate.
14730 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14733 * config.gcc: Obsolete powerpc*-*-*spe*.
14735 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14738 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14739 (stabstr_D): Change type of unum from unsigned int to
14740 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14743 2018-04-17 Jim Wilson <jimw@sifive.com>
14746 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14747 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14748 Set arg_pointer_offset after using pretend_args_size.
14750 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14752 PR rtl-optimization/85431
14753 * dse.c (record_store): Ignore zero width stores.
14756 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14757 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14758 __builtin_stack_restore rather than after it.
14759 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14760 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14761 argument instead of virtual_dynamic_stack_rtx.
14763 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14765 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14767 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14768 Add note to error message to explain internal mapping of overloaded
14769 built-in function name to non-overloaded built-in function name.
14770 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14773 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14776 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14777 where the inputs overlap with the output.
14779 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14781 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14782 (=v, v) alternative and explicit "memory" attribute.
14783 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14784 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14786 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14787 "sselog1" type instead of "sselog".
14788 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14789 "sselog". Remove explicit "memory" attribute.
14790 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14791 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14793 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14794 "sselog1" type instead of "sselog". Remove explicit "memory"
14796 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14797 use "sselog1" type instead of "sselog". Remove explicit "memory"
14799 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14800 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14802 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14803 "sselog1" type instead of "sselog". Remove explicit "memory"
14805 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14806 use "sselog1" type instead of "sselog". Remove explicit "memory"
14810 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14812 PR middle-end/85414
14813 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14816 2018-04-17 Martin Jambor <mjambor@suse.cz>
14819 * ipa-cp.c (create_specialized_node): Call
14820 expand_all_artificial_thunks if necessary.
14822 2018-04-17 Martin Liska <mliska@suse.cz>
14825 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14826 in message, remote space in between '_G' and '('.
14828 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14831 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14832 avx512f_vmcmp<mode>3<round_saeonly_name>,
14833 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14834 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14835 avx512f_rndscale<mode><round_saeonly_name>,
14836 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14837 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14838 Use %<iptr>2 instead of %2 for -masm=intel.
14839 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14840 avx512f_vcvttss2usi<round_saeonly_name>,
14841 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14843 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14844 avx512f_vcvttsd2usi<round_saeonly_name>,
14845 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14846 Use %q1 instead of %1 for -masm=intel.
14847 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14848 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14849 of %3 for -masm=intel.
14850 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14852 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14854 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14856 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14857 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14859 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14861 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14862 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14863 %g1 and one with %0 and %1.
14864 (avx512er_vmrcp28<mode><round_saeonly_name>,
14865 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14866 %1 for -masm=intel.
14867 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14868 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14869 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14870 of %0 and %{%4%} for -masm=intel.
14871 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14872 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14873 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14874 order of %0 and %{%5%}%{z%} for -masm=intel.
14876 2018-04-17 Jan Hubicka <jh@suse.cz>
14879 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14881 2018-04-17 Martin Liska <mliska@suse.cz>
14884 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14885 for target_clone error message. Make default implementation
14886 clone to be a local declaration.
14887 (separate_attrs): Add new argument and check for an empty
14889 (expand_target_clones): Handle it.
14890 (ipa_target_clone): Make redirection just for target_clones
14893 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14894 Tom de Vries <tom@codesourcery.com>
14896 PR middle-end/84955
14897 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14898 tiled basic blocks without omp continue statements.
14900 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14903 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14904 vec_extract expression as having side effects to make sure it gets
14907 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14910 * config/i386/i386.c (get_builtin_code_for_version): Check
14913 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14916 * config.gcc: Support "skylake".
14917 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14919 * config/i386/i386.c (m_SKYLAKE): Define.
14920 (processor_target_table): Add "skylake".
14921 (ix86_option_override_internal): Add "skylake".
14922 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14923 PROCESSOR_CANNONLAKE.
14924 (get_builtin_code_for_version): Fix priority for
14925 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14926 PROCESSOR_SKYLAKE-AVX512.
14927 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14928 (processor_type): Add PROCESSOR_SKYLAKE.
14930 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14931 Jason Merrill <jason@redhat.com>
14934 * convert.c (convert_to_integer_1): Use direct recursion for
14935 enumeral types and types with a precision less than the number
14936 of bits in their mode.
14938 2018-04-16 Julia Koval <julia.koval@intel.com>
14941 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14942 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14944 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14947 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14948 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14949 and -mno-direct-move.
14951 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14954 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14955 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14956 Ensure negative shifts result in {0}.
14958 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14960 PR rtl-optimization/79916
14961 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14962 regs (if any) to define how to gnerate SD moves when LRA is in
14965 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14967 PR rtl-optimization/85393
14968 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14969 * except.c (expand_dw2_landing_pad_for_region): Make static.
14970 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14971 a label and unconditional jump to old_bb, rather than
14972 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14975 PR rtl-optimization/85376
14976 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14977 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14978 instead of a specific value.
14980 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14981 Bin Cheng <bin.cheng@arm.com>
14983 PR tree-optimization/82965
14984 PR tree-optimization/83991
14985 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14986 by_profile_only parameter.
14987 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14988 information if the loop was predicted to iterate too many times.
14989 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14991 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14994 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14997 2018-04-13 Martin Liska <mliska@suse.cz>
14998 Jakub Jelinek <jakub@redhat.com>
15000 PR middle-end/81657
15001 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15002 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15003 * builtins.c (expand_builtin_memory_copy_args): Use
15004 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15005 handle dest_addr == pc_rtx.
15007 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
15010 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15011 asked to not generate direct moves.
15012 (fix_trunc<mode>si2_stfiwx): Similar.
15013 (fix_trunc<mode>si2_internal): Similar.
15015 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15018 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15019 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15020 lookup if dest in some wider mode is known to be const0_rtx and
15021 if so, record permanent equivalence for it to be ZERO_EXTEND of
15022 the narrower mode destination.
15024 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15026 * lto-streamer-out.c (output_function): Revert 259346.
15027 * omp-expand.c (expand_oacc_for): Likewise.
15029 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
15031 PR rtl-optimization/85354
15032 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15033 * sel-sched.c (sel_global_init): ... here.
15035 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
15038 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15039 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15040 mode for PE-COFF targets.
15041 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15042 (i386_pe_asm_lto_end): Likewise.
15043 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15044 (TARGET_ASM_LTO_END): Likewise.
15045 * config/i386/winnt.c (saved_debug_info_level): New static variable.
15046 (i386_pe_asm_lto_start): New function.
15047 (i386_pe_asm_lto_end): Likewise.
15049 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15050 Richard Biener <rguenther@suse.de>
15052 PR middle-end/84955
15053 * lto-streamer-out.c (output_function): Fix CFG loop state before
15055 * omp-expand.c (expand_oacc_for): Handle calls to internal
15056 functions like regular functions.
15058 2018-04-12 Richard Biener <rguenther@suse.de>
15061 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15062 for the early LTO debug to properly generate references to it
15063 during DIE emission. Do not re-use that for the skeleton for
15065 (dwarf2out_early_finish): Likewise.
15067 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15070 * config/i386/sse.md
15071 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15072 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15073 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15074 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15075 and output is a reg, avoid creating invalid lowpart subreg, but
15076 instead split into a 512-bit move. Don't split if not AVX512VL,
15077 input is xmm16+ reg and output is a mem.
15078 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15079 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15080 xmm16+ reg and output is a mem.
15082 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15084 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15085 also for flag_dwarf2_cfi_asm.
15087 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15089 PR rtl-optimization/85342
15090 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15091 a bool scalar var inside of the loop instead. Don't try to update
15092 recog_data.operand after failed apply_change_group.
15094 2018-04-12 Tom de Vries <tom@codesourcery.com>
15097 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15098 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
15099 array with flexible array member as array without given dimension.
15100 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15101 argument for undefined param to true.
15103 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
15106 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15107 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15108 from PowerPC section.
15109 * config/rs6000/sysv4.opt (mcall-): Improve help text.
15110 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15111 help text that is too long.
15112 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15113 help text that is too long.
15114 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15115 help text that is too long.
15117 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
15119 * config/alpha/alpha.md (stack_probe_internal): Rename
15120 from "probe_stack". Update all callers.
15122 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15124 PR rtl-optimization/84566
15125 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15126 sched_macro_fuse_insns.
15128 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15131 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15132 (compute_block_dependences): ... from here.
15134 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15136 PR tree-optimization/85331
15137 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15138 from int to HOST_WIDE_INT.
15140 2018-04-11 Martin Jambor <mjambor@suse.cz>
15143 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15144 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15145 not the same as the source val.
15146 (cgraph_edge_brings_value_p): New parameter.
15147 (gather_edges_for_value): Pass destination value to
15148 cgraph_edge_brings_value_p.
15149 (perhaps_add_new_callers): Likewise.
15150 (get_info_about_necessary_edges): Likewise and exclude values brought
15151 only by self-recursive edges.
15152 (create_specialized_node): Redirect only clones of self-calling edges.
15153 (+self_recursive_pass_through_p): New function.
15154 (find_more_scalar_values_for_callers_subset): Use it.
15155 (find_aggregate_values_for_callers_subset): Likewise.
15156 (known_aggs_to_agg_replacement_list): Removed.
15157 (decide_whether_version_node): Re-calculate known constants for all
15158 remaining context clones.
15160 2018-04-11 Richard Biener <rguenther@suse.de>
15163 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15164 from early DWARF output.
15165 (dwarf2out_early_finish): Output line info unconditionally into
15166 early DWARF and add reference to it.
15168 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15171 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15172 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15173 other than V2DFmode using iptr mode attribute.
15174 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15176 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15178 PR rtl-optimization/84659
15179 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15181 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15184 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15186 (output_loc_list): Pass address of a dummy size variable even in the
15187 locview handling loop.
15188 (index_location_lists): Add comment on why skip_loc_list_entry can't
15191 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
15194 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15197 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
15200 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15201 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15202 and -mstring-compare-inline-limit.
15204 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15207 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15208 for stack clash protection in a register whenever we need it to be in
15211 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15213 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15214 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15216 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15219 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15221 (mlong-double-): Ditto.
15222 * config/rs6000/sysv4.opt (msdata=): Ditto.
15223 (mtls-size=): Ditto.
15225 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15227 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15228 erroneous entries for
15229 "vector int vec_ldl (int, long int *)", and
15230 "vector unsigned int vec_ldl (int, unsigned long int *)".
15231 Add comments and entries for
15232 "vector bool char vec_ldl (int, bool char *)",
15233 "vector bool short vec_ldl (int, bool short *)",
15234 "vector bool int vec_ldl (int, bool int *)",
15235 "vector bool long long vec_ldl (int, bool long long *)",
15236 "vector pixel vec_ldl (int, pixel *)",
15237 "vector long long vec_ldl (int, long long *)",
15238 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15239 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15240 type tree bool_long_long_type_node and correct definition of
15241 bool_V2DI_type_node to make reference to this new type tree.
15242 (rs6000_mangle_type): Replace erroneous reference to
15243 bool_long_type_node with bool_long_long_type_node.
15244 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15245 comments to emphasize sign distinctions for char and int types and
15246 replace RS6000_BTI_bool_long constant with
15247 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15248 use of RS6000_BTI_pixel.
15249 (bool_long_type_node): Remove this macro definition.
15250 (bool_long_long_type_node): New macro definition
15252 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15254 PR rtl-optimization/85300
15255 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15256 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15257 simplify_unary_operation fails.
15259 2018-04-10 Martin Liska <mliska@suse.cz>
15261 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15262 cgraph_edge and ipa_ref.
15264 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15268 * config/i386/sse.md
15269 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15270 computation of the VEC_MERGE selector from mask.
15271 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15272 Fix decoding of the VEC_MERGE selector into mask.
15274 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15276 PR tree-optimization/85286
15277 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15279 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15281 * final.c (final_1): Set insn_last_address as well as
15282 insn_current_address.
15284 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15287 * explow.c (emit_stack_probe): Call validize_mem on memory location
15288 before passing it to gen_probe_stack. Create address operand and
15289 legitimize it for the probe_stack_address case.
15291 2018-04-09 Jan Hubicka <jh@suse.cz>
15294 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15295 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15296 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15298 (free_lang_data): Rebuild type inheritance graph.
15300 2018-04-09 Martin Sebor <msebor@redhat.com>
15302 * invoke.texi (-finline-small-functions): Mention other optimization
15304 (-findirect-inlining, -fpartial-inlining): Same.
15305 (-finline-functions-called-once): Same.
15306 (-freorder-blocks-and-partition): Same.
15308 2018-04-09 Jan Hubicka <jh@suse.cz>
15311 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15312 jumps; choose last target that matches the criteria (i.e.
15313 no partition changes for non-crossing jumps).
15314 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15315 support for redirecting crossing jumps to non-crossing.
15317 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15319 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15320 also for naked functions.
15322 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15324 * config/arc/arc.md (add_shift): New pattern.
15325 (add_shift2): Likewise.
15326 (sub_shift): Likewise.
15327 (sub_shift_cmp0_noout): Likewise.
15328 (compare_si_ashiftsi): Likewise.
15329 (xbfu_cmp0_noout): New combine pattern.
15330 (xbfu_cmp0"): Likewise.
15331 (movsi_set_cc_insn): Place the predicable variant first.
15332 (commutative_binary_cmp0_noout): Remove clobber.
15333 (commutative_binary_cmp0): New pattern.
15334 (noncommutative_binary_cmp0): Likewise.
15335 (noncommutative_binary_cmp0_noout): Likewise.
15336 (noncommutative_binary_comparison_result_used): Removed.
15337 (rsub_cmp0): New pattern.
15338 (rsub_cmp0_noout): Likewise.
15339 (extzvsi): Changed, keep only meaningful variants.
15340 (SQH, SEZ): New iterators.
15341 (SQH_postfix): New mode attribute.
15342 (SEZ_prefix): New code attribute.
15343 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15344 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15345 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15346 of numerical value.
15347 (noncommutative_operator): Check the availability of barrel
15350 2018-04-09 Richard Biener <rguenther@suse.de>
15352 PR tree-optimization/85284
15353 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15354 Only use the niter constraining form of simple_iv when the exit
15355 is always executed.
15357 2018-04-09 Tom de Vries <tom@codesourcery.com>
15360 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15361 (define_expand "*memory_barrier"): New define_expand.
15362 (define_insn "memory_barrier"): New insn.
15364 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15366 PR rtl-optimization/80463
15367 PR rtl-optimization/83972
15368 PR rtl-optimization/83480
15370 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15371 correct producer for the insn.
15372 (tidy_control_flow): Fixup seqnos in case of debug insns.
15374 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15376 PR rtl-optimization/83913
15378 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15379 different sched-times when merging exprs.
15381 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15383 PR rtl-optimization/83962
15385 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15386 tidy_fallthru_edge and tidy_control_flow.
15388 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15390 PR rtl-optimization/83530
15392 * sel-sched.c (force_next_insn): New global variable.
15393 (remove_insn_for_debug): When force_next_insn is true, also leave only
15394 next insn in the ready list.
15395 (sel_sched_region): When the region wasn't scheduled, make another pass
15396 over it with force_next_insn set to 1.
15398 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15400 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15402 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15403 for interrupt control.
15404 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15405 functions for interrupt control.
15406 * config/nds32/nds32-intrinsic.md: Likewise.
15407 * config/nds32/nds32_intrinsic.h: Likewise.
15408 * config/nds32/nds32.h (nds32_builtins): Likewise.
15410 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15412 * config/nds32/nds32.c (nds32_init_machine_status,
15413 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15414 strict_aligned_p field.
15415 (nds32_expand_to_rtl_hook): New function.
15416 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15417 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15419 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15420 Chung-Ju Wu <jasonwucj@gmail.com>
15422 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15423 * config/nds32/nds32-n7.md: New file.
15424 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15425 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15427 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15428 * config/nds32/nds32.md (pipeline_model): Add n7.
15429 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15430 * config/nds32/pipelines.md: Include n7 settings.
15432 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15433 Chung-Ju Wu <jasonwucj@gmail.com>
15435 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15436 * config/nds32/nds32-e8.md: New file.
15437 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15438 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15440 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15441 * config/nds32/nds32.md (pipeline_model): Add e8.
15442 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15443 * config/nds32/pipelines.md: Include e8 settings.
15445 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15446 Chung-Ju Wu <jasonwucj@gmail.com>
15448 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15449 * config/nds32/nds32-n8.md: New file.
15450 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15451 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15453 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15454 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15455 * config/nds32/nds32.md (pipeline_model): Add n8.
15456 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15457 * config/nds32/pipelines.md: Include n8 settings.
15459 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15460 Chung-Ju Wu <jasonwucj@gmail.com>
15462 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15463 * config/nds32/nds32-n9-2r1w.md: New file.
15464 * config/nds32/nds32-n9-3r2w.md: New file.
15465 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15466 nds32_register_ports): New or modify for cpu n9.
15467 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15469 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15470 * config/nds32/nds32-utils.c: New file.
15471 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15472 TARGET_MUL_SLOW): Define.
15473 * config/nds32/nds32.md (pipeline_model): New attribute.
15474 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15475 New options that support cpu n9.
15476 * config/nds32/pipelines.md: Include n9 settings.
15477 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15479 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15481 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15482 information if necessary.
15483 (output_cond_branch_compare_zero): Likewise.
15484 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15485 (nds32_target_alignment): Refine for alignment.
15486 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15487 (FUNCTION_BOUNDARY): Modify.
15488 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15490 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15492 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15494 * config/nds32/constants.md (unspec_volatile_element): Add values for
15495 TLB operation and data prefetch.
15496 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15497 functions for TLB operation and data prefetch.
15498 * config/nds32/nds32-intrinsic.md: Likewise.
15499 * config/nds32/nds32_intrinsic.h: Likewise.
15500 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15501 (nds32_print_operand): Likewise.
15502 * config/nds32/nds32.h (nds32_builtins): Likewise.
15504 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15505 Andrew Pinski <pinsika@gcc.gnu.org>
15507 PR middle-end/82976
15508 * match.pd: Use constant_boolean_node of correct type instead of
15509 boolean_true_node or boolean_false_node for simplifying
15510 pointer comparisons to zero.
15512 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15514 PR tree-optimization/80021
15515 * tree.c (verify_type_variant): Make error call in verify_variant_match
15516 translatable and remove final full stop.
15518 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15520 * config/nds32/constants.md (unspec_volatile_element): Add
15521 UNSPEC_VOLATILE_EH_RETURN.
15522 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15523 nds32_output_stack_pop): Support dwarf exception handling process.
15524 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15525 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15526 exception handling process.
15527 (nds32_compute_stack_frame): Likewise.
15528 (nds32_return_addr_rtx): Likewise.
15529 (nds32_initial_elimination_offset): Likewise.
15530 (nds32_expand_prologue): Likewise.
15531 (nds32_expand_epilogue): Likewise.
15532 (nds32_dynamic_chain_address): New function.
15533 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15534 exception handling.
15535 (DYNAMIC_CHAIN_ADDRESS): Define.
15536 (EH_RETURN_DATA_REGNO): Define.
15537 (EH_RETURN_STACKADJ_RTX): Define.
15538 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15539 patterns for dwarf exception handling.
15541 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15543 * config/nds32/nds32.h: Clean up obsolete macros.
15545 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15547 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15548 Add enum values for particular instructions.
15549 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15550 particular intrinsic functions.
15551 * config/nds32/nds32-intrinsic.md: Likewise.
15552 * config/nds32/nds32_intrinsic.h: Likewise.
15553 * config/nds32/nds32.h (nds32_builtins): Likewise.
15554 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15555 (btst, ave): New patterns for particular instructions.
15557 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15559 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15560 Add enum values for atomic load/store and memory sync.
15561 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15563 * config/nds32/nds32-intrinsic.md: Likewise.
15564 * config/nds32/nds32_intrinsic.h: Likewise.
15565 * config/nds32/nds32.h (nds32_builtins): Likewise.
15567 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15569 PR tree-optimization/85257
15570 * fold-const.c (native_encode_vector): If not all elts could fit
15571 and off is -1, return 0 rather than offset.
15572 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15573 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15574 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15575 adjust buffer in native_interpret_expr call.
15577 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15579 * config/nds32/constants.md (unspec_volatile_element): Add cache
15580 control enum values.
15581 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15582 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15583 * config/nds32/nds32.c (nds32_cctl_names): New.
15584 (nds32_print_operand): Handle cache control register names.
15585 * config/nds32/nds32.h (nds32_builtins): New enum values.
15586 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15588 * config/nds32/nds32.md (type): Add mmu.
15589 * config/nds32/pipelines.md (simple_insn): Add mmu.
15591 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15593 * config/nds32/nds32.md (type): Remove call.
15594 * config/nds32/pipelines.md (simple_insn): Likewise.
15596 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15598 * config/nds32/constants.md (unspec_volatile_element): Add
15599 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15600 UNSPEC_VOLATILE_FMFCFG.
15601 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15602 description for fmfcfg and fmfcsr.
15603 (bdesc_1arg): Add fmtcsr.
15604 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15605 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15606 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15607 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15608 unspec_fmfcfg): New patterns.
15609 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15610 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15611 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15612 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15613 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15614 __nds32__fmfcfg): Define.
15616 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15618 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15619 intrinsic register names.
15620 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15621 intrinsic register enum values and macros.
15623 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15625 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15626 for load/store addressing form.
15627 (nds32_print_operand_address): Likewise.
15629 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15632 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15633 based on LABEL_REF. Remove useless assertion.
15634 (pic_address_needs_scratch): Fix formatting.
15635 (sparc_legitimize_pic_address): Minor tweaks.
15636 (sparc_delegitimize_address): Adjust assertion accordingly.
15637 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15638 into symbolic_operand.
15639 (movsi_high_pic_label_ref): Likewise.
15640 (movsi_lo_sum_pic_label_ref): Likewise.
15641 (movdi_pic_label_ref): Likewise.
15642 (movdi_high_pic_label_ref): Likewise.
15643 (movdi_lo_sum_pic_label_ref): Likewise.
15645 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15647 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15648 custom LIB_SPEC setup.
15650 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15651 Kito Cheng <kito.cheng@gmail.com>
15653 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15654 * config/riscv/freebsd.h: New.
15656 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15658 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15659 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15662 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15663 Kito Cheng <kito.cheng@gmail.com>
15665 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15666 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15667 * config/nds32/nds32-protos.h (nds32_output_call,
15668 nds32_output_return): Declare.
15669 * config/nds32/nds32.md: Refine all the call and return patterns.
15671 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15674 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15675 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15677 PR rtl-optimization/84872
15678 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15679 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15680 EDGE_CROSSING edge.
15682 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15684 * expr.c (copy_blkmode_to_reg): Revert 254862.
15685 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15687 2018-04-06 Richard Biener <rguenther@suse.de>
15689 PR middle-end/85244
15690 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15691 after seeing a component reference with an adjacent field. Treat
15692 refs to arrays at struct end of external decls similar to
15693 refs to unconstrained commons.
15695 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15698 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15699 look through SAVE_EXPRs with non-side-effects argument. Adjust
15701 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15704 2018-04-06 Richard Biener <rguenther@suse.de>
15706 PR middle-end/85180
15707 * alias.c (find_base_term): New wrapper around find_base_term
15708 unwinding CSELIB_VAL_PTR changes.
15709 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15712 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15714 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15716 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15717 constant definitions.
15718 ("nop"): lr 0,0 -> nopr r0
15719 ("nop_lr0", "nop_lr1"): New insn definitions.
15721 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15723 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15724 NDS32_V3PUSH_AVAILABLE_P macro.
15726 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15727 Chung-Ju Wu <jasonwucj@gmail.com>
15729 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15730 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15731 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15732 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15733 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15734 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15735 * config/nds32/constraints.md: New constraints and checking for hard
15736 float configuration.
15737 * config/nds32/iterators.md: New mode iterator and attribute for hard
15738 float configuration.
15739 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15741 * config/nds32/nds32-fpu.md: New file.
15742 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15743 deal with hard float code generation.
15744 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15746 (abi_type, float_reg_number): New enum type.
15747 * config/nds32/nds32-predicates.c: New predicates for hard float.
15748 * config/nds32/nds32-protos.h: Declare functions for hard float.
15749 * config/nds32/nds32.c: Implementation for hard float configuration.
15750 * config/nds32/nds32.h: Definitions for hard float configuration.
15751 * config/nds32/nds32.md: Include hard float machine description and
15752 modify patterns for hard float configuration.
15753 * config/nds32/nds32.opt: New options for hard float configuration.
15754 * config/nds32/predicates.md: New predicates for hard float
15757 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15759 * common/config/nds32/nds32-common.c
15760 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15762 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15764 PR middle-end/85195
15765 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15766 CONSTRUCTOR_ELT (ctor, ...)->value.
15768 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15771 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15773 2018-04-05 Tom de Vries <tom@codesourcery.com>
15776 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15779 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15780 Kito Cheng <kito.cheng@gmail.com>
15782 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15783 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15784 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15785 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15787 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15788 Kito Cheng <kito.cheng@gmail.com>
15790 * config/nds32/constraints.md (Ufe): New memory constraint.
15791 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15792 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15793 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15795 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15796 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15798 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15800 * config/nds32/nds32.md: Use optimize_size in the condition for
15801 alu-shift instructions.
15803 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15805 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15807 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15809 * config/nds32/nds32.md (negsi2): Refine pattern.
15811 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15812 Chung-Ju Wu <jasonwucj@gmail.com>
15814 * config/nds32/iterators.md (shift_rotate): New code iterator.
15815 (shift): New code attribute.
15816 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15817 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15818 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15819 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15820 bit-wise operations.
15821 (andsi3, *andsi3): Ditto.
15822 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15823 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15824 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15825 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15826 nds32_ior_operand, nds32_xor_operand): New predicates.
15828 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15830 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15831 (addsi3, subsi3): ... this.
15833 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15835 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15837 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15839 * config/nds32/nds32.md: Adjust indention.
15841 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15843 * config/nds32/nds32.md (feature): New attribute.
15845 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15847 * config/nds32/nds32.md (subtype): New attribute.
15849 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15852 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15853 expansion to perform a bitwise AND of the argument followed by a
15854 boolean negation of the result.
15856 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15858 PR rtl-optimization/84878
15859 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15860 the basic block. Assert the use reference is not artificial and that
15861 it has an associated insn.
15863 2018-04-04 Michael Matz <matz@suse.de>
15865 * builtins.c (compute_objsize): Pass correct operand
15866 to array_at_struct_end_p.
15868 2018-04-04 Richard Biener <rguenther@suse.de>
15871 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15872 from contexts for DINFO_LEVEL_TERSE and below.
15874 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15876 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15877 resiter_operand condition.
15878 * config/nds32/nds32.md (*move<mode>): Ditto.
15880 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15881 Monk Chiang <sh.chiang04@gmail.com>
15883 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15885 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15887 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15889 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15890 Kito Cheng <kito.cheng@gmail.com>
15892 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15893 nds32_cond_code_str, output_cond_branch,
15894 output_cond_branch_compare_zero, nds32_expand_cbranch,
15895 nds32_expand_cstore, nds32_expand_movcc,
15896 nds32_output_cbranchsi4_equality_zero,
15897 nds32_output_cbranchsi4_equality_reg,
15898 nds32_output_cbranchsi4_equality_reg_or_const_int,
15899 nds32_output_cbranchsi4_greater_less_zero: New functions.
15900 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15901 nds32_expand_cstore, nds32_expand_movcc,
15902 nds32_output_cbranchsi4_equality_zero,
15903 nds32_output_cbranchsi4_equality_reg,
15904 nds32_output_cbranchsi4_equality_reg_or_const_int,
15905 nds32_output_cbranchsi4_greater_less_zero): Declare.
15906 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15907 nds32_rimm11s_operand): New predicates.
15908 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15909 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15912 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15914 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15915 * config/nds32/nds32.md: Ditto.
15916 * config/nds32/pipelines.md: Ditto.
15918 2018-04-04 Richard Biener <rguenther@suse.de>
15920 PR tree-optimization/85168
15921 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15922 propagating abnormals.
15924 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15926 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15928 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15929 Kito Cheng <kito.cheng@gmail.com>
15931 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15932 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15933 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15934 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15935 * config/nds32/nds32.md (sibcall_internal): New.
15936 (sibcall_register): Remove.
15937 (sibcall_immediate): Remove.
15938 (sibcall_value_internal): New.
15939 (sibcall_value_register): Remove.
15940 (sibcall_value_immediate): Remove.
15941 * config/nds32/predicates.md (nds32_general_register_operand): New.
15942 (nds32_call_address_operand): New.
15944 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15946 PR rtl-optimization/85167
15947 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15948 bb_defs if *split_p, instead preinitialize it to NULL.
15950 PR tree-optimization/85156
15951 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15952 evaluating the argument multiple times.
15954 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15956 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15958 (_mm_cvtpd_ps): Likewise.
15959 (_mm_cvttpd_epi32): Likewise.
15960 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15961 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15962 vector, pixel, and bool following altivec.h include.
15964 2018-04-03 Martin Sebor <msebor@redhat.com>
15966 * doc/extend.texi (Common Function Attributes): Clarify.
15967 (const attribute): Likewise.
15968 (pure attribute): Likewise.
15970 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15973 * config/i386/i386.c (ix86_expand_vector_set): Use
15974 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15976 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15978 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15979 instructions when changing rounding bits to preserve precision bits
15980 in the x87 control word.
15982 2018-04-03 Martin Liska <mliska@suse.cz>
15984 PR tree-optimization/82491
15985 * rtl.h (strip_offset_and_add): Replace += suboffset with
15986 poly_uint64 () + suboffset.
15988 2018-03-29 Martin Liska <mliska@suse.cz>
15989 Martin Jambor <mjambor@suse.cz>
15992 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15993 param_type is not an integral or pointer type.
15995 2018-04-03 Richard Biener <rguenther@suse.de>
15997 * sese.h (recompute_all_dominators): Remove.
15999 2018-04-02 Martin Sebor <msebor@redhat.com>
16001 * doc/invoke.texi (-Wrestrict): Fix typos.
16003 2018-04-02 Jim Wilson <jimw@sifive.com>
16005 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16006 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16007 (<optab>di3, <optab>si3_extend): Likewise.
16008 (<optab>si3_mask, <optab>si3_mask_1): New.
16009 (<optab>di3_mask, <optab>di3_mask_1): New.
16010 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16011 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16012 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16014 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
16016 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16019 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
16021 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16022 (nds32_canonicalize_comparison): New function.
16024 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16025 Kito Cheng <kito.cheng@gmail.com>
16026 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16028 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16029 * config/nds32/constants.md (unspec_volatile_element): Add
16030 UNSPEC_VOLATILE_RELAX_GROUP.
16031 * config/nds32/nds32-relax-opt.c: New file.
16032 * config/nds32/nds32-predicates.c
16033 (nds32_symbol_load_store_p): New function.
16034 * config/nds32/nds32-protos.h
16035 (nds32_symbol_load_store_p): Declare function.
16036 (make_pass_nds32_relax_opt): Declare new rtl pass function.
16037 * config/nds32/nds32.c
16038 (nds32_register_pass): New function to register pass.
16039 (nds32_register_passes): New function to register passes.
16040 * config/nds32/nds32.md (relax_group): New pattern.
16041 * config/nds32/nds32.opt (mrelax-hint): New option.
16042 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16044 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
16046 * config/nds32/t-nds32: Modify files dependency.
16048 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16050 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16051 (PROFILE_HOOK): Define its implementation.
16053 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16055 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16056 type and 32-bit size.
16058 2018-04-01 Jakub Jelinek <jakub@redhat.com>
16060 PR middle-end/85090
16061 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16062 (V_128_256): New mode iterator.
16063 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16064 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16065 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16067 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16068 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16070 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
16073 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16074 NaN inputs correctly.
16076 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
16079 * config/rs6000/vsx.md (??r): New mode attribute.
16080 (*vsx_mov<mode>_64bit): Use it.
16081 (*vsx_mov<mode>_32bit): Likewise.
16083 2018-03-30 Martin Sebor <msebor@redhat.com>
16085 PR tree-optimization/84818
16086 * builtins.c (check_access): Use warning_n.
16088 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16091 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16093 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16096 2018-03-30 Julia Koval <julia.koval@intel.com>
16099 * x86-tune.def (movx, partial_reg_dependency): Enable for
16102 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
16104 PR inline-asm/84985
16105 * lra-constraints.c (process_alt_operands): Move setting
16106 this_alternative_matches below.
16108 2018-03-29 Martin Liska <mliska@suse.cz>
16111 * doc/invoke.texi: Document how LTO works with debug info.
16112 Describe auto-load support of binutils. Mention 'x86-64'
16113 as valid option value of -march option.
16115 2018-03-29 Jakub Jelinek <jakub@redhat.com>
16117 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16120 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16121 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16122 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16125 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16128 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16129 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16130 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16131 for RS6000_BTM_POWERPC64.
16132 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16133 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16134 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16137 (DIVDEU): Likewise.
16139 2018-03-28 Carl Love <cel@us.ibm.com>
16142 2017-09-27 Carl Love <cel@us.ibm.com>
16144 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16145 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16146 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16149 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16151 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16152 instead of __vector bool.
16153 (_mm_max_pu8): Likewise.
16154 (_mm_min_pi16): Likewise.
16156 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16159 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16160 (DIVWEUO): Likewise.
16161 (DIVDEO): Likewise.
16162 (DIVDEUO): Likewise.
16163 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16164 DIVWEUO and DIVDEUO.
16165 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16166 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16167 (div_extend): Likewise.
16168 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16170 (__builtin_divweuo): Likewise.
16171 (__builtin_divdeo): Likewise.
16172 (__builtin_divdeuo): Likewise.
16174 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16177 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16178 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16180 PR tree-optimization/82004
16181 * gimple-match-head.c (optimize_pow_to_exp): New function.
16182 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16183 Don't fold to exp if optimize_pow_to_exp is false.
16185 2018-03-28 Martin Liska <mliska@suse.cz>
16188 * calls.c (initialize_argument_information): Fix trailing space.
16189 * common.opt: Fix typo and provide better explanation for
16190 -fsanitize-coverage option.
16191 * config/i386/i386.opt: Fix typo.
16193 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16194 Martin Liska <mliska@suse.cz>
16197 * gimplify.c (asan_poison_variable): Don't do the check for
16198 gimplify_omp_ctxp here.
16199 (gimplify_decl_expr): Do it here.
16200 (gimplify_target_expr): Likewise.
16202 2018-03-28 Martin Liska <mliska@suse.cz>
16205 * config/i386/i386.c (ix86_function_arg_advance): Do not call
16206 chkp_type_bounds_count if MPX is not enabled.
16208 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
16210 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16212 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
16215 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16216 function to create the function decl for complex long double
16217 multiply and divide for -mabi=ieeelongdouble.
16218 (init_float128_ieee): Call it.
16220 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16223 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16224 -fcf-protection=branch -mibt.
16225 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16227 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16230 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16231 arm_word_relocations.
16233 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16236 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16237 extern array declarations.
16239 2018-03-27 Richard Biener <rguenther@suse.de>
16241 PR middle-end/84067
16242 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16243 explicit single_use checks.
16245 2018-03-27 Richard Biener <rguenther@suse.de>
16247 PR tree-optimization/85082
16248 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16251 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16253 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16254 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16255 Turn on fasynchronous-unwind-tables and funwind-tables.
16257 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16260 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16261 (*bmi_blsr_<mode>_ccz): Ditto.
16263 2018-03-26 Tom de Vries <tom@codesourcery.com>
16265 PR tree-optimization/85063
16266 * omp-general.c (offloading_function_p): New function. Factor out
16268 * omp-offload.c (pass_omp_target_link::gate): ... here.
16269 * omp-general.h (offloading_function_p): Declare.
16270 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16271 with attribute omp declare target for offloading functions.
16273 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16275 PR tree-optimization/84005
16276 * tree-data-ref.h (get_base_for_alignment): Declare.
16277 * tree-data-ref.c (get_base_for_alignment_1): New function.
16278 (get_base_for_alignment): Likewise.
16279 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16280 get_base_for_alignment to find a suitable base object, instead
16281 of always using drb->base_address.
16283 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16285 PR inline-asm/85022
16286 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16287 known size by default.
16289 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16291 PR inline-asm/85030
16292 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16293 and non BLKmode operands.
16295 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16298 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16299 Clean up attributes.
16301 2018-03-23 Richard Biener <rguenther@suse.de>
16304 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16305 we are going to emit early debug for LTO.
16307 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16309 PR inline-asm/85034
16310 * function.c (match_asm_constraints_1): Don't optimize if input
16311 doesn't satisfy general_operand predicate for output's mode.
16313 PR inline-asm/85022
16314 * alias.c (write_dependence_p): Don't require for x_canonicalized
16315 non-VOIDmode if x has VOIDmode.
16318 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16319 just don't try to optimize it rather than assert it never happens.
16321 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16323 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16324 macro expansions for definition of ST_INTERNAL_<mode> and
16325 LD_INTERNAL_<mode> builtins.
16326 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16328 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16330 (altivec_expand_st_builtin): Likewise.
16331 (altivec_expand_builtin): Remove calls to deleted functions.
16332 (rs6000_address_for_altivec): Delete this function.
16333 * config/rs6000/vector.md: Remove expands for
16334 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16336 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16339 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16340 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16341 re-computing once computed.
16342 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16343 (arm_init_machine_status): Initialize
16344 machine->static_chain_stack_bytes.
16346 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16349 * doc/extend.texi: Add four new prototypes for vec_ld.
16350 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16351 definitions for more logical presentation.
16352 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16353 entries for V1TI variants of __builtin_altivec_ld builtin.
16354 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16355 handling of V1TI variant of LVX icode pattern.
16356 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16357 (rs6000_gimple_fold_builtin): Likewise.
16358 (altivec_init_builtins): Add code to define
16359 __builtin_altivec_lvx_v1ti function.
16361 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16363 PR inline-asm/84941
16364 * function.c (match_asm_constraints_1): Don't do the optimization
16365 if input isn't a REG, SUBREG, MEM or constant.
16367 2018-03-22 Tom de Vries <tom@codesourcery.com>
16369 PR tree-optimization/84956
16370 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16371 bb_has_abnormal_pred.
16373 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16376 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16377 DECL_INITIAL (decl) to decl at the end.
16378 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16379 adjust the comment.
16381 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16383 * doc/extend.texi (__builtin_tgmath): Document when complex
16384 integer types are treated as _Complex _Float64.
16386 2018-03-21 Tom de Vries <tom@codesourcery.com>
16388 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16390 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16392 PR tree-optimization/84960
16393 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16394 if it is ENTRY block, move them into single succ of ENTRY in that case.
16396 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16398 PR tree-optimization/84811
16399 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16400 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16401 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16402 (known_subrange_p): Update accordingly. Cast each value involved
16403 in the size comparison, rather than casting the result of the
16406 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16408 PR tree-optimization/84982
16409 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16410 by flipping the least significant bit rather than all bits from
16411 bitpos to bitpos + bitsize - 1.
16413 2018-03-21 Nathan Sidwell <nathan@acm.org>
16415 * doc/extend.texi (Deprecated Features): Remove mention of
16416 long-deleted deprecations.
16418 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16421 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16422 * configure: Regenerate.
16424 2018-03-21 Tom de Vries <tom@codesourcery.com>
16426 PR tree-optimization/83126
16427 * tree-parloops.c (num_phis): New function.
16428 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16430 2018-03-21 Nathan Sidwell <nathan@acm.org>
16432 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16433 mention anon-struct/union members and trailing attributes.
16435 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16437 PR tree-optimization/84969
16438 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16439 builtin memset partitions if they set different rhs values.
16441 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16443 PR rtl-optimization/84989
16444 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16445 VEC_DUPLICATE with scalar result mode.
16447 2018-03-21 Martin Liska <mliska@suse.cz>
16450 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16451 not intended return statement.
16453 2018-03-21 Martin Liska <mliska@suse.cz>
16456 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16457 (chkp_find_bound_slots_1): Limit number of iterations.
16459 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16462 * Minor grammar fixes for x86 options.
16464 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16467 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16468 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16470 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16473 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16474 (altivec_lvx_<mode>_1op): Likewise.
16475 (altivec_stvx_<mode>_2op): Likewise.
16476 (altivec_stvx_<mode>_1op): Likewise.
16477 (altivec_lvx_<VM2:mode>): New define_expand.
16478 (altivec_stvx_<VM2:mode>): Likewise.
16479 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16480 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16481 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16482 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16483 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16484 (rs6000_gen_lvx): Likewise.
16485 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16486 (altivec_expand_stv_builtin): Likewise.
16487 (altivec_expand_builtin): Likewise.
16488 * config/rs6000/vector.md: Likewise.
16490 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16493 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16496 2018-03-20 Richard Biener <rguenther@suse.de>
16499 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16500 sign-conversions as zero, fall back to standard scalar_stmt
16503 2018-03-20 Martin Liska <mliska@suse.cz>
16506 * predict.c (rebuild_frequencies): Handle case when we have
16507 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16509 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16512 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16513 flag_section_anchors.
16514 * varasm.c (use_blocks_for_decl_p): Remove hack for
16515 dw2_force_const_mem.
16518 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16520 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16521 be created, use lowpart_subreg of operands[0] rather than operands[0]
16523 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16524 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16525 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16526 and n constraint instead of aarch64_shift_imm_di and Usd.
16527 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16528 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16530 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16533 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16534 to favor GPR over NEON registers.
16535 (<shift>di3_neon): Likewise.
16537 2018-03-20 Tom de Vries <tom@codesourcery.com>
16540 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16541 (nvptx_process_pars): Emit bar.sync asap and alap.
16543 2018-03-20 Tom de Vries <tom@codesourcery.com>
16546 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16547 seen_label if seen_label is already set.
16549 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16552 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16553 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16554 Use 1U instead of 1. Formatting fixes.
16557 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16558 instead of TREE_TYPE (s1) for the return value.
16560 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16562 PR tree-optimization/84946
16563 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16564 bitsize + bitsize in poly_uint64 rather than poly_int64.
16567 * dwarf2asm.c: Include fold-const.c.
16568 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16569 of decl rather than decl itself.
16571 PR rtl-optimization/84643
16572 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16574 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16577 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16578 calling assemble_variable.
16580 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16583 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16584 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16586 2018-03-19 Jim Wilson <jimw@sifive.com>
16589 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16590 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16591 (riscv_first_stack_step): Likewise.
16592 (riscv_option_override): Use STACK_BOUNDARY instead of
16593 MIN_STACK_BOUNDARY.
16594 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16595 MIN_STACK_BOUNDARY.
16596 (BIGGEST_ALIGNMENT): Set to 128.
16597 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16598 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16601 2018-03-19 Richard Biener <rguenther@suse.de>
16603 PR tree-optimization/84933
16604 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16605 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16607 2018-03-19 Richard Biener <rguenther@suse.de>
16609 PR tree-optimization/84859
16610 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16611 (cond_if_else_store_replacement): Perform sinking operation on
16612 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16613 Generalize what a BB with a single eligible store is.
16615 2018-03-19 Richard Biener <rguenther@suse.de>
16617 PR tree-optimization/84929
16618 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16619 chrec_is_positive against non-chrec arg.
16621 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16624 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16626 2018-03-18 Martin Liska <mliska@suse.cz>
16628 PR rtl-optimization/84635
16629 * regrename.c (build_def_use): Use matches_mode only when
16632 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16634 PR tree-optimization/84913
16635 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16636 vectorize chains of COND_EXPRs.
16638 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16640 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16642 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16644 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16646 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16648 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16650 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16651 Kito Cheng <kito.cheng@gmail.com>
16653 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16654 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16655 (nds32_adjust_reg_alloc_order): New function.
16656 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16658 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16660 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16661 nds32_print_operand, nds32_print_operand_address): Use
16662 HOST_WIDE_INT_PRINT_DEC instead.
16664 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16666 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16668 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16671 * config/i386/i386.c (initial_ix86_tune_features,
16672 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16673 unsigned long long.
16674 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16675 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16676 rather than 1u << ix86_tune. Formatting fix.
16677 (ix86_option_override_internal): Change ix86_arch_mask from
16678 unsigned int to unsigned HOST_WIDE_INT, initialize to
16679 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16680 (ix86_function_specific_restore): Likewise.
16682 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16685 * postreload.c (reload_combine_recognize_pattern): Perform
16686 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16687 truncate_int_for_mode the result for the destination's mode.
16690 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16691 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16693 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16696 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16699 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16700 regno_allocno_class_array and sorted_pseudos.
16701 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16702 insns where regno is used.
16704 2018-03-16 Martin Liska <mliska@suse.cz>
16707 * multiple_target.c (create_dispatcher_calls): Redirect
16708 reference in the symbol table.
16710 2018-03-16 Martin Liska <mliska@suse.cz>
16713 * multiple_target.c (create_dispatcher_calls): Redirect also
16716 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16720 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16721 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16722 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16724 2018-03-16 Julia Koval <julia.koval@intel.com>
16726 * doc/invoke.texi (Skylake Server): Add CLWB.
16727 Cannonlake): Remove CLWB.
16729 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16731 PR tree-optimization/84841
16732 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16734 (FLOAT_ONE_CONST_TYPE): Define.
16735 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16736 (sort_by_operand_rank): Put entries with higher constant_type last
16737 rather than first to match comments.
16739 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16741 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16744 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16747 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16748 check and use address of target always.
16750 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16753 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16754 (indirect_thunk_bnd_needed): Likewise.
16755 (indirect_thunks_used): Likewise.
16756 (indirect_thunks_bnd_used): Likewise.
16757 (indirect_return_needed): New.
16758 (indirect_return_bnd_needed): Likewise.
16759 (output_indirect_thunk_function): Add a bool argument for
16761 (output_indirect_thunk_function): Don't generate alias for
16762 function return thunk.
16763 (ix86_code_end): Call output_indirect_thunk_function to generate
16764 function return thunks.
16765 (ix86_output_function_return): Set indirect_return_bnd_needed
16766 and indirect_return_needed instead of indirect_thunk_bnd_needed
16767 and indirect_thunk_needed.
16769 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16771 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16772 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16773 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16775 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16776 Paul Hua <paul.hua.gm@gmail.com>
16779 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16781 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16783 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16784 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16785 resp. SFmode cases.
16787 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16790 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16791 instead of GET_MODE_SIZE when comparing Units.
16793 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16796 * varasm.c (hash_section): Return an unchangeble hash value
16797 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16798 Return !aarch64_can_use_per_function_literal_pools_p ().
16800 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16803 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16804 rather than address of cmode as last argument to prepare_cmp_insn.
16806 2018-03-15 Julia Koval <julia.koval@intel.com>
16808 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16809 F_AVX512VNNI, F_AVX512BITALG): New.
16811 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16814 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16815 insn for floating-point loads and stores.
16817 2018-03-14 Carl Love <cel@us.ibm.com>
16819 * config/rs6000/rs6000-c.c: Add macro definitions for
16820 ALTIVEC_BUILTIN_VEC_PERMXOR.
16821 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16822 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16823 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16824 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16826 * config/doc/extend.texi: Add prototypes for vec_permxor.
16828 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16831 * diagnostic-show-locus.c (class layout_point): Convert m_line
16832 from int to linenum_type.
16833 (line_span::comparator): Use linenum "compare" function when
16834 comparing line numbers.
16835 (test_line_span): New function.
16836 (layout_range::contains_point): Convert param "row" from int to
16838 (layout_range::intersects_line_p): Likewise.
16839 (layout::will_show_line_p): Likewise.
16840 (layout::print_source_line): Likewise.
16841 (layout::should_print_annotation_line_p): Likewise.
16842 (layout::print_annotation_line): Likewise.
16843 (layout::print_leading_fixits): Likewise.
16844 (layout::annotation_line_showed_range_p): Likewise.
16845 (struct line_corrections): Likewise for field m_row.
16846 (line_corrections::line_corrections): Likewise for param "row".
16847 (layout::print_trailing_fixits): Likewise.
16848 (layout::get_state_at_point): Likewise.
16849 (layout::get_x_bound_for_row): Likewise.
16850 (layout::print_line): Likewise.
16851 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16852 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16853 * input.c (selftest::test_linenum_comparisons): New function.
16854 (selftest::input_c_tests): Call it.
16855 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16856 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16857 * selftest.h (ASSERT_GT): New macro.
16858 (ASSERT_GT_AT): New macro.
16859 (ASSERT_LT): New macro.
16860 (ASSERT_LT_AT): New macro.
16862 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16864 PR rtl-optimization/84780
16865 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16867 2018-03-14 Martin Liska <mliska@suse.cz>
16869 * tree.c (record_node_allocation_statistics): Use
16870 get_stats_node_kind.
16871 (get_stats_node_kind): New function extracted from
16872 record_node_allocation_statistics.
16873 (free_node): Use get_stats_node_kind.
16875 2018-03-14 Richard Biener <rguenther@suse.de>
16877 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16878 that the value-set of ANTIC_IN doesn't grow.
16881 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16883 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16884 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16886 2018-03-14 Julia Koval <julia.koval@intel.com>
16888 * config.gcc (icelake-client, icelake-server): New.
16890 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16891 (initial_ix86_arch_features): Ditto.
16892 (PTA_SKYLAKE): Add SGX.
16893 (PTA_ICELAKE): Remove.
16894 (PTA_ICELAKE_CLIENT): New.
16895 (PTA_ICELAKE_SERVER): New.
16896 (ix86_option_override_internal): Split up icelake on icelake client and
16898 (get_builtin_code_for_version): Ditto.
16899 (fold_builtin_cpu): Ditto.
16900 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16901 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16902 * config/i386/i386.h (processor_type): Ditto.
16903 * doc/invoke.texi: Ditto.
16905 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16908 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16909 INTEGER_CST offset, add it together with bitpos / 8 and
16910 sign extend based on POINTER_SIZE.
16914 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16917 * config/i386/constraints.md (Yc): New register constraint.
16918 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16919 Use Yc constraint for alternative 2 of operand 0. Remove
16920 preferred_for_speed attribute.
16922 2018-03-14 Richard Biener <rguenther@suse.de>
16924 PR tree-optimization/84830
16925 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16926 with the old one to avoid oscillations.
16928 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16931 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16933 (assign_by_spills): Return a flag of reload assignment failure.
16934 Do not process the reload assignment failures. Do not spill other
16935 reload pseudos if they has the same reg class. Update n if
16937 (lra_assign): Add a return arg. Set up from the result of
16938 assign_by_spills call.
16939 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16940 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16941 usage_insns if it is not NULL.
16942 (spill_hard_reg_in_range): New function.
16943 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16944 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16945 function prototypes.
16946 (lra_assign): Change prototype.
16947 * lra.c (lra): Add code to deal with fails by splitting hard reg
16950 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16952 * config/riscv/riscv.opt (mrelax): New option.
16953 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16954 "norelax" when riscv_mrelax is disabled.
16955 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16957 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16960 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16961 reassociation for int modes.
16963 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16965 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16966 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16968 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16969 * config/aarch64/aarch64-sve.md
16970 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16971 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16972 (*extend<mode><Vwide>2): Rename to...
16973 (aarch64_sve_extend<mode><Vwide>2): ...this.
16974 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16975 renaming the old pattern to...
16976 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16978 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16979 define_expand, renaming the old pattern to...
16980 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16981 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16982 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16983 account when deciding which SVE instruction the optab should use.
16984 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16986 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16988 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16989 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16990 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16991 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16992 (tlsdesc_small_<mode>): Turn a define_expand and use
16993 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16994 (tlsdesc_small_advsimd_<mode>): ...this.
16995 (tlsdesc_small_sve_<mode>): New pattern.
16997 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16999 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17000 (UNSPEC_UMUL_HIGHPART): New constants.
17001 (MUL_HIGHPART): New int iteraor.
17002 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17003 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17005 (*<su>mul<mode>3_highpart): New define_insn.
17007 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17010 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17013 2018-03-13 Martin Liska <mliska@suse.cz>
17016 * (sem_item_optimizer::sem_item_optimizer): Initialize new
17018 (sem_item_optimizer::~sem_item_optimizer): Release it.
17019 (sem_item_optimizer::merge_classes): Register variable aliases.
17020 (sem_item_optimizer::fixup_pt_set): New function.
17021 (sem_item_optimizer::fixup_points_to_sets): Likewise.
17022 * ipa-icf.h: Declare new variables and functions.
17024 2018-03-13 Jakub Jelinek <jakub@redhat.com>
17026 PR middle-end/84834
17027 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17028 integer_pow2p@2 and test integer_pow2p in condition.
17029 (A < 0 ? C : 0): Similarly for @1.
17031 PR middle-end/84831
17032 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17033 characters starting at p contain '\0' character, don't look beyond
17037 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17038 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17041 * reg-stack.c (change_stack): Change update_end var from int to
17042 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17043 also call set_block_for_insn on the newly added insns and rescan.
17046 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17047 on the last operand.
17050 * tree.c (stabilize_reference_1): Return save_expr (e) for
17051 STATEMENT_LIST even if it doesn't have side-effects.
17053 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
17055 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17057 2018-03-12 Renlin Li <renlin.li@arm.com>
17059 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17060 aarch64_output_scalar_simd_mov_immediate.
17062 2018-03-12 Martin Sebor <msebor@redhat.com>
17064 PR tree-optimization/83456
17065 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17066 for perfectly overlapping calls to memcpy.
17067 (gimple_fold_builtin_memory_chk): Same.
17068 (gimple_fold_builtin_strcpy): Handle no-warning.
17069 (gimple_fold_builtin_stxcpy_chk): Same.
17070 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17072 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17074 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17075 parameter. Use it for SFmode.
17076 (rs6000_function_arg_advance_1): Adjust.
17077 (rs6000_function_arg): Adjust.
17078 (rs6000_gimplify_va_arg): Pass false for that new parameter.
17080 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17082 PR rtl-optimization/84169
17083 PR rtl-optimization/84780
17084 * combine.c (can_combine_p): Check for a 2-insn combination whether
17085 the destination register is used between the two insns, too.
17087 2018-03-12 Richard Biener <rguenther@suse.de>
17089 PR tree-optimization/84803
17090 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17091 for refs DR analysis didn't process.
17093 2018-03-12 Richard Biener <rguenther@suse.de>
17095 PR tree-optimization/84777
17096 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17097 force-vectorize loops ignore whether we are optimizing for size.
17099 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
17101 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17102 (TARGET_MD_ASM_ADJUST): Define.
17104 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
17105 Kito Cheng <kito.cheng@gmail.com>
17106 Chung-Ju Wu <jasonwucj@gmail.com>
17108 * config/nds32/nds32.c (nds32_compute_stack_frame,
17109 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17110 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17111 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17112 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17113 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17114 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17115 * config/nds32/nds32.md (prologue, epilogue): Use macro
17116 NDS32_V3PUSH_AVAILABLE_P to do checking.
17118 2018-03-11 Jakub Jelinek <jakub@redhat.com>
17121 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17122 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17123 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
17124 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
17125 addition of most attributes on !orig_type_die or the attribute not
17126 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17128 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17129 Chung-Ju Wu <jasonwucj@gmail.com>
17131 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17132 __NDS32_VH__ macro.
17133 * config/nds32/nds32.opt (mvh): New option.
17135 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17136 Chung-Ju Wu <jasonwucj@gmail.com>
17138 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17140 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17141 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17144 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17145 Chung-Ju Wu <jasonwucj@gmail.com>
17147 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17149 * config/nds32/nds32-multiple.md (strlensi): New pattern.
17150 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17152 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
17153 Kito Cheng <kito.cheng@gmail.com>
17154 Chung-Ju Wu <jasonwucj@gmail.com>
17156 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17157 UNSPEC_FFMISM and UNSPEC_FLMISM.
17158 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17159 for ffb, ffmism and flmism.
17160 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17161 (unspec_ffmism): Ditto.
17162 (unspec_flmism): Ditto.
17163 (nds32_expand_builtin_impl): Check if string extension is available.
17164 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17165 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17167 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
17170 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17173 * lra-assigns.c (assign_by_spills): Return a flag of reload
17174 assignment failure. Do not process the reload assignment
17175 failures. Do not spill other reload pseudos if they has the same
17177 (lra_assign): Add a return arg. Set up from the result of
17178 assign_by_spills call.
17179 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17180 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17181 usage_insns if it is not NULL.
17182 (spill_hard_reg_in_range): New function.
17183 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17184 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17185 function prototypes.
17186 (lra_assign): Change prototype.
17187 * lra.c (lra): Add code to deal with fails by splitting hard reg
17190 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
17193 * config/i386/i386.opt: Replace Enforcment with Enforcement.
17195 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
17198 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17199 (dw_val_node): Add val_symbolic_view.
17200 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17201 (symview_upper_bound): New.
17202 (new_line_info_table): Initialize symviews_since_reset.
17203 (dwarf2out_source_line): Count symviews_since_reset and set
17204 symview_upper_bound.
17205 (dw_val_equal_p): Handle symview.
17206 (add_AT_symview): New.
17207 (print_dw_val): Handle symview.
17208 (attr_checksum, attr_checksum_ordered): Likewise.
17209 (same_dw_val_p, size_of_die): Likewise.
17210 (value_format, output_die): Likewise.
17211 (add_high_low_attributes): Use add_AT_symview for entry_view.
17212 (dwarf2out_finish): Reset symview_upper_bound, clear
17215 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
17218 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17219 Add strict argument and use it.
17220 (rs6000_split_multireg_move): Update for new strict argument.
17221 (mem_operand_gpr): Disallow all non-offsettable addresses.
17222 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17224 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17227 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17228 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17229 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17232 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17233 decl, use remap_type if we want to use the type.
17235 2018-03-09 Martin Sebor <msebor@redhat.com>
17237 PR tree-optimization/84526
17238 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17240 (builtin_access::generic_overlap): Be prepared to handle non-array
17243 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17245 PR rtl-optimization/84682
17246 * lra-constraints.c (process_address_1): Check is_address flag
17247 for address constraints.
17248 (process_alt_operands): Likewise.
17249 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17250 preprocess_constraints.
17251 * recog.h (preprocess_constraints): Add oploc parameter.
17253 * recog.c (preprocess_constraints): Test address_operand for
17254 CT_ADDRESS constraints.
17256 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17259 * lra-assigns.c (assign_by_spills): Return a flag of reload
17260 assignment failure. Do not process the reload assignment
17261 failures. Do not spill other reload pseudos if they has the same
17263 (lra_assign): Add a return arg. Set up from the result of
17264 assign_by_spills call.
17265 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17266 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17267 usage_insns if it is not NULL.
17268 (spill_hard_reg_in_range): New function.
17269 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17270 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17271 function prototypes.
17272 (lra_assign): Change prototype.
17273 * lra.c (lra): Add code to deal with fails by splitting hard reg
17276 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17279 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17280 Accept complain bool parameter. Only emit errors if it is true.
17281 (arm_parse_cpu_option_name): Likewise.
17282 (arm_target_thumb_only): Adjust callers of the above.
17283 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17284 prototype to take a default true bool parameter.
17285 (arm_parse_arch_option_name): Likewise.
17287 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17288 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17292 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17293 * configure: Regenerate.
17294 * configure.ac ("linker --version-script option"): New.
17295 ("linker soname option"): New.
17297 2018-03-09 Richard Biener <rguenther@suse.de>
17299 PR tree-optimization/84775
17300 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17301 immediate uses of predicate stmts and mark them modified.
17304 PR tree-optimization/84178
17305 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17307 (version_loop_for_if_conversion): Delay update_ssa call.
17308 (tree_if_conversion): Delay update_ssa until after predicate
17311 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17314 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17315 when the function accesses prior frames.
17317 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17320 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17321 gen_llsym, otherwise call maybe_gen_llsym.
17323 PR inline-asm/84742
17324 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17325 has ',' character inside of it.
17327 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17330 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17331 as clobbering CC_REGNUM.
17333 2018-03-08 Richard Biener <rguenther@suse.de>
17335 PR middle-end/84552
17336 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17337 (follow_copies_to_constant): Do not follow SSA names registered
17340 2018-03-08 Richard Biener <rguenther@suse.de>
17342 PR tree-optimization/84178
17343 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17345 (version_loop_for_if_conversion): Delay update_ssa call.
17346 (tree_if_conversion): Delay update_ssa until after predicate
17349 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17351 PR tree-optimization/84178
17352 * tree-if-conv.c (release_bb_predicate): Remove the
17353 the assertion that the stmts have NULL use_ops.
17354 Discard the statements, asserting that they haven't
17355 yet been added to a BB.
17357 2018-03-08 Richard Biener <rguenther@suse.de>
17359 PR tree-optimization/84746
17360 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17361 (phi_translate): Pass in destination ANTIC_OUT set.
17362 (phi_translate_1): Likewise. For a simplified result lookup
17363 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17364 (phi_translate_set): Adjust.
17365 (do_pre_regular_insertion): Likewise.
17366 (do_pre_partial_partial_insertion): Likewise.
17368 2018-03-08 Martin Liska <mliska@suse.cz>
17370 PR gcov-profile/84735
17371 * doc/gcov.texi: Document usage of profile files.
17372 * gcov-io.h: Document changes in the format.
17374 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17378 * dwarf2out.c (struct dw_line_info_table): Update comments for
17380 (FORCE_RESET_NEXT_VIEW): New.
17381 (FORCE_RESETTING_VIEW_P): New.
17382 (RESETTING_VIEW_P): Check for -1 too.
17383 (ZERO_VIEW_P): Likewise.
17384 (new_line_info_table): Force-reset next view.
17385 (dwarf2out_begin_function): Likewise.
17386 (dwarf2out_source_line): Simplify zero_view_p initialization.
17387 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17388 view directly. Omit view when omitting .loc at line 0.
17390 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17392 PR tree-optimization/84740
17393 * tree-switch-conversion.c (process_switch): Call build_constructors
17394 only if info.phi_count is non-zero.
17396 PR tree-optimization/84739
17397 * tree-tailcall.c (find_tail_calls): Check call arguments against
17398 DECL_ARGUMENTS (current_function_decl) rather than
17399 DECL_ARGUMENTS (func) when checking for tail recursion.
17401 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17403 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17404 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17405 Volker Reichelt's entry and add entries for people that perform
17406 GCC fuzzy testing and report numerous bugs.
17408 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17411 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17412 readonly data in sdata, if that is disabled.
17413 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17414 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17415 -mreadonly-in-sdata option.
17417 2018-03-07 Martin Sebor <msebor@redhat.com>
17419 PR tree-optimization/84468
17420 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17421 basic block when looking for nul assignment.
17423 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17426 * except.h (output_function_exception_table): Adjust prototype.
17427 * except.c (output_function_exception_table): Remove FNNAME parameter
17428 and add SECTION parameter. Ouput one part of the table at a time.
17429 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17430 the first part of the exception table and emit unwind directives.
17431 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17432 (i386_pe_seh_cold_init): Likewise.
17433 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17434 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17435 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17436 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17437 * config/i386/winnt.c: Include except.h.
17438 (struct seh_frame_state): Add reg_offset, after_prologue and
17439 in_cold_section fields.
17440 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17441 (i386_pe_seh_cold_init): New function.
17442 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17443 to seh->in_cold_section.
17444 (seh_emit_push): Record the offset of the push.
17445 (seh_emit_save): Record the offet of the save.
17446 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17447 Test seh->after_prologue to disregard the epilogue.
17448 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17449 (i386_pe_end_cold_function): New function.
17451 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17454 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17455 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17458 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17460 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17461 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17463 PR middle-end/84723
17464 * multiple_target.c: Include tree-inline.h and intl.h.
17465 (expand_target_clones): Diagnose and fail if node->definition and
17466 !tree_versionable_function_p (node->decl).
17468 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17470 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17472 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17473 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17474 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17476 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17479 * combine.c (try_combine): Use reg_or_subregno instead of handling
17480 just paradoxical SUBREGs and REGs.
17482 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17484 * config/arc/arc.c (arc_finalize_pic): Remove function.
17485 (arc_must_save_register): We use single base PIC register, remove
17486 checks to save/restore the PIC register.
17487 (arc_expand_prologue): Likewise.
17488 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17490 (arc_verify_short): Likewise.
17491 (arc_attr_type): Likewise.
17492 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17493 (walk_stores): Likewise.
17494 (arc_address_cost): Make it static.
17495 (arc_verify_short): Likewise.
17496 (branch_dest): Likewise.
17497 (arc_attr_type): Likewise.
17498 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17499 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17500 (arc_final_prescan_insn): Remove inserting the nops due to
17501 hardware hazards. It is done in reorg step.
17502 (insn_length_variant_t): Remove.
17503 (insn_length_parameters_t): Likewise.
17504 (arc_insn_length_parameters): Likewise.
17505 (arc_get_insn_variants): Likewise.
17506 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17508 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17510 PR inline-asm/84683
17511 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17514 PR tree-optimization/84687
17515 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17517 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17519 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17521 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17522 Rename to ppc_speculation_barrier.
17523 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17524 __builtin_ppc_speculation_barrier.
17526 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17529 * combine.c (combine_simplify_rtx): Don't try to simplify if
17530 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17533 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17535 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17536 to 32 bytes when compiling for POWER9.
17538 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17541 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17542 regparm >= 3 with no arg reg available also for calls with
17543 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17546 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17548 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17550 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17553 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17555 2018-03-05 Richard Biener <rguenther@suse.de>
17557 PR tree-optimization/84486
17558 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17559 When inserting a __builtin_assume_aligned call set the LHS
17560 SSA name alignment info accordingly.
17562 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17564 PR tree-optimization/84114
17565 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17566 Avoid reassociation of FLOAT_MODE addition.
17568 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17570 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17571 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17572 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17573 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17574 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17575 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17576 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17578 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17579 __builtin_ia32_wbinvd): New builtins.
17580 (SPECIAL_ARGS2): New.
17581 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17582 (SPECIAL_ARGS2): New.
17583 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17584 (ix86_valid_target_attribute_inner_p): Ditto.
17585 (ix86_init_mmx_sse_builtins): Add special_args2.
17586 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17587 TARGET_WBNOINVD_P): New.
17588 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17589 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17590 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17591 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17592 * config/i386/pconfigintrin.h: New file.
17593 * config/i386/wbnoinvdintrin.h: Ditto.
17594 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17596 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17598 2018-03-05 Richard Biener <rguenther@suse.de>
17600 PR tree-optimization/84670
17601 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17603 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17604 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17605 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17606 doesn't grow if all successors (recursively) were visited at least
17609 2018-03-05 Richard Biener <rguenther@suse.de>
17611 PR tree-optimization/84650
17612 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17613 if executed in the loop pipeline.
17615 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17617 * doc/configfiles.texi (Configuration Files): Move info about
17618 conditionalizing $target-protos.h to...
17619 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17620 differs from $target-protos.h.
17622 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17623 Chung-Ju Wu <jasonwucj@gmail.com>
17625 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17626 * config/nds32/nds32-multiple.md (setmemsi): Define.
17627 * config/nds32/nds32-memory-manipulation.c
17628 (nds32_gen_dup_4_byte_to_word_value): New.
17629 (emit_setmem_word_loop): New.
17630 (emit_setmem_byte_loop): New.
17631 (nds32_expand_setmem_loop): New.
17632 (nds32_expand_setmem_loop_v3m): New.
17633 (nds32_expand_setmem_unroll): New.
17634 (nds32_expand_setmem): New.
17636 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17637 Chung-Ju Wu <jasonwucj@gmail.com>
17639 * config/nds32/nds32-memory-manipulation.c
17640 (nds32_emit_load_store): New.
17641 (nds32_emit_post_inc_load_store): New.
17642 (nds32_emit_mem_move): New.
17643 (nds32_emit_mem_move_block): New.
17644 (nds32_expand_movmemsi_loop_unknown_size): New.
17645 (nds32_expand_movmemsi_loop_known_size): New.
17646 (nds32_expand_movmemsi_loop): New.
17647 (nds32_expand_movmemsi_unroll): New.
17648 (nds32_expand_movmemqi): Rename ...
17649 (nds32_expand_movmemsi): ... to this.
17650 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17651 (movmemsi): ... to this.
17652 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17653 (nds32_expand_movmemsi): ... to this.
17655 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17656 Monk Chiang <sh.chiang04@gmail.com>
17657 Chung-Ju Wu <jasonwucj@gmail.com>
17659 * config/nds32/nds32-protos.h
17660 (nds32_expand_load_multiple): New arguments.
17661 (nds32_expand_store_multiple): Ditto.
17662 (nds32_valid_multiple_load_store): Rename ...
17663 (nds32_valid_multiple_load_store_p): ... to this.
17664 * config/nds32/nds32-memory-manipulation.c
17665 (nds32_expand_load_multiple): Refine implementation.
17666 (nds32_expand_store_multiple): Ditto.
17667 * config/nds32/nds32-multiple.md
17668 (load_multiple): Update nds32_expand_load_multiple interface.
17669 (store_multiple): Update nds32_expand_store_multiple interface.
17670 * config/nds32/nds32-predicates.c
17671 (nds32_valid_multiple_load_store): Rename ...
17672 (nds32_valid_multiple_load_store_p): ... to this and refine
17674 * config/nds32/predicates.md
17675 (nds32_load_multiple_and_update_address_operation): New predicate.
17676 (nds32_store_multiple_and_update_address_operation): New predicate.
17678 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17679 Chung-Ju Wu <jasonwucj@gmail.com>
17681 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17682 (combo): New attribute.
17683 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17685 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17687 * config/nds32/nds32.opt: Change -mcmodel= default value.
17689 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17690 Monk Chiang <sh.chiang04@gmail.com>
17691 Chung-Ju Wu <jasonwucj@gmail.com>
17693 * config/nds32/constants.md (unspec_element): New enum.
17694 * config/nds32/constraints.md (Umw): New constraint.
17695 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17696 * config/nds32/nds32-intrinsic.md: Likewise.
17697 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17698 (nds32_valid_smw_lwm_base_p): New.
17699 (nds32_output_smw_single_word): New.
17700 (nds32_output_lmw_single_word): New.
17701 (nds32_expand_unaligned_load): New.
17702 (nds32_expand_unaligned_store): New.
17703 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17704 (nds32_output_smw_single_word): Declare.
17705 (nds32_output_lmw_single_word): Declare.
17706 (nds32_expand_unaligned_load): Declare.
17707 (nds32_expand_unaligned_store): Declare.
17708 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17709 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17710 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17711 NDS32_BUILTIN_UASTORE_DW.
17712 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17715 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17716 Kito Cheng <kito.cheng@gmail.com>
17717 Chung-Ju Wu <jasonwucj@gmail.com>
17719 * config/nds32/nds32-intrinsic.c
17720 (nds32_expand_builtin_null_ftype_reg): Delete.
17721 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17722 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17723 (nds32_read_argument): New.
17724 (nds32_legitimize_target): Ditto.
17725 (nds32_legitimize_argument): Ditto.
17726 (nds32_check_constant_argument): Ditto.
17727 (nds32_expand_unop_builtin): Ditto.
17728 (nds32_expand_unopimm_builtin): Ditto.
17729 (nds32_expand_binop_builtin): Ditto.
17730 (nds32_builtin_decl_impl): Ditto.
17731 (builtin_description): Ditto.
17732 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17733 (nds32_init_builtins_impl): Ditto.
17734 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17735 (nds32_builtin_decl): New.
17736 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17737 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17739 2018-03-02 Jeff Law <law@redhat.com>
17741 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17742 (redundant_insn, fill_simple_delay_slots): Likewise.
17743 (fill_slots_from_thread): Likewise.
17744 * resource.c (mark_referenced_resources): Likewise.
17745 (mark_set_resources, find_dead_or_set_registers): Likewise.
17747 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17749 * substring-locations.h (format_warning_va): Formatting fix for
17750 ATTRIBUTE_GCC_DIAG.
17751 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17753 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17754 * substring-locations.c: Include intl.h.
17755 (format_warning_va): Turned into small wrapper around
17756 format_warning_n_va, renamed to ...
17757 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17758 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17760 (format_warning_at_substring_n): New function.
17761 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17762 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17763 format_warning_at_substring with just a shorter name instead of
17764 const function pointer.
17765 (fmtwarn_n): New function.
17766 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17767 appropriate, get rid of all the fmtstr temporaries, move conditionals
17768 with G_() wrapped string literals directly into fmtwarn arguments,
17769 cast dir.len to (int), formatting fixes.
17771 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17773 * doc/invoke.texi: Remove "Cilk Plus" references.
17775 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17776 Richard Biener <rguenther@suse.de>
17779 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17780 for error or warning attributes if CALL_FROM_THUNK_P is set.
17783 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17786 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17787 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17790 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17791 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17793 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17794 instead of -1U in last predictors element's probability member.
17796 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17799 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17800 arguments if they are comparable.
17802 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17804 PR tree-optimization/84634
17805 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17806 masks and masked_loop_p with a single loop_masks, making sure it's
17807 null for bb vectorization.
17809 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17811 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17812 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17813 loop->force_vectorize to check whether there is no alias.
17815 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17818 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17820 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17822 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17823 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17824 instead of a loop around prev_real_insn.
17825 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17828 PR inline-asm/84625
17829 * config/i386/i386.c (ix86_print_operand): Use conditional
17830 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17833 2018-03-02 Richard Biener <rguenther@suse.de>
17835 PR tree-optimization/84427
17836 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17837 (bitmap_set_subtract_values): Rewrite to handle multiple
17840 (prune_clobbered_mems): Likewise.
17841 (phi_translate): Take edge instead of pred/phiblock.
17842 (phi_translate_1): Likewise.
17843 (phi_translate_set): Likewise. Insert all translated
17844 exprs for a value into the set, keeping possibly multiple
17845 expressions per value.
17846 (compute_antic_aux): Adjust for phi_translate changes.
17847 When intersecting union the expressions and prune those
17848 not in the final value set, keeping possibly multiple
17849 expressions per value. Do not use value-insertion
17850 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17851 all expressions. Add verification that the value-sets
17852 only shrink during iteration.
17853 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17854 (do_pre_regular_insertion): Likewise.
17855 (do_pre_partial_partial_insertion): Likewise.
17857 2018-03-02 Richard Biener <rguenther@suse.de>
17860 * config/darwin.c (saved_debug_info_level): New static global.
17861 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17862 (darwin_asm_lto_end): Restore debug info generation settings.
17864 2018-03-01 Martin Liska <mliska@suse.cz>
17867 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17868 volatile arguments.
17870 2018-03-01 Richard Biener <rguenther@suse.de>
17873 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17874 type annotation with LTO when debug was disabled at compile-time.
17876 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17878 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17880 (mips_final_postscan_insn): Likewise.
17882 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17884 PR rtl-optimization/84528
17885 * alias.c (init_alias_target): Add commentary.
17886 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17887 a unique base value if the frame pointer is not eliminated
17888 to the stack pointer.
17890 2018-03-01 Tom de Vries <tom@codesourcery.com>
17892 PR rtl-optimization/83327
17893 * lra-int.h (hard_regs_spilled_into): Declare.
17894 * lra.c (hard_regs_spilled_into): Define.
17895 (init_reg_info): Init hard_regs_spilled_into.
17896 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17897 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17898 (process_bb_lives): Handle hard_regs_spilled_into.
17899 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17900 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17902 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17904 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17905 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17906 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17907 * config/rs6000/aix72.h: New file.
17909 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17911 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17912 instead of warning_at with conditional singular and plural messages
17916 * stor-layout.c (update_alignment_for_field): For
17917 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17918 && !DECL_PACKED (field), do the alignment update, just use
17919 only desired_align instead of MAX (type_align, desired_align)
17921 (place_field): Don't do known_align < desired_align handling
17922 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17923 is non-NULL, instead do it after rli->prev_field handling and
17924 only if not within a bitfield word. For DECL_PACKED (field)
17925 use type_align of BITS_PER_UNIT.
17927 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17929 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17930 superfluous parentheses and trailing spaces.
17932 2018-02-28 Richard Biener <rguenther@suse.de>
17934 PR tree-optimization/84584
17935 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17936 SCoPs with fake exit edge.
17938 2018-02-28 Martin Liska <mliska@suse.cz>
17941 * timevar.c (timer::print): Fix format to properly print 100%
17944 2018-02-28 Richard Biener <rguenther@suse.de>
17946 PR middle-end/84607
17947 * genmatch.c (capture_info::walk_match): Do not mark
17948 captured expressions without operands as expr_p given
17949 they act more like predicates and should be subject to
17950 "lost tail" side-effect preserving.
17952 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17954 PR rtl-optimization/81611
17955 * auto-inc-dec.c (attempt_change): Move dead note from
17956 mem_insn if it's the next use of regno
17957 (find_address): Take address use of reg holding
17958 non-incremented value. Add parm to limit search to the named
17960 (merge_in_block): Attempt to use a mem insn that is the next
17961 use of the original regno.
17963 2018-02-27 Martin Sebor <msebor@redhat.com>
17966 * doc/invoke.texi (-Wmissing-attributes): New option.
17967 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17969 2018-02-27 Martin Sebor <msebor@redhat.com>
17971 PR translation/84207
17972 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17973 n argument to unsigned HOST_WIDE_INT.
17974 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17975 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17976 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17977 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17979 2018-02-27 Richard Biener <rguenther@suse.de>
17981 PR tree-optimization/84512
17982 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17983 Do not use the estimate returned from record_stmt_cost for
17984 the scalar iteration cost but sum properly using add_stmt_cost.
17986 2018-02-27 Richard Biener <rguenther@suse.de>
17988 PR tree-optimization/84466
17989 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17990 Adjust last change to less strictly validate use operands.
17992 2018-02-27 Martin Liska <mliska@suse.cz>
17994 PR gcov-profile/84548
17995 * gcov.c (process_file): Allow partial overlap and consider it
17996 also as group functions.
17997 (output_lines): Properly calculate range of lines for a group.
17999 2018-02-27 Martin Liska <mliska@suse.cz>
18001 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18002 'ggc' suffixes. Change first column width.
18003 (timer::print): Fix formatting of the column.
18005 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
18007 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18008 preserve inline entry blocks for the sake of debug inline
18009 entry point markers alone.
18010 (remove_unused_locals): Suggest in comments a better place to
18011 force the preservation of inline entry blocks that are
18012 otherwise unused, but do not preserve them.
18014 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18016 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18018 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18021 * config/i386/constraints.md (Bs): Replace
18022 ix86_indirect_branch_register with
18023 TARGET_INDIRECT_BRANCH_REGISTER.
18025 * config/i386/i386.md (indirect_jump): Likewise.
18026 (tablejump): Likewise.
18027 (*sibcall_memory): Likewise.
18028 (*sibcall_value_memory): Likewise.
18029 Peepholes of indirect call and jump via memory: Likewise.
18030 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18031 (*sibcall_value_GOT_32): Likewise.
18032 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18033 (GOT_memory_operand): Likewise.
18034 (call_insn_operand): Likewise.
18035 (sibcall_insn_operand): Likewise.
18036 (GOT32_symbol_operand): Likewise.
18037 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18039 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18041 PR rtl-optimization/83496
18042 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18043 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
18044 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18045 redundant insn, if any.
18046 (relax_delay_slots): Likewise.
18047 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18049 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
18051 PR tree-optimization/83965
18052 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18053 that grouped statements are part of a reduction chain. Return
18054 true if the statement is not marked as a reduction itself but
18055 is part of a group.
18056 (vect_recog_dot_prod_pattern): Don't check whether the statement
18057 is part of a group here.
18058 (vect_recog_sad_pattern): Likewise.
18059 (vect_recog_widen_sum_pattern): Likewise.
18061 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18064 * final.c (rest_of_clean_state): Also look for calls inside sequences.
18066 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18069 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18071 (ix86_output_indirect_function_return): New prototype.
18072 (ix86_split_simple_return_pop_internal): Likewise.
18073 * config/i386/i386.c (indirect_return_via_cx): New.
18074 (indirect_return_via_cx_bnd): Likewise.
18075 (indirect_thunk_name): Handle return va CX_REG.
18076 (output_indirect_thunk_function): Create alias for
18077 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18078 (ix86_output_indirect_jmp): Remove the bool argument.
18079 (ix86_output_indirect_function_return): New function.
18080 (ix86_split_simple_return_pop_internal): Likewise.
18081 * config/i386/i386.md (*indirect_jump): Don't pass false
18082 to ix86_output_indirect_jmp.
18083 (*tablejump_1): Likewise.
18084 (simple_return_pop_internal): Change it to define_insn_and_split.
18085 Call ix86_split_simple_return_pop_internal to split it for
18086 -mfunction-return=.
18087 (simple_return_indirect_internal): Call
18088 ix86_output_indirect_function_return instead of
18089 ix86_output_indirect_jmp.
18091 2018-02-26 Jakub Jelinek <jakub@redhat.com>
18094 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18095 memset and value initialization afterwards.
18097 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
18099 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18101 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18104 * common/config/aarch64/aarch64-common.c
18105 (aarch_option_optimization_table[]): Switch
18106 off fomit-frame-pointer
18108 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18109 Chung-Ju Wu <jasonwucj@gmail.com>
18111 * config/nds32/nds32-multiple.md (load_multiple): Disallow
18113 (store_multiple): Ditto.
18115 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18117 * config.gcc: Add --with-cpu support for nds32 target.
18118 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18119 * config/nds32/nds32.opt: Add -mcpu= option.
18121 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
18123 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18124 isel=yes): Warn for these deprecated options.
18126 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
18128 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18129 ISA_2_5_MASKS_EMBEDDED.
18131 2018-02-23 Jakub Jelinek <jakub@redhat.com>
18133 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18134 p->max as pointers rather than using iterative_hash_expr.
18136 2018-02-23 Carl Love <cel@us.ibm.com>
18138 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18139 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18141 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18142 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18143 P8V_BUILTIN_VEC_VUNSIGNED2.
18145 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
18148 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18149 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18151 * lra-constraints.c (curr_insn_transform): Set up
18152 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
18154 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18155 * lra-eliminations.c (spill_pseudos): Ditto.
18156 (process_insn_for_elimination): Ditto.
18157 * lra-lives.c (reg_early_clobber_p): Use the new macros.
18158 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18159 LRA_NON_CLOBBERED_ALT.
18161 2018-02-22 Martin Sebor <msebor@redhat.com>
18163 PR tree-optimization/84480
18164 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18165 to maybe_diag_stxncpy_trunc. Call it.
18166 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18167 from gimple_fold_builtin_strcpy. Print inlining stack.
18168 (handle_builtin_stxncpy): Print inlining stack.
18169 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18171 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
18174 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18175 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18176 and -fcheck-pointer-bounds are used together.
18177 (indirect_thunk_prefix): New enum.
18178 (indirect_thunk_need_prefix): New function.
18179 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
18180 "_nt" instead of "_bnd" for NOTRACK prefix.
18181 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18182 (output_indirect_thunk_function): Likewise.
18184 (ix86_code_end): Update output_indirect_thunk_function calls.
18185 (ix86_output_indirect_branch_via_reg): Replace
18186 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18187 (ix86_output_indirect_branch_via_push): Likewise.
18188 (ix86_output_function_return): Likewise.
18189 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18190 incompatible with -fcf-protection=branch and
18191 -fcheck-pointer-bounds.
18193 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18196 * config/aarch64/aarch64.c (aarch64_print_address_internal):
18197 Change gcc_assert call to output_operand_lossage.
18199 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18201 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18203 2018-02-22 DJ Delorie <dj@redhat.com>
18204 Sebastian Perta <sebastian.perta@renesas.com>
18205 Oleg Endo <olegendo@gcc.gnu.org>
18207 * config/rx/rx.c (rx_rtx_costs): New function.
18208 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18210 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
18212 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18214 2018-02-22 Martin Liska <mliska@suse.cz>
18217 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18218 Add "native" as a possible value.
18220 2018-02-22 Martin Liska <mliska@suse.cz>
18223 * config/i386/i386.c (ix86_option_override_internal):
18224 Add "native" as a possible value for -march and -mtune.
18226 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18229 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18230 to all type variants.
18232 PR tree-optimization/84503
18233 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18234 width as info->bitpos + info->bitsize - start.
18235 (merged_store_group::merge_overlapping): Simplify width computation.
18236 (check_no_overlap): New function.
18237 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18238 start + width and last_order of the group, fail if check_no_overlap
18240 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18241 to group if check_no_overlap fails.
18243 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18245 * config/rs6000/altivec.md: Delete contraint arguments to
18246 define_expand, define_split, and define_peephole2, and in
18247 define_insn_and_split if always unused.
18248 * config/rs6000/darwin.md: Ditto.
18249 * config/rs6000/dfp.md: Ditto.
18250 * config/rs6000/rs6000.md: Ditto.
18251 * config/rs6000/sync.md: Ditto.
18252 * config/rs6000/vector.md: Ditto.
18253 * config/rs6000/vsx.md: Ditto.
18255 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18257 * config/rs6000/altivec.md: Write output control strings as braced
18258 blocks instead of double-quoted strings.
18259 * config/rs6000/darwin.md: Ditto.
18260 * config/rs6000/rs6000.md: Ditto.
18261 * config/rs6000/vector.md: Ditto.
18262 * config/rs6000/vsx.md: Ditto.
18264 2018-02-21 Jason Merrill <jason@redhat.com>
18266 PR c++/84314 - ICE with templates and fastcall attribute.
18267 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18269 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18271 * ipa-cp.c (determine_versionability): Fix comment typos.
18273 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18276 * ipa-cp.c (determine_versionability): Do not version functions caling
18279 2018-02-21 Martin Liska <mliska@suse.cz>
18282 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18283 Add "native" as a possible value.
18284 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18285 the macro when native cpu detection is available.
18287 2018-02-21 Martin Liska <mliska@suse.cz>
18290 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18291 Add "native" as a possible value.
18292 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18293 when native cpu detection is available.
18295 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18296 Martin Sebor <msebor@redhat.com>
18298 PR tree-optimization/84478
18299 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18301 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18302 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18303 support which is conservatively correct, for 2 only stay conservative
18304 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18305 argument to the 2 argument get_range_strlen, adjust 6 arg
18306 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18308 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18309 (gimple_fold_builtin_strlen): Pass true as last argument to
18312 2018-02-20 Martin Sebor <msebor@redhat.com>
18314 PR middle-end/84095
18315 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18316 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18317 (builtin_memref::builtin_memref): Factor out parts into
18318 set_base_and_offset and call it.
18320 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18322 PR middle-end/84406
18323 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18324 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18325 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18326 search at the associated MODE_INT.
18328 2018-02-20 Jeff Law <law@redhat.com>
18330 PR middle-end/82123
18331 PR tree-optimization/81592
18332 PR middle-end/79257
18333 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18334 for range data rather than using global data.
18335 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18336 range data rather than using global data.
18337 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18338 pass it to children as needed.
18339 (struct directive::fmtresult): Similarly.
18340 (struct directive::set_width): Similarly.
18341 (struct directive::set_precision): Similarly.
18342 (format_integer, format_directive, parse_directive): Similarly.
18343 (format_none): Accept unnamed vr_values parameter.
18344 (format_percent, format_floating, format_character): Similarly.
18345 (format_string, format_plain): Similarly.
18346 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18347 the EVRP range analyzer for range data rather than using global data.
18348 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18349 gimple-ssa-evrp-analyze.h
18350 (class sprintf_dom_walker): Add after_dom_children member function.
18351 Add evrp_range_analyzer member.
18352 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18353 range analyzer as needed.
18354 (sprintf_dom_walker::after_dom_children): New member function.
18355 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18357 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18358 (evrp_range_analyzer::pop_to_marker): Likewise.
18360 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18362 PR tree-optimization/84419
18363 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18364 with the required type if its current type is compatible but
18367 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18369 PR middle-end/82004
18370 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18371 after vectorization.
18373 2018-02-20 Martin Liska <mliska@suse.cz>
18376 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18377 possible values if we don't have a hint.
18379 2018-02-20 Martin Liska <mliska@suse.cz>
18383 * final.c (shorten_branches): Build align_tab array with one
18385 * opts.c (finish_options): Add alignment option limit check.
18386 (MAX_CODE_ALIGN): Likewise.
18387 (MAX_CODE_ALIGN_VALUE): Likewise.
18388 * doc/invoke.texi: Document maximum allowed option value for
18389 all -falign-* options.
18391 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18394 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18395 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18396 * var-tracking.c (emit_note_insn_var_location): Remove all references
18397 to NOTE_INSN_CALL_ARG_LOCATION.
18398 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18399 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18400 Use copy_rtx_if_shared.
18401 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18402 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18403 (dwarf2out_var_location): Remove handling of
18404 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18406 * final.c (final_scan_insn): Remove all references to
18407 NOTE_INSN_CALL_ARG_LOCATION.
18408 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18409 before dumping final insns.
18410 * except.c (emit_note_eh_region_end): Remove all references to
18411 NOTE_INSN_CALL_ARG_LOCATION.
18412 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18413 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18414 * config/arc/arc.c (hwloop_optimize): Likewise.
18415 * config/arm/arm.c (create_fix_barrier): Likewise.
18416 * config/s390/s390.c (s390_chunkify_start): Likewise.
18417 * config/sh/sh.c (find_barrier): Likewise.
18418 * config/i386/i386.c (rest_of_insert_endbranch,
18419 ix86_seh_fixup_eh_fallthru): Likewise.
18420 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18421 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18422 * config/frv/frv.c (frv_function_prologue): Likewise.
18423 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18425 (note_outside_basic_block_p): Remove all references to
18426 NOTE_INSN_CALL_ARG_LOCATION.
18427 * gengtype.c (adjust_field_rtx_def): Likewise.
18428 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18430 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18431 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18434 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18437 PR tree-optimization/84452
18438 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18439 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18442 2018-02-19 Martin Liska <mliska@suse.cz>
18445 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18447 2018-02-19 Martin Liska <mliska@suse.cz>
18448 Richard Sandiford <richard.sandiford@linaro.org>
18450 PR tree-optimization/82491
18451 * gimple-fold.c (get_base_constructor): Make earlier bail out
18454 2018-02-19 Carl Love <cel@us.ibm.com>
18456 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18457 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18459 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18460 P8V_BUILTIN_VEC_NEG.
18462 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18464 * config/rl78/rl78.md (movdf): New define expand.
18466 2018-02-19 Martin Liska <mliska@suse.cz>
18469 * doc/invoke.texi: Fix typo.
18470 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18472 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18474 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18475 handle rs6000_single_float and rs6000_double_float specially for
18478 2018-02-16 Jeff Law <law@redhat.com>
18480 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18481 (pop_regs): Use it.
18483 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18486 * ipa-inline.c (inline_small_functions): Fix a typo.
18488 2018-02-16 Nathan Sidwell <nathan@acm.org>
18490 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18492 2018-02-16 Carl Love <cel@us.ibm.com>
18494 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18495 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18496 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18497 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18498 expansion to P8V_BUILTIN_VEC_FLOAT2.
18500 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18502 PR rtl-optimization/70023
18503 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18504 src_regno into account.
18506 2018-02-16 Carl Love <cel@us.ibm.com>
18508 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18509 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18510 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18511 * config/rs6000/rs6000.c: Remove case statements for
18512 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18513 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18514 and P9V_BUILTIN_VEC_VINSERT4B.
18515 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18516 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18517 * config/rs6000/vsx.md:
18518 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18521 2018-02-16 Carl Love <cel@us.ibm.com>
18523 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18525 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18527 * config/rs6000/rs6000-c.c: Add the definitions for
18528 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18529 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18530 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18531 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18532 definition for insert4b and define insn *insert3b_internal.
18533 * doc/extend.texi: Add documentation for vec_extract4b.
18535 2018-02-16 Nathan Sidwell <nathan@acm.org>
18537 * doc/extend.texi (Backwards Compatibility): Mention friend
18538 injection. Note for-scope is deprecated.
18539 * doc/invoke.texi (-ffriend-injection): Deprecate.
18541 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18543 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18544 that moved to I2, also allow destinations that are a paradoxical
18545 subreg (instead of a normal reg).
18547 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18550 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18553 2018-02-16 Richard Biener <rguenther@suse.de>
18555 PR tree-optimization/84037
18556 PR tree-optimization/84016
18558 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18559 Adjust vec_construct for the fact we need additional higher latency
18560 128bit inserts for AVX256 and AVX512 vector builds.
18561 (ix86_add_stmt_cost): Scale vector construction cost for
18564 2018-02-16 Richard Biener <rguenther@suse.de>
18566 PR tree-optimization/84417
18567 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18568 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18569 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18571 2018-02-16 Martin Liska <mliska@suse.cz>
18574 * internal-fn.def (ASAN_CHECK): Set proper flags.
18575 (ASAN_MARK): Likewise.
18577 2018-02-16 Julia Koval <julia.koval@intel.com>
18579 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18580 from PTA_CANNONLAKE.
18582 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18585 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18586 Use ++iter rather than iter++ for std::list iterators.
18587 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18588 defer deleting them until all nodes in the forest are processed. Do
18589 free even leaf nodes. Change to_process into auto_vec.
18592 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18593 * vec.h (vec_default_construct): Use memset instead of placement new
18594 if BROKEN_VALUE_INITIALIZATION is defined.
18595 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18596 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18599 PR rtl-optimization/83723
18600 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18601 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18602 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18604 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18606 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18608 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18610 PR rtl-optimization/81443
18611 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18612 from inner REGs to paradoxical SUBREGs.
18614 2018-02-16 Richard Biener <rguenther@suse.de>
18616 PR tree-optimization/84399
18617 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18618 For operands we can analyze at their definition make sure we can
18619 analyze them at each use as well.
18621 2018-02-16 Richard Biener <rguenther@suse.de>
18623 PR tree-optimization/84190
18624 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18625 volatile accesses if the decl isn't volatile.
18627 2018-02-15 Jason Merrill <jason@redhat.com>
18629 PR c++/84314 - ICE with templates and fastcall attribute.
18630 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18631 TYPE_CANONICAL on an existing type.
18633 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18635 PR tree-optimization/84383
18636 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18637 dstoff nor call operand_equal_p if dstbase is NULL.
18639 PR tree-optimization/84334
18640 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18641 also a CONSTANT_CLASS_P, punt.
18643 2018-02-14 Jim Wilson <jimw@sifive.com>
18645 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18646 first SMALL_OPERAND check. New local min_second_step. Move assert
18647 to where locals are set. Add TARGET_RVC support.
18648 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18650 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18652 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18654 2018-02-14 Martin Sebor <msebor@redhat.com>
18656 PR tree-optimization/83698
18657 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18658 arrays constrain the offset range to their bounds.
18659 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18660 (builtin_access::overlap): Avoid setting the size of overlap if it's
18662 (maybe_diag_overlap): Also consider arrays when deciding what values
18663 of offsets to include in diagnostics.
18665 2018-02-14 Martin Sebor <msebor@redhat.com>
18668 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18669 that correspond to the kind of a declaration.
18671 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18674 * config/pa/pa.md: Load address of PIC label using the linkage table
18675 if the label is nonlocal.
18677 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18679 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18680 warning message if user requests -maltivec=be.
18681 * doc/invoke.texi: Document deprecation of -maltivec=be.
18683 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18686 * config/rs6000/rs6000-c.c: Update definitions for
18687 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18688 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18690 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18693 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18694 add _get_ssp intrinsics. Remove argument from
18695 __builtin_ia32_rdssp[d|q].
18696 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18697 * config/i386/i386-builtin.def: Remove argument from
18698 __builtin_ia32_rdssp[d|q].
18699 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18700 ix86_expand_special_args_builtin for _rdssp[d|q].
18701 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18702 Clear register before usage.
18703 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18704 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18706 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18708 PR tree-optimization/84357
18709 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18710 operand 1 of an ARRAY_REF too.
18712 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18715 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18716 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18718 (set_of_reg): New struct.
18719 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18720 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18721 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18723 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18724 Split into bitclr, bitset, bitinvert patterns if appropriate.
18725 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18726 use rx_fuse_in_memory_bitop.
18727 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18728 to named insn, correct maximum insn length.
18730 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18733 * machmode.def: Define a complex mode for PARTIAL_INT.
18734 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18736 * doc/rtl.texi: Document CSPImode.
18737 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18739 (msp430_hard_regno_nregs_with_padding): Likewise.
18741 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18744 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18746 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18748 PR rtl-optimization/84169
18749 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18750 we generated a parallel as new i3 and we split that to new i2 and i3
18751 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18752 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18753 those to i2, not i1. Partially rewrite this scan code.
18755 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18758 * stor-layout.c (place_field): For variable length fields, adjust
18759 offset_align afterwards not just based on the field's alignment,
18760 but also on the size.
18762 PR middle-end/84309
18763 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18764 of exps and logs in the use_exp2 case.
18766 2018-02-13 Jeff Law <law@redhat.com>
18768 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18769 entry for "vector".
18771 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18774 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18778 * common.opt (gas-loc-support, gas-locview-support): New.
18779 (ginline-points, ginternal-reset-location-views): New.
18780 * doc/invoke.texi: Document them. Use @itemx where intended.
18781 (gvariable-location-views): Adjust.
18782 * target.def (reset_location_view): New.
18783 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18784 (TARGET_RESET_LOCATION_VIEW): New.
18785 * doc/tm.texi: Rebuilt.
18786 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18787 (dwarf2out_default_as_locview_support): New.
18788 (output_asm_line_debug_info): Use option variables.
18789 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18790 (output_loc_list): Likewise.
18791 (add_high_low_attributes): Check option variables.
18792 Don't output entry view attribute in strict mode.
18793 (gen_inlined_subroutine_die): Check option variables.
18794 (dwarf2out_inline_entry): Likewise.
18795 (init_sections_and_labels): Likewise.
18796 (dwarf2out_early_finish): Likewise.
18797 (maybe_reset_location_view): New, from...
18798 (dwarf2out_var_location): ... here. Call it.
18799 * debug.h (dwarf2out_default_as_loc_support): Declare.
18800 (dwarf2out_default_as_locview_support): Declare.
18801 * hooks.c (hook_int_rtx_insn_0): New.
18802 * hooks.h (hook_int_rtx_insn_0): Declare.
18803 * toplev.c (process_options): Take -gas-loc-support and
18804 -gas-locview-support from dwarf2out. Enable
18805 -gvariable-location-views by default only with locview
18806 assembler support. Enable -ginternal-reset-location-views by
18807 default only if the target defines the corresponding hook.
18808 Enable -ginline-points by default if location views are
18809 enabled; force it disabled if statement frontiers are
18811 * tree-inline.c (expand_call_inline): Check option variables.
18812 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18814 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18816 PR tree-optimization/84321
18817 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18818 handling. Also check whether the anti-range contains any values
18819 that satisfy the mask; switch to a VR_RANGE if not.
18821 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18824 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18826 2018-02-13 Martin Jambor <mjambor@suse.cz>
18829 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18830 of call statements, also set location of a load to a temporary.
18832 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18834 * config/rl78/rl78.c (add_vector_labels): New function.
18835 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18836 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18837 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18838 which checks that no arguments are passed.
18839 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18840 * doc/extend.texi: Documentation for the new attribute.
18842 2018-02-13 Andreas Schwab <schwab@suse.de>
18844 * config/riscv/linux.h (CPP_SPEC): Define.
18846 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18849 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18850 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18851 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18852 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18853 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18854 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18855 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18856 temporarily for AES and PCLMUL builtins.
18858 PR tree-optimization/84339
18859 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18860 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18863 PR middle-end/84309
18864 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18865 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18866 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18868 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18870 * omp-simd-clone.h: New file.
18871 * omp-simd-clone.c: Include omp-simd-clone.h.
18872 (expand_simd_clones): No longer static.
18873 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18874 cgraph.h and omp-simd-clone.h.
18875 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18876 (vect_recog_widen_shift_pattern): Formatting fix.
18877 (vect_pattern_recog_1): Don't check optab for calls.
18880 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18881 operands[2] into a REG before using gen_lowpart on it.
18883 2018-02-12 Jeff Law <law@redhat.com>
18886 * config/sh/sh.c (find_barrier): Consider a sibling call
18889 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18890 successfully back substituting a reg.
18892 2018-02-12 Richard Biener <rguenther@suse.de>
18894 PR tree-optimization/84037
18895 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18896 parameter, move visited init to caller.
18897 (vect_slp_analyze_operations): Separate cost from validity
18898 check, initialize visited once for all instances.
18899 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18901 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18903 (vect_model_promotion_demotion_cost): Likewise.
18904 (vectorizable_bswap): Guard cost modeling with !slp_node
18905 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18907 (vectorizable_call): Likewise.
18908 (vectorizable_conversion): Likewise.
18909 (vectorizable_assignment): Likewise.
18910 (vectorizable_shift): Likewise.
18911 (vectorizable_operation): Likewise.
18912 (vectorizable_store): Likewise.
18913 (vectorizable_load): Likewise.
18914 (vectorizable_condition): Likewise.
18915 (vectorizable_comparison): Likewise.
18917 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18920 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18921 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18922 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18924 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18926 PR middle-end/83665
18927 * params.def (inline-min-speedup): Increase from 8 to 15.
18928 (max-inline-insns-auto): Decrease from 40 to 30.
18929 * ipa-split.c (consider_split): Add some buffer for function to
18930 be considered inlining candidate.
18931 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18934 2018-02-12 Richard Biener <rguenther@suse.de>
18936 PR tree-optimization/84037
18937 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18938 matched stmts if we cannot swap the non-matched ones.
18940 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18942 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18943 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18944 _mm_maskz_scalef_round_ss): New intrinsics.
18945 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18946 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18947 __builtin_ia32_scalefss_round): Remove.
18948 (__builtin_ia32_scalefsd_mask_round,
18949 __builtin_ia32_scalefss_mask_round): New intrinsics.
18950 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18951 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18952 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18953 "<round_constraint>")): Changed to ...
18954 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18955 "<round_scalar_constraint>")): ... this.
18956 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18957 %0, %1, %2<round_op3>}"): Changed to ...
18958 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18959 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18960 %2<round_scalar_mask_op3>}"): ... this.
18961 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18963 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18965 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18966 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18967 (_mm_maskz_sqrt_round_ss): New intrinsics.
18968 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18969 (__builtin_ia32_sqrtsd_mask_round)
18970 (__builtin_ia32_sqrtss_mask_round): New builtins.
18971 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18972 (__builtin_ia32_sqrtss_round): Remove.
18973 (__builtin_ia32_sqrtsd_mask_round)
18974 (__builtin_ia32_sqrtss_mask_round): New builtins.
18975 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18976 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18977 ((match_operand:VF_128 1 "vector_operand"
18978 "xBm,<round_constraint>")): Changed to ...
18979 ((match_operand:VF_128 1 "vector_operand"
18980 "xBm,<round_scalar_constraint>")): ... this.
18981 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18982 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18983 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18984 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18985 %<iptr>1<round_scalar_mask_op3>}): ... this.
18986 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18987 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18989 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18992 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18993 Cast vec_cmpeq result to correct type.
18994 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18995 Cast vec_cmpgt result to correct type.
18997 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18999 * final.c (final_scan_insn_1): Renamed from...
19000 (final_scan_insn): ... this. New wrapper, to recover
19001 seen from the outermost call in recursive ones.
19002 * config/sparc/sparc.c (output_return): Drop seen from call.
19003 (output_sibcall): Likewise.
19004 * config/visium/visium.c (output_branch): Likewise.
19006 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
19008 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19011 2018-02-10 Alan Modra <amodra@gmail.com>
19014 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19015 Specify LR as an input.
19017 2018-02-10 Jakub Jelinek <jakub@redhat.com>
19020 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19021 remove_member_access_dummy_vars): New functions.
19022 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19023 lower_omp_1, execute_lower_omp): Use them.
19025 PR rtl-optimization/84308
19026 * shrink-wrap.c (spread_components): Release todo vector.
19028 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
19030 PR rtl-optimization/57193
19031 * ira-color.c (struct allocno_color_data): Add member
19032 conflict_allocno_hard_prefs.
19033 (update_conflict_allocno_hard_prefs): New.
19034 (bucket_allocno_compare_func): Add a preference based on
19035 conflict_allocno_hard_prefs.
19036 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19037 (color_allocnos): Remove a dead code. Initiate
19038 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
19040 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19043 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19044 constraint from =wa to wa. Avoid a subreg on the output operand,
19045 instead use a pseudo and subreg it in a move.
19046 (p9_xxbrd_<mode>): Changed to ...
19047 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19048 (p9_xxbrd_v2df): New expander.
19049 (p9_xxbrw_<mode>): Changed to ...
19050 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19051 (p9_xxbrw_v4sf): New expander.
19053 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19055 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19057 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
19060 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19061 multiply in 32-bit mode.
19062 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19063 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19066 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19068 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19069 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19070 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19071 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19073 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
19076 * dwarf2out.c (is_trivial_indirect_ref): New function.
19077 (dwarf2out_late_global_decl): Do not generate a location
19078 attribute for variables that have a non-trivial DECL_VALUE_EXPR
19079 and that are not defined in the current unit.
19081 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19083 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19084 instead of a libcall for UNORDERED.
19086 2018-02-09 Tamar Christina <tamar.christina@arm.com>
19089 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19090 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19092 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19095 * config/s390/s390.c (s390_set_current_function): Invoke
19096 s390_indirect_branch_settings also if fndecl didn't change.
19098 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19100 * config/rs6000/rs6000.md (blockage): Set length to zero.
19102 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19104 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19106 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19109 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19110 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19114 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19115 PARALLEL incoming that failed vt_get_decl_and_offset check.
19117 PR middle-end/84237
19118 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19119 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19121 (get_variable_section): For decls in named .bss* sections pass true as
19122 second argument to bss_initializer_p.
19124 2018-02-09 Marek Polacek <polacek@redhat.com>
19125 Jakub Jelinek <jakub@redhat.com>
19128 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19129 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
19130 Sync some changes from cxx_fold_indirect_ref.
19132 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19134 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19136 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19137 (BLOCK_INLINE_ENTRY_LABEL): New.
19138 (dwarf2out_var_location): Disregard inline entry markers.
19139 (inline_entry_data): New struct.
19140 (inline_entry_data_hasher): New hashtable type.
19141 (inline_entry_data_hasher::hash): New.
19142 (inline_entry_data_hasher::equal): New.
19143 (inline_entry_data_table): New variable.
19144 (add_high_low_attributes): Add DW_AT_entry_pc and
19145 DW_AT_GNU_entry_view attributes if a pending entry is found
19146 in inline_entry_data_table. Add old entry_pc attribute only
19147 if debug nonbinding markers are disabled.
19148 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19149 markers are enabled.
19150 (block_within_block_p, dwarf2out_inline_entry): New.
19151 (dwarf2out_finish): Check that no entries remained in
19152 inline_entry_data_table.
19153 * final.c (reemit_insn_block_notes): Handle inline entry notes.
19154 (final_scan_insn, notice_source_line): Likewise.
19155 (rest_of_clean_state): Skip inline entry markers.
19156 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19158 * gimple.c (gimple_build_debug_inline_entry): New.
19159 * gimple.h (enum gimple_debug_subcode): Add
19160 GIMPLE_DEBUG_INLINE_ENTRY.
19161 (gimple_build_debug_inline_entry): Declare.
19162 (gimple_debug_inline_entry_p): New.
19163 (gimple_debug_nonbind_marker_p): Adjust.
19164 * insn-notes.def (INLINE_ENTRY): New.
19165 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19166 inline entry marker notes.
19167 (print_insn): Likewise.
19168 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19169 (INSN_DEBUG_MARKER_KIND): Likewise.
19170 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19171 * tree-inline.c (expand_call_inline): Build and insert
19172 debug_inline_entry stmt.
19173 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19174 inline entry blocks early, if nonbind markers are enabled.
19175 (dump_scope_block): Dump fragment info.
19176 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19177 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19178 (gimple_build_debug_inline_entry): New.
19179 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19180 Enable/disable inline entry points too.
19181 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19182 (DEBUG_INSN): Describe inline entry markers.
19184 * common.opt (gvariable-location-views): New.
19185 (gvariable-location-views=incompat5): New.
19186 * config.in: Rebuilt.
19187 * configure: Rebuilt.
19188 * configure.ac: Test assembler for view support.
19189 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19190 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19191 * dwarf2out.c (var_loc_view): New typedef.
19192 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19193 (dwarf2out_locviews_in_attribute): New.
19194 (dwarf2out_locviews_in_loclist): New.
19195 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19196 (enum dw_line_info_opcode): Add LI_adv_address.
19197 (struct dw_line_info_table): Add view.
19198 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19199 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19200 (zero_view_p): New variable.
19201 (ZERO_VIEW_P): New macro.
19202 (output_asm_line_debug_info): New.
19203 (struct var_loc_node): Add view.
19204 (add_AT_view_list, AT_loc_list): New.
19205 (add_var_loc_to_decl): Add view param. Test it against last.
19206 (new_loc_list): Add view params. Record them.
19207 (AT_loc_list_ptr): Handle loc and view lists.
19208 (view_list_to_loc_list_val_node): New.
19209 (print_dw_val): Handle dw_val_class_view_list.
19210 (size_of_die): Likewise.
19211 (value_format): Likewise.
19212 (loc_list_has_views): New.
19213 (gen_llsym): Set vl_symbol too.
19214 (maybe_gen_llsym, skip_loc_list_entry): New.
19215 (dwarf2out_maybe_output_loclist_view_pair): New.
19216 (output_loc_list): Output view list or entries too.
19217 (output_view_list_offset): New.
19218 (output_die): Handle dw_val_class_view_list.
19219 (output_dwarf_version): New.
19220 (output_compilation_unit_header): Use it.
19221 (output_skeleton_debug_sections): Likewise.
19222 (output_rnglists, output_line_info): Likewise.
19223 (output_pubnames, output_aranges): Update version comments.
19224 (output_one_line_info_table): Output view numbers in asm comments.
19225 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19226 Call maybe_gen_llsym.
19227 (loc_list_from_tree_1): Adjust.
19228 (add_AT_location_description): Create view list attribute if
19229 needed, check it's absent otherwise.
19230 (convert_cfa_to_fb_loc_list): Adjust.
19231 (maybe_emit_file): Call output_asm_line_debug_info for test.
19232 (dwarf2out_var_location): Reset views as needed. Precompute
19233 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19234 attribute. Set view.
19235 (new_line_info_table): Reset next view.
19236 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19237 (dwarf2out_source_line): Likewise. Output view resets and labels to
19238 the assembler, or select appropriate line info opcodes.
19239 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19240 (optimize_string_length): Catch it. Adjust.
19241 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19242 dw_val_class_view_list, and remove it if no longer needed.
19243 (hash_loc_list): Hash view numbers.
19244 (loc_list_hasher::equal): Compare them.
19245 (optimize_location_lists): Check whether a view list symbol is
19246 needed, and whether the locview attribute is present, and
19247 whether they match. Remove the locview attribute if no longer
19249 (index_location_lists): Call skip_loc_list_entry for test.
19250 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19251 Use output_dwarf_version.
19252 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19253 (struct dw_val_node): Add val_view_list.
19254 * final.c (SEEN_NEXT_VIEW): New.
19255 (set_next_view_needed): New.
19256 (clear_next_view_needed): New.
19257 (maybe_output_next_view): New.
19258 (final_start_function): Rename to...
19259 (final_start_function_1): ... this. Take pointer to FIRST,
19260 add SEEN parameter. Emit param bindings in the initial view.
19261 (final_start_function): Reintroduce SEEN-less interface.
19262 (final): Rename to...
19263 (final_1): ... this. Take SEEN parameter. Output final pending
19264 next view at the end.
19265 (final): Reintroduce seen-less interface.
19266 (final_scan_insn): Output pending next view before switching
19267 sections or ending a block. Mark the next view as needed when
19268 outputting variable locations. Notify debug backend of section
19269 changes, and of location view changes.
19270 (rest_of_handle_final): Adjust.
19271 * toplev.c (process_options): Autodetect value for debug variable
19272 location views option. Warn on incompat5 without -gdwarf-5.
19273 * doc/invoke.texi (gvariable-location-views): New.
19274 (gvariable-location-views=incompat5): New.
19275 (gno-variable-location-views): New.
19277 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19279 PR tree-optimization/84136
19280 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19281 that the result of find_edge is non-NULL.
19283 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19286 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19287 storing integer register in SImode. Fix cost of 256 and 512
19288 byte aligned SSE register store.
19290 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19292 * config/i386/i386.c (ix86_multiplication_cost): Fix
19293 multiplication cost for TARGET_AVX512DQ.
19295 2018-02-08 Marek Polacek <polacek@redhat.com>
19297 PR tree-optimization/84238
19298 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19301 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19303 PR tree-optimization/84265
19304 * tree-vect-stmts.c (vectorizable_store): Don't treat
19305 VMAT_CONTIGUOUS accesses as grouped.
19306 (vectorizable_load): Likewise.
19308 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19310 PR tree-optimization/81635
19311 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19312 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19313 (test_round_for_mask): New functions.
19314 (wide_int_cc_tests): Call test_round_for_mask.
19315 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19316 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19317 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19318 range returned by get_range_info.
19320 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19323 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19324 * symtab.c: Include builtins.h
19325 (symtab_node::output_to_lto_symbol_table_p): Move here
19326 from lto-streamer-out.c:output_symbol_p.
19327 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19328 (output_symbol_p): Move all logic to symtab.c
19329 (produce_symtab): Update.
19331 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19333 * config/s390/s390-opts.h (enum indirect_branch): Define.
19334 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19335 (s390_indirect_branch_via_thunk)
19336 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19337 (enum s390_indirect_branch_type): Define.
19338 * config/s390/s390.c (struct s390_frame_layout, struct
19339 machine_function): Remove.
19340 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19341 (indirect_branch_table_label_no, indirect_branch_table_name):
19343 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19344 (enum s390_indirect_branch_option): Define.
19345 (s390_return_addr_from_memory): New function.
19346 (s390_handle_string_attribute): New function.
19347 (s390_attribute_table): Add new attribute handler.
19348 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19349 (s390_indirect_branch_via_thunk): New function.
19350 (s390_indirect_branch_via_inline_thunk): New function.
19351 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19352 sibling call optimization for non z10 compiles.
19353 (s390_emit_call): Force indirect branch target to be a single
19354 register. Add r1 clobber for non-z10 compiles.
19355 (s390_emit_epilogue): Emit return jump via return_use expander.
19356 (s390_reorg): Handle JUMP_INSNs as execute targets.
19357 (s390_option_override_internal): Perform validity checks for the
19358 new command line options.
19359 (s390_indirect_branch_attrvalue): New function.
19360 (s390_indirect_branch_settings): New function.
19361 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19362 (s390_output_indirect_thunk_function): New function.
19363 (s390_code_end): Implement target hook.
19364 (s390_case_values_threshold): Implement target hook.
19365 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19367 * config/s390/s390.h (struct s390_frame_layout)
19368 (struct machine_function): Move here from s390.c.
19369 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19370 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19371 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19372 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19373 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19374 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19375 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19376 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19377 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19378 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19379 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19380 (mnemonic attribute): Add values which aren't recognized
19382 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19383 pattern for branch conversion. Fix mnemonic attribute.
19384 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19385 indirect branch via thunk if requested.
19386 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19387 ("*indirect_jump"): Disable for branch conversion using out of
19389 ("indirect_jump_via_thunk<mode>_z10")
19390 ("indirect_jump_via_thunk<mode>")
19391 ("indirect_jump_via_inlinethunk<mode>_z10")
19392 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19393 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19394 ("casesi_jump_via_inlinethunk<mode>_z10")
19395 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19396 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19397 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19398 ("*indirect2_jump"): Disable for branch conversion.
19399 ("casesi_jump"): Turn into expander and expand patterns for branch
19401 ("return_use"): New expander.
19402 ("*return"): Emit return via thunk and rename it to ...
19403 ("*return<mode>"): ... this one.
19404 * config/s390/s390.opt: Add new options and and enum for the
19407 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19409 * lra-constraints.c (match_reload): Unconditionally use
19410 gen_lowpart_SUBREG, rather than selecting between that
19411 and equivalent gen_rtx_SUBREG code.
19413 2018-02-08 Richard Biener <rguenther@suse.de>
19415 PR tree-optimization/84233
19416 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19417 changed flag instead of boguously re-using phi_inserted.
19419 2018-02-08 Martin Jambor <mjambor@suse.cz>
19421 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19422 static local variables.
19424 2018-02-08 Richard Biener <rguenther@suse.de>
19426 PR tree-optimization/84278
19427 * tree-vect-stmts.c (vectorizable_store): When looking for
19428 smaller vector types to perform grouped strided loads/stores
19429 make sure the mode is supported by the target.
19430 (vectorizable_load): Likewise.
19432 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19434 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19435 Increase LDP/STP opportunities by adding adjacent callee-saves.
19437 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19439 PR rtl-optimization/84068
19440 PR rtl-optimization/83459
19441 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19443 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19445 PR tree-optimization/84224
19446 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19447 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19448 non-zero arguments.
19450 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19453 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19454 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19455 count, remove one USE.
19457 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19459 * doc/install.texi (Configuration): Document the
19460 --with-long-double-format={ibm,ieee} PowerPC configuration
19464 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19465 Convert from define_expand to be define_insn_and_split. Rework
19466 float/double/_Float128 conversions to QI/HI/SImode to work with
19467 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19468 conversions to QI/HImode types did a store and then a load to
19469 truncate the value. For conversions to VSX registers, don't split
19470 the insn, instead emit the code directly. Use the code iterator
19471 any_fix to combine signed and unsigned conversions.
19472 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19473 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19474 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19475 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19476 (fix_<mode>di2_hw): Likewise.
19477 (fixuns_<mode>di2_hw): Likewise.
19478 (fix_<mode>si2_hw): Likewise.
19479 (fixuns_<mode>si2_hw): Likewise.
19480 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19481 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19482 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19483 fix<uns>_trunc<SFDF:mode>si2_p8.
19484 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19485 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19486 (fix<uns>_<mode>_mem): Likewise.
19487 (fctiw<u>z_<mode>_mem): Likewise.
19488 (fix<uns>_<mode>_mem): Likewise.
19489 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19490 the register allocator from doing a direct move to the GPRs to do
19491 a store, and instead use the ISA 3.0 store byte/half-word from
19492 vector register instruction. For IEEE 128-bit floating point,
19493 also optimize stores of 32-bit ints.
19494 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19496 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19498 * genextract.c (push_pathstr_operand): New function to support
19500 (walk_rtx): Call push_pathstr_operand.
19501 (print_path): Support [a-zA-Z].
19503 2018-02-07 Richard Biener <rguenther@suse.de>
19505 PR tree-optimization/84037
19506 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19507 (cse_and_gimplify_to_preheader): Declare.
19508 (vect_get_place_in_interleaving_chain): Likewise.
19509 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19511 (_loop_vec_info::~_loop_vec_info): Delete it.
19512 (cse_and_gimplify_to_preheader): New function.
19513 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19514 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19515 (vectorizable_load): Likewise. For grouped stores always base
19516 the IV on the first element.
19517 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19518 condition before gimplifying.
19520 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19522 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19523 *DIV_EXPR and *MOD_EXPR.
19525 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19528 * config/i386/i386.c (ix86_option_override_internal): Mask out
19529 the CF_SET bit when checking -fcf-protection.
19531 2018-02-07 Tom de Vries <tom@codesourcery.com>
19534 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19537 2018-02-07 Richard Biener <rguenther@suse.de>
19539 PR tree-optimization/84204
19540 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19543 PR tree-optimization/84205
19544 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19545 special-case isl_ast_op_zdiv_r.
19547 PR tree-optimization/84223
19548 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19549 Only add conditions from within the region.
19550 (gather_bbs::after_dom_children): Adjust.
19552 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19555 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19556 * config/avr/avr.md: Only post-reload split REG-REG moves if
19557 either register is GENERAL_REG_P.
19559 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19561 PR tree-optimization/84235
19562 * tree-ssa-scopedtables.c
19563 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19564 if the subtraction is performed in floating point type where NaNs are
19565 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19566 build 1. Formatting fix.
19568 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19571 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19572 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19573 and skip it regardless of bb boundaries. Use CALL_P macro,
19574 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19575 unnecessarily, formatting fix.
19577 2018-02-06 Michael Collison <michael.collison@arm.com>
19579 * config/arm/thumb2.md:
19580 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19581 (*thumb_mov_notscc): Ditto.
19583 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19586 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19587 unsigned_fix, not "s".
19589 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19591 * configure.ac (gcc_fn_eh_frame_ro): New function.
19592 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19593 correct .eh_frame permissions.
19594 * configure: Regenerate.
19596 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19598 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19599 irrelevant options.
19601 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19603 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19604 Display warning message for -mno-speculate-indirect-jumps.
19606 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19608 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19610 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19612 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19614 PR tree-optimization/84225
19615 * tree-eh.c (find_trapping_overflow): Only call
19616 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19618 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19621 * config/i386/i386.c: Reimplement the check of possible options
19622 -mibt/-mshstk conbination. Change error messages.
19623 * doc/invoke.texi: Fix a typo: remove extra '='.
19625 2018-02-06 Marek Polacek <polacek@redhat.com>
19627 PR tree-optimization/84228
19628 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19630 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19633 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19634 emitted arch directives.
19635 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19636 __ARM_FEATURE_COPROC before changing architectures.
19638 2018-02-06 Richard Biener <rguenther@suse.de>
19640 * config/i386/i386.c (print_reg): Fix typo.
19641 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19643 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19645 * configure: Regenerate.
19647 2018-02-05 Martin Sebor <msebor@redhat.com>
19649 PR tree-optimization/83369
19650 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19653 2018-02-05 Martin Liska <mliska@suse.cz>
19655 * doc/invoke.texi: Cherry-pick upstream r323995.
19657 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19659 * ira.c (ira_init_register_move_cost): Adjust comment.
19661 2018-02-05 Martin Liska <mliska@suse.cz>
19663 PR gcov-profile/84137
19664 * doc/gcov.texi: Fix typo in documentation.
19666 2018-02-05 Martin Liska <mliska@suse.cz>
19668 PR gcov-profile/83879
19669 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19670 using dlopen functionality.
19672 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19674 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19675 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19676 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19677 _mm_maskz_range_round_ss): New intrinsics.
19678 (__builtin_ia32_rangesd128_round)
19679 (__builtin_ia32_rangess128_round): Remove.
19680 (__builtin_ia32_rangesd128_mask_round,
19681 __builtin_ia32_rangess128_mask_round): New builtins.
19682 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19683 __builtin_ia32_rangess128_round): Remove.
19684 (__builtin_ia32_rangesd128_mask_round,
19685 __builtin_ia32_rangess128_mask_round): New builtins.
19686 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19687 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19688 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19689 "<round_saeonly_constraint>")): Changed to ...
19690 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19691 "<round_saeonly_scalar_constraint>")): ... this.
19692 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19693 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19694 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19695 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19696 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19698 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19700 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19702 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19703 Remove all values except native, 8540 and 8548.
19705 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19707 * config/i386/i386.c (ix86_output_function_return): Pass
19708 INVALID_REGNUM, instead of -1, as invalid register number to
19709 indirect_thunk_name and output_indirect_thunk.
19711 2018-02-02 Julia Koval <julia.koval@intel.com>
19713 * config.gcc: Add -march=icelake.
19714 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19715 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19716 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19717 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19718 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19719 (processor_target_table): Add icelake.
19720 (ix86_option_override_internal): Handle new PTAs.
19721 (get_builtin_code_for_version): Handle icelake.
19722 (M_INTEL_COREI7_ICELAKE): New.
19723 (fold_builtin_cpu): Handle icelake.
19724 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19725 * doc/invoke.texi: Add -march=icelake.
19727 2018-02-02 Julia Koval <julia.koval@intel.com>
19729 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19730 to wide_int_bitmask.
19731 * wide-int-bitmask.h: New.
19733 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19736 * config/i386/i386.md: Replace Pmode with word_mode in
19737 builtin_setjmp_setup and builtin_longjmp to support x32.
19739 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19743 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19745 (rs6000_supported_cpu_names): New static variable.
19746 (linux_cpu_translation_table): Likewise.
19747 (elf_platform) <cpu>: Define new static variable and use it.
19748 Translate kernel AT_PLATFORM name to canonical name if needed.
19749 Error if platform name is unknown.
19751 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19754 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19756 2018-02-01 Jeff Law <law@redhat.com>
19759 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19760 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19761 the scratch if RELEASE_VIA_POP is false.
19762 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19763 If we have to save a temporary register, decrement SIZE appropriately.
19764 Pass new arguments to release_scratch_register_on_entry.
19765 (ix86_adjust_stack_and_probe): Likewise.
19766 (ix86_emit_probe_stack_range): Pass new arguments to
19767 release_scratch_register_on_entry.
19769 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19771 PR rtl-optimization/84157
19772 * combine.c (change_zero_ext): Use REG_P predicate in
19773 front of HARD_REGISTER_P predicate.
19775 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19777 * config/avr/avr.c (avr_option_override): Move disabling of
19778 -fdelete-null-pointer-checks to...
19779 * common/config/avr/avr-common.c (avr_option_optimization_table):
19782 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19784 PR tree-optimization/81635
19785 * tree-data-ref.c (split_constant_offset_1): For types that
19786 wrap on overflow, try to use range info to prove that wrapping
19789 2018-02-01 Renlin Li <renlin.li@arm.com>
19792 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19793 TAILCALL_ADDR_REGS.
19794 (aarch64_register_move_cost): Likewise.
19795 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19796 TAILCALL_ADDR_REGS.
19797 (REG_CLASS_NAMES): Likewise.
19798 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19799 TAILCALL_ADDR_REGS. Remove IP registers.
19800 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19802 2018-02-01 Richard Biener <rguenther@suse.de>
19804 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19805 for specifying RPO order and allow NULL for that.
19806 * domwalk.c (dom_walker::dom_walker): Likewise.
19807 (dom_walker::walk): Handle NULL RPO order.
19808 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19810 (rewrite_update_dom_walker): Likewise.
19811 (mark_def_dom_walker): Likewise.
19813 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19815 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19816 (aarch64_maybe_expand_sve_subreg_move): Declare.
19817 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19818 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19820 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19821 that are semantically a reverse operation.
19822 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19823 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19824 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19826 (aarch64_can_change_mode_class): For big-endian, forbid changes
19827 between two SVE modes if they have different element sizes.
19829 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19831 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19832 the TImode handling for big-endian targets.
19834 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19836 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19837 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19839 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19840 Remove BSWAP handing for big-endian targets and use the form of
19841 LD1RQ appropariate for the mode.
19843 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19845 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19846 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19847 duplicated element.
19849 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19852 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19853 check for operands that need to go through aarch64_sve_reload_be.
19855 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19857 PR tree-optimization/81661
19858 PR tree-optimization/84117
19859 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19860 * tree-eh.c: Include gimplify.h.
19861 (find_trapping_overflow, replace_trapping_overflow,
19862 rewrite_to_non_trapping_overflow): New functions.
19863 * tree-vect-loop.c: Include tree-eh.h.
19864 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19865 * tree-data-ref.c: Include tree-eh.h.
19866 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19868 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19870 PR rtl-optimization/84123
19871 * combine.c (change_zero_ext): Check if hard register satisfies
19872 can_change_dest_mode before calling gen_lowpart_SUBREG.
19874 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19877 * ira.c (ira_init_register_move_cost): Remove assert.
19879 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19881 PR rtl-optimization/84071
19882 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19883 * doc/tm.texi: Regenerate.
19885 2018-01-31 Richard Biener <rguenther@suse.de>
19887 PR tree-optimization/84132
19888 * tree-data-ref.c (analyze_miv_subscript): Properly
19889 check whether evolution_function_is_affine_multivariate_p
19890 before calling gcd_of_steps_may_divide_p.
19892 2018-01-31 Julia Koval <julia.koval@intel.com>
19895 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19896 * config/i386/i386.md (rdpid_rex64) New.
19897 (rdpid): Make 32bit only.
19899 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19902 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19903 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19905 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19908 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19910 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19912 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19914 PR rtl-optimization/84071
19915 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19916 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19918 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19920 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19921 (arc_attribute_table): Add 'aux' attribute.
19922 (arc_in_small_data_p): Consider aux like variables.
19923 (arc_is_aux_reg_p): New function.
19924 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19925 (arc_get_aux_arg): New function.
19926 (prepare_move_operands): Handle aux-register access.
19927 (arc_handle_aux_attribute): New function.
19928 * doc/extend.texi (ARC Variable attributes): Add subsection.
19930 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19932 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19933 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19934 (arc_attribute_table): Add 'uncached' attribute.
19935 (arc_print_operand): Print '.di' flag for uncached memory
19937 (arc_in_small_data_p): Do not consider for small data the uncached
19939 (arc_is_uncached_mem_p): New function.
19940 * config/arc/predicates.md (compact_store_memory_operand): Check
19941 for uncached memory accesses.
19942 (nonvol_nonimm_operand): Likewise.
19943 * doc/extend.texi (ARC Type Attribute): New subsection.
19945 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19948 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19949 falign-loops=): Add Optimization flag.
19951 2018-01-30 Jeff Law <law@redhat.com>
19954 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19955 INT_REGISTERS_SAVED. Check it prior to calling
19956 get_scratch_register_on_entry.
19957 (ix86_adjust_stack_and_probe): Similarly.
19958 (ix86_emit_probe_stack_range): Similarly.
19959 (ix86_expand_prologue): Corresponding changes.
19961 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19964 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19965 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19967 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19970 * lra-constraints.c (curr_insn_transform): Process AND in the
19973 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19975 PR rtl-optimization/83986
19976 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19977 dependence against last_pending_memory_flush in addition to
19978 pending_jump_insns.
19980 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19982 PR tree-optimization/81611
19983 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19986 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19989 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19992 2018-01-30 Richard Biener <rguenther@suse.de>
19993 Jakub Jelinek <jakub@redhat.com>
19995 PR tree-optimization/84111
19996 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19997 inner loops added during recursion, as they don't have up-to-date
20000 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20003 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20004 (can_inline_edge_by_limits_p): ... here.
20005 (can_early_inline_edge_p, check_callers,
20006 update_caller_keys, update_callee_keys, recursive_inlining,
20007 add_new_edges_to_heap, speculation_useful_p,
20008 inline_small_functions,
20009 inline_small_functions, flatten_function,
20010 inline_to_all_callers_1): Update.
20012 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20014 * profile-count.c (profile_count::combine_with_ipa_count): Handle
20017 2018-01-30 Richard Biener <rguenther@suse.de>
20019 PR tree-optimization/83008
20020 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20021 invariant and constant vector uses in stmts when they need
20022 more than one stmt.
20024 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20027 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20028 * configure: Regenerate.
20030 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20032 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20034 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20035 Use gen_rtx_REG rather than gen_lowpart.
20037 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20039 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20040 rather than 0 when creating partial subregs.
20042 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20044 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20047 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
20050 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20051 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20052 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20053 flags. This restores the settings used before the 2017-07-24.
20054 Turning off pre increment/decrement/modify allows IVOPTS to
20055 optimize DF/SF loops where the index is an int.
20057 2018-01-29 Richard Biener <rguenther@suse.de>
20058 Kelvin Nilsen <kelvin@gcc.gnu.org>
20061 * tree-vect-stmts.c (vectorizable_call): Don't call
20062 targetm.vectorize_builtin_md_vectorized_function if callee is
20065 2018-01-22 Carl Love <cel@us.ibm.com>
20067 * doc/extend.tex: Fix typo in second arg in
20068 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20070 2018-01-29 Richard Biener <rguenther@suse.de>
20072 PR tree-optimization/84086
20073 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20074 (flush_ssaname_freelist): When SSA names were released reset
20075 the SCEV hash table.
20077 2018-01-29 Richard Biener <rguenther@suse.de>
20079 PR tree-optimization/84057
20080 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20081 removed paths when removing edges.
20083 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
20085 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20086 -mfunction-return=@var{choice}.
20088 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
20090 PR diagnostic/84034
20091 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20092 Handle CR like TAB.
20093 (layout::print_source_line): Likewise.
20094 (test_get_line_width_without_trailing_whitespace): Add test cases.
20096 2018-01-27 Jakub Jelinek <jakub@redhat.com>
20098 PR middle-end/84040
20099 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20102 2018-01-26 Jim Wilson <jimw@sifive.com>
20104 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20106 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20109 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20111 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20112 and CMP + SUB-immediate -> SUBS.
20114 2018-01-26 Martin Sebor <msebor@redhat.com>
20116 PR tree-optimization/83896
20117 * tree-ssa-strlen.c (get_string_len): Rename...
20118 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
20119 Avoid assuming length is constant.
20120 (handle_char_store): Use HOST_WIDE_INT for string length.
20122 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
20125 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20126 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20128 2018-01-26 Richard Biener <rguenther@suse.de>
20130 PR rtl-optimization/84003
20131 * dse.c (record_store): Only record redundant stores when
20132 the earlier store aliases at least all accesses the later one does.
20134 2018-01-26 Jakub Jelinek <jakub@redhat.com>
20136 PR rtl-optimization/83985
20137 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20138 REG_CFA_RESTORE insns.
20139 (delete_unmarked_insns): Don't ignore separate shrink wrapping
20140 REG_CFA_RESTORE insns here.
20143 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20144 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20146 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20148 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20149 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20150 (arc_init): Likewise.
20151 (arc_override_options): Likewise.
20152 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20154 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20156 * config/arc/arc.h (TARGET_DBNZ): Define.
20157 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20158 properly set the tune attribute.
20159 (dbnz): Use TARGET_DBNZ guard.
20160 * config/arc/arc.opt (mtune): Add core3 option.
20162 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20164 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20165 recognize new pic like addresses.
20166 (arc_delegitimize_address): Clean up.
20168 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20170 * config/arc/arc-arches.def: Option mrf16 valid for all
20172 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20173 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20174 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20175 * config/arc/arc-tables.opt: Regenerate.
20176 * config/arc/arc.c (arc_conditional_register_usage): Handle
20177 reduced register file case.
20178 (arc_file_start): Set must have build attributes.
20179 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20180 mrf16 option value.
20181 * config/arc/arc.opt (mrf16): Add new option.
20182 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20183 * config/arc/genmultilib.awk: Handle new mrf16 option.
20184 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20185 * config/arc/t-multilib: Regenerate.
20186 * doc/invoke.texi (ARC Options): Document mrf16 option.
20188 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20190 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20191 * config/arc/arc.c (arc_handle_secure_attribute): New function.
20192 (arc_attribute_table): Add 'secure_call' attribute.
20193 (arc_print_operand): Print secure call operand.
20194 (arc_function_ok_for_sibcall): Don't optimize tail calls when
20196 (arc_is_secure_call_p): New function. * config/arc/arc.md
20197 (call_i): Add support for sjli instruction.
20198 (call_value_i): Likewise.
20199 * config/arc/constraints.md (Csc): New constraint.
20201 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20202 John Eric Martin <John.Martin@emmicro-us.com>
20204 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20205 * config/arc/arc.c (_arc_jli_section): New struct.
20206 (arc_jli_section): New type.
20207 (rc_jli_sections): New static variable.
20208 (arc_handle_jli_attribute): New function.
20209 (arc_attribute_table): Add jli_always and jli_fixed attribute.
20210 (arc_file_end): New function.
20211 (TARGET_ASM_FILE_END): Define.
20212 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20213 (arc_add_jli_section): New function.
20214 (jli_call_scan): Likewise.
20215 (arc_reorg): Call jli_call_scan.
20216 (arc_output_addsi): Remove 'S' from printing asm operand.
20217 (arc_is_jli_call_p): New function.
20218 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20220 (movhi_insn): Likewise.
20221 (movsi_insn): Likewise.
20222 (movsi_set_cc_insn): Likewise.
20223 (loadqi_update): Likewise.
20224 (load_zeroextendqisi_update): Likewise.
20225 (load_signextendqisi_update): Likewise.
20226 (loadhi_update): Likewise.
20227 (load_zeroextendhisi_update): Likewise.
20228 (load_signextendhisi_update): Likewise.
20229 (loadsi_update): Likewise.
20230 (loadsf_update): Likewise.
20231 (movsicc_insn): Likewise.
20232 (bset_insn): Likewise.
20233 (bxor_insn): Likewise.
20234 (bclr_insn): Likewise.
20235 (bmsk_insn): Likewise.
20236 (bicsi3_insn): Likewise.
20237 (cmpsi_cc_c_insn): Likewise.
20238 (movsi_ne): Likewise.
20239 (movsi_cond_exec): Likewise.
20240 (clrsbsi2): Likewise.
20241 (norm_f): Likewise.
20251 (call_i): Remove 'S' asm letter, add jli instruction.
20252 (call_value_i): Likewise.
20253 * config/arc/arc.op (mjli-always): New option.
20254 * config/arc/constraints.md (Cji): New constraint.
20255 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20257 (subsf3_fpx): Likewise.
20258 (mulsf3_fpx): Likewise.
20259 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20261 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20262 function attrbutes.
20263 * doc/invoke.texi (ARC): Document mjli-always option.
20265 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20267 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20268 avoid addition with 0 and use incw and decw where possible.
20270 2018-01-26 Richard Biener <rguenther@suse.de>
20272 PR tree-optimization/81082
20273 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20274 association if it requires casting to unsigned.
20275 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20276 from fold_plusminus_mult_expr to catch important cases late when
20277 range info is available.
20279 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20281 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20282 * configure.ac (hidden_linkonce): New test.
20283 * configure: Regenerate.
20284 * config.in: Regenerate.
20286 2018-01-26 Julia Koval <julia.koval@intel.com>
20288 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20289 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20290 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20291 _mm_mask_bitshuffle_epi64_mask): Fix type.
20292 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20293 USI_FTYPE_V4DI_V4DI_USI): Remove.
20294 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20295 __builtin_ia32_vpshufbitqmb256_mask,
20296 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20297 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20298 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20300 2018-01-26 Alan Modra <amodra@gmail.com>
20303 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20304 UNSPEC_VBPERMQ. Sort other unspecs.
20306 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20308 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20310 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20312 PR middle-end/83055
20313 * predict.c (drop_profile): Do not push/pop cfun; update also
20315 (handle_missing_profiles): Fix logic looking for zero profiles.
20317 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20319 PR middle-end/83977
20320 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20321 on functions with #pragma omp declare simd or functions with simd
20323 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20324 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20325 Remove trailing \n from warning_at calls.
20327 2018-01-25 Tom de Vries <tom@codesourcery.com>
20330 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20331 for neutered workers.
20333 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20336 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20337 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20339 2018-01-24 Jeff Law <law@redhat.com>
20342 * i386.c (get_probe_interval): Move to earlier point.
20343 (ix86_compute_frame_layout): If -fstack-clash-protection and
20344 the frame is larger than the probe interval, then use pushes
20345 to save registers rather than reg->mem moves.
20346 (ix86_expand_prologue): Remove conditional for int_registers_saved
20349 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20352 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20353 min/max for never referenced object.
20355 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20357 PR middle-end/83977
20358 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20360 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20361 attributes from DECL_ATTRIBUTES (decl) without affecting
20362 DECL_ATTRIBUTES (current_function_decl).
20363 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20364 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20366 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20368 PR tree-optimization/83979
20369 * fold-const.c (fold_comparison): Use constant_boolean_node
20370 instead of boolean_{true,false}_node.
20372 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20374 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20377 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20379 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20380 Simplify the clause that sets the length attribute.
20381 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20382 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20383 clause that sets the length attribute.
20384 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20386 2018-01-24 Tom de Vries <tom@codesourcery.com>
20389 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20390 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20391 Add strict parameter.
20392 (prevent_branch_around_nothing): Insert dummy insn between branch to
20393 label and label with no ptx insn inbetween.
20394 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20396 2018-01-24 Tom de Vries <tom@codesourcery.com>
20399 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20400 for neutered threads in warp.
20401 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20403 2018-01-24 Richard Biener <rguenther@suse.de>
20405 PR tree-optimization/83176
20406 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20409 2018-01-24 Richard Biener <rguenther@suse.de>
20411 PR tree-optimization/82819
20412 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20413 code generating pluses that are no-ops in the target precision.
20415 2018-01-24 Richard Biener <rguenther@suse.de>
20417 PR middle-end/84000
20418 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20420 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20422 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20423 to merge probabilities.
20424 * predict.c (probably_never_executed): Also mark as cold functions
20425 with global 0 profile and guessed local profile.
20426 * profile-count.c (profile_probability::combine_with_count): New
20428 * profile-count.h (profile_probability::operator*,
20429 profile_probability::operator*=, profile_probability::operator/,
20430 profile_probability::operator/=): Reduce precision to adjusted
20431 and set value to guessed on contradictory divisions.
20432 (profile_probability::combine_with_freq): Remove.
20433 (profile_probability::combine_wiht_count): Declare.
20434 (profile_count::force_nonzero):: Set to adjusted.
20435 (profile_count::probability_in):: Set quality to adjusted.
20436 * tree-ssa-tail-merge.c (replace_block_by): Use
20437 combine_with_count.
20439 2018-01-23 Andrew Waterman <andrew@sifive.com>
20440 Jim Wilson <jimw@sifive.com>
20442 * config/riscv/riscv.c (riscv_stack_boundary): New.
20443 (riscv_option_override): Set riscv_stack_boundary. Handle
20444 riscv_preferred_stack_boundary_arg.
20445 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20446 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20447 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20448 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20449 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20450 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20452 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20455 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20456 of struct ix86_frame.
20457 (ix86_expand_epilogue): Likewise. Add a local variable for
20458 the reg_save_offset field in struct ix86_frame.
20460 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20462 PR tree-optimization/82604
20463 * tree-loop-distribution.c (enum partition_kind): New enum item
20464 PKIND_PARTIAL_MEMSET.
20465 (partition_builtin_p): Support above new enum item.
20466 (generate_code_for_partition): Ditto.
20467 (compute_access_range): Differentiate cases that equality can be
20468 proven at all loops, the innermost loops or no loops.
20469 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20470 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20471 (finalize_partitions, distribute_loop): Don't fuse partition of
20472 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20473 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20474 parloop is enabled.
20476 2018-01-23 Martin Liska <mliska@suse.cz>
20478 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20479 order to ignore the predictor.
20480 (PRED_POLYMORPHIC_CALL): Likewise.
20481 (PRED_RECURSIVE_CALL): Likewise.
20483 2018-01-23 Martin Liska <mliska@suse.cz>
20485 * tree-profile.c (tree_profiling): Print function header to
20486 aware reader which function we are working on.
20487 * value-prof.c (gimple_find_values_to_profile): Do not print
20488 not interesting value histograms.
20490 2018-01-23 Martin Liska <mliska@suse.cz>
20492 * profile-count.h (enum profile_quality): Add
20493 profile_uninitialized as the first value. Do not number values
20494 as they are zero based.
20495 (profile_count::verify): Update sanity check.
20496 (profile_probability::verify): Likewise.
20498 2018-01-23 Nathan Sidwell <nathan@acm.org>
20500 * doc/invoke.texi (ffor-scope): Deprecate.
20502 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20504 PR tree-optimization/83510
20505 * domwalk.c (set_all_edges_as_executable): New function.
20506 (dom_walker::dom_walker): Convert bool param
20507 "skip_unreachable_blocks" to enum reachability. Move setup of
20508 edge flags to set_all_edges_as_executable and only do it when
20509 reachability is REACHABLE_BLOCKS.
20510 * domwalk.h (enum dom_walker::reachability): New enum.
20511 (dom_walker::dom_walker): Convert bool param
20512 "skip_unreachable_blocks" to enum reachability.
20513 (set_all_edges_as_executable): New decl.
20514 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20515 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20517 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20518 but converting true to REACHABLE_BLOCKS.
20519 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20521 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20522 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20523 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20525 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20526 if check_all_array_refs will be called.
20528 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20530 * tree.c (selftest::test_location_wrappers): Add more test
20533 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20535 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20536 (selftest::test_bit_in_range): Likewise.
20538 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20541 * doc/sourcebuild.texi (vect_float): Say that the selector
20542 only describes the situation when -funsafe-math-optimizations is on.
20543 (vect_float_strict): Document.
20545 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20547 PR tree-optimization/83965
20548 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20549 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20550 instead of checking only for a reduction.
20551 (vect_recog_widen_sum_pattern): Likewise.
20553 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20555 * predict.c (probably_never_executed): Only use precise profile info.
20556 (compute_function_frequency): Skip after inlining hack since we now
20557 have quality checking.
20559 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20561 * profile-count.h (profile_probability::very_unlikely,
20562 profile_probability::unlikely, profile_probability::even): Set
20563 precision to guessed.
20565 2018-01-23 Richard Biener <rguenther@suse.de>
20567 PR tree-optimization/83963
20568 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20569 Properly terminate dominator walk when crossing the exit edge not
20570 when visiting its source block.
20572 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20575 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20576 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20578 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20580 PR tree-optimization/83957
20581 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20582 semicolon after for body surrounded by braces.
20584 PR tree-optimization/83081
20585 * profile-count.h (profile_probability::split): New method.
20586 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20587 Use profile_probability::split.
20588 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20589 when splitting a single conditional jump into 2.
20591 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20593 PR tree-optimization/69452
20594 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20597 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20599 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20600 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20601 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20603 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20605 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20607 * config/rl78/rl78.md (movdi): New define_expand.
20608 * config/rl78/rl78.c (rl78_split_movdi): New function.
20610 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20613 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20615 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20616 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20617 128-bit to produce an UNSPEC move to get the double word with the
20618 signbit and then a shift directly to do signbit.
20619 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20620 implementation with a new version that just does either a direct
20621 move or a regular move. Move memory interface to separate insns.
20622 Move insns so they are next to the expander.
20623 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20624 with signbit move. Split big and little endian case.
20625 (signbit<mode>2_dm_mem_le): Likewise.
20626 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20627 (signbit<mode>2_dm2): Likewise.
20629 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20631 * config/rl78/rl78.md (anddi3): New define_expand.
20633 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20635 * config/rl78/rl78.md (umindi3): New define_expand.
20637 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20639 * config/rl78/rl78.md (smindi3): New define_expand.
20641 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20643 * config/rl78/rl78.md (smaxdi3): New define_expand.
20645 2018-01-22 Carl Love <cel@us.ibm.com>
20647 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20648 LVX_V1TI): Add macro expansion.
20649 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20650 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20651 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20652 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20653 Change check to determine if the instruction is a byte reversing
20654 entry. Fix typo in comment.
20655 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20656 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20657 Add def_builtin calls for new builtins.
20658 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20659 Add define_insn expansion.
20661 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20663 * config/rl78/rl78.md (umaxdi3): New define_expand.
20665 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20667 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20668 for non-QImode registers.
20670 2018-01-22 Richard Biener <rguenther@suse.de>
20672 PR tree-optimization/83963
20673 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20674 including the loop exit block.
20675 (scop_detection::merge_sese): Likewise.
20676 (scop_detection::add_scop): Do it here instead.
20678 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20680 * doc/sourcebuild.texi (arm_softfloat): Document.
20682 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20685 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20686 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20687 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20689 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20690 David Edelsohn <dje.gcc@gmail.com>
20693 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20694 Change "crset eq" to "crset 2".
20695 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20696 (*call_indirect_aix<mode>_nospec): Likewise.
20697 (*call_value_indirect_aix<mode>_nospec): Likewise.
20698 (*call_indirect_elfv2<mode>_nospec): Likewise.
20699 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20700 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20701 change assembly output from . to $.
20702 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20703 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20704 (*tablejump<mode>_internal1_nospec): Likewise.
20706 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20709 * config/sh/sh_optimize_sett_clrt.cc:
20710 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20712 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20714 PR tree-optimization/83940
20715 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20716 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20717 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20718 use it to pass back the definition type.
20719 (vect_check_store_rhs): Likewise rhs_dt_out.
20720 (vect_build_gather_load_calls): Add a mask_dt argument and use
20721 it instead of a call to vect_is_simple_use.
20722 (vectorizable_store): Update calls to vect_check_load_store_mask
20723 and vect_check_store_rhs. Use the dt returned by the latter instead
20724 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20725 instead of calls to vect_is_simple_use. Pass the scalar rather
20726 than the vector operand to vect_is_simple_use when handling
20727 second and subsequent copies of an rhs value.
20728 (vectorizable_load): Update calls to vect_check_load_store_mask
20729 and vect_build_gather_load_calls. Use the cached mask_dt and
20730 gs_info.offset_dt instead of calls to vect_is_simple_use.
20732 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20734 PR middle-end/83945
20735 * tree-emutls.c: Include gimplify.h.
20736 (lower_emutls_2): New function.
20737 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20738 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20739 it before further processing.
20742 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20743 UINTVAL (trueop1) instead of INTVAL (op1).
20745 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20749 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20750 INCOMING_FRAME_SP_OFFSET if not defined.
20751 (scan_trace): Add ENTRY argument. If true and
20752 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20753 emit a note to adjust the CFA offset.
20754 (create_cfi_notes): Adjust scan_trace callers.
20755 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20756 INCOMING_FRAME_SP_OFFSET in the CIE.
20757 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20758 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20760 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20761 * doc/tm.texi: Regenerated.
20763 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20765 PR rtl-optimization/83147
20766 * lra-constraints.c (remove_inheritance_pseudos): Use
20767 lra_substitute_pseudo_within_insn.
20769 2018-01-19 Tom de Vries <tom@codesourcery.com>
20770 Cesar Philippidis <cesar@codesourcery.com>
20773 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20775 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20778 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20779 spaces for function labels.
20781 2018-01-19 Martin Liska <mliska@suse.cz>
20783 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20784 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20785 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20786 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20787 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20788 (PRED_CONST_RETURN): Change from 69 to 65.
20789 (PRED_NULL_RETURN): Change from 91 to 71.
20790 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20791 (PRED_LOOP_GUARD): Change from 66 to 73.
20793 2018-01-19 Martin Liska <mliska@suse.cz>
20795 * predict.c (predict_insn_def): Add new assert.
20796 (struct branch_predictor): Change type to signed integer.
20797 (test_prediction_value_range): Amend test to cover
20798 PROB_UNINITIALIZED.
20799 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20800 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20801 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20802 (PRED_LOOP_IV_COMPARE): Likewise.
20803 * predict.h (PROB_UNINITIALIZED): Define new constant.
20805 2018-01-19 Martin Liska <mliska@suse.cz>
20807 * predict.c (dump_prediction): Add new format for
20808 analyze_brprob.py script which is enabled with -details
20810 * profile-count.h (precise_p): New function.
20812 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20814 PR tree-optimization/83922
20815 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20816 there are no statements that need masking.
20817 (vect_active_double_reduction_p): New function.
20818 (vect_analyze_loop_operations): Use it when handling phis that
20819 are not in the loop header.
20821 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20823 PR tree-optimization/83914
20824 * tree-vect-loop.c (vectorizable_induction): Don't convert
20825 init_expr or apply the peeling adjustment for inductions
20826 that are nested within the vectorized loop.
20828 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20830 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20833 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20837 * function.h (gimplify_parameters): Add gimple_seq * argument.
20838 * function.c: Include gimple.h and options.h.
20839 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20840 for the added local temporaries if needed.
20841 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20842 if there are any parameter cleanups, wrap whole body into a
20843 try/finally with the cleanups.
20845 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20848 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20849 Use GET_MODE_CLASS for scalar floating point.
20851 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20855 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20856 Fix call of call_cgraph_insertion_hooks.
20858 2018-01-18 Martin Sebor <msebor@redhat.com>
20860 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20862 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20865 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20868 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20871 * common.opt: (-ffile-prefix-map): New option.
20872 * opts.c (common_handle_option): Defer it.
20873 * opts-global.c (handle_common_deferred_options): Handle it.
20874 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20875 * file-prefix-map.h: New file.
20876 (remap_debug_filename, add_debug_prefix_map): ...here.
20877 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20878 * final.c (debug_prefix_map, add_debug_prefix_map
20879 remap_debug_filename): Move to...
20880 * file-prefix-map.c: New file.
20881 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20882 generalize, get rid of alloca(), use strrchr() instead of strchr().
20883 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20884 Implement in terms of add_prefix_map().
20885 (remap_macro_filename, remap_debug_filename): Implement in term of
20887 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20888 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20889 * dbxout.c: Include file-prefix-map.h.
20890 * varasm.c: Likewise.
20891 * vmsdbgout.c: Likewise.
20892 * xcoffout.c: Likewise.
20893 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20894 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20895 * doc/invoke.texi (-ffile-prefix-map): Document.
20896 (-fdebug-prefix-map): Update description.
20898 2018-01-18 Martin Liska <mliska@suse.cz>
20900 * config/i386/i386.c (indirect_thunk_name): Document that also
20902 (output_indirect_thunk): Document why both instructions
20903 (pause and lfence) are generated.
20905 2018-01-18 Richard Biener <rguenther@suse.de>
20907 PR tree-optimization/83887
20908 * graphite-scop-detection.c
20909 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20910 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20911 (scop_detection::merge_sese): Re-implement with a flood-fill
20912 algorithm that properly finds a SESE region if it exists.
20914 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20917 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20918 pointer_diff optimizations use view_convert instead of convert.
20920 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20922 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20923 Generate different code for -mno-speculate-indirect-jumps.
20924 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20925 (*call_indirect_aix<mode>): Disable for
20926 -mno-speculate-indirect-jumps.
20927 (*call_indirect_aix<mode>_nospec): New define_insn.
20928 (*call_value_indirect_aix<mode>): Disable for
20929 -mno-speculate-indirect-jumps.
20930 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20931 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20932 -mno-speculate-indirect-jumps.
20933 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20935 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20937 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20938 long double type, set the flags for noting the default long double
20939 type, even if we don't pass or return a long double type.
20941 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20944 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20947 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20949 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20950 support for merge[hl].
20951 (fold_mergehl_helper): New helper function.
20952 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20953 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20954 (altivec_vmrglw_direct): Add xxmrglw insn.
20956 2018-01-17 Andrew Waterman <andrew@sifive.com>
20958 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20959 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20961 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20964 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20965 call the lto_location_cache before reading the
20966 DECL_SOURCE_LOCATION of the types.
20968 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20969 Richard Sandiford <richard.sandiford@linaro.org>
20971 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20972 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20973 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20974 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20975 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20977 * config/aarch64/constraints.md (aarch64_movti_operand):
20979 * config/aarch64/predicates.md (Uti): Add new constraint.
20981 2018-01-17 Carl Love <cel@us.ibm.com>
20983 * config/rs6000/vsx.md (define_expand xl_len_r,
20984 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20985 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20987 (define_expand, define_insn): Move the shift left from the
20988 define_insn to the define_expand for lxvl and stxvl instructions.
20989 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20990 and XL_LEN_R definitions to PURE.
20992 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20994 * config/i386/i386.c (indirect_thunk_name): Declare regno
20995 as unsigned int. Compare regno with INVALID_REGNUM.
20996 (output_indirect_thunk): Ditto.
20997 (output_indirect_thunk_function): Ditto.
20998 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20999 in the call to output_indirect_thunk_function.
21001 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
21003 PR middle-end/83884
21004 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21005 rather than the size of inner_type to determine the stack slot size
21006 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21008 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
21011 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21014 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
21016 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21017 endian Linux systems to optionally enable multilibs for selecting
21018 the long double type if the user configured an explicit type.
21019 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21020 have no long double multilibs if not defined.
21021 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21022 warn if the user used -mabi={ieee,ibm}longdouble and we built
21023 multilibs for long double.
21024 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21025 appropriate multilib option.
21026 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21028 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21029 for building long double multilibs.
21030 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21032 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
21034 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21037 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21039 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21042 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21045 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21048 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21050 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21051 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21053 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
21055 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21056 different rtl trees depending on TARGET_64BIT.
21057 (rs6000_gen_lvx): Likewise.
21059 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21061 * config/visium/visium.md (nop): Tweak comment.
21062 (hazard_nop): Likewise.
21064 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21066 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21067 -mspeculate-indirect-jumps.
21068 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21069 for -mno-speculate-indirect-jumps.
21070 (*call_indirect_elfv2<mode>_nospec): New define_insn.
21071 (*call_value_indirect_elfv2<mode>): Disable for
21072 -mno-speculate-indirect-jumps.
21073 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21074 (indirect_jump): Emit different RTL for
21075 -mno-speculate-indirect-jumps.
21076 (*indirect_jump<mode>): Disable for
21077 -mno-speculate-indirect-jumps.
21078 (*indirect_jump<mode>_nospec): New define_insn.
21079 (tablejump): Emit different RTL for
21080 -mno-speculate-indirect-jumps.
21081 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21082 (tablejumpsi_nospec): New define_expand.
21083 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21084 (tablejumpdi_nospec): New define_expand.
21085 (*tablejump<mode>_internal1): Disable for
21086 -mno-speculate-indirect-jumps.
21087 (*tablejump<mode>_internal1_nospec): New define_insn.
21088 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21091 2018-01-16 Artyom Skrobov tyomitch@gmail.com
21093 * caller-save.c (insert_save): Drop unnecessary parameter. All
21096 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21097 Richard Biener <rguenth@suse.de>
21100 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21101 return early, inline manually is_gimple_sizepos. Make sure if we
21102 call gimplify_expr we don't end up with a gimple constant.
21103 * tree.c (variably_modified_type_p): Don't return true for
21104 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
21105 * gimplify.h (is_gimple_sizepos): Remove.
21107 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21109 PR tree-optimization/83857
21110 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21111 vectorizable_live_operation for pure SLP statements.
21112 (vectorizable_live_operation): Handle PHIs.
21114 2018-01-16 Richard Biener <rguenther@suse.de>
21116 PR tree-optimization/83867
21117 * tree-vect-stmts.c (vect_transform_stmt): Precompute
21118 nested_in_vect_loop_p since the scalar stmt may get invalidated.
21120 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21123 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21124 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21125 If off is not INTEGER_CST, issue a may not be aligned warning
21126 rather than isn't aligned. Use isn%'t rather than isn't.
21127 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21129 <case MULT_EXPR>: Improve the case when bottom and one of the
21130 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21131 operand, in that case check if the other operand is multiple of
21132 bottom divided by the INTEGER_CST operand.
21134 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21137 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21138 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21139 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21140 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21141 * config/pa/pa.c (pa_function_arg_advance): Likewise.
21142 (pa_function_arg, pa_arg_partial_bytes): Likewise.
21143 (pa_function_arg_size): New function.
21145 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21147 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21148 in a separate statement.
21150 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21152 PR tree-optimization/83847
21153 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21154 group gathers and scatters.
21156 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21158 PR rtl-optimization/86620
21159 * params.def (max-sched-ready-insns): Bump minimum value to 1.
21161 PR rtl-optimization/83213
21162 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21163 to last if both are JUMP_INSNs.
21165 PR tree-optimization/83843
21166 * gimple-ssa-store-merging.c
21167 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21168 store_immediate_info for bswap/nop orig_stores.
21170 2018-01-15 Andrew Waterman <andrew@sifive.com>
21172 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21174 <UDIV>: Increase cost if !TARGET_DIV.
21176 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
21178 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21179 (define_attr "cr_logical_3op"): New.
21180 (cceq_ior_compare): Adjust.
21181 (cceq_ior_compare_complement): Adjust.
21182 (*cceq_rev_compare): Adjust.
21183 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21184 (is_cracked_insn): Adjust.
21185 (insn_must_be_first_in_group): Adjust.
21186 * config/rs6000/40x.md: Adjust.
21187 * config/rs6000/440.md: Adjust.
21188 * config/rs6000/476.md: Adjust.
21189 * config/rs6000/601.md: Adjust.
21190 * config/rs6000/603.md: Adjust.
21191 * config/rs6000/6xx.md: Adjust.
21192 * config/rs6000/7450.md: Adjust.
21193 * config/rs6000/7xx.md: Adjust.
21194 * config/rs6000/8540.md: Adjust.
21195 * config/rs6000/cell.md: Adjust.
21196 * config/rs6000/e300c2c3.md: Adjust.
21197 * config/rs6000/e500mc.md: Adjust.
21198 * config/rs6000/e500mc64.md: Adjust.
21199 * config/rs6000/e5500.md: Adjust.
21200 * config/rs6000/e6500.md: Adjust.
21201 * config/rs6000/mpc.md: Adjust.
21202 * config/rs6000/power4.md: Adjust.
21203 * config/rs6000/power5.md: Adjust.
21204 * config/rs6000/power6.md: Adjust.
21205 * config/rs6000/power7.md: Adjust.
21206 * config/rs6000/power8.md: Adjust.
21207 * config/rs6000/power9.md: Adjust.
21208 * config/rs6000/rs64.md: Adjust.
21209 * config/rs6000/titan.md: Adjust.
21211 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21213 * config/i386/predicates.md (indirect_branch_operand): Rewrite
21214 ix86_indirect_branch_register logic.
21216 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21218 * config/i386/constraints.md (Bs): Update
21219 ix86_indirect_branch_register check. Don't check
21220 ix86_indirect_branch_register with GOT_memory_operand.
21222 * config/i386/predicates.md (GOT_memory_operand): Don't check
21223 ix86_indirect_branch_register here.
21224 (GOT32_symbol_operand): Likewise.
21226 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21228 * config/i386/predicates.md (constant_call_address_operand):
21229 Rewrite ix86_indirect_branch_register logic.
21230 (sibcall_insn_operand): Likewise.
21232 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21234 * config/i386/constraints.md (Bs): Replace
21235 ix86_indirect_branch_thunk_register with
21236 ix86_indirect_branch_register.
21238 * config/i386/i386.md (indirect_jump): Likewise.
21239 (tablejump): Likewise.
21240 (*sibcall_memory): Likewise.
21241 (*sibcall_value_memory): Likewise.
21242 Peepholes of indirect call and jump via memory: Likewise.
21243 * config/i386/i386.opt: Likewise.
21244 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21245 (GOT_memory_operand): Likewise.
21246 (call_insn_operand): Likewise.
21247 (sibcall_insn_operand): Likewise.
21248 (GOT32_symbol_operand): Likewise.
21250 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21252 PR middle-end/83837
21253 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21254 type rather than type addr's type points to.
21255 (expand_omp_atomic_mutex): Likewise.
21256 (expand_omp_atomic): Likewise.
21258 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21261 * config/i386/i386.c (output_indirect_thunk_function): Use
21262 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21263 for __x86_return_thunk.
21265 2018-01-15 Richard Biener <rguenther@suse.de>
21267 PR middle-end/83850
21268 * expmed.c (extract_bit_field_1): Fix typo.
21270 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21273 * config/arm/iterators.md (VF): New mode iterator.
21274 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21275 Remove integer-related logic from pattern.
21276 (neon_vabd<mode>_3): Likewise.
21278 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21280 PR middle-end/82694
21281 * common.opt (fstrict-overflow): No longer an alias.
21282 (fwrapv-pointer): New option.
21283 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21284 also for pointer types based on flag_wrapv_pointer.
21285 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21286 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21287 opts->x_flag_wrapv got set.
21288 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21289 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21290 POINTER_TYPE_OVERFLOW_UNDEFINED.
21291 * match.pd: Likewise in address comparison pattern.
21292 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21294 2018-01-15 Richard Biener <rguenther@suse.de>
21297 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21298 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21299 Reset type names to their identifier if their TYPE_DECL doesn't
21300 have linkage (and thus is used for ODR and devirt).
21301 (save_debug_info_for_decl): Remove.
21302 (save_debug_info_for_type): Likewise.
21303 (add_tree_to_fld_list): Adjust.
21304 * tree-pretty-print.c (dump_generic_node): Make dumping of
21305 type names more robust.
21307 2018-01-15 Richard Biener <rguenther@suse.de>
21309 * BASE-VER: Bump to 8.0.1.
21311 2018-01-14 Martin Sebor <msebor@redhat.com>
21314 * builtins.c (check_access): Avoid warning when the no-warning bit
21317 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21319 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21320 * ira-color (allocno_hard_regs_compare): Likewise.
21322 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21325 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21326 Use .pushsection/.popsection.
21328 2018-01-14 Martin Sebor <msebor@redhat.com>
21331 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21333 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21335 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21336 entry from extra_headers.
21337 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21338 extra_headers, make the list bitwise identical to the i?86-*-* one.
21340 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21342 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21343 -mcmodel=large with -mindirect-branch=thunk,
21344 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21345 -mfunction-return=thunk-extern.
21346 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21347 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21348 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21350 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21352 * config/i386/i386.c (print_reg): Print the name of the full
21353 integer register without '%'.
21354 (ix86_print_operand): Handle 'V'.
21355 * doc/extend.texi: Document 'V' modifier.
21357 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21359 * config/i386/constraints.md (Bs): Disallow memory operand for
21360 -mindirect-branch-register.
21362 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21363 (GOT_memory_operand): Likewise.
21364 (call_insn_operand): Likewise.
21365 (sibcall_insn_operand): Likewise.
21366 (GOT32_symbol_operand): Likewise.
21367 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21368 for -mindirect-branch-register.
21369 (tablejump): Likewise.
21370 (*sibcall_memory): Likewise.
21371 (*sibcall_value_memory): Likewise.
21372 Disallow peepholes of indirect call and jump via memory for
21373 -mindirect-branch-register.
21374 (*call_pop): Replace m with Bw.
21375 (*call_value_pop): Likewise.
21376 (*sibcall_pop_memory): Replace m with Bs.
21377 * config/i386/i386.opt (mindirect-branch-register): New option.
21378 * doc/invoke.texi: Document -mindirect-branch-register option.
21380 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21382 * config/i386/i386-protos.h (ix86_output_function_return): New.
21383 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21384 set function_return_type.
21385 (indirect_thunk_name): Add ret_p to indicate thunk for function
21387 (output_indirect_thunk_function): Pass false to
21388 indirect_thunk_name.
21389 (ix86_output_indirect_branch_via_reg): Likewise.
21390 (ix86_output_indirect_branch_via_push): Likewise.
21391 (output_indirect_thunk_function): Create alias for function
21392 return thunk if regno < 0.
21393 (ix86_output_function_return): New function.
21394 (ix86_handle_fndecl_attribute): Handle function_return.
21395 (ix86_attribute_table): Add function_return.
21396 * config/i386/i386.h (machine_function): Add
21397 function_return_type.
21398 * config/i386/i386.md (simple_return_internal): Use
21399 ix86_output_function_return.
21400 (simple_return_internal_long): Likewise.
21401 * config/i386/i386.opt (mfunction-return=): New option.
21402 (indirect_branch): Mention -mfunction-return=.
21403 * doc/extend.texi: Document function_return function attribute.
21404 * doc/invoke.texi: Document -mfunction-return= option.
21406 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21408 * config/i386/i386-opts.h (indirect_branch): New.
21409 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21410 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21411 with local indirect jump when converting indirect call and jump.
21412 (ix86_set_indirect_branch_type): New.
21413 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21414 (indirectlabelno): New.
21415 (indirect_thunk_needed): Likewise.
21416 (indirect_thunk_bnd_needed): Likewise.
21417 (indirect_thunks_used): Likewise.
21418 (indirect_thunks_bnd_used): Likewise.
21419 (INDIRECT_LABEL): Likewise.
21420 (indirect_thunk_name): Likewise.
21421 (output_indirect_thunk): Likewise.
21422 (output_indirect_thunk_function): Likewise.
21423 (ix86_output_indirect_branch_via_reg): Likewise.
21424 (ix86_output_indirect_branch_via_push): Likewise.
21425 (ix86_output_indirect_branch): Likewise.
21426 (ix86_output_indirect_jmp): Likewise.
21427 (ix86_code_end): Call output_indirect_thunk_function if needed.
21428 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21430 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21431 (ix86_attribute_table): Add indirect_branch.
21432 * config/i386/i386.h (machine_function): Add indirect_branch_type
21433 and has_local_indirect_jump.
21434 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21436 (tablejump): Likewise.
21437 (*indirect_jump): Use ix86_output_indirect_jmp.
21438 (*tablejump_1): Likewise.
21439 (simple_return_indirect_internal): Likewise.
21440 * config/i386/i386.opt (mindirect-branch=): New option.
21441 (indirect_branch): New.
21444 (thunk-inline): Likewise.
21445 (thunk-extern): Likewise.
21446 * doc/extend.texi: Document indirect_branch function attribute.
21447 * doc/invoke.texi: Document -mindirect-branch= option.
21449 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21452 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21454 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21456 * ipa-inline.c (want_inline_small_function_p): Return false if
21457 inlining has already failed with CIF_FINAL_ERROR.
21458 (update_caller_keys): Call want_inline_small_function_p before
21460 (update_callee_keys): Likewise.
21462 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21464 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21466 (rs6000_quadword_masked_address_p): Likewise.
21467 (quad_aligned_load_p): Likewise.
21468 (quad_aligned_store_p): Likewise.
21469 (const_load_sequence_p): Add comment to describe the outer-most loop.
21470 (mimic_memory_attributes_and_flags): New function.
21471 (rs6000_gen_stvx): Likewise.
21472 (replace_swapped_aligned_store): Likewise.
21473 (rs6000_gen_lvx): Likewise.
21474 (replace_swapped_aligned_load): Likewise.
21475 (replace_swapped_load_constant): Capitalize argument name in
21476 comment describing this function.
21477 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21478 and stores that access quad-word aligned addresses and replace
21479 with stvx or lvx instructions when appropriate.
21480 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21481 New function prototype.
21482 (rs6000_quadword_masked_address_p): Likewise.
21483 (rs6000_gen_lvx): Likewise.
21484 (rs6000_gen_stvx): Likewise.
21485 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21486 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21487 when memory address is aligned.
21488 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21489 this split to select lvx instruction when memory address is aligned.
21490 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21491 instruction when memory address is aligned.
21492 (*vsx_le_perm_load_v16qi): Likewise.
21493 (four unnamed splitters): Modify to select the stvx instruction
21494 when memory is aligned.
21496 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21498 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21499 which appears in the queue multiple times.
21501 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21502 Alan Hayward <alan.hayward@arm.com>
21503 David Sherwood <david.sherwood@arm.com>
21505 * tree-vectorizer.h (vec_lower_bound): New structure.
21506 (_loop_vec_info): Add check_nonzero and lower_bounds.
21507 (LOOP_VINFO_CHECK_NONZERO): New macro.
21508 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21509 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21510 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21511 fields. Make seg_len the distance travelled, not including the
21513 (dr_direction_indicator): Declare.
21514 (dr_zero_step_indicator): Likewise.
21515 (dr_known_forward_stride_p): Likewise.
21516 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21518 (runtime_alias_check_p): Allow runtime alias checks with
21520 (operator ==): Compare access_size and align.
21521 (prune_runtime_alias_test_list): Rework for new distinction between
21522 the access_size and seg_len.
21523 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21525 (get_segment_min_max): New function.
21526 (create_intersect_range_checks): Use it.
21527 (dr_step_indicator): New function.
21528 (dr_direction_indicator): Likewise.
21529 (dr_zero_step_indicator): Likewise.
21530 (dr_known_forward_stride_p): Likewise.
21531 * tree-loop-distribution.c (data_ref_segment_size): Return
21532 DR_STEP * (niters - 1).
21533 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21535 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21536 (vect_preserves_scalar_order_p): New function, split out from...
21537 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21538 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21539 (vect_vfa_access_size): New function.
21540 (vect_vfa_align): Likewise.
21541 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21542 (dump_lower_bound): New function.
21543 (vect_check_lower_bound): Likewise.
21544 (vect_small_gap_p): Likewise.
21545 (vectorizable_with_step_bound_p): Likewise.
21546 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21547 depencies if the vectorization factor is 1. Convert the checks
21548 for nonzero steps into checks on the bounds of DR_STEP. Try using
21549 a bunds check for variable steps if the minimum required step is
21550 relatively small. Update calls to the dr_with_seg_len
21551 constructor and to vect_compile_time_alias.
21552 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21554 (vect_loop_versioning): Call it.
21555 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21557 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21559 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21560 Alan Hayward <alan.hayward@arm.com>
21561 David Sherwood <david.sherwood@arm.com>
21563 * doc/sourcebuild.texi (vect_scatter_store): Document.
21564 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21566 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21568 * genopinit.c (main): Add supports_vec_scatter_store and
21569 supports_vec_scatter_store_cached to target_optabs.
21570 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21571 IFN_MASK_SCATTER_STORE.
21572 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21574 * internal-fn.h (internal_store_fn_p): Declare.
21575 (internal_fn_stored_value_index): Likewise.
21576 * internal-fn.c (scatter_store_direct): New macro.
21577 (expand_scatter_store_optab_fn): New function.
21578 (direct_scatter_store_optab_supported_p): New macro.
21579 (internal_store_fn_p): New function.
21580 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21581 IFN_MASK_SCATTER_STORE.
21582 (internal_fn_mask_index): Likewise.
21583 (internal_fn_stored_value_index): New function.
21584 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21585 for scatter stores.
21586 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21587 * optabs-query.c (supports_vec_scatter_store_p): New function.
21588 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21589 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21590 true for scatter stores.
21591 (vect_gather_scatter_fn_p): Handle scatter stores too.
21592 (vect_check_gather_scatter): Consider using scatter stores if
21593 supports_vec_scatter_store_p.
21594 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21595 scatter stores too.
21596 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21597 internal_fn_stored_value_index.
21598 (check_load_store_masking): Handle scatter stores too.
21599 (vect_get_store_rhs): Make public.
21600 (vectorizable_call): Use internal_store_fn_p.
21601 (vectorizable_store): Handle scatter store internal functions.
21602 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21603 when deciding whether the end of the group has been reached.
21604 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21605 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21606 (mask_scatter_store<mode>): New insns.
21608 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21609 Alan Hayward <alan.hayward@arm.com>
21610 David Sherwood <david.sherwood@arm.com>
21612 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21613 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21614 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21616 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21617 Use vect_truncate_gather_scatter_offset if we can't treat the
21618 operation as a normal gather load or scatter store.
21619 (get_group_load_store_type): Take the gather_scatter_info
21620 as argument. Try using a gather load or scatter store for
21621 single-element groups.
21622 (get_load_store_type): Update calls to get_group_load_store_type
21623 and vect_use_strided_gather_scatters_p.
21625 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21626 Alan Hayward <alan.hayward@arm.com>
21627 David Sherwood <david.sherwood@arm.com>
21629 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21630 optional tree argument.
21631 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21633 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21634 but continue to use the current value as a fallback.
21635 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21636 to compare the updates.
21637 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21638 (get_load_store_type): Use it when handling a strided access.
21639 (vect_get_strided_load_store_ops): New function.
21640 (vect_get_data_ptr_increment): Likewise.
21641 (vectorizable_load): Handle strided gather loads. Always pass
21642 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21644 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21645 Alan Hayward <alan.hayward@arm.com>
21646 David Sherwood <david.sherwood@arm.com>
21648 * doc/md.texi (gather_load@var{m}): Document.
21649 (mask_gather_load@var{m}): Likewise.
21650 * genopinit.c (main): Add supports_vec_gather_load and
21651 supports_vec_gather_load_cached to target_optabs.
21652 * optabs-tree.c (init_tree_optimization_optabs): Use
21653 ggc_cleared_alloc to allocate target_optabs.
21654 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21655 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21657 * internal-fn.h (internal_load_fn_p): Declare.
21658 (internal_gather_scatter_fn_p): Likewise.
21659 (internal_fn_mask_index): Likewise.
21660 (internal_gather_scatter_fn_supported_p): Likewise.
21661 * internal-fn.c (gather_load_direct): New macro.
21662 (expand_gather_load_optab_fn): New function.
21663 (direct_gather_load_optab_supported_p): New macro.
21664 (direct_internal_fn_optab): New function.
21665 (internal_load_fn_p): Likewise.
21666 (internal_gather_scatter_fn_p): Likewise.
21667 (internal_fn_mask_index): Likewise.
21668 (internal_gather_scatter_fn_supported_p): Likewise.
21669 * optabs-query.c (supports_at_least_one_mode_p): New function.
21670 (supports_vec_gather_load_p): Likewise.
21671 * optabs-query.h (supports_vec_gather_load_p): Declare.
21672 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21673 and memory_type field.
21674 (NUM_PATTERNS): Bump to 15.
21675 * tree-vect-data-refs.c: Include internal-fn.h.
21676 (vect_gather_scatter_fn_p): New function.
21677 (vect_describe_gather_scatter_call): Likewise.
21678 (vect_check_gather_scatter): Try using internal functions for
21679 gather loads. Recognize existing calls to a gather load function.
21680 (vect_analyze_data_refs): Consider using gather loads if
21681 supports_vec_gather_load_p.
21682 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21683 (vect_get_gather_scatter_offset_type): Likewise.
21684 (vect_convert_mask_for_vectype): Likewise.
21685 (vect_add_conversion_to_patterm): Likewise.
21686 (vect_try_gather_scatter_pattern): Likewise.
21687 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21688 (vect_vect_recog_func_ptrs): Add it.
21689 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21690 internal_fn_mask_index and internal_gather_scatter_fn_p.
21691 (check_load_store_masking): Take the gather_scatter_info as an
21692 argument and handle gather loads.
21693 (vect_get_gather_scatter_ops): New function.
21694 (vectorizable_call): Check internal_load_fn_p.
21695 (vectorizable_load): Likewise. Handle gather load internal
21697 (vectorizable_store): Update call to check_load_store_masking.
21698 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21699 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21700 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21701 (aarch64_gather_scale_operand_d): New predicates.
21702 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21703 (mask_gather_load<mode>): New insns.
21705 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21706 Alan Hayward <alan.hayward@arm.com>
21707 David Sherwood <david.sherwood@arm.com>
21709 * optabs.def (fold_left_plus_optab): New optab.
21710 * doc/md.texi (fold_left_plus_@var{m}): Document.
21711 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21712 * internal-fn.c (fold_left_direct): Define.
21713 (expand_fold_left_optab_fn): Likewise.
21714 (direct_fold_left_optab_supported_p): Likewise.
21715 * fold-const-call.c (fold_const_fold_left): New function.
21716 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21717 * tree-parloops.c (valid_reduction_p): New function.
21718 (gather_scalar_reductions): Use it.
21719 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21720 (vect_finish_replace_stmt): Declare.
21721 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21722 (needs_fold_left_reduction_p): New function, split out from...
21723 (vect_is_simple_reduction): ...here. Accept reductions that
21724 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21725 (vect_force_simple_reduction): Also store the reduction type in
21726 the assignment's STMT_VINFO_REDUC_TYPE.
21727 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21728 (merge_with_identity): New function.
21729 (vect_expand_fold_left): Likewise.
21730 (vectorize_fold_left_reduction): Likewise.
21731 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21732 scalar phi in place for it. Check for target support and reject
21733 cases that would reassociate the operation. Defer the transform
21734 phase to vectorize_fold_left_reduction.
21735 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21736 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21737 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21739 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21741 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21742 call to ifc_temp_var.
21744 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21745 Alan Hayward <alan.hayward@arm.com>
21746 David Sherwood <david.sherwood@arm.com>
21748 * target.def (legitimize_address_displacement): Take the original
21749 offset as a poly_int.
21750 * targhooks.h (default_legitimize_address_displacement): Update
21752 * targhooks.c (default_legitimize_address_displacement): Likewise.
21753 * doc/tm.texi: Regenerate.
21754 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21755 as an argument, moving assert of ad->disp == ad->disp_term to...
21756 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21757 Try calling targetm.legitimize_address_displacement before expanding
21758 the address rather than afterwards, and adjust for the new interface.
21759 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21760 Match the new hook interface. Handle SVE addresses.
21761 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21762 new hook interface.
21764 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21766 * Makefile.in (OBJS): Add early-remat.o.
21767 * target.def (select_early_remat_modes): New hook.
21768 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21769 * doc/tm.texi: Regenerate.
21770 * targhooks.h (default_select_early_remat_modes): Declare.
21771 * targhooks.c (default_select_early_remat_modes): New function.
21772 * timevar.def (TV_EARLY_REMAT): New timevar.
21773 * passes.def (pass_early_remat): New pass.
21774 * tree-pass.h (make_pass_early_remat): Declare.
21775 * early-remat.c: New file.
21776 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21778 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21780 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21781 Alan Hayward <alan.hayward@arm.com>
21782 David Sherwood <david.sherwood@arm.com>
21784 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21785 vfm1 with a bound_epilog parameter.
21786 (vect_do_peeling): Update calls accordingly, and move the prologue
21787 call earlier in the function. Treat the base bound_epilog as 0 for
21788 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21789 this base when peeling for gaps.
21790 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21791 with fully-masked loops.
21792 (vect_estimate_min_profitable_iters): Handle the single peeled
21793 iteration in that case.
21795 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21796 Alan Hayward <alan.hayward@arm.com>
21797 David Sherwood <david.sherwood@arm.com>
21799 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21800 single-element interleaving even if the size is not a power of 2.
21801 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21802 accesses for single-element interleaving if the group size is
21805 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21806 Alan Hayward <alan.hayward@arm.com>
21807 David Sherwood <david.sherwood@arm.com>
21809 * doc/md.texi (fold_extract_last_@var{m}): Document.
21810 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21811 * optabs.def (fold_extract_last_optab): New optab.
21812 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21813 * internal-fn.c (fold_extract_direct): New macro.
21814 (expand_fold_extract_optab_fn): Likewise.
21815 (direct_fold_extract_optab_supported_p): Likewise.
21816 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21817 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21818 EXTRACT_LAST_REDUCTION.
21819 (get_initial_def_for_reduction): Do not create an initial vector
21820 for EXTRACT_LAST_REDUCTION reductions.
21821 (vectorizable_reduction): Leave the scalar phi in place for
21822 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21823 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21824 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21825 transform phase to vectorizable_condition.
21826 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21828 (vect_finish_stmt_generation): ...here.
21829 (vect_finish_replace_stmt): New function.
21830 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21831 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21833 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21835 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21836 Alan Hayward <alan.hayward@arm.com>
21837 David Sherwood <david.sherwood@arm.com>
21839 * doc/md.texi (extract_last_@var{m}): Document.
21840 * optabs.def (extract_last_optab): New optab.
21841 * internal-fn.def (EXTRACT_LAST): New internal function.
21842 * internal-fn.c (cond_unary_direct): New macro.
21843 (expand_cond_unary_optab_fn): Likewise.
21844 (direct_cond_unary_optab_supported_p): Likewise.
21845 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21846 loops using EXTRACT_LAST.
21847 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21848 (extract_last_<mode>): ...this optab.
21849 (vec_extract<mode><Vel>): Update accordingly.
21851 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21852 Alan Hayward <alan.hayward@arm.com>
21853 David Sherwood <david.sherwood@arm.com>
21855 * target.def (empty_mask_is_expensive): New hook.
21856 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21857 * doc/tm.texi: Regenerate.
21858 * targhooks.h (default_empty_mask_is_expensive): Declare.
21859 * targhooks.c (default_empty_mask_is_expensive): New function.
21860 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21861 if the target says that empty masks are expensive.
21862 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21864 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21866 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21867 Alan Hayward <alan.hayward@arm.com>
21868 David Sherwood <david.sherwood@arm.com>
21870 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21871 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21872 (vect_use_loop_mask_for_alignment_p): New function.
21873 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21874 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21875 niters_skip argument. Make sure that the first niters_skip elements
21876 of the first iteration are inactive.
21877 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21878 Update call to vect_set_loop_masks_directly.
21879 (get_misalign_in_elems): New function, split out from...
21880 (vect_gen_prolog_loop_niters): ...here.
21881 (vect_update_init_of_dr): Take a code argument that specifies whether
21882 the adjustment should be added or subtracted.
21883 (vect_update_init_of_drs): Likewise.
21884 (vect_prepare_for_masked_peels): New function.
21885 (vect_do_peeling): Skip prologue peeling if we're using a mask
21886 instead. Update call to vect_update_inits_of_drs.
21887 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21889 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21890 alignment. Do not include the number of peeled iterations in
21891 the minimum threshold in that case.
21892 (vectorizable_induction): Adjust the start value down by
21893 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21894 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21895 Take the number of skipped iterations into account when calculating
21897 * tree-vect-stmts.c (vect_gen_while_not): New function.
21899 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21900 Alan Hayward <alan.hayward@arm.com>
21901 David Sherwood <david.sherwood@arm.com>
21903 * doc/sourcebuild.texi (vect_fully_masked): Document.
21904 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21905 default value to 0.
21906 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21908 (vect_analyze_loop_2): ...here. Don't check the vectorization
21909 factor against the number of loop iterations if the loop is
21912 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21913 Alan Hayward <alan.hayward@arm.com>
21914 David Sherwood <david.sherwood@arm.com>
21916 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21917 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21918 (dump_groups): Update accordingly.
21919 (iv_use::mem_type): New member variable.
21920 (address_p): New function.
21921 (record_use): Add a mem_type argument and initialize the new
21923 (record_group_use): Add a mem_type argument. Use address_p.
21924 Remove obsolete null checks of base_object. Update call to record_use.
21925 (find_interesting_uses_op): Update call to record_group_use.
21926 (find_interesting_uses_cond): Likewise.
21927 (find_interesting_uses_address): Likewise.
21928 (get_mem_type_for_internal_fn): New function.
21929 (find_address_like_use): Likewise.
21930 (find_interesting_uses_stmt): Try find_address_like_use before
21931 calling find_interesting_uses_op.
21932 (addr_offset_valid_p): Use the iv mem_type field as the type
21933 of the addressed memory.
21934 (add_autoinc_candidates): Likewise.
21935 (get_address_cost): Likewise.
21936 (split_small_address_groups_p): Use address_p.
21937 (split_address_groups): Likewise.
21938 (add_iv_candidate_for_use): Likewise.
21939 (autoinc_possible_for_pair): Likewise.
21940 (rewrite_groups): Likewise.
21941 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21942 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21943 (get_alias_ptr_type_for_ptr_address): New function.
21944 (rewrite_use_address): Rewrite address uses in calls that were
21945 identified by find_address_like_use.
21947 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21948 Alan Hayward <alan.hayward@arm.com>
21949 David Sherwood <david.sherwood@arm.com>
21951 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21953 * gimple-expr.h (is_gimple_addressable: Likewise.
21954 * gimple-expr.c (is_gimple_address): Likewise.
21955 * internal-fn.c (expand_call_mem_ref): New function.
21956 (expand_mask_load_optab_fn): Use it.
21957 (expand_mask_store_optab_fn): Likewise.
21959 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21960 Alan Hayward <alan.hayward@arm.com>
21961 David Sherwood <david.sherwood@arm.com>
21963 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21964 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21965 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21966 (cond_umax@var{mode}): Document.
21967 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21968 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21969 (cond_umin_optab, cond_umax_optab): New optabs.
21970 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21971 (COND_IOR, COND_XOR): New internal functions.
21972 * internal-fn.h (get_conditional_internal_fn): Declare.
21973 * internal-fn.c (cond_binary_direct): New macro.
21974 (expand_cond_binary_optab_fn): Likewise.
21975 (direct_cond_binary_optab_supported_p): Likewise.
21976 (get_conditional_internal_fn): New function.
21977 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21978 Cope with reduction statements that are vectorized as calls rather
21980 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21981 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21982 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21983 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21984 (UNSPEC_COND_EOR): New unspecs.
21985 (optab): Add mappings for them.
21986 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21987 (sve_int_op, sve_fp_op): New int attributes.
21989 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21990 Alan Hayward <alan.hayward@arm.com>
21991 David Sherwood <david.sherwood@arm.com>
21993 * optabs.def (while_ult_optab): New optab.
21994 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21995 * internal-fn.def (WHILE_ULT): New internal function.
21996 * internal-fn.h (direct_internal_fn_supported_p): New override
21997 that takes two types as argument.
21998 * internal-fn.c (while_direct): New macro.
21999 (expand_while_optab_fn): New function.
22000 (convert_optab_supported_p): Likewise.
22001 (direct_while_optab_supported_p): New macro.
22002 * wide-int.h (wi::udiv_ceil): New function.
22003 * tree-vectorizer.h (rgroup_masks): New structure.
22004 (vec_loop_masks): New typedef.
22005 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22006 and fully_masked_p.
22007 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22008 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22009 (vect_max_vf): New function.
22010 (slpeel_make_loop_iterate_ntimes): Delete.
22011 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22012 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22013 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22014 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22015 internal-fn.h, stor-layout.h and optabs-query.h.
22016 (vect_set_loop_mask): New function.
22017 (add_preheader_seq): Likewise.
22018 (add_header_seq): Likewise.
22019 (interleave_supported_p): Likewise.
22020 (vect_maybe_permute_loop_masks): Likewise.
22021 (vect_set_loop_masks_directly): Likewise.
22022 (vect_set_loop_condition_masked): Likewise.
22023 (vect_set_loop_condition_unmasked): New function, split out from
22024 slpeel_make_loop_iterate_ntimes.
22025 (slpeel_make_loop_iterate_ntimes): Rename to..
22026 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
22027 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22028 (vect_do_peeling): Update call accordingly.
22029 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22031 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22032 mask_compare_type, can_fully_mask_p and fully_masked_p.
22033 (release_vec_loop_masks): New function.
22034 (_loop_vec_info): Use it to free the loop masks.
22035 (can_produce_all_loop_masks_p): New function.
22036 (vect_get_max_nscalars_per_iter): Likewise.
22037 (vect_verify_full_masking): Likewise.
22038 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22039 retries, and free the mask rgroups before retrying. Check loop-wide
22040 reasons for disallowing fully-masked loops. Make the final decision
22041 about whether use a fully-masked loop or not.
22042 (vect_estimate_min_profitable_iters): Do not assume that peeling
22043 for the number of iterations will be needed for fully-masked loops.
22044 (vectorizable_reduction): Disable fully-masked loops.
22045 (vectorizable_live_operation): Likewise.
22046 (vect_halve_mask_nunits): New function.
22047 (vect_double_mask_nunits): Likewise.
22048 (vect_record_loop_mask): Likewise.
22049 (vect_get_loop_mask): Likewise.
22050 (vect_transform_loop): Handle the case in which the final loop
22051 iteration might handle a partial vector. Call vect_set_loop_condition
22052 instead of slpeel_make_loop_iterate_ntimes.
22053 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22054 (check_load_store_masking): New function.
22055 (prepare_load_store_mask): Likewise.
22056 (vectorizable_store): Handle fully-masked loops.
22057 (vectorizable_load): Likewise.
22058 (supportable_widening_operation): Use vect_halve_mask_nunits for
22060 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22061 (vect_gen_while): New function.
22062 * config/aarch64/aarch64.md (umax<mode>3): New expander.
22063 (aarch64_uqdec<mode>): New insn.
22065 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22066 Alan Hayward <alan.hayward@arm.com>
22067 David Sherwood <david.sherwood@arm.com>
22069 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22070 (reduc_xor_scal_optab): New optabs.
22071 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22072 (reduc_xor_scal_@var{m}): Document.
22073 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22074 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22075 internal functions.
22076 * fold-const-call.c (fold_const_call): Handle them.
22077 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22078 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22079 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22080 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22081 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22082 (UNSPEC_XORV): New unspecs.
22083 (optab): Add entries for them.
22084 (BITWISEV): New int iterator.
22085 (bit_reduc_op): New int attributes.
22087 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22088 Alan Hayward <alan.hayward@arm.com>
22089 David Sherwood <david.sherwood@arm.com>
22091 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22092 * internal-fn.def (VEC_SHL_INSERT): New internal function.
22093 * optabs.def (vec_shl_insert_optab): New optab.
22094 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22095 (duplicate_and_interleave): Likewise.
22096 * tree-vect-loop.c: Include internal-fn.h.
22097 (neutral_op_for_slp_reduction): New function, split out from
22098 get_initial_defs_for_reduction.
22099 (get_initial_def_for_reduction): Handle option 2 for variable-length
22100 vectors by loading the neutral value into a vector and then shifting
22101 the initial value into element 0.
22102 (get_initial_defs_for_reduction): Replace the code argument with
22103 the neutral value calculated by neutral_op_for_slp_reduction.
22104 Use gimple_build_vector for constant-length vectors.
22105 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22106 but the first group_size elements have a neutral value.
22107 Use duplicate_and_interleave otherwise.
22108 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22109 Update call to get_initial_defs_for_reduction. Handle SLP
22110 reductions for variable-length vectors by creating one vector
22111 result for each scalar result, with the elements associated
22112 with other scalar results stubbed out with the neutral value.
22113 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22114 Require IFN_VEC_SHL_INSERT for double reductions on
22115 variable-length vectors, or SLP reductions that have
22116 a neutral value. Require can_duplicate_and_interleave_p
22117 support for variable-length unchained SLP reductions if there
22118 is no neutral value, such as for MIN/MAX reductions. Also require
22119 the number of vector elements to be a multiple of the number of
22120 SLP statements when doing variable-length unchained SLP reductions.
22121 Update call to vect_create_epilog_for_reduction.
22122 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22123 and remove initial values.
22124 (duplicate_and_interleave): Make public.
22125 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22126 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22128 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22129 Alan Hayward <alan.hayward@arm.com>
22130 David Sherwood <david.sherwood@arm.com>
22132 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22133 (can_duplicate_and_interleave_p): New function.
22134 (vect_get_and_check_slp_defs): Take the vector of statements
22135 rather than just the current one. Remove excess parentheses.
22136 Restriction rejectinon of vect_constant_def and vect_external_def
22137 for variable-length vectors to boolean types, or types for which
22138 can_duplicate_and_interleave_p is false.
22139 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22140 (duplicate_and_interleave): New function.
22141 (vect_get_constant_vectors): Use gimple_build_vector for
22142 constant-length vectors and suitable variable-length constant
22143 vectors. Use duplicate_and_interleave for other variable-length
22144 vectors. Don't defer the update when inserting new statements.
22146 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22147 Alan Hayward <alan.hayward@arm.com>
22148 David Sherwood <david.sherwood@arm.com>
22150 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22151 min_profitable_iters doesn't go negative.
22153 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22154 Alan Hayward <alan.hayward@arm.com>
22155 David Sherwood <david.sherwood@arm.com>
22157 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22158 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22159 * optabs.def (vec_mask_load_lanes_optab): New optab.
22160 (vec_mask_store_lanes_optab): Likewise.
22161 * internal-fn.def (MASK_LOAD_LANES): New internal function.
22162 (MASK_STORE_LANES): Likewise.
22163 * internal-fn.c (mask_load_lanes_direct): New macro.
22164 (mask_store_lanes_direct): Likewise.
22165 (expand_mask_load_optab_fn): Handle masked operations.
22166 (expand_mask_load_lanes_optab_fn): New macro.
22167 (expand_mask_store_optab_fn): Handle masked operations.
22168 (expand_mask_store_lanes_optab_fn): New macro.
22169 (direct_mask_load_lanes_optab_supported_p): Likewise.
22170 (direct_mask_store_lanes_optab_supported_p): Likewise.
22171 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22173 (vect_load_lanes_supported): Likewise.
22174 * tree-vect-data-refs.c (strip_conversion): New function.
22175 (can_group_stmts_p): Likewise.
22176 (vect_analyze_data_ref_accesses): Use it instead of checking
22177 for a pair of assignments.
22178 (vect_store_lanes_supported): Take a masked_p parameter.
22179 (vect_load_lanes_supported): Likewise.
22180 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22181 vect_store_lanes_supported and vect_load_lanes_supported.
22182 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22183 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22184 parameter. Don't allow gaps for masked accesses.
22185 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
22186 and vect_load_lanes_supported.
22187 (get_load_store_type): Take a masked_p parameter and update
22188 call to get_group_load_store_type.
22189 (vectorizable_store): Update call to get_load_store_type.
22190 Handle IFN_MASK_STORE_LANES.
22191 (vectorizable_load): Update call to get_load_store_type.
22192 Handle IFN_MASK_LOAD_LANES.
22194 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22195 Alan Hayward <alan.hayward@arm.com>
22196 David Sherwood <david.sherwood@arm.com>
22198 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22200 * config/aarch64/aarch64-protos.h
22201 (aarch64_sve_struct_memory_operand_p): Declare.
22202 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22203 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22204 (VPRED, vpred): Handle SVE structure modes.
22205 * config/aarch64/constraints.md (Utx): New constraint.
22206 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22207 (aarch64_sve_struct_nonimmediate_operand): New predicates.
22208 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22209 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22210 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22211 structure modes. Split into pieces after RA.
22212 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22213 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22215 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22216 SVE structure modes.
22217 (aarch64_classify_address): Likewise.
22218 (sizetochar): Move earlier in file.
22219 (aarch64_print_operand): Handle SVE register lists.
22220 (aarch64_array_mode): New function.
22221 (aarch64_sve_struct_memory_operand_p): Likewise.
22222 (TARGET_ARRAY_MODE): Redefine.
22224 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22225 Alan Hayward <alan.hayward@arm.com>
22226 David Sherwood <david.sherwood@arm.com>
22228 * target.def (array_mode): New target hook.
22229 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22230 * doc/tm.texi: Regenerate.
22231 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22232 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22233 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22234 targetm.array_mode.
22235 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22238 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22239 Alan Hayward <alan.hayward@arm.com>
22240 David Sherwood <david.sherwood@arm.com>
22242 * fold-const.c (fold_binary_loc): Check the argument types
22243 rather than the result type when testing for a vector operation.
22245 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22247 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22248 * doc/tm.texi: Regenerate.
22250 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22251 Alan Hayward <alan.hayward@arm.com>
22252 David Sherwood <david.sherwood@arm.com>
22254 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22255 (sve): Document new AArch64 extension.
22256 * doc/md.texi (w): Extend the description of the AArch64
22257 constraint to include SVE vectors.
22258 (Upl, Upa): Document new AArch64 predicate constraints.
22259 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22261 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22262 (msve-vector-bits=): New option.
22263 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22264 SVE when these are disabled.
22265 (sve): New extension.
22266 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22267 modes. Adjust their number of units based on aarch64_sve_vg.
22268 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22269 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22270 aarch64_addr_query_type.
22271 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22272 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22273 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22274 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22275 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22276 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22277 (aarch64_simd_imm_zero_p): Delete.
22278 (aarch64_check_zero_based_sve_index_immediate): Declare.
22279 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22280 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22281 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22282 (aarch64_sve_float_mul_immediate_p): Likewise.
22283 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22284 rather than an rtx.
22285 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22286 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22287 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22288 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22289 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22290 (aarch64_regmode_natural_size): Likewise.
22291 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22292 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22294 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22295 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22296 for VG and the SVE predicate registers.
22297 (V_ALIASES): Add a "z"-prefixed alias.
22298 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22299 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22300 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22301 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22302 (REG_CLASS_NAMES): Add entries for them.
22303 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22304 and the predicate registers.
22305 (aarch64_sve_vg): Declare.
22306 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22307 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22308 (REGMODE_NATURAL_SIZE): Define.
22309 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22311 * config/aarch64/aarch64.c: Include cfgrtl.h.
22312 (simd_immediate_info): Add a constructor for series vectors,
22313 and an associated step field.
22314 (aarch64_sve_vg): New variable.
22315 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22316 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22317 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22318 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22319 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22320 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22321 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22322 (aarch64_get_mask_mode): New functions.
22323 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22324 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22325 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22326 predicate modes and predicate registers. Explicitly restrict
22327 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22328 to store a vector mode if it is recognized by
22329 aarch64_classify_vector_mode.
22330 (aarch64_regmode_natural_size): New function.
22331 (aarch64_hard_regno_caller_save_mode): Return the original mode
22333 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22334 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22335 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22336 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22338 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22339 does not overlap dest if the function is frame-related. Handle
22341 (aarch64_split_add_offset): New function.
22342 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22343 them aarch64_add_offset.
22344 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22345 and update call to aarch64_sub_sp.
22346 (aarch64_add_cfa_expression): New function.
22347 (aarch64_expand_prologue): Pass extra temporary registers to the
22348 functions above. Handle the case in which we need to emit new
22349 DW_CFA_expressions for registers that were originally saved
22350 relative to the stack pointer, but now have to be expressed
22351 relative to the frame pointer.
22352 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22354 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22355 IP0 and IP1 values for SVE frames.
22356 (aarch64_expand_vec_series): New function.
22357 (aarch64_expand_sve_widened_duplicate): Likewise.
22358 (aarch64_expand_sve_const_vector): Likewise.
22359 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22360 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22361 into the register, rather than emitting a SET directly.
22362 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22363 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22364 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22365 (offset_9bit_signed_scaled_p): New functions.
22366 (aarch64_replicate_bitmask_imm): New function.
22367 (aarch64_bitmask_imm): Use it.
22368 (aarch64_cannot_force_const_mem): Reject expressions involving
22369 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22370 (aarch64_classify_index): Handle SVE indices, by requiring
22371 a plain register index with a scale that matches the element size.
22372 (aarch64_classify_address): Handle SVE addresses. Assert that
22373 the mode of the address is VOIDmode or an integer mode.
22374 Update call to aarch64_classify_symbol.
22375 (aarch64_classify_symbolic_expression): Update call to
22376 aarch64_classify_symbol.
22377 (aarch64_const_vec_all_in_range_p): New function.
22378 (aarch64_print_vector_float_operand): Likewise.
22379 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22380 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22381 and the FP immediates 1.0 and 0.5.
22382 (aarch64_print_address_internal): Handle SVE addresses.
22383 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22384 (aarch64_regno_regclass): Handle predicate registers.
22385 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22387 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22388 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22389 (aarch64_convert_sve_vector_bits): New function.
22390 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22391 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22392 rather than an rtx.
22393 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22394 Handle SVE vector and predicate modes. Accept VL-based constants
22395 that need only one temporary register, and VL offsets that require
22396 no temporary registers.
22397 (aarch64_conditional_register_usage): Mark the predicate registers
22398 as fixed if SVE isn't available.
22399 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22400 Return true for SVE vector and predicate modes.
22401 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22402 rather than an unsigned int. Handle SVE modes.
22403 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22405 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22407 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22408 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22409 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22410 (aarch64_sve_float_mul_immediate_p): New functions.
22411 (aarch64_sve_valid_immediate): New function.
22412 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22413 Explicitly reject structure modes. Check for INDEX constants.
22414 Handle PTRUE and PFALSE constants.
22415 (aarch64_check_zero_based_sve_index_immediate): New function.
22416 (aarch64_simd_imm_zero_p): Delete.
22417 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22418 vector modes. Accept constants in the range of CNT[BHWD].
22419 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22420 ask for an Advanced SIMD mode.
22421 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22422 (aarch64_simd_vector_alignment): Handle SVE predicates.
22423 (aarch64_vectorize_preferred_vector_alignment): New function.
22424 (aarch64_simd_vector_alignment_reachable): Use it instead of
22426 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22427 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22429 (MAX_VECT_LEN): Delete.
22430 (expand_vec_perm_d): Add a vec_flags field.
22431 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22432 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22433 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22435 (aarch64_evpc_rev): Rename to...
22436 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22437 (aarch64_evpc_rev_global): New function.
22438 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22439 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22441 (aarch64_evpc_sve_tbl): New function.
22442 (aarch64_expand_vec_perm_const_1): Update after rename of
22443 aarch64_evpc_rev. Handle SVE permutes too, trying
22444 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22445 than aarch64_evpc_tbl.
22446 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22447 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22448 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22449 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22450 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22451 (aarch64_expand_sve_vcond): New functions.
22452 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22453 of aarch64_vector_mode_p.
22454 (aarch64_dwarf_poly_indeterminate_value): New function.
22455 (aarch64_compute_pressure_classes): Likewise.
22456 (aarch64_can_change_mode_class): Likewise.
22457 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22458 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22459 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22460 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22461 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22462 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22463 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22464 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22466 (Dn, Dl, Dr): Accept const as well as const_vector.
22467 (Dz): Likewise. Compare against CONST0_RTX.
22468 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22469 of "vector" where appropriate.
22470 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22471 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22472 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22473 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22474 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22475 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22476 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22477 (v_int_equiv): Extend to SVE modes.
22478 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22480 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22481 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22482 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22483 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22484 (SVE_COND_FP_CMP): New int iterators.
22485 (perm_hilo): Handle the new unpack unspecs.
22486 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22488 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22489 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22490 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22491 (aarch64_equality_operator, aarch64_constant_vector_operand)
22492 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22493 (aarch64_sve_nonimmediate_operand): Likewise.
22494 (aarch64_sve_general_operand): Likewise.
22495 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22496 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22497 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22498 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22499 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22500 (aarch64_sve_float_arith_immediate): Likewise.
22501 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22502 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22503 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22504 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22505 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22506 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22507 (aarch64_sve_float_arith_operand): Likewise.
22508 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22509 (aarch64_sve_float_mul_operand): Likewise.
22510 (aarch64_sve_vec_perm_operand): Likewise.
22511 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22512 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22513 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22514 as well as const_vector.
22515 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22516 in file. Use CONST0_RTX and CONSTM1_RTX.
22517 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22518 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22519 Use aarch64_simd_imm_zero.
22520 * config/aarch64/aarch64-sve.md: New file.
22521 * config/aarch64/aarch64.md: Include it.
22522 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22523 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22524 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22525 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22526 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22527 (sve): New attribute.
22528 (enabled): Disable instructions with the sve attribute unless
22530 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22531 aarch64_expand_mov_immediate.
22532 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22533 CNT[BHSD] immediates.
22534 (movti): Split CONST_POLY_INT moves into two halves.
22535 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22536 Split additions that need a temporary here if the destination
22537 is the stack pointer.
22538 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22539 (*add<mode>3_poly_1): New instruction.
22540 (set_clobber_cc): New expander.
22542 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22544 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22545 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22546 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22547 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22548 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22549 Change innermode from fixed_mode_size to machine_mode.
22550 (simplify_subreg): Update call accordingly. Handle a constant-sized
22551 subreg of a variable-length CONST_VECTOR.
22553 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22554 Alan Hayward <alan.hayward@arm.com>
22555 David Sherwood <david.sherwood@arm.com>
22557 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22558 (add_offset_to_base): New function, split out from...
22559 (create_mem_ref): ...here. When handling a scale other than 1,
22560 check first whether the address is valid without the offset.
22561 Add it into the base if so, leaving the index and scale as-is.
22563 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22566 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22567 fold_for_warn before checking if arg2 is INTEGER_CST.
22569 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22571 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22572 (store_multiple_operation): Delete.
22573 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22574 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22575 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22576 guarded by TARGET_STRING.
22577 (rs6000_output_load_multiple): Delete.
22578 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22579 OPTION_MASK_STRING / TARGET_STRING handling.
22580 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22581 (const rs6000_opt_masks) <"string">: Change mask to 0.
22582 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22583 (MASK_STRING): Delete.
22584 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22586 (load_multiple): Delete.
22593 (store_multiple): Delete.
22600 (movmemsi_8reg): Delete.
22601 (corresponding unnamed define_insn): Delete.
22602 (movmemsi_6reg): Delete.
22603 (corresponding unnamed define_insn): Delete.
22604 (movmemsi_4reg): Delete.
22605 (corresponding unnamed define_insn): Delete.
22606 (movmemsi_2reg): Delete.
22607 (corresponding unnamed define_insn): Delete.
22608 (movmemsi_1reg): Delete.
22609 (corresponding unnamed define_insn): Delete.
22610 * config/rs6000/rs6000.opt (mno-string): New.
22611 (mstring): Replace by deprecation warning stub.
22612 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22614 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22616 * regrename.c (regrename_do_replace): If replacing the same
22617 reg multiple times, try to reuse last created gen_raw_REG.
22620 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22621 main to workaround a bug in GDB.
22623 2018-01-12 Tom de Vries <tom@codesourcery.com>
22626 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22628 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22630 PR rtl-optimization/80481
22631 * ira-color.c (get_cap_member): New function.
22632 (allocnos_conflict_by_live_ranges_p): Use it.
22633 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22634 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22636 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22639 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22640 (*saddl_se_1): Ditto.
22641 (*ssubsi_1): Ditto.
22642 (*ssubl_se_1): Ditto.
22644 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22646 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22647 rather than wi::to_widest for DR_INITs.
22648 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22649 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22650 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22652 (vect_analyze_group_access_1): Note that here.
22654 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22656 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22657 polynomial type sizes.
22659 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22661 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22662 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22663 (gimple_add_tmp_var): Likewise.
22665 2018-01-12 Martin Liska <mliska@suse.cz>
22667 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22668 (gimple_alloc_sizes): Likewise.
22669 (dump_gimple_statistics): Use PRIu64 in printf format.
22670 * gimple.h: Change uint64_t to int.
22672 2018-01-12 Martin Liska <mliska@suse.cz>
22674 * tree-core.h: Use uint64_t instead of int.
22675 * tree.c (tree_node_counts): Likewise.
22676 (tree_node_sizes): Likewise.
22677 (dump_tree_statistics): Use PRIu64 in printf format.
22679 2018-01-12 Martin Liska <mliska@suse.cz>
22681 * Makefile.in: As qsort_chk is implemented in vec.c, add
22682 vec.o to linkage of gencfn-macros.
22683 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22684 passing the info to record_node_allocation_statistics.
22685 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22687 * ggc-common.c (struct ggc_usage): Add operator== and use
22688 it in operator< and compare function.
22689 * mem-stats.h (struct mem_usage): Likewise.
22690 * vec.c (struct vec_usage): Remove operator< and compare
22691 function. Can be simply inherited.
22693 2018-01-12 Martin Jambor <mjambor@suse.cz>
22696 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22697 * tree-ssa-math-opts.c: Include domwalk.h.
22698 (convert_mult_to_fma_1): New function.
22699 (fma_transformation_info): New type.
22700 (fma_deferring_state): Likewise.
22701 (cancel_fma_deferring): New function.
22702 (result_of_phi): Likewise.
22703 (last_fma_candidate_feeds_initial_phi): Likewise.
22704 (convert_mult_to_fma): Added deferring logic, split actual
22705 transformation to convert_mult_to_fma_1.
22706 (math_opts_dom_walker): New type.
22707 (math_opts_dom_walker::after_dom_children): New method, body moved
22708 here from pass_optimize_widening_mul::execute, added deferring logic
22710 (pass_optimize_widening_mul::execute): Moved most of code to
22711 math_opts_dom_walker::after_dom_children.
22712 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22713 * config/i386/i386.c (ix86_option_override_internal): Added
22714 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22716 2018-01-12 Richard Biener <rguenther@suse.de>
22719 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22720 inline instance vars.
22722 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22725 * config/rx/rx.c (rx_is_restricted_memory_address):
22726 Handle SUBREG case.
22728 2018-01-12 Richard Biener <rguenther@suse.de>
22730 PR tree-optimization/80846
22731 * target.def (split_reduction): New target hook.
22732 * targhooks.c (default_split_reduction): New function.
22733 * targhooks.h (default_split_reduction): Declare.
22734 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22735 target requests first reduce vectors by combining low and high
22737 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22738 (get_vectype_for_scalar_type_and_size): Export.
22739 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22740 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22741 * doc/tm.texi: Regenerate.
22742 * config/i386/i386.c (ix86_split_reduction): Implement
22743 TARGET_VECTORIZE_SPLIT_REDUCTION.
22745 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22748 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22749 in PIC mode except for TARGET_VXWORKS_RTP.
22750 * config/sparc/sparc.c: Include cfgrtl.h.
22751 (TARGET_INIT_PIC_REG): Define.
22752 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22753 (sparc_pic_register_p): New predicate.
22754 (sparc_legitimate_address_p): Use it.
22755 (sparc_legitimize_pic_address): Likewise.
22756 (sparc_delegitimize_address): Likewise.
22757 (sparc_mode_dependent_address_p): Likewise.
22758 (gen_load_pcrel_sym): Remove 4th parameter.
22759 (load_got_register): Adjust call to above. Remove obsolete stuff.
22760 (sparc_expand_prologue): Do not call load_got_register here.
22761 (sparc_flat_expand_prologue): Likewise.
22762 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22763 (sparc_use_pseudo_pic_reg): New function.
22764 (sparc_init_pic_reg): Likewise.
22765 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22766 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22768 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22770 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22771 Add item for branch_cost.
22773 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22775 PR rtl-optimization/83565
22776 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22777 not extend the result to a larger mode for rotate operations.
22778 (num_sign_bit_copies1): Likewise.
22780 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22783 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22785 Use values-Xc.o for -pedantic.
22786 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22788 2018-01-12 Martin Liska <mliska@suse.cz>
22791 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22793 (possible_polymorphic_call_targets): Use it.
22794 (ipa_devirt): Likewise.
22796 2018-01-12 Martin Liska <mliska@suse.cz>
22798 * profile-count.h (enum profile_quality): Use 0 as invalid
22799 enum value of profile_quality.
22801 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22803 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22804 -mext-string options.
22806 2018-01-12 Richard Biener <rguenther@suse.de>
22808 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22809 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22810 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22812 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22814 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22816 * configure.ac (--with-long-double-format): Add support for the
22817 configuration option to change the default long double format on
22819 * config.gcc (powerpc*-linux*-*): Likewise.
22820 * configure: Regenerate.
22821 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22822 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22823 used without modification.
22825 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22827 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22828 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22829 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22830 MISC_BUILTIN_SPEC_BARRIER.
22831 (rs6000_init_builtins): Likewise.
22832 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22834 (speculation_barrier): New define_insn.
22835 * doc/extend.texi: Document __builtin_speculation_barrier.
22837 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22840 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22841 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22842 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22844 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22845 integral modes instead of "ss" and "sd".
22846 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22847 vectors with 32-bit and 64-bit elements.
22848 (vecdupssescalarmodesuffix): New mode attribute.
22849 (vec_dup<mode>): Use it.
22851 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22854 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22855 frame if argument is passed on stack.
22857 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22860 * ree.c (combine_reaching_defs): Optimize also
22861 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22862 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22864 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22866 PR middle-end/83189
22867 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22869 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22871 PR middle-end/83718
22872 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22873 after they are computed.
22875 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22877 PR tree-optimization/83695
22878 * gimple-loop-linterchange.cc
22879 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22880 reset cached scev information after interchange.
22881 (pass_linterchange::execute): Remove call to scev_reset_htab.
22883 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22885 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22886 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22887 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22888 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22889 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22890 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22891 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22892 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22893 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22894 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22895 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22896 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22897 (V_lane_reg): Likewise.
22898 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22900 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22901 (vfmal_lane_low<mode>_intrinsic,
22902 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22903 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22904 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22905 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22906 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22907 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22909 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22911 * config/arm/arm-cpus.in (fp16fml): New feature.
22912 (ALL_SIMD): Add fp16fml.
22913 (armv8.2-a): Add fp16fml as an option.
22914 (armv8.3-a): Likewise.
22915 (armv8.4-a): Add fp16fml as part of fp16.
22916 * config/arm/arm.h (TARGET_FP16FML): Define.
22917 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22919 * config/arm/arm-modes.def (V2HF): Define.
22920 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22921 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22922 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22923 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22924 vfmsl_low, vfmsl_high): New set of builtins.
22925 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22926 (vfml_op): New code attribute.
22927 (VFMLHALVES): New int iterator.
22928 (VFML, VFMLSEL): New mode attributes.
22929 (V_reg): Define mapping for V2HF.
22930 (V_hi, V_lo): New mode attributes.
22931 (VF_constraint): Likewise.
22932 (vfml_half, vfml_half_selector): New int attributes.
22933 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22935 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22936 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22938 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22939 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22940 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22941 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22943 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22944 Document new effective target and option set.
22946 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22948 * config/arm/arm-cpus.in (armv8_4): New feature.
22949 (ARMv8_4a): New fgroup.
22950 (armv8.4-a): New arch.
22951 * config/arm/arm-tables.opt: Regenerate.
22952 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22953 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22954 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22955 Add matching rules for -march=armv8.4-a and extensions.
22956 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22958 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22961 * config/rx/rx.md (BW): New mode attribute.
22962 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22964 2018-01-11 Richard Biener <rguenther@suse.de>
22966 PR tree-optimization/83435
22967 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22968 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22969 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22971 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22972 Alan Hayward <alan.hayward@arm.com>
22973 David Sherwood <david.sherwood@arm.com>
22975 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22977 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22978 (aarch64_print_address_internal): Use it to check for a zero offset.
22980 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22981 Alan Hayward <alan.hayward@arm.com>
22982 David Sherwood <david.sherwood@arm.com>
22984 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22985 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22986 Return a poly_int64 rather than a HOST_WIDE_INT.
22987 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22988 rather than a HOST_WIDE_INT.
22989 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22990 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22991 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22992 final_offset from HOST_WIDE_INT to poly_int64.
22993 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22994 to_constant when getting the number of units in an Advanced SIMD
22996 (aarch64_builtin_vectorized_function): Check for a constant number
22998 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23000 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23001 attribute instead of GET_MODE_NUNITS.
23002 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23003 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23004 GET_MODE_SIZE for fixed-size registers.
23005 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23006 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23007 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23008 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23009 (aarch64_print_operand, aarch64_print_address_internal)
23010 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23011 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23012 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23013 Handle polynomial GET_MODE_SIZE.
23014 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
23015 wider than SImode without modification.
23016 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23017 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23018 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23019 passing and returning SVE modes.
23020 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23021 rather than GEN_INT.
23022 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23023 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23024 (aarch64_allocate_and_probe_stack_space): Likewise.
23025 (aarch64_layout_frame): Cope with polynomial offsets.
23026 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23027 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
23028 polynomial offsets.
23029 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23030 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23031 poly_int64 rather than a HOST_WIDE_INT.
23032 (aarch64_get_separate_components, aarch64_process_components)
23033 (aarch64_expand_prologue, aarch64_expand_epilogue)
23034 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23035 (aarch64_anchor_offset): New function, split out from...
23036 (aarch64_legitimize_address): ...here.
23037 (aarch64_builtin_vectorization_cost): Handle polynomial
23038 TYPE_VECTOR_SUBPARTS.
23039 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23041 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23042 number of elements from the PARALLEL rather than the mode.
23043 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23044 rather than GET_MODE_BITSIZE.
23045 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23046 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23047 (aarch64_expand_vec_perm_const_1): Handle polynomial
23048 d->perm.length () and d->perm elements.
23049 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
23050 Apply to_constant to d->perm elements.
23051 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23052 polynomial CONST_VECTOR_NUNITS.
23053 (aarch64_move_pointer): Take amount as a poly_int64 rather
23055 (aarch64_progress_pointer): Avoid temporary variable.
23056 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23057 the mode attribute instead of GET_MODE.
23059 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23060 Alan Hayward <alan.hayward@arm.com>
23061 David Sherwood <david.sherwood@arm.com>
23063 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23064 x exists before using it.
23065 (aarch64_add_constant_internal): Rename to...
23066 (aarch64_add_offset_1): ...this. Replace regnum with separate
23067 src and dest rtxes. Handle the case in which they're different,
23068 including when the offset is zero. Replace scratchreg with an rtx.
23069 Use 2 additions if there is no spare register into which we can
23070 move a 16-bit constant.
23071 (aarch64_add_constant): Delete.
23072 (aarch64_add_offset): Replace reg with separate src and dest
23073 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
23074 Use aarch64_add_offset_1.
23075 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23076 an rtx rather than an int. Take the delta as a poly_int64
23077 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
23078 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23079 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23080 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23081 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23082 and aarch64_add_sp.
23083 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23084 aarch64_add_constant.
23086 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23088 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23089 Use scalar_float_mode.
23091 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23093 * config/aarch64/aarch64-simd.md
23094 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23095 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23096 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23097 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23098 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23099 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23100 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23101 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23102 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23103 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23105 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23108 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23109 targ_options->x_arm_arch_string is non NULL.
23111 2018-01-11 Tamar Christina <tamar.christina@arm.com>
23113 * config/aarch64/aarch64.h
23114 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
23116 2018-01-11 Sudakshina Das <sudi.das@arm.com>
23119 * expmed.c (emit_store_flag_force): Swap if const op0
23120 and change VOIDmode to mode of op0.
23122 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23124 PR rtl-optimization/83761
23125 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23126 than bytes to mode_for_size.
23128 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23130 PR middle-end/83189
23131 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23132 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23135 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23137 PR middle-end/83575
23138 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23139 when in layout mode.
23140 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23141 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23144 2018-01-10 Michael Collison <michael.collison@arm.com>
23146 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23147 * config/aarch64/aarch64-option-extension.def: Add
23148 AARCH64_OPT_EXTENSION of 'fp16fml'.
23149 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23150 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23151 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23152 * config/aarch64/constraints.md (Ui7): New constraint.
23153 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23154 (VFMLA_SEL_W): Ditto.
23157 (VFMLA16_LOW): New int iterator.
23158 (VFMLA16_HIGH): Ditto.
23159 (UNSPEC_FMLAL): New unspec.
23160 (UNSPEC_FMLSL): Ditto.
23161 (UNSPEC_FMLAL2): Ditto.
23162 (UNSPEC_FMLSL2): Ditto.
23163 (f16mac): New code attribute.
23164 * config/aarch64/aarch64-simd-builtins.def
23165 (aarch64_fmlal_lowv2sf): Ditto.
23166 (aarch64_fmlsl_lowv2sf): Ditto.
23167 (aarch64_fmlalq_lowv4sf): Ditto.
23168 (aarch64_fmlslq_lowv4sf): Ditto.
23169 (aarch64_fmlal_highv2sf): Ditto.
23170 (aarch64_fmlsl_highv2sf): Ditto.
23171 (aarch64_fmlalq_highv4sf): Ditto.
23172 (aarch64_fmlslq_highv4sf): Ditto.
23173 (aarch64_fmlal_lane_lowv2sf): Ditto.
23174 (aarch64_fmlsl_lane_lowv2sf): Ditto.
23175 (aarch64_fmlal_laneq_lowv2sf): Ditto.
23176 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23177 (aarch64_fmlalq_lane_lowv4sf): Ditto.
23178 (aarch64_fmlsl_lane_lowv4sf): Ditto.
23179 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23180 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23181 (aarch64_fmlal_lane_highv2sf): Ditto.
23182 (aarch64_fmlsl_lane_highv2sf): Ditto.
23183 (aarch64_fmlal_laneq_highv2sf): Ditto.
23184 (aarch64_fmlsl_laneq_highv2sf): Ditto.
23185 (aarch64_fmlalq_lane_highv4sf): Ditto.
23186 (aarch64_fmlsl_lane_highv4sf): Ditto.
23187 (aarch64_fmlalq_laneq_highv4sf): Ditto.
23188 (aarch64_fmlsl_laneq_highv4sf): Ditto.
23189 * config/aarch64/aarch64-simd.md:
23190 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23191 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23192 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23193 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23194 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23195 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23196 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23197 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23198 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23199 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23200 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23201 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23202 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23203 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23204 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23205 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23206 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23207 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23208 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23209 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23210 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23211 (vfmlsl_low_u32): Ditto.
23212 (vfmlalq_low_u32): Ditto.
23213 (vfmlslq_low_u32): Ditto.
23214 (vfmlal_high_u32): Ditto.
23215 (vfmlsl_high_u32): Ditto.
23216 (vfmlalq_high_u32): Ditto.
23217 (vfmlslq_high_u32): Ditto.
23218 (vfmlal_lane_low_u32): Ditto.
23219 (vfmlsl_lane_low_u32): Ditto.
23220 (vfmlal_laneq_low_u32): Ditto.
23221 (vfmlsl_laneq_low_u32): Ditto.
23222 (vfmlalq_lane_low_u32): Ditto.
23223 (vfmlslq_lane_low_u32): Ditto.
23224 (vfmlalq_laneq_low_u32): Ditto.
23225 (vfmlslq_laneq_low_u32): Ditto.
23226 (vfmlal_lane_high_u32): Ditto.
23227 (vfmlsl_lane_high_u32): Ditto.
23228 (vfmlal_laneq_high_u32): Ditto.
23229 (vfmlsl_laneq_high_u32): Ditto.
23230 (vfmlalq_lane_high_u32): Ditto.
23231 (vfmlslq_lane_high_u32): Ditto.
23232 (vfmlalq_laneq_high_u32): Ditto.
23233 (vfmlslq_laneq_high_u32): Ditto.
23234 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23235 (AARCH64_FL_FOR_ARCH8_4): New.
23236 (AARCH64_ISA_F16FML): New ISA flag.
23237 (TARGET_F16FML): New feature flag for fp16fml.
23238 (doc/invoke.texi): Document new fp16fml option.
23240 2018-01-10 Michael Collison <michael.collison@arm.com>
23242 * config/aarch64/aarch64-builtins.c:
23243 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23244 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23245 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23246 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23247 (AARCH64_ISA_SHA3): New ISA flag.
23248 (TARGET_SHA3): New feature flag for sha3.
23249 * config/aarch64/iterators.md (sha512_op): New int attribute.
23250 (CRYPTO_SHA512): New int iterator.
23251 (UNSPEC_SHA512H): New unspec.
23252 (UNSPEC_SHA512H2): Ditto.
23253 (UNSPEC_SHA512SU0): Ditto.
23254 (UNSPEC_SHA512SU1): Ditto.
23255 * config/aarch64/aarch64-simd-builtins.def
23256 (aarch64_crypto_sha512hqv2di): New builtin.
23257 (aarch64_crypto_sha512h2qv2di): Ditto.
23258 (aarch64_crypto_sha512su0qv2di): Ditto.
23259 (aarch64_crypto_sha512su1qv2di): Ditto.
23260 (aarch64_eor3qv8hi): Ditto.
23261 (aarch64_rax1qv2di): Ditto.
23262 (aarch64_xarqv2di): Ditto.
23263 (aarch64_bcaxqv8hi): Ditto.
23264 * config/aarch64/aarch64-simd.md:
23265 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23266 (aarch64_crypto_sha512su0qv2di): Ditto.
23267 (aarch64_crypto_sha512su1qv2di): Ditto.
23268 (aarch64_eor3qv8hi): Ditto.
23269 (aarch64_rax1qv2di): Ditto.
23270 (aarch64_xarqv2di): Ditto.
23271 (aarch64_bcaxqv8hi): Ditto.
23272 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23273 (vsha512h2q_u64): Ditto.
23274 (vsha512su0q_u64): Ditto.
23275 (vsha512su1q_u64): Ditto.
23276 (veor3q_u16): Ditto.
23277 (vrax1q_u64): Ditto.
23278 (vxarq_u64): Ditto.
23279 (vbcaxq_u16): Ditto.
23280 * config/arm/types.md (crypto_sha512): New type attribute.
23281 (crypto_sha3): Ditto.
23282 (doc/invoke.texi): Document new sha3 option.
23284 2018-01-10 Michael Collison <michael.collison@arm.com>
23286 * config/aarch64/aarch64-builtins.c:
23287 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23288 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23289 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23290 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23291 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23292 (AARCH64_ISA_SM4): New ISA flag.
23293 (TARGET_SM4): New feature flag for sm4.
23294 * config/aarch64/aarch64-simd-builtins.def
23295 (aarch64_sm3ss1qv4si): Ditto.
23296 (aarch64_sm3tt1aq4si): Ditto.
23297 (aarch64_sm3tt1bq4si): Ditto.
23298 (aarch64_sm3tt2aq4si): Ditto.
23299 (aarch64_sm3tt2bq4si): Ditto.
23300 (aarch64_sm3partw1qv4si): Ditto.
23301 (aarch64_sm3partw2qv4si): Ditto.
23302 (aarch64_sm4eqv4si): Ditto.
23303 (aarch64_sm4ekeyqv4si): Ditto.
23304 * config/aarch64/aarch64-simd.md:
23305 (aarch64_sm3ss1qv4si): Ditto.
23306 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23307 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23308 (aarch64_sm4eqv4si): Ditto.
23309 (aarch64_sm4ekeyqv4si): Ditto.
23310 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23311 (sm3part_op): Ditto.
23312 (CRYPTO_SM3TT): Ditto.
23313 (CRYPTO_SM3PART): Ditto.
23314 (UNSPEC_SM3SS1): New unspec.
23315 (UNSPEC_SM3TT1A): Ditto.
23316 (UNSPEC_SM3TT1B): Ditto.
23317 (UNSPEC_SM3TT2A): Ditto.
23318 (UNSPEC_SM3TT2B): Ditto.
23319 (UNSPEC_SM3PARTW1): Ditto.
23320 (UNSPEC_SM3PARTW2): Ditto.
23321 (UNSPEC_SM4E): Ditto.
23322 (UNSPEC_SM4EKEY): Ditto.
23323 * config/aarch64/constraints.md (Ui2): New constraint.
23324 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23325 * config/arm/types.md (crypto_sm3): New type attribute.
23326 (crypto_sm4): Ditto.
23327 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23328 (vsm3tt1aq_u32): Ditto.
23329 (vsm3tt1bq_u32): Ditto.
23330 (vsm3tt2aq_u32): Ditto.
23331 (vsm3tt2bq_u32): Ditto.
23332 (vsm3partw1q_u32): Ditto.
23333 (vsm3partw2q_u32): Ditto.
23334 (vsm4eq_u32): Ditto.
23335 (vsm4ekeyq_u32): Ditto.
23336 (doc/invoke.texi): Document new sm4 option.
23338 2018-01-10 Michael Collison <michael.collison@arm.com>
23340 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23341 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23342 (AARCH64_FL_FOR_ARCH8_4): New.
23343 (AARCH64_FL_V8_4): New flag.
23344 (doc/invoke.texi): Document new armv8.4-a option.
23346 2018-01-10 Michael Collison <michael.collison@arm.com>
23348 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23349 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23350 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23351 * config/aarch64/aarch64-option-extension.def: Add
23352 AARCH64_OPT_EXTENSION of 'sha2'.
23353 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23354 (crypto): Disable sha2 and aes if crypto disabled.
23355 (crypto): Enable aes and sha2 if enabled.
23356 (simd): Disable sha2 and aes if simd disabled.
23357 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23359 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23360 (TARGET_SHA2): New feature flag for sha2.
23361 (TARGET_AES): New feature flag for aes.
23362 * config/aarch64/aarch64-simd.md:
23363 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23364 conditional on TARGET_AES.
23365 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23366 (aarch64_crypto_sha1hsi): Make pattern conditional
23368 (aarch64_crypto_sha1hv4si): Ditto.
23369 (aarch64_be_crypto_sha1hv4si): Ditto.
23370 (aarch64_crypto_sha1su1v4si): Ditto.
23371 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23372 (aarch64_crypto_sha1su0v4si): Ditto.
23373 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23374 (aarch64_crypto_sha256su0v4si): Ditto.
23375 (aarch64_crypto_sha256su1v4si): Ditto.
23376 (doc/invoke.texi): Document new aes and sha2 options.
23378 2018-01-10 Martin Sebor <msebor@redhat.com>
23380 PR tree-optimization/83781
23381 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23384 2018-01-11 Martin Sebor <msebor@gmail.com>
23385 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23387 PR tree-optimization/83501
23388 PR tree-optimization/81703
23390 * tree-ssa-strlen.c (get_string_cst): Rename...
23391 (get_string_len): ...to this. Handle global constants.
23392 (handle_char_store): Adjust.
23394 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23395 Jim Wilson <jimw@sifive.com>
23397 * config/riscv/riscv-protos.h (riscv_output_return): New.
23398 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23399 (riscv_attribute_table, riscv_output_return),
23400 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23401 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23402 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23404 (riscv_expand_prologue): Add early return for naked function.
23405 (riscv_expand_epilogue): Likewise.
23406 (riscv_function_ok_for_sibcall): Return false for naked function.
23407 (riscv_set_current_function): New.
23408 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23409 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23410 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23411 * doc/extend.texi (RISC-V Function Attributes): New.
23413 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23415 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23416 check for 128-bit long double before checking TCmode.
23417 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23418 128-bit long doubles before checking TFmode or TCmode.
23419 (FLOAT128_IBM_P): Likewise.
23421 2018-01-10 Martin Sebor <msebor@redhat.com>
23423 PR tree-optimization/83671
23424 * builtins.c (c_strlen): Unconditionally return zero for the empty
23426 Use -Warray-bounds for warnings.
23427 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23428 for non-constant array indices with COMPONENT_REF, arrays of
23429 arrays, and pointers to arrays.
23430 (gimple_fold_builtin_strlen): Determine and set length range for
23431 non-constant character arrays.
23433 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23435 PR middle-end/81897
23436 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23439 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23441 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23443 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23446 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23447 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23448 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23449 indexed_or_indirect_operand predicate.
23450 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23451 (*vsx_le_perm_load_v8hi): Likewise.
23452 (*vsx_le_perm_load_v16qi): Likewise.
23453 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23454 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23455 (*vsx_le_perm_store_v8hi): Likewise.
23456 (*vsx_le_perm_store_v16qi): Likewise.
23457 (eight unnamed splitters): Likewise.
23459 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23461 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23462 * config/rs6000/emmintrin.h: Likewise.
23463 * config/rs6000/mmintrin.h: Likewise.
23464 * config/rs6000/xmmintrin.h: Likewise.
23466 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23469 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23471 * tree.c (tree_nop_conversion): Return true for location wrapper
23473 (maybe_wrap_with_location): New function.
23474 (selftest::check_strip_nops): New function.
23475 (selftest::test_location_wrappers): New function.
23476 (selftest::tree_c_tests): Call it.
23477 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23478 (maybe_wrap_with_location): New decl.
23479 (EXPR_LOCATION_WRAPPER_P): New macro.
23480 (location_wrapper_p): New inline function.
23481 (tree_strip_any_location_wrapper): New inline function.
23483 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23486 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23487 stack_realign_offset for the largest alignment of stack slot
23489 (ix86_find_max_used_stack_alignment): New function.
23490 (ix86_finalize_stack_frame_flags): Use it. Set
23491 max_used_stack_alignment if we don't realign stack.
23492 * config/i386/i386.h (machine_function): Add
23493 max_used_stack_alignment.
23495 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23497 * config/arm/arm.opt (-mbranch-cost): New option.
23498 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23501 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23504 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23505 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23507 2018-01-10 Richard Biener <rguenther@suse.de>
23510 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23511 early out so it also covers the case where we have a non-NULL
23514 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23516 PR tree-optimization/83753
23517 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23518 for non-strided grouped accesses if the number of elements is 1.
23520 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23523 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23524 * i386.h (TARGET_USE_GATHER): Define.
23525 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23527 2018-01-10 Martin Liska <mliska@suse.cz>
23530 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23531 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23533 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23534 CLEANUP_NO_PARTITIONING is not set.
23536 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23538 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23539 for vectors, as a partial revert of r254296.
23540 * rtl.h (const_vec_p): Delete.
23541 (const_vec_duplicate_p): Don't test for vector CONSTs.
23542 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23543 * expmed.c (make_tree): Likewise.
23546 * common.md (E, F): Use CONSTANT_P instead of checking for
23548 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23549 checking for CONST_VECTOR.
23551 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23553 PR middle-end/83575
23554 * predict.c (force_edge_cold): Handle in more sane way edges
23555 with no prediction.
23557 2018-01-09 Carl Love <cel@us.ibm.com>
23559 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23561 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23562 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23563 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23564 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23565 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23566 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23567 * config/rs6000/rs6000-protos.h: Add extern defition for
23568 rs6000_generate_float2_double_code.
23569 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23571 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23572 (float2_v2df): Add define_expand.
23574 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23577 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23578 op_mode in the force_to_mode call.
23580 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23582 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23583 instead of checking each element individually.
23584 (aarch64_evpc_uzp): Likewise.
23585 (aarch64_evpc_zip): Likewise.
23586 (aarch64_evpc_ext): Likewise.
23587 (aarch64_evpc_rev): Likewise.
23588 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23589 instead of checking each element individually. Return true without
23591 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23592 whether all selected elements come from the same input, instead of
23593 checking each element individually. Remove calls to gen_rtx_REG,
23594 start_sequence and end_sequence and instead assert that no rtl is
23597 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23599 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23600 order of HIGH and CONST checks.
23602 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23604 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23605 if the destination isn't an SSA_NAME.
23607 2018-01-09 Richard Biener <rguenther@suse.de>
23609 PR tree-optimization/83668
23610 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23612 (canonicalize_loop_form): ... here, renamed from ...
23613 (canonicalize_loop_closed_ssa_form): ... this and amended to
23614 swap successor edges for loop exit blocks to make us use
23615 the RPO order we need for initial schedule generation.
23617 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23619 PR tree-optimization/64811
23620 * match.pd: When optimizing comparisons with Inf, avoid
23621 introducing or losing exceptions from comparisons with NaN.
23623 2018-01-09 Martin Liska <mliska@suse.cz>
23626 * asan.c (shadow_mem_size): Add gcc_assert.
23628 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23630 Don't save registers in main().
23633 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23634 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23635 * config/avr/avr.c (avr_set_current_function): Don't error if
23636 naked, OS_task or OS_main are specified at the same time.
23637 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23639 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23641 * common/config/avr/avr-common.c (avr_option_optimization_table):
23642 Switch on -mmain-is-OS_task for optimizing compilations.
23644 2018-01-09 Richard Biener <rguenther@suse.de>
23646 PR tree-optimization/83572
23647 * graphite.c: Include cfganal.h.
23648 (graphite_transform_loops): Connect infinite loops to exit
23649 and remove fake edges at the end.
23651 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23653 * ipa-inline.c (edge_badness): Revert accidental checkin.
23655 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23658 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23659 symbols; not inline clones.
23661 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23664 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23665 hard registers. Formatting fixes.
23667 PR preprocessor/83722
23668 * gcc.c (try_generate_repro): Pass
23669 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23670 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23673 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23674 Kito Cheng <kito.cheng@gmail.com>
23676 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23677 (riscv_leaf_function_p): Delete.
23678 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23680 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23682 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23684 (do_ifelse): New function.
23685 (do_isel): New function.
23686 (do_sub3): New function.
23687 (do_add3): New function.
23688 (do_load_mask_compare): New function.
23689 (do_overlap_load_compare): New function.
23690 (expand_compare_loop): New function.
23691 (expand_block_compare): Call expand_compare_loop() when appropriate.
23692 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23693 option description.
23694 (-mblock-compare-inline-loop-limit): New option.
23696 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23699 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23700 Reverse order of second and third operands in first alternative.
23701 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23702 of first and second elements in UNSPEC_VPERMR vector.
23703 (altivec_expand_vec_perm_le): Likewise.
23705 2018-01-08 Jeff Law <law@redhat.com>
23707 PR rtl-optimizatin/81308
23708 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23709 (process_switch): If group_case_labels makes a change, then set
23711 (pass_convert_switch::execute): If a switch is converted, then
23712 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23714 PR rtl-optimization/81308
23715 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23718 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23720 PR target/83663 - Revert r255946
23721 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23722 generation for cases where splatting a value is not useful.
23723 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23724 across a vec_duplicate and a paradoxical subreg forming a vector
23725 mode to a vec_concat.
23727 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23729 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23730 -march=armv8.3-a variants.
23731 * config/arm/t-multilib: Likewise.
23732 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23734 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23736 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23738 (cceq_ior_compare_complement): Give it a name so I can use it, and
23739 change boolean_or_operator predicate to boolean_operator so it can
23740 be used to generate a crand.
23741 (eqne): New code iterator.
23742 (bd/bd_neg): New code_attrs.
23743 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23744 a single define_insn.
23745 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23746 decrement (bdnzt/bdnzf/bdzt/bdzf).
23747 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23748 with the new names of the branch decrement patterns, and added the
23749 names of the branch decrement conditional patterns.
23751 2018-01-08 Richard Biener <rguenther@suse.de>
23753 PR tree-optimization/83563
23754 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23757 2018-01-08 Richard Biener <rguenther@suse.de>
23759 PR middle-end/83713
23760 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23762 2018-01-08 Richard Biener <rguenther@suse.de>
23764 PR tree-optimization/83685
23765 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23766 references to abnormals.
23768 2018-01-08 Richard Biener <rguenther@suse.de>
23771 * dwarf2out.c (output_indirect_strings): Handle empty
23772 skeleton_debug_str_hash.
23773 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23775 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23777 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23778 (emit_store_direct): Likewise.
23779 (arc_trampoline_adjust_address): Likewise.
23780 (arc_asm_trampoline_template): New function.
23781 (arc_initialize_trampoline): Use asm_trampoline_template.
23782 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23783 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23784 * config/arc/arc.md (flush_icache): Delete pattern.
23786 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23788 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23789 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23792 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23795 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23796 by not USED_FOR_TARGET.
23797 (make_pass_resolve_sw_modes): Likewise.
23799 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23801 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23804 2018-01-08 Richard Biener <rguenther@suse.de>
23806 PR middle-end/83580
23807 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23809 2018-01-08 Richard Biener <rguenther@suse.de>
23811 PR middle-end/83517
23812 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23814 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23816 PR middle-end/81897
23817 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23818 basic blocks with a small number of successors.
23819 (convert_control_dep_chain_into_preds): Improve handling of
23821 (dump_predicates): Split apart into...
23822 (dump_pred_chain): ...here...
23823 (dump_pred_info): ...and here.
23824 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23825 (can_chain_union_be_invalidated_p): Improve check for invalidation
23827 (uninit_uses_cannot_happen): Avoid unnecessary if
23828 convert_control_dep_chain_into_preds yielded nothing.
23830 2018-01-06 Martin Sebor <msebor@redhat.com>
23832 PR tree-optimization/83640
23833 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23834 subtracting negative offset from size.
23835 (builtin_access::overlap): Adjust offset bounds of the access to fall
23836 within the size of the object if possible.
23838 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23840 PR rtl-optimization/83699
23841 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23842 extract_bit_field_as_subreg to cases in which the extracted
23843 value is also a vector.
23845 * lra-constraints.c (process_alt_operands): Test for the equivalence
23846 substitutions when detecting a possible reload cycle.
23848 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23851 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23852 by default if flag_selective_schedling{,2}. Formatting fixes.
23854 PR rtl-optimization/83682
23855 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23856 if it has non-VECTOR_MODE element mode.
23857 (vec_duplicate_p): Likewise.
23859 PR middle-end/83694
23860 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23861 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23863 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23866 * config/i386/i386-builtin.def
23867 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23868 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23869 Require also OPTION_MASK_ISA_AVX512F in addition to
23870 OPTION_MASK_ISA_GFNI.
23871 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23872 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23873 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23874 to OPTION_MASK_ISA_GFNI.
23875 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23876 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23877 OPTION_MASK_ISA_AVX512BW.
23878 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23879 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23880 addition to OPTION_MASK_ISA_GFNI.
23881 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23882 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23883 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23884 to OPTION_MASK_ISA_GFNI.
23885 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23886 a requirement for all ISAs rather than any of them with a few
23888 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23890 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23891 bitmasks to be enabled with 3 exceptions, instead of requiring any
23892 enabled ISA with lots of exceptions.
23893 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23894 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23895 Change avx512bw in isa attribute to avx512f.
23896 * config/i386/sgxintrin.h: Add license boilerplate.
23897 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23898 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23899 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23900 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23902 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23903 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23904 temporarily sse2 rather than sse if not enabled already.
23907 * config/i386/sse.md (VI248_VLBW): Rename to ...
23908 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23909 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23910 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23911 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23912 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23913 mode iterator instead of VI248_VLBW.
23915 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23917 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23918 (record_modified): Skip clobbers; add debug output.
23919 (param_change_prob): Use sreal frequencies.
23921 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23923 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23924 punt for user-aligned variables.
23926 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23928 * tree-chrec.c (chrec_contains_symbols): Return true for
23931 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23934 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23935 of (x|y) == x for BICS pattern.
23937 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23939 PR tree-optimization/83605
23940 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23941 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23944 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23946 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23947 * config/epiphany/rtems.h: New file.
23949 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23950 Uros Bizjak <ubizjak@gmail.com>
23953 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23954 QIreg_operand instead of register_operand predicate.
23955 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23956 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23957 comments instead of -fmitigate[-_]rop.
23959 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23962 * cgraphunit.c (symbol_table::compile): Switch to text_section
23963 before calling assembly_start debug hook.
23964 * run-rtl-passes.c (run_rtl_passes): Likewise.
23967 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23969 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23970 range_int_cst_p rather than !symbolic_range_p before calling
23971 extract_range_from_multiplicative_op_1.
23973 2018-01-04 Jeff Law <law@redhat.com>
23975 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23976 redundant test in assertion.
23978 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23980 * doc/rtl.texi: Document machine_mode wrapper classes.
23982 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23984 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23985 using tree_to_uhwi.
23987 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23989 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23990 the VEC_PERM_EXPR fold to fail.
23992 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23995 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23996 to switched_sections.
23998 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24001 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24002 test for d.testing.
24004 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
24007 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24008 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24010 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24013 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24014 is BLKmode and bitpos not zero or mode change is needed.
24016 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24019 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24022 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
24025 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24026 instead of MULT rtx. Update all corresponding splitters.
24027 (*saddl_se): Ditto.
24028 (*ssub<modesuffix>): Ditto.
24029 (*ssubl_se): Ditto.
24030 (*cmp_sadd_di): Update split patterns.
24031 (*cmp_sadd_si): Ditto.
24032 (*cmp_sadd_sidi): Ditto.
24033 (*cmp_ssub_di): Ditto.
24034 (*cmp_ssub_si): Ditto.
24035 (*cmp_ssub_sidi): Ditto.
24036 * config/alpha/predicates.md (const23_operand): New predicate.
24037 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24038 Look for ASHIFT, not MULT inner operand.
24039 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24041 2018-01-04 Martin Liska <mliska@suse.cz>
24043 PR gcov-profile/83669
24044 * gcov.c (output_intermediate_file): Add version to intermediate
24046 * doc/gcov.texi: Document new field 'version' in intermediate
24047 file format. Fix location of '-k' option of gcov command.
24049 2018-01-04 Martin Liska <mliska@suse.cz>
24052 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24054 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24056 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24058 2018-01-03 Martin Sebor <msebor@redhat.com>
24060 PR tree-optimization/83655
24061 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24062 checking calls with invalid arguments.
24064 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24066 * tree-vect-stmts.c (vect_get_store_rhs): New function.
24067 (vectorizable_mask_load_store): Delete.
24068 (vectorizable_call): Return false for masked loads and stores.
24069 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
24070 instead of gimple_assign_rhs1.
24071 (vectorizable_load): Handle IFN_MASK_LOAD.
24072 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24074 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24076 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24078 (vectorizable_mask_load_store): ...here.
24079 (vectorizable_load): ...and here.
24081 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24083 * tree-vect-stmts.c (vect_build_all_ones_mask)
24084 (vect_build_zero_merge_argument): New functions, split out from...
24085 (vectorizable_load): ...here.
24087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24089 * tree-vect-stmts.c (vect_check_store_rhs): New function,
24091 (vectorizable_mask_load_store): ...here.
24092 (vectorizable_store): ...and here.
24094 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24096 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24098 (vectorizable_mask_load_store): ...here.
24100 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24102 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24103 (vect_model_store_cost): Take a vec_load_store_type instead of a
24105 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24106 (vect_model_store_cost): Take a vec_load_store_type instead of a
24108 (vectorizable_mask_load_store): Update accordingly.
24109 (vectorizable_store): Likewise.
24110 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24112 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24114 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24115 IFN_MASK_LOAD calls here rather than...
24116 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24119 Alan Hayward <alan.hayward@arm.com>
24120 David Sherwood <david.sherwood@arm.com>
24122 * expmed.c (extract_bit_field_1): For vector extracts,
24123 fall back to extract_bit_field_as_subreg if vec_extract
24126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24127 Alan Hayward <alan.hayward@arm.com>
24128 David Sherwood <david.sherwood@arm.com>
24130 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24131 they are variable or constant sized.
24132 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24133 slots for constant-sized data.
24135 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24136 Alan Hayward <alan.hayward@arm.com>
24137 David Sherwood <david.sherwood@arm.com>
24139 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24140 handling COND_EXPRs with boolean comparisons, try to find a better
24141 basis for the mask type than the boolean itself.
24143 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24145 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24146 is calculated and how it can be overridden.
24147 * genmodes.c (max_bitsize_mode_any_mode): New variable.
24148 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24150 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24153 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24154 Alan Hayward <alan.hayward@arm.com>
24155 David Sherwood <david.sherwood@arm.com>
24157 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24158 Remove the mode argument.
24159 (aarch64_simd_valid_immediate): Remove the mode and inverse
24161 * config/aarch64/iterators.md (bitsize): New iterator.
24162 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24163 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24164 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24165 aarch64_simd_valid_immediate.
24166 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24167 (aarch64_reg_or_bic_imm): Likewise.
24168 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24169 with an insn_type enum and msl with a modifier_type enum.
24170 Replace element_width with a scalar_mode. Change the shift
24171 to unsigned int. Add constructors for scalar_float_mode and
24172 scalar_int_mode elements.
24173 (aarch64_vect_float_const_representable_p): Delete.
24174 (aarch64_can_const_movi_rtx_p)
24175 (aarch64_simd_scalar_immediate_valid_for_move)
24176 (aarch64_simd_make_constant): Update call to
24177 aarch64_simd_valid_immediate.
24178 (aarch64_advsimd_valid_immediate_hs): New function.
24179 (aarch64_advsimd_valid_immediate): Likewise.
24180 (aarch64_simd_valid_immediate): Remove mode and inverse
24181 arguments. Rewrite to use the above. Use const_vec_duplicate_p
24182 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24183 and aarch64_float_const_representable_p on the result.
24184 (aarch64_output_simd_mov_immediate): Remove mode argument.
24185 Update call to aarch64_simd_valid_immediate and use of
24186 simd_immediate_info.
24187 (aarch64_output_scalar_simd_mov_immediate): Update call
24190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24191 Alan Hayward <alan.hayward@arm.com>
24192 David Sherwood <david.sherwood@arm.com>
24194 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24195 (mode_nunits): Likewise CONST_MODE_NUNITS.
24196 * machmode.def (ADJUST_NUNITS): Document.
24197 * genmodes.c (mode_data::need_nunits_adj): New field.
24198 (blank_mode): Update accordingly.
24199 (adj_nunits): New variable.
24200 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24202 (emit_mode_size_inline): Set need_bytesize_adj for all modes
24203 listed in adj_nunits.
24204 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24205 listed in adj_nunits. Don't emit case statements for such modes.
24206 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24207 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
24208 nothing if adj_nunits is nonnull.
24209 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24210 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24211 (emit_mode_fbit): Update use of print_maybe_const_decl.
24212 (emit_move_size): Likewise. Treat the array as non-const
24214 (emit_mode_adjustments): Handle adj_nunits.
24216 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24218 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24219 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24220 (VECTOR_MODES): Use it.
24221 (make_vector_modes): Take the prefix as an argument.
24223 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24224 Alan Hayward <alan.hayward@arm.com>
24225 David Sherwood <david.sherwood@arm.com>
24227 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24228 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24229 for MODE_VECTOR_BOOL.
24230 * machmode.def (VECTOR_BOOL_MODE): Document.
24231 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24232 (make_vector_bool_mode): New function.
24233 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24235 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24236 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24238 * stor-layout.c (int_mode_for_mode): Likewise.
24239 * tree.c (build_vector_type_for_mode): Likewise.
24240 * varasm.c (output_constant_pool_2): Likewise.
24241 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24242 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24243 for MODE_VECTOR_BOOL.
24244 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24245 of mode class checks.
24246 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24247 instead of a list of mode class checks.
24248 (expand_vector_scalar_condition): Likewise.
24249 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24252 Alan Hayward <alan.hayward@arm.com>
24253 David Sherwood <david.sherwood@arm.com>
24255 * machmode.h (mode_size): Change from unsigned short to
24257 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24258 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24259 or if measurement_type is not polynomial.
24260 (fixed_size_mode::includes_p): Check for constant-sized modes.
24261 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24262 return a poly_uint16 rather than an unsigned short.
24263 (emit_mode_size): Change the type of mode_size from unsigned short
24264 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24265 (emit_mode_adjustments): Cope with polynomial vector sizes.
24266 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24268 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24270 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24271 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24272 * caller-save.c (setup_save_areas): Likewise.
24273 (replace_reg_with_saved_mem): Likewise.
24274 * calls.c (emit_library_call_value_1): Likewise.
24275 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24276 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24277 (gen_lowpart_for_combine): Likewise.
24278 * convert.c (convert_to_integer_1): Likewise.
24279 * cse.c (equiv_constant, cse_insn): Likewise.
24280 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24281 (cselib_subst_to_values): Likewise.
24282 * dce.c (word_dce_process_block): Likewise.
24283 * df-problems.c (df_word_lr_mark_ref): Likewise.
24284 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24285 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24286 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24287 (rtl_for_decl_location): Likewise.
24288 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24289 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24290 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24291 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24292 (expand_expr_real_1): Likewise.
24293 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24294 (pad_below): Likewise.
24295 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24296 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24297 * ira.c (get_subreg_tracking_sizes): Likewise.
24298 * ira-build.c (ira_create_allocno_objects): Likewise.
24299 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24300 (ira_sort_regnos_for_alter_reg): Likewise.
24301 * ira-costs.c (record_operand_costs): Likewise.
24302 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24303 (resolve_simple_move): Likewise.
24304 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24305 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24306 (lra_constraints): Likewise.
24307 (CONST_POOL_OK_P): Reject variable-sized modes.
24308 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24309 (add_pseudo_to_slot, lra_spill): Likewise.
24310 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24311 * optabs-query.c (get_best_extraction_insn): Likewise.
24312 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24313 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24314 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24315 * recog.c (offsettable_address_addr_space_p): Likewise.
24316 * regcprop.c (maybe_mode_change): Likewise.
24317 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24318 * regrename.c (build_def_use): Likewise.
24319 * regstat.c (dump_reg_info): Likewise.
24320 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24321 (find_reloads, find_reloads_subreg_address): Likewise.
24322 * reload1.c (eliminate_regs_1): Likewise.
24323 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24324 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24325 (simplify_binary_operation_1, simplify_subreg): Likewise.
24326 * targhooks.c (default_function_arg_padding): Likewise.
24327 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24328 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24329 (verify_gimple_assign_ternary): Likewise.
24330 * tree-inline.c (estimate_move_cost): Likewise.
24331 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24332 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24333 (get_address_cost_ainc): Likewise.
24334 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24335 (vect_supportable_dr_alignment): Likewise.
24336 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24337 (vectorizable_reduction): Likewise.
24338 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24339 (vectorizable_operation, vectorizable_load): Likewise.
24340 * tree.c (build_same_sized_truth_vector_type): Likewise.
24341 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24342 * var-tracking.c (emit_note_insn_var_location): Likewise.
24343 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24344 (ADDR_VEC_ALIGN): Likewise.
24346 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24347 Alan Hayward <alan.hayward@arm.com>
24348 David Sherwood <david.sherwood@arm.com>
24350 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24352 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24353 or if measurement_type is polynomial.
24354 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24355 * combine.c (make_extraction): Likewise.
24356 * dse.c (find_shift_sequence): Likewise.
24357 * dwarf2out.c (mem_loc_descriptor): Likewise.
24358 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24359 (extract_bit_field, extract_low_bits): Likewise.
24360 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24361 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24362 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24363 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24364 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24365 * reload.c (find_reloads): Likewise.
24366 * reload1.c (alter_reg): Likewise.
24367 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24368 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24369 * tree-if-conv.c (predicate_mem_writes): Likewise.
24370 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24371 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24372 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24373 * valtrack.c (dead_debug_insert_temp): Likewise.
24374 * varasm.c (mergeable_constant_section): Likewise.
24375 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24377 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24378 Alan Hayward <alan.hayward@arm.com>
24379 David Sherwood <david.sherwood@arm.com>
24381 * expr.c (expand_assignment): Cope with polynomial mode sizes
24382 when assigning to a CONCAT.
24384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24385 Alan Hayward <alan.hayward@arm.com>
24386 David Sherwood <david.sherwood@arm.com>
24388 * machmode.h (mode_precision): Change from unsigned short to
24390 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24392 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24393 or if measurement_type is not polynomial.
24394 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24395 in which the mode is already known to be a scalar_int_mode.
24396 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24397 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24399 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24400 for GET_MODE_PRECISION.
24401 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24402 for GET_MODE_PRECISION.
24403 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24405 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24406 (expand_field_assignment, make_extraction): Likewise.
24407 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24408 (get_last_value): Likewise.
24409 * convert.c (convert_to_integer_1): Likewise.
24410 * cse.c (cse_insn): Likewise.
24411 * expr.c (expand_expr_real_1): Likewise.
24412 * lra-constraints.c (simplify_operand_subreg): Likewise.
24413 * optabs-query.c (can_atomic_load_p): Likewise.
24414 * optabs.c (expand_atomic_load): Likewise.
24415 (expand_atomic_store): Likewise.
24416 * ree.c (combine_reaching_defs): Likewise.
24417 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24418 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24419 * tree.h (type_has_mode_precision_p): Likewise.
24420 * ubsan.c (instrument_si_overflow): Likewise.
24422 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24423 Alan Hayward <alan.hayward@arm.com>
24424 David Sherwood <david.sherwood@arm.com>
24426 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24427 polynomial numbers of units.
24428 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24429 (valid_vector_subparts_p): New function.
24430 (build_vector_type): Remove temporary shim and take the number
24431 of units as a poly_uint64 rather than an int.
24432 (build_opaque_vector_type): Take the number of units as a
24433 poly_uint64 rather than an int.
24434 * tree.c (build_vector_from_ctor): Handle polynomial
24435 TYPE_VECTOR_SUBPARTS.
24436 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24437 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24438 (build_vector_from_val): If the number of units is variable,
24439 use build_vec_duplicate_cst for constant operands and
24440 VEC_DUPLICATE_EXPR otherwise.
24441 (make_vector_type): Remove temporary is_constant ().
24442 (build_vector_type, build_opaque_vector_type): Take the number of
24443 units as a poly_uint64 rather than an int.
24444 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24446 * cfgexpand.c (expand_debug_expr): Likewise.
24447 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24448 (store_constructor, expand_expr_real_1): Likewise.
24449 (const_scalar_mask_from_tree): Likewise.
24450 * fold-const-call.c (fold_const_reduction): Likewise.
24451 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24452 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24453 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24454 (fold_relational_const): Likewise.
24455 (native_interpret_vector): Likewise. Change the size from an
24456 int to an unsigned int.
24457 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24458 TYPE_VECTOR_SUBPARTS.
24459 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24460 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24461 duplicating a non-constant operand into a variable-length vector.
24462 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24463 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24464 * ipa-icf.c (sem_variable::equals): Likewise.
24465 * match.pd: Likewise.
24466 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24467 * print-tree.c (print_node): Likewise.
24468 * stor-layout.c (layout_type): Likewise.
24469 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24470 * tree-cfg.c (verify_gimple_comparison): Likewise.
24471 (verify_gimple_assign_binary): Likewise.
24472 (verify_gimple_assign_ternary): Likewise.
24473 (verify_gimple_assign_single): Likewise.
24474 * tree-pretty-print.c (dump_generic_node): Likewise.
24475 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24476 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24477 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24478 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24479 (vect_shift_permute_load_chain): Likewise.
24480 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24481 (expand_vector_condition, optimize_vector_constructor): Likewise.
24482 (lower_vec_perm, get_compute_type): Likewise.
24483 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24484 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24485 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24486 (vect_recog_mask_conversion_pattern): Likewise.
24487 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24488 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24489 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24490 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24491 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24492 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24493 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24494 (supportable_widening_operation): Likewise.
24495 (supportable_narrowing_operation): Likewise.
24496 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24498 * varasm.c (output_constant): Likewise.
24500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24501 Alan Hayward <alan.hayward@arm.com>
24502 David Sherwood <david.sherwood@arm.com>
24504 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24505 so that both the length == 3 and length != 3 cases set up their
24506 own permute vectors. Add comments explaining why we know the
24507 number of elements is constant.
24508 (vect_permute_load_chain): Likewise.
24510 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24511 Alan Hayward <alan.hayward@arm.com>
24512 David Sherwood <david.sherwood@arm.com>
24514 * machmode.h (mode_nunits): Change from unsigned char to
24516 (ONLY_FIXED_SIZE_MODES): New macro.
24517 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24518 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24519 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24521 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24522 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24523 or if measurement_type is not polynomial.
24524 * genmodes.c (ZERO_COEFFS): New macro.
24525 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24527 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24528 Use ZERO_COEFFS when emitting initializers.
24529 * data-streamer.h (bp_pack_poly_value): New function.
24530 (bp_unpack_poly_value): Likewise.
24531 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24532 for GET_MODE_NUNITS.
24533 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24534 for GET_MODE_NUNITS.
24535 * tree.c (make_vector_type): Remove temporary shim and make
24536 the real function take the number of units as a poly_uint64
24537 rather than an int.
24538 (build_vector_type_for_mode): Handle polynomial nunits.
24539 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24540 * emit-rtl.c (const_vec_series_p_1): Likewise.
24541 (gen_rtx_CONST_VECTOR): Likewise.
24542 * fold-const.c (test_vec_duplicate_folding): Likewise.
24543 * genrecog.c (validate_pattern): Likewise.
24544 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24545 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24546 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24547 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24548 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24549 * rtlanal.c (subreg_get_info): Likewise.
24550 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24551 (vect_grouped_load_supported): Likewise.
24552 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24553 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24554 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24555 (simplify_const_unary_operation, simplify_binary_operation_1)
24556 (simplify_const_binary_operation, simplify_ternary_operation)
24557 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24558 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24559 instead of CONST_VECTOR_NUNITS.
24560 * varasm.c (output_constant_pool_2): Likewise.
24561 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24562 explicit-encoded elements in the XVEC for variable-length vectors.
24564 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24566 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24569 Alan Hayward <alan.hayward@arm.com>
24570 David Sherwood <david.sherwood@arm.com>
24572 * coretypes.h (fixed_size_mode): Declare.
24573 (fixed_size_mode_pod): New typedef.
24574 * builtins.h (target_builtins::x_apply_args_mode)
24575 (target_builtins::x_apply_result_mode): Change type to
24576 fixed_size_mode_pod.
24577 * builtins.c (apply_args_size, apply_result_size, result_vector)
24578 (expand_builtin_apply_args_1, expand_builtin_apply)
24579 (expand_builtin_return): Update accordingly.
24581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24583 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24584 * cselib.c (cselib_hash_rtx): Likewise.
24585 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24586 CONST_VECTOR encoding.
24588 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24589 Jeff Law <law@redhat.com>
24592 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24593 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24594 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24595 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24598 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24599 explicitly probe *sp in a noreturn function if there were any callee
24600 register saves or frame pointer is needed.
24602 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24605 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24606 BLKmode for ternary, binary or unary expressions.
24609 * var-tracking.c (delete_vta_debug_insn): New inline function.
24610 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24611 insns from get_insns () to NULL instead of each bb separately.
24612 Use delete_vta_debug_insn. No longer static.
24613 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24614 delete_vta_debug_insns callers.
24615 * rtl.h (delete_vta_debug_insns): Declare.
24616 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24617 instead of variable_tracking_main.
24619 2018-01-03 Martin Sebor <msebor@redhat.com>
24621 PR tree-optimization/83603
24622 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24623 arguments past the endof the argument list in functions declared
24624 without a prototype.
24625 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24626 Avoid checking when arguments are null.
24628 2018-01-03 Martin Sebor <msebor@redhat.com>
24631 * doc/extend.texi (attribute const): Fix a typo.
24632 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24633 issuing -Wsuggest-attribute for void functions.
24635 2018-01-03 Martin Sebor <msebor@redhat.com>
24637 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24638 offset_int::from instead of wide_int::to_shwi.
24639 (maybe_diag_overlap): Remove assertion.
24640 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24641 * gimple-ssa-sprintf.c (format_directive): Same.
24642 (parse_directive): Same.
24643 (sprintf_dom_walker::compute_format_length): Same.
24644 (try_substitute_return_value): Same.
24646 2018-01-03 Jeff Law <law@redhat.com>
24648 PR middle-end/83654
24649 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24650 non-constant residual for zero at runtime and avoid probing in
24651 that case. Reorganize code for trailing problem to mirror handling
24654 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24656 PR tree-optimization/83501
24657 * tree-ssa-strlen.c (get_string_cst): New.
24658 (handle_char_store): Call get_string_cst.
24660 2018-01-03 Martin Liska <mliska@suse.cz>
24662 PR tree-optimization/83593
24663 * tree-ssa-strlen.c: Include tree-cfg.h.
24664 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24665 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24666 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24668 (strlen_dom_walker::before_dom_children): Call
24669 gimple_purge_dead_eh_edges. Dump tranformation with details
24671 (strlen_dom_walker::before_dom_children): Update call by adding
24672 new argument cleanup_eh.
24673 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24675 2018-01-03 Martin Liska <mliska@suse.cz>
24678 * cif-code.def (VARIADIC_THUNK): New enum value.
24679 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24682 2018-01-03 Jan Beulich <jbeulich@suse.com>
24684 * sse.md (mov<mode>_internal): Tighten condition for when to use
24685 vmovdqu<ssescalarsize> for TI and OI modes.
24687 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24689 Update copyright years.
24691 2018-01-03 Martin Liska <mliska@suse.cz>
24694 * ipa-visibility.c (function_and_variable_visibility): Skip
24695 functions with noipa attribure.
24697 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24699 * gcc.c (process_command): Update copyright notice dates.
24700 * gcov-dump.c (print_version): Ditto.
24701 * gcov.c (print_version): Ditto.
24702 * gcov-tool.c (print_version): Ditto.
24703 * gengtype.c (create_file): Ditto.
24704 * doc/cpp.texi: Bump @copying's copyright year.
24705 * doc/cppinternals.texi: Ditto.
24706 * doc/gcc.texi: Ditto.
24707 * doc/gccint.texi: Ditto.
24708 * doc/gcov.texi: Ditto.
24709 * doc/install.texi: Ditto.
24710 * doc/invoke.texi: Ditto.
24712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24714 * vector-builder.h (vector_builder::m_full_nelts): Change from
24715 unsigned int to poly_uint64.
24716 (vector_builder::full_nelts): Update prototype accordingly.
24717 (vector_builder::new_vector): Likewise.
24718 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24719 (vector_builder::operator ==): Likewise.
24720 (vector_builder::finalize): Likewise.
24721 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24722 Take the number of elements as a poly_uint64 rather than an
24724 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24725 from unsigned int to poly_uint64.
24726 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24727 (vec_perm_indices::new_vector): Likewise.
24728 (vec_perm_indices::length): Likewise.
24729 (vec_perm_indices::nelts_per_input): Likewise.
24730 (vec_perm_indices::input_nelts): Likewise.
24731 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24732 number of elements per input as a poly_uint64 rather than an
24733 unsigned int. Use the original encoding for variable-length
24734 vectors, rather than clamping each individual element.
24735 For the second and subsequent elements in each pattern,
24736 clamp the step and base before clamping their sum.
24737 (vec_perm_indices::series_p): Handle polynomial element counts.
24738 (vec_perm_indices::all_in_range_p): Likewise.
24739 (vec_perm_indices_to_tree): Likewise.
24740 (vec_perm_indices_to_rtx): Likewise.
24741 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24742 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24743 (tree_vector_builder::new_binary_operation): Handle polynomial
24744 element counts. Return false if we need to know the number
24745 of elements at compile time.
24746 * fold-const.c (fold_vec_perm): Punt if the number of elements
24747 isn't known at compile time.
24749 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24751 * vec-perm-indices.h (vec_perm_builder): Change element type
24752 from HOST_WIDE_INT to poly_int64.
24753 (vec_perm_indices::element_type): Update accordingly.
24754 (vec_perm_indices::clamp): Handle polynomial element_types.
24755 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24756 (vec_perm_indices::all_in_range_p): Likewise.
24757 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24759 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24760 polynomial vec_perm_indices element types.
24761 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24762 * fold-const.c (fold_vec_perm): Likewise.
24763 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24764 * tree-vect-generic.c (lower_vec_perm): Likewise.
24765 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24766 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24767 element type to HOST_WIDE_INT.
24769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24770 Alan Hayward <alan.hayward@arm.com>
24771 David Sherwood <david.sherwood@arm.com>
24773 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24774 rather than an int. Use plus_constant.
24775 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24776 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24779 Alan Hayward <alan.hayward@arm.com>
24780 David Sherwood <david.sherwood@arm.com>
24782 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24783 a HOST_WIDE_INT to a poly_int64.
24785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24786 Alan Hayward <alan.hayward@arm.com>
24787 David Sherwood <david.sherwood@arm.com>
24789 * calls.c (load_register_parameters): Cope with polynomial
24790 mode sizes. Require a constant size for BLKmode parameters
24791 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24792 forces a parameter to be padded at the lsb end in order to
24793 fill a complete number of words, require the parameter size
24794 to be ordered wrt UNITS_PER_WORD.
24796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24797 Alan Hayward <alan.hayward@arm.com>
24798 David Sherwood <david.sherwood@arm.com>
24800 * reload1.c (spill_stack_slot_width): Change element type
24801 from unsigned int to poly_uint64_pod.
24802 (alter_reg): Treat mode sizes as polynomial.
24804 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24805 Alan Hayward <alan.hayward@arm.com>
24806 David Sherwood <david.sherwood@arm.com>
24808 * reload.c (complex_word_subreg_p): New function.
24809 (reload_inner_reg_of_subreg, push_reload): Use it.
24811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24812 Alan Hayward <alan.hayward@arm.com>
24813 David Sherwood <david.sherwood@arm.com>
24815 * lra-constraints.c (process_alt_operands): Reject matched
24816 operands whose sizes aren't ordered.
24817 (match_reload): Refer to this check here.
24819 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24820 Alan Hayward <alan.hayward@arm.com>
24821 David Sherwood <david.sherwood@arm.com>
24823 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24824 that the mode size is in the set {1, 2, 4, 8, 16}.
24826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24827 Alan Hayward <alan.hayward@arm.com>
24828 David Sherwood <david.sherwood@arm.com>
24830 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24831 Use plus_constant instead of gen_rtx_PLUS.
24833 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24834 Alan Hayward <alan.hayward@arm.com>
24835 David Sherwood <david.sherwood@arm.com>
24837 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24838 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24839 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24840 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24841 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24842 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24843 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24844 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24845 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24846 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24848 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24849 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24850 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24851 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24852 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24853 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24854 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24855 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24856 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24857 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24859 * expr.c (emit_move_resolve_push): Treat the input and result
24860 of PUSH_ROUNDING as a poly_int64.
24861 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24862 (emit_push_insn): Likewise.
24863 * lra-eliminations.c (mark_not_eliminable): Likewise.
24864 * recog.c (push_operand): Likewise.
24865 * reload1.c (elimination_effects): Likewise.
24866 * rtlanal.c (nonzero_bits1): Likewise.
24867 * calls.c (store_one_arg): Likewise. Require the padding to be
24868 known at compile time.
24870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24871 Alan Hayward <alan.hayward@arm.com>
24872 David Sherwood <david.sherwood@arm.com>
24874 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24875 Use plus_constant instead of gen_rtx_PLUS.
24877 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24878 Alan Hayward <alan.hayward@arm.com>
24879 David Sherwood <david.sherwood@arm.com>
24881 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24882 rather than an int.
24884 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24885 Alan Hayward <alan.hayward@arm.com>
24886 David Sherwood <david.sherwood@arm.com>
24888 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24889 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24890 via stack temporaries. Treat the mode size as polynomial too.
24892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24893 Alan Hayward <alan.hayward@arm.com>
24894 David Sherwood <david.sherwood@arm.com>
24896 * expr.c (expand_expr_real_2): When handling conversions involving
24897 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24898 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24899 as a poly_uint64 too.
24901 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24902 Alan Hayward <alan.hayward@arm.com>
24903 David Sherwood <david.sherwood@arm.com>
24905 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24908 Alan Hayward <alan.hayward@arm.com>
24909 David Sherwood <david.sherwood@arm.com>
24911 * combine.c (can_change_dest_mode): Handle polynomial
24912 REGMODE_NATURAL_SIZE.
24913 * expmed.c (store_bit_field_1): Likewise.
24914 * expr.c (store_constructor): Likewise.
24915 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24916 and polynomial REGMODE_NATURAL_SIZE.
24917 (gen_lowpart_common): Likewise.
24918 * reginfo.c (record_subregs_of_mode): Likewise.
24919 * rtlanal.c (read_modify_subreg_p): Likewise.
24921 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24922 Alan Hayward <alan.hayward@arm.com>
24923 David Sherwood <david.sherwood@arm.com>
24925 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24926 numbers of elements.
24928 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24929 Alan Hayward <alan.hayward@arm.com>
24930 David Sherwood <david.sherwood@arm.com>
24932 * match.pd: Cope with polynomial numbers of vector elements.
24934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24935 Alan Hayward <alan.hayward@arm.com>
24936 David Sherwood <david.sherwood@arm.com>
24938 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24939 in a POINTER_PLUS_EXPR.
24941 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24942 Alan Hayward <alan.hayward@arm.com>
24943 David Sherwood <david.sherwood@arm.com>
24945 * omp-simd-clone.c (simd_clone_subparts): New function.
24946 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24947 (ipa_simd_modify_function_body): Likewise.
24949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24950 Alan Hayward <alan.hayward@arm.com>
24951 David Sherwood <david.sherwood@arm.com>
24953 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24954 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24955 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24956 (expand_vector_condition, vector_element): Likewise.
24957 (subparts_gt): New function.
24958 (get_compute_type): Use subparts_gt.
24959 (count_type_subparts): Delete.
24960 (expand_vector_operations_1): Use subparts_gt instead of
24961 count_type_subparts.
24963 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24964 Alan Hayward <alan.hayward@arm.com>
24965 David Sherwood <david.sherwood@arm.com>
24967 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24968 (vect_compile_time_alias): ...this new function. Do the calculation
24969 on poly_ints rather than trees.
24970 (vect_prune_runtime_alias_test_list): Update call accordingly.
24972 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24973 Alan Hayward <alan.hayward@arm.com>
24974 David Sherwood <david.sherwood@arm.com>
24976 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24978 (vect_schedule_slp_instance): Likewise.
24980 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24981 Alan Hayward <alan.hayward@arm.com>
24982 David Sherwood <david.sherwood@arm.com>
24984 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24985 constant and extern definitions for variable-length vectors.
24986 (vect_get_constant_vectors): Note that the number of units
24987 is known to be constant.
24989 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24990 Alan Hayward <alan.hayward@arm.com>
24991 David Sherwood <david.sherwood@arm.com>
24993 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24994 of units as polynomial. Choose between WIDE and NARROW based
24997 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24998 Alan Hayward <alan.hayward@arm.com>
24999 David Sherwood <david.sherwood@arm.com>
25001 * tree-vect-stmts.c (simd_clone_subparts): New function.
25002 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25005 Alan Hayward <alan.hayward@arm.com>
25006 David Sherwood <david.sherwood@arm.com>
25008 * tree-vect-stmts.c (vectorizable_call): Treat the number of
25009 vectors as polynomial. Use build_index_vector for
25010 IFN_GOMP_SIMD_LANE.
25012 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25013 Alan Hayward <alan.hayward@arm.com>
25014 David Sherwood <david.sherwood@arm.com>
25016 * tree-vect-stmts.c (get_load_store_type): Treat the number of
25017 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25018 for variable-length vectors.
25019 (vectorizable_mask_load_store): Treat the number of units as
25020 polynomial, asserting that it is constant if the condition has
25021 already been enforced.
25022 (vectorizable_store, vectorizable_load): Likewise.
25024 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25025 Alan Hayward <alan.hayward@arm.com>
25026 David Sherwood <david.sherwood@arm.com>
25028 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25029 of units as polynomial. Punt if we can't tell at compile time
25030 which vector contains the final result.
25032 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25033 Alan Hayward <alan.hayward@arm.com>
25034 David Sherwood <david.sherwood@arm.com>
25036 * tree-vect-loop.c (vectorizable_induction): Treat the number
25037 of units as polynomial. Punt on SLP inductions. Use an integer
25038 VEC_SERIES_EXPR for variable-length integer reductions. Use a
25039 cast of such a series for variable-length floating-point
25042 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25043 Alan Hayward <alan.hayward@arm.com>
25044 David Sherwood <david.sherwood@arm.com>
25046 * tree.h (build_index_vector): Declare.
25047 * tree.c (build_index_vector): New function.
25048 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25049 of units as polynomial, forcibly converting it to a constant if
25050 vectorizable_reduction has already enforced the condition.
25051 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
25052 to create a {1,2,3,...} vector.
25053 (vectorizable_reduction): Treat the number of units as polynomial.
25054 Choose vectype_in based on the largest scalar element size rather
25055 than the smallest number of units. Enforce the restrictions
25058 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25059 Alan Hayward <alan.hayward@arm.com>
25060 David Sherwood <david.sherwood@arm.com>
25062 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25063 number of units as polynomial.
25065 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25066 Alan Hayward <alan.hayward@arm.com>
25067 David Sherwood <david.sherwood@arm.com>
25069 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25070 * target.def (autovectorize_vector_sizes): Return the vector sizes
25071 by pointer, using vector_sizes rather than a bitmask.
25072 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25073 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25074 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25076 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25077 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25078 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25079 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25080 * omp-general.c (omp_max_vf): Likewise.
25081 * omp-low.c (omp_clause_aligned_alignment): Likewise.
25082 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25083 * tree-vect-loop.c (vect_analyze_loop): Likewise.
25084 * tree-vect-slp.c (vect_slp_bb): Likewise.
25085 * doc/tm.texi: Regenerate.
25086 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25088 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25089 the vector size as a poly_uint64 rather than an unsigned int.
25090 (current_vector_size): Change from an unsigned int to a poly_uint64.
25091 (get_vectype_for_scalar_type): Update accordingly.
25092 * tree.h (build_truth_vector_type): Take the size and number of
25093 units as a poly_uint64 rather than an unsigned int.
25094 (build_vector_type): Add a temporary overload that takes
25095 the number of units as a poly_uint64 rather than an unsigned int.
25096 * tree.c (make_vector_type): Likewise.
25097 (build_truth_vector_type): Take the number of units as a poly_uint64
25098 rather than an unsigned int.
25100 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25101 Alan Hayward <alan.hayward@arm.com>
25102 David Sherwood <david.sherwood@arm.com>
25104 * target.def (get_mask_mode): Take the number of units and length
25105 as poly_uint64s rather than unsigned ints.
25106 * targhooks.h (default_get_mask_mode): Update accordingly.
25107 * targhooks.c (default_get_mask_mode): Likewise.
25108 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25109 * doc/tm.texi: Regenerate.
25111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25112 Alan Hayward <alan.hayward@arm.com>
25113 David Sherwood <david.sherwood@arm.com>
25115 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25116 * omp-general.c (omp_max_vf): Likewise.
25117 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25118 (expand_omp_simd): Handle polynomial safelen.
25119 * omp-low.c (omplow_simd_context): Add a default constructor.
25120 (omplow_simd_context::max_vf): Change from int to poly_uint64.
25121 (lower_rec_simd_input_clauses): Update accordingly.
25122 (lower_rec_input_clauses): Likewise.
25124 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25125 Alan Hayward <alan.hayward@arm.com>
25126 David Sherwood <david.sherwood@arm.com>
25128 * tree-vectorizer.h (vect_nunits_for_cost): New function.
25129 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25130 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25131 (vect_analyze_slp_cost): Likewise.
25132 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25133 (vect_model_load_cost): Likewise.
25135 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25136 Alan Hayward <alan.hayward@arm.com>
25137 David Sherwood <david.sherwood@arm.com>
25139 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25140 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25141 from an unsigned int * to a poly_uint64_pod *.
25142 (calculate_unrolling_factor): New function.
25143 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
25145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25146 Alan Hayward <alan.hayward@arm.com>
25147 David Sherwood <david.sherwood@arm.com>
25149 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25150 from an unsigned int to a poly_uint64.
25151 (_loop_vec_info::slp_unrolling_factor): Likewise.
25152 (_loop_vec_info::vectorization_factor): Change from an int
25154 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25155 (vect_get_num_vectors): New function.
25156 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25157 (vect_get_num_copies): Use vect_get_num_vectors.
25158 (vect_analyze_data_ref_dependences): Change max_vf from an int *
25159 to an unsigned int *.
25160 (vect_analyze_data_refs): Change min_vf from an int * to a
25162 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25163 than an unsigned HOST_WIDE_INT.
25164 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25165 (vect_analyze_data_ref_dependence): Change max_vf from an int *
25166 to an unsigned int *.
25167 (vect_analyze_data_ref_dependences): Likewise.
25168 (vect_compute_data_ref_alignment): Handle polynomial vf.
25169 (vect_enhance_data_refs_alignment): Likewise.
25170 (vect_prune_runtime_alias_test_list): Likewise.
25171 (vect_shift_permute_load_chain): Likewise.
25172 (vect_supportable_dr_alignment): Likewise.
25173 (dependence_distance_ge_vf): Take the vectorization factor as a
25174 poly_uint64 rather than an unsigned HOST_WIDE_INT.
25175 (vect_analyze_data_refs): Change min_vf from an int * to a
25177 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25178 vfm1 as a poly_uint64 rather than an int. Make the same change
25179 for the returned bound_scalar.
25180 (vect_gen_vector_loop_niters): Handle polynomial vf.
25181 (vect_do_peeling): Likewise. Update call to
25182 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25183 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25185 * tree-vect-loop.c (vect_determine_vectorization_factor)
25186 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25187 (vect_get_known_peeling_cost): Likewise.
25188 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25189 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25190 (vect_transform_loop): Likewise. Use the lowest possible VF when
25191 updating the upper bounds of the loop.
25192 (vect_min_worthwhile_factor): Make static. Return an unsigned int
25193 rather than an int.
25194 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25195 polynomial unroll factors.
25196 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25197 (vect_make_slp_decision): Likewise.
25198 (vect_supported_load_permutation_p): Likewise, and polynomial
25200 (vect_analyze_slp_cost): Handle polynomial vf.
25201 (vect_slp_analyze_node_operations): Likewise.
25202 (vect_slp_analyze_bb_1): Likewise.
25203 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25204 than an unsigned HOST_WIDE_INT.
25205 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25206 (vectorizable_load): Handle polynomial vf.
25207 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25209 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25211 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25212 Alan Hayward <alan.hayward@arm.com>
25213 David Sherwood <david.sherwood@arm.com>
25215 * match.pd: Handle bit operations involving three constants
25216 and try to fold one pair.
25218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25220 * tree-vect-loop-manip.c: Include gimple-fold.h.
25221 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25222 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25223 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25224 Add a path that uses a step of VF instead of 1, but disable it
25226 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25227 and niters_no_overflow parameters. Update calls to
25228 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25229 Create a new SSA name if the latter choses to use a ste other
25230 than zero, and return it via niters_vector_mult_vf_var.
25231 * tree-vect-loop.c (vect_transform_loop): Update calls to
25232 vect_do_peeling, vect_gen_vector_loop_niters and
25233 slpeel_make_loop_iterate_ntimes.
25234 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25235 (vect_gen_vector_loop_niters): Update declarations after above changes.
25237 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25239 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25240 128-bit round to integer instructions.
25241 (ceil<mode>2): Likewise.
25242 (btrunc<mode>2): Likewise.
25243 (round<mode>2): Likewise.
25245 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25247 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25248 unaligned VSX load/store on P8/P9.
25249 (expand_block_clear): Allow the use of unaligned VSX
25250 load/store on P8/P9.
25252 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25254 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25256 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25257 swap associated with both a load and a store.
25259 2018-01-02 Andrew Waterman <andrew@sifive.com>
25261 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25262 * config/riscv/riscv.md (clear_cache): Use it.
25264 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25266 * web.c: Remove out-of-date comment.
25268 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25270 * expr.c (fixup_args_size_notes): Check that any existing
25271 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25272 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25273 (emit_single_push_insn): ...here.
25275 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25277 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25278 (const_vector_encoded_nelts): New function.
25279 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25280 (const_vector_int_elt, const_vector_elt): Declare.
25281 * emit-rtl.c (const_vector_int_elt_1): New function.
25282 (const_vector_elt): Likewise.
25283 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25284 of CONST_VECTOR_ELT.
25286 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25288 * expr.c: Include rtx-vector-builder.h.
25289 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25290 directly on the tree encoding.
25291 (const_vector_from_tree): Likewise.
25292 * optabs.c: Include rtx-vector-builder.h.
25293 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25294 sequence of "u" values.
25295 * vec-perm-indices.c: Include rtx-vector-builder.h.
25296 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25297 directly on the vec_perm_indices encoding.
25299 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25301 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25302 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25303 * rtx-vector-builder.h: New file.
25304 * rtx-vector-builder.c: Likewise.
25305 * rtl.h (rtx_def::u2): Add a const_vector field.
25306 (CONST_VECTOR_NPATTERNS): New macro.
25307 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25308 (CONST_VECTOR_DUPLICATE_P): Likewise.
25309 (CONST_VECTOR_STEPPED_P): Likewise.
25310 (CONST_VECTOR_ENCODED_ELT): Likewise.
25311 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25312 (unwrap_const_vec_duplicate): Likewise.
25313 (const_vec_series_p): Check for a non-duplicated vector encoding.
25314 Say that the function only returns true for integer vectors.
25315 * emit-rtl.c: Include rtx-vector-builder.h.
25316 (gen_const_vec_duplicate_1): Delete.
25317 (gen_const_vector): Call gen_const_vec_duplicate instead of
25318 gen_const_vec_duplicate_1.
25319 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25320 (gen_const_vec_duplicate): Use rtx_vector_builder.
25321 (gen_const_vec_series): Likewise.
25322 (gen_rtx_CONST_VECTOR): Likewise.
25323 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25324 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25325 Build a new vector rather than modifying a CONST_VECTOR in-place.
25326 (handle_special_swappables): Update call accordingly.
25327 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25328 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25329 Build a new vector rather than modifying a CONST_VECTOR in-place.
25330 (handle_special_swappables): Update call accordingly.
25332 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25334 * simplify-rtx.c (simplify_const_binary_operation): Use
25335 CONST_VECTOR_ELT instead of XVECEXP.
25337 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25339 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25340 the selector elements to be different from the data elements
25341 if the selector is a VECTOR_CST.
25342 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25343 ssizetype for the selector.
25345 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25347 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25348 before testing each element individually.
25349 * tree-vect-generic.c (lower_vec_perm): Likewise.
25351 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25353 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25354 * selftest-run-tests.c (selftest::run_tests): Call it.
25355 * vector-builder.h (vector_builder::operator ==): New function.
25356 (vector_builder::operator !=): Likewise.
25357 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25358 (vec_perm_indices::all_from_input_p): New function.
25359 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25360 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25361 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25362 instead of reading the VECTOR_CST directly. Detect whether both
25363 vector inputs are the same before constructing the vec_perm_indices,
25364 and update the number of inputs argument accordingly. Use the
25365 utility functions added above. Only construct sel2 if we need to.
25367 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25369 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25370 the broadcast of the low byte.
25371 (expand_mult_highpart): Use an explicit encoding for the permutes.
25372 * optabs-query.c (can_mult_highpart_p): Likewise.
25373 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25374 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25375 (vectorizable_bswap): Likewise.
25376 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25377 explicit encoding for the power-of-2 permutes.
25378 (vect_permute_store_chain): Likewise.
25379 (vect_grouped_load_supported): Likewise.
25380 (vect_permute_load_chain): Likewise.
25382 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25384 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25385 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25386 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25387 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25388 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25389 (vect_gen_perm_mask_any): Likewise.
25391 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25393 * int-vector-builder.h: New file.
25394 * vec-perm-indices.h: Include int-vector-builder.h.
25395 (vec_perm_indices): Redefine as an int_vector_builder.
25396 (auto_vec_perm_indices): Delete.
25397 (vec_perm_builder): Redefine as a stand-alone class.
25398 (vec_perm_indices::vec_perm_indices): New function.
25399 (vec_perm_indices::clamp): Likewise.
25400 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25401 (vec_perm_indices::new_vector): New function.
25402 (vec_perm_indices::new_expanded_vector): Update for new
25403 vec_perm_indices class.
25404 (vec_perm_indices::rotate_inputs): New function.
25405 (vec_perm_indices::all_in_range_p): Operate directly on the
25406 encoded form, without computing elided elements.
25407 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25408 encoding. Update for new vec_perm_indices class.
25409 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25410 the given vec_perm_builder.
25411 (expand_vec_perm_var): Update vec_perm_builder constructor.
25412 (expand_mult_highpart): Use vec_perm_builder instead of
25413 auto_vec_perm_indices.
25414 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25415 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25416 or double series encoding as appropriate.
25417 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25418 vec_perm_indices instead of auto_vec_perm_indices.
25419 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25420 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25421 (vect_permute_store_chain): Likewise.
25422 (vect_grouped_load_supported): Likewise.
25423 (vect_permute_load_chain): Likewise.
25424 (vect_shift_permute_load_chain): Likewise.
25425 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25426 (vect_transform_slp_perm_load): Likewise.
25427 (vect_schedule_slp_instance): Likewise.
25428 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25429 (vectorizable_mask_load_store): Likewise.
25430 (vectorizable_bswap): Likewise.
25431 (vectorizable_store): Likewise.
25432 (vectorizable_load): Likewise.
25433 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25434 vec_perm_indices instead of auto_vec_perm_indices. Use
25435 tree_to_vec_perm_builder to read the vector from a tree.
25436 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25437 vec_perm_builder instead of a vec_perm_indices.
25438 (have_whole_vector_shift): Use vec_perm_builder and
25439 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25440 truncation to calc_vec_perm_mask_for_shift.
25441 (vect_create_epilog_for_reduction): Likewise.
25442 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25443 from auto_vec_perm_indices to vec_perm_indices.
25444 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25445 instead of changing individual elements.
25446 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25447 the vector in d.perm.
25448 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25449 from auto_vec_perm_indices to vec_perm_indices.
25450 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25451 instead of changing individual elements.
25452 (arm_vectorize_vec_perm_const): Use new_vector to install
25453 the vector in d.perm.
25454 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25455 Update vec_perm_builder constructor.
25456 (rs6000_expand_interleave): Likewise.
25457 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25458 (rs6000_expand_interleave): Likewise.
25460 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25462 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25463 to qimode could truncate the indices.
25464 * optabs.c (expand_vec_perm_var): Likewise.
25466 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25468 * Makefile.in (OBJS): Add vec-perm-indices.o.
25469 * vec-perm-indices.h: New file.
25470 * vec-perm-indices.c: Likewise.
25471 * target.h (vec_perm_indices): Replace with a forward class
25473 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25474 * optabs.h: Include vec-perm-indices.h.
25475 (expand_vec_perm): Delete.
25476 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25477 (expand_vec_perm_const): Declare.
25478 * target.def (vec_perm_const_ok): Replace with...
25479 (vec_perm_const): ...this new hook.
25480 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25481 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25482 * doc/tm.texi: Regenerate.
25483 * optabs.def (vec_perm_const): Delete.
25484 * doc/md.texi (vec_perm_const): Likewise.
25485 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25486 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25487 expand_vec_perm for constant permutation vectors. Assert that
25488 the mode of variable permutation vectors is the integer equivalent
25489 of the mode that is being permuted.
25490 * optabs-query.h (selector_fits_mode_p): Declare.
25491 * optabs-query.c: Include vec-perm-indices.h.
25492 (selector_fits_mode_p): New function.
25493 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25494 is defined, instead of checking whether the vec_perm_const_optab
25495 exists. Use targetm.vectorize.vec_perm_const instead of
25496 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25497 fit in the vector mode before using a variable permute.
25498 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25499 vec_perm_indices instead of an rtx.
25500 (expand_vec_perm): Replace with...
25501 (expand_vec_perm_const): ...this new function. Take the selector
25502 as a vec_perm_indices rather than an rtx. Also take the mode of
25503 the selector. Update call to shift_amt_for_vec_perm_mask.
25504 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25505 Use vec_perm_indices::new_expanded_vector to expand the original
25506 selector into bytes. Check whether the indices fit in the vector
25507 mode before using a variable permute.
25508 (expand_vec_perm_var): Make global.
25509 (expand_mult_highpart): Use expand_vec_perm_const.
25510 * fold-const.c: Includes vec-perm-indices.h.
25511 * tree-ssa-forwprop.c: Likewise.
25512 * tree-vect-data-refs.c: Likewise.
25513 * tree-vect-generic.c: Likewise.
25514 * tree-vect-loop.c: Likewise.
25515 * tree-vect-slp.c: Likewise.
25516 * tree-vect-stmts.c: Likewise.
25517 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25519 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25520 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25521 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25522 (aarch64_vectorize_vec_perm_const): ...this new function.
25523 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25524 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25525 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25526 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25527 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25528 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25529 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25531 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25532 check for NEON modes.
25533 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25534 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25535 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25536 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25538 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25539 the old VEC_PERM_CONST conditions.
25540 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25541 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25542 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25543 (ia64_vectorize_vec_perm_const_ok): Merge into...
25544 (ia64_vectorize_vec_perm_const): ...this new function.
25545 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25546 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25547 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25548 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25549 * config/mips/mips.c (mips_expand_vec_perm_const)
25550 (mips_vectorize_vec_perm_const_ok): Merge into...
25551 (mips_vectorize_vec_perm_const): ...this new function.
25552 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25553 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25554 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25555 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25556 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25557 (rs6000_expand_vec_perm_const): Delete.
25558 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25560 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25561 (altivec_expand_vec_perm_const_le): Take each operand individually.
25562 Operate on constant selectors rather than rtxes.
25563 (altivec_expand_vec_perm_const): Likewise. Update call to
25564 altivec_expand_vec_perm_const_le.
25565 (rs6000_expand_vec_perm_const): Delete.
25566 (rs6000_vectorize_vec_perm_const_ok): Delete.
25567 (rs6000_vectorize_vec_perm_const): New function.
25568 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25569 an element count and rtx array.
25570 (rs6000_expand_extract_even): Update call accordingly.
25571 (rs6000_expand_interleave): Likewise.
25572 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25573 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25574 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25575 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25576 (rs6000_expand_vec_perm_const): Delete.
25577 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25578 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25579 (altivec_expand_vec_perm_const_le): Take each operand individually.
25580 Operate on constant selectors rather than rtxes.
25581 (altivec_expand_vec_perm_const): Likewise. Update call to
25582 altivec_expand_vec_perm_const_le.
25583 (rs6000_expand_vec_perm_const): Delete.
25584 (rs6000_vectorize_vec_perm_const_ok): Delete.
25585 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25586 reference to the SPE evmerge intructions.
25587 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25588 an element count and rtx array.
25589 (rs6000_expand_extract_even): Update call accordingly.
25590 (rs6000_expand_interleave): Likewise.
25591 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25592 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25594 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25596 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25598 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25599 vector mode and that that mode matches the mode of the data
25601 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25602 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25603 directly using expand_vec_perm_1 when forcing selectors into
25605 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25607 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25609 * optabs-query.h (can_vec_perm_p): Delete.
25610 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25611 * optabs-query.c (can_vec_perm_p): Split into...
25612 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25613 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25614 particular selector is valid.
25615 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25616 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25617 (vect_grouped_load_supported): Likewise.
25618 (vect_shift_permute_load_chain): Likewise.
25619 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25620 (vect_transform_slp_perm_load): Likewise.
25621 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25622 (vectorizable_bswap): Likewise.
25623 (vect_gen_perm_mask_checked): Likewise.
25624 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25625 implementations of variable permutation vectors into account
25626 when deciding which selector to use.
25627 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25628 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25629 with a false third argument.
25630 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25631 to test whether the constant selector is valid and can_vec_perm_var_p
25632 to test whether a variable selector is valid.
25634 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25636 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25637 * optabs-query.c (can_vec_perm_p): Likewise.
25638 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25639 instead of vec_perm_indices.
25640 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25641 (vect_gen_perm_mask_checked): Likewise,
25642 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25643 (vect_gen_perm_mask_checked): Likewise,
25645 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25647 * optabs-query.h (qimode_for_vec_perm): Declare.
25648 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25649 (qimode_for_vec_perm): ...this new function.
25650 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25652 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25654 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25655 does not have a conditional at the top.
25657 2018-01-02 Richard Biener <rguenther@suse.de>
25659 * ipa-inline.c (big_speedup_p): Fix expression.
25661 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25664 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25667 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25671 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25672 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25673 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25674 cond_taken_branch_cost 3->4.
25676 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25678 PR tree-optimization/83581
25679 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25680 TODO_cleanup_cfg if any changes have been made.
25682 PR middle-end/83608
25683 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25684 convert_modes if target mode has the right side, but different mode
25687 PR middle-end/83609
25688 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25689 last argument when extracting from CONCAT. If either from_real or
25690 from_imag is NULL, use expansion through memory. If result is not
25691 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25692 the parts directly to inner mode, if even that fails, use expansion
25695 PR middle-end/83623
25696 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25697 check for bswap in mode rather than HImode and use that in expand_unop
25700 Copyright (C) 2018 Free Software Foundation, Inc.
25702 Copying and distribution of this file, with or without modification,
25703 are permitted in any medium without royalty provided the copyright
25704 notice and this notice are preserved.