1 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
5 before and after a JUMP_TABLE_DATA.
7 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
10 * dojump.c (do_compare_and_jump): Canonicalize function pointers
11 when one operand is a function pointer. Use POINTER_TYPE_P and
12 FUNC_OR_METHOD_TYPE_P.
13 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
14 * fold-const.c (build_range_check): Likewise.
15 * match.pd (simple_comparison): Likewise.
17 2018-09-14 David Malcolm <dmalcolm@redhat.com>
20 * spellcheck.c (get_edit_distance_cutoff): New function.
21 (selftest::test_edit_distance_unit_test_oneway): Rename to...
22 (selftest::test_get_edit_distance_one_way): ...this.
23 (selftest::test_get_edit_distance_unit): Rename to...
24 (selftest::test_get_edit_distance_both_ways): ...this.
25 (selftest::test_edit_distances): Move tests to this new function,
26 and test some more pairs of strings. Update for above renaming.
27 (selftest::get_old_cutoff): New function.
28 (selftest::test_get_edit_distance_cutoff): New function.
29 (selftest::assert_suggested_for): New function.
30 (ASSERT_SUGGESTED_FOR): New macro.
31 (selftest::assert_not_suggested_for): New function.
32 (ASSERT_NOT_SUGGESTED_FOR): New macro.
33 (selftest::test_suggestions): New function.
34 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
35 tests to selftest::test_edit_distances and call it. Add calls to
36 selftest::test_get_edit_distance_cutoff and
37 selftest::test_suggestions.
38 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
39 (best_match::consider): Replace hard-coded cutoff calculation with
41 (best_match::get_cutoff): New declaration.
42 (best_match::get_best_meaningful_candidate): Likewise.
44 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
46 * builtins.c (fold_builtin_strlen): Remove TODO comment.
48 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
51 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
53 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
54 terminated string literal.
56 2018-09-14 Martin Sebor <msebor@redhat.com>
58 * builtins.c (unterminated_array): Handle ARRAY_REF.
59 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
60 * builtins.h (unterminated_array): Declare extern.
61 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
63 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
66 2018-09-14 Martin Sebor <msebor@redhat.com>
67 Jeff Law <law@redhat.com>
69 * builtins.c (unterminated_array): New.
70 (expand_builtin_strcpy): Adjust.
71 (expand_builtin_strcpy_args): Detect unterminated arrays.
72 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
74 * gimple-fold.h (get_maxval_strlen): Add argument.
75 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
77 * gimple-fold.c (get_range_strlen): Add argument.
78 (get_maxval_strlen): Adjust.
79 * gimple-fold.h (get_range_strlen): Add argument.
81 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
83 * config/i386/movdirintrin.h: Fix copyright year.
85 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
87 * reg-stack.c: Include regs.h.
88 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
89 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
90 FIRST_STACK_REG, not DFmode.
91 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
92 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
93 (change stack): Default register mode to the reg_raw_mode of
94 FIRST_STACK_REG, not DFmode.
95 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
96 (*swapxf): Rename from swapxf.
98 2018-09-14 Carl Love <cel@us.ibm.com>
100 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
101 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
103 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
106 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
109 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
112 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
114 2018-09-14 Jason Merrill <jason@redhat.com>
116 Fix --enable-gather-detailed-mem-stats.
117 * hash-table.c (hash_table_usage): Change from variable to function.
118 * hash-table.h: Adjust.
119 * Makefile.in: Add missing dependencies on hash-table.h.
121 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
123 PR tree-optimization/87259
125 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
126 execute_cse_reciprocals_1 has tried transforming.
128 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
130 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
131 VR_VARYING for PLUS/MINUS_EXPR.
133 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
135 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
138 2018-09-14 Richard Biener <rguenther@suse.de>
141 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
142 bits for the merged partition.
144 2018-09-13 Martin Sebor <msebor@redhat.com>
145 Bernd Edlinger <bernd.edlinger@hotmail.de>
147 * builtins.h (c_srlen): Add argument.
148 * builtins.c (warn_string_no_nul): New function.
149 (c_strlen): Add argument and use it. Update recursive calls.
150 Pass DECL argument to string_constant to get info on non
151 terminated strings. Update *NONSTR as needed.
152 (fold_builtin_strlen): Add argument to calls to c_strlen.
153 Warn for unterminated arrays.
154 (warn_string_no_null): Add prototype.
155 * expr.c (string_constant): Update arguments. Update recursive
156 calls appropriately. Detect missing NUL terminator and outermost
157 declaration its missing in.
158 Improve checks for arrays with nonzero lower bound or elements
159 that are not a single byte. Simplify offset computation.
160 Simplify checks for non-NUL terminated strings.
161 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
162 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
164 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
166 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
168 * fold-const.c (c_getstr): Fix function comment. Remove unused third
169 argument. Fix range checks.
170 * fold-const.h (c_getstr): Adjust protoype.
171 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
172 string is constant but contains no NUL byte.
174 * expr.c (string_constant): Adjust function comment.
175 Remove bogus check for zero termination.
177 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
179 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
180 (get_constant_size): Don't make STRING_CSTs larger than they are.
181 (check_string_literal): New check function for STRING_CSTs.
182 (output_constant): Use it.
184 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
187 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
189 2018-09-13 Richard Biener <rguenther@suse.de>
191 PR tree-optimization/87263
192 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
193 (struct unwind_state): Add max_rpo field.
194 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
195 Compute max_rpo, the max RPO number a block can be backwards reached
196 from. Re-write non-iterating mode to a RPO ordered worklist approach,
197 separating it from the iterating mode.
199 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
201 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
202 (rfs_decision): New scheduling decision.
204 2018-09-13 Richard Biener <rguenther@suse.de>
207 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
208 (vn_nary_op_insert_pieces_predicated): Do not write useless
209 valid_dominated_by_p entry outside of the allocated storage.
211 2018-09-13 Omar Sandoval <osandov@osandov.com>
212 Tom de Vries <tdevries@suse.de>
215 * dwarf2out.c (is_c): New function.
216 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
218 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
221 * config/aarch64/aarch64.md (*aarch64_bfxil):
223 * config/aarch64/constraints.md (Ulc): Define.
224 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
226 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
229 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
231 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
232 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
233 aarch64_layout_frame call.
234 (aarch64_expand_epilogue): Likewise.
235 (aarch64_initial_elimination_offset): Likewise.
236 (aarch64_get_separate_components): Likewise.
237 (aarch64_use_return_insn_p): Likewise.
238 (aarch64_layout_frame): Remove unneeded check.
240 2018-09-13 Jakub Jelinek <jakub@redhat.com>
242 * configure.ac: Only append
243 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
244 gcc_config_arguments if it was never reconfigured or last reconfigure
245 was with different arguments.
246 * configure: Regenerated.
248 2018-09-13 Jakub Jelinek <jakub@redhat.com>
249 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
252 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
253 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
255 2018-09-13 Jakub Jelinek <jakub@redhat.com>
257 PR tree-optimization/87287
258 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
259 X % C == 0 to X % (unsigned) C == 0 optimization to ...
260 * match.pd (X % C == 0): ... here. New optimization.
262 2018-09-12 Jakub Jelinek <jakub@redhat.com>
265 * expr.h (maybe_optimize_mod_cmp): Declare.
266 * expr.c (mod_inv): New function.
267 (maybe_optimize_mod_cmp): New function.
268 (do_store_flag): Use it.
269 * cfgexpand.c (expand_gimple_cond): Likewise.
271 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
272 Julian Brown <julian@codesourcery.com>
275 * gimplify.c (gimplify_scan_omp_clauses): Set
276 target_firstprivatize_array_bases in OpenACC parallel and kernels
277 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
278 OpenACC data regions.
280 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
282 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
283 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
285 2018-09-12 Richard Biener <rguenther@suse.de>
287 PR tree-optimization/87280
288 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
289 edge but unreachable target.
290 (do_rpo_vn): For conservatively handling a PHI only mark
291 the backedge executable but not the block reachable.
293 2018-09-12 Richard Biener <rguenther@suse.de>
295 PR tree-optimization/87266
296 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
299 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
301 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
303 ("trunc<BFP:mode><DFP_ALL:mode>2")
304 ("trunc<DFP_ALL:mode><BFP:mode>2")
305 ("extend<BFP:mode><DFP_ALL:mode>2")
306 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
307 according to the target operand type.
309 2018-09-12 Jakub Jelinek <jakub@redhat.com>
310 Andreas Krebbel <krebbel@linux.ibm.com>
312 PR tree-optimization/86844
313 * gimple-ssa-store-merging.c
314 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
315 there are any overlapping stores in between them, make sure they are
316 also coalesced or we give up completely.
318 2018-09-12 Jakub Jelinek <jakub@redhat.com>
321 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
322 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
324 2018-09-12 Tom de Vries <tdevries@suse.de>
326 * common.opt (gdescribe-dies): Add option.
327 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
328 attribute for artifical and nameless decls.
329 (dwarf2out_register_external_die): Add description attribute to
330 external reference die.
331 (add_desc_attribute): New functions.
332 (gen_subprogram_die): Add description attribute to
333 DW_TAG_call_site_parameter.
334 * tree-pretty-print.c (print_generic_expr_to_str): New function.
335 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
336 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
338 (@item -gdescribe-dies): Add.
340 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
342 * tree-vrp.c (vrp_shift_undefined_p): Remove.
343 (extract_range_from_binary_expr_1: Call
344 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
345 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
348 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
350 * gimple-ssa-warn-alloca.c
351 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
352 field for ALLOCA_BOUND_*_LARGE.
354 2018-09-11 Nathan Sidwell <nathan@acm.org>
356 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
358 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
360 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
361 for clobbers. Remove obsolete comment.
363 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
365 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
366 mpxchk, mpxld and mpxst types.
367 (define_attr length_immediate): Remove all processing of mpx types.
368 (define_attr prefix_0f): Ditto.
369 (define_attr memory): Ditto.
371 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
373 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
374 (log<mode>2): Change operand 1 predicate to general_operand.
375 Extend operand 1 to XFmode and generate logxf3 insn.
376 (log10<mode>2): Change operand 1 predicate to general_operand.
377 Extend operand 1 to XFmode and generate log10xf3 insn.
378 (log2<mode>2): Change operand 1 predicate to general_operand.
379 Extend operand 1 to XFmode and generate log2xf3 insn.
380 (fyl2xp1_extend<mode>xf3_i387): Remove.
381 (log1p<mode>2): Change operand 1 predicate to general_operand.
382 Extend operand 1 to XFmode and generate log1pxf3 insn.
383 (fxtract_extend<mode>xf3_i387): Remove.
384 (logb<mode>2): Change operand 1 predicate to general_operand.
385 Extend operand 1 to XFmode and generate logbxf3 insn.
386 (ilogb<mode>2): Change operand 1 predicate to general_operand.
387 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
388 (significand<mode>2): Change operand 1 predicate to general_operand.
389 Extend operand 1 to XFmode and generate significandxf3 insn.
391 2018-09-11 Nathan Sidwell <nathan@acm.org>
393 * gcc.c (perror_with_name, pfatal_with_name): Delete.
394 (load_specs): Use fatal_error.
395 (DELETE_IF_ORDINARY, process_command): Use error.
396 (execute, run_attempt): Use fatal_error.
398 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
400 * diagnostic-core.h (sorry_at): New prototype.
401 * diagnostic.c (sorry_at): New function.
403 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
405 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
406 by zero as VR_UNDEFINED.
408 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
410 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
411 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
412 (<sincos>mode2): New expander.
413 (sincos_extend<mode>xf3_i387): Remove insn pattern.
414 (sincos -> sin, cos splitters): Remove splitter patterns.
415 (sincos<mode>3): Change operand 2 predicate to general_operand.
416 Extend operand 2 to XFmode and generate sincosxf3 insn.
417 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
418 Change operand 3 predicate to const1_operand.
419 (fptan_extend<mode>xf4_i387): Remove insn pattern.
420 (tanxf2): Update operands in the call to fptanxf4_i387.
421 (tan<mode>2): Change operand 1 predicate to general_operand.
422 Extend operand 1 to XFmode and generate tanxf3 insn.
423 (atan2xf3): Rename from *fpatanxf3_i387.
424 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
425 (atan2xf3): Remove expander.
426 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
427 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
428 (atan<mode>2): Change operand 1 predicate to general_operand.
429 Extend operand 1 to XFmode and generate atanxf3 insn.
431 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
433 * config/i386/i386.md (x87/SSE constant load splitter): Use
434 memory_operand instead of nonimmediate_operand for input operand
437 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
439 * config/i386/i386.md (float partial SSE register stall splitter): Move
440 splitter near its instruction pattern.
441 (float_extend partial SSE register stall splitter): Ditto.
442 (float_truncate partial SSE register stall splitter): Ditto.
444 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
447 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
448 to speculation_safe_value_not_needed.
451 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
452 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
453 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
454 leaf_function_p, instead use has_hard_reg_initial_val.
456 2018-09-09 Nathan Sidwell <nathan@acm.org>
458 * gcc.h (pfatal_with_name): Don't declare here.
459 * gcc.c (pfatal_with_name): Make static.
461 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
463 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
466 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
468 PR rtl-optimization/85458
469 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
470 priority hook to reduce the priority of EXPR.
472 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
474 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
475 DImode for x87 on 32bit targets. Conditionally disable x87 modes
476 with X87_ENABLE_FLOAT. Remove preparation code.
477 (*float<SWI48:mode><MODEF:mode>2): Rename from
478 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
479 math using "enabled" attribute.
480 (*floatdi<MODEF:mode>2_i387): Rename from
481 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
482 enable for 32bit targets only.
483 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
485 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
486 as operand 1 predicate. Rewrite as define_insn_and_split.
487 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
489 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
491 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
492 to fallthru to FLOAT case.
494 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
497 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
498 around folding of vec_sl to handle out of range shift values.
500 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
502 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
503 Update callers to gen_fix_trunc<mode>_i387_fisttp
504 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
505 nonimmediate_operand.
506 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
507 and corresponding splitters.
508 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
509 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
510 (fix_truncdi_i387_with_temp): Remove insn pattern
511 and corresponding splitters.
512 (fix_trunc<mode>_i387): Change operand 0 predicate to
513 nonimmediate_operand.
514 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
515 and corresponding splitters.
516 (*fistdi2_1): Remove.
518 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
519 (lrintxfdi2): Remove expander. Reimplement as define_insn.
520 (*fist<mode>2_1): Remove.
521 (fist<mode>2): Ditto.
522 (fist<mode>2_with_temp): Remove insn pattern and corresponding
524 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
525 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
526 (fistdi2_<rounding>): Change operand 0 predicate to
527 nonimmediate_operand.
528 (fistdi2_<rounding>_with_temp): Remove insn pattern
529 and corresponding splitters.
530 (fist<mode>2_<rounding>): Change operand 0 predicate to
531 nonimmediate_operand.
532 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
533 and corresponding splitters.
535 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
537 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
539 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
542 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
544 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
545 early gimple folding of vec_splat().
546 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
547 * gimple-fold.h: Add an extern define for tree_vec_extract().
549 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
551 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
552 wrappers around TREE_TYPE comparisons.
554 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
557 * config/s390/predicates.md: Add nonsym_memory_operand.
558 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
559 contains a SYMBOL_REF, load it into an intermediate pseudo.
560 (s390_emit_compare_and_swap): Legitimize operand.
561 * config/s390/s390.md: Use the new nonsym_memory_operand
562 with UNSPECV_CAS patterns.
564 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
567 * config/s390/s390-passes.def: New file.
568 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
570 (make_pass_s390_early_mach): Add declaration.
571 * config/s390/s390.c (make_pass_s390_early_mach):
572 (s390_option_override): Remove dynamic registration.
573 * config/s390/t-s390: Add s390-passes.def.
575 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
577 * config/s390/s390.c (s390_decompose_constant_pool_ref):
578 Remove UNSPEC_LTREL_BASE check.
579 (annotate_constant_pool_refs): Likewise.
580 (find_constant_pool_ref): Likewise.
581 (find_ltrel_base): Removed.
582 (replace_ltrel_base): Removed.
583 (s390_mainpool_finish): Remove replace_ltrel_base call.
584 (s390_chunkify_start): Remove pending LTREL_BASE logic.
585 (s390_chunkify_finish): Remove replace_ltrel_base call.
586 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
588 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
591 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
592 to speculation_safe_value_not_needed.
594 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
595 Bernd Schmidt <bernds_cb1@t-online.de>
597 * config/nvptx/nvptx-opts.h: New file.
598 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
599 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
601 (TARGET_SM35): New macro.
602 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
604 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
607 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
609 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
611 * config/i386/i386.md (truncdfsf2): Remove expander.
612 (truncdfsf2_with_temp): Ditto.
613 (truncxf<mode>2): Ditto.
614 (*truncdfsf_fast_mixed): Remove insn pattern.
615 (*truncdfsf_fast_i387): Ditto.
616 (*truncdfsf_mixed): Ditto.
617 (*truncdfsf_i387): Ditto.
618 (*truncdfsf2_i387_1): Ditto.
619 (*truncxfsf2_mixed): Ditto.
620 (*truncxfdf2_mixed): Ditto.
621 (*truncxf<mode>2_i387_noop): Ditto. Update callers
622 to call gen_truncxf<mode>2 instead.
623 (*truncxf<mode>2_i387): Remove.
624 (reg->reg splitters): Remove splitter pattern.
625 (reg->mem splitters): Ditto.
627 (truncdfsf2): New insn pattern.
628 (truncxf<mode>2): Ditto.
630 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
632 * tree-ssa-math-opts.c (is_mult_by): New function.
633 (is_square_of): Use the above.
634 (optimize_recip_sqrt): New function.
635 (pass_cse_reciprocals::execute): Use the above.
637 2018-09-05 Richard Biener <rguenther@suse.de>
640 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
641 to zero-init the emplaced vec.
643 2018-09-05 Martin Liska <mliska@suse.cz>
645 PR tree-optimization/87205
646 * tree-switch-conversion.c (pass_lower_switch::execute):
647 Group cases for switch statements.
649 2018-09-05 Richard Biener <rguenther@suse.de>
651 PR tree-optimization/87217
652 * tree-ssa-sccvn.c (vuse_valueize): New.
653 (vn_reference_lookup_pieces): Use it.
654 (vn_reference_lookup): Likewise.
656 2018-09-05 Nathan Sidwell <nathan@acm.org>
659 * stor-layout.c (place_field): Scan forwards to check last
660 bitfield when ms_bitfield_placement is in effect.
662 2018-09-05 Richard Biener <rguenther@suse.de>
665 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
668 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
669 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
671 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
672 * config.gcc (extra_objs): Build it.
673 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
675 * config/aarch64/aarch64-passes.def
676 (pass_tag_collision_avoidance): New pass.
677 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
678 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
679 (aarch64_classify_address): Remove static qualifier.
680 (aarch64_address_info, aarch64_address_type): Move to...
681 * config/aarch64/aarch64-protos.h: ... here.
682 (make_pass_tag_collision_avoidance): New function.
683 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
686 2018-09-05 Martin Liska <mliska@suse.cz>
688 * doc/gcov.texi: Update documentation of humar
690 * gcov.c (format_count): Print one decimal place, it provides
691 more fine number of situations like '1G' vs. '1.4G'.
693 2018-09-05 Martin Liska <mliska@suse.cz>
696 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
697 * optc-gen.awk: Allow 'Var' for Deprecated options in order
698 to generate a MASK value.
700 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
703 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
704 if frame pointer isn't used.
705 (compute_frame_pointer_to_fb_displacement): Likewise.
707 2018-09-04 Jakub Jelinek <jakub@redhat.com>
710 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
711 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
712 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
713 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
714 and OPTION_MASK_ISA_XSAVEC_UNSET.
716 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
718 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
719 XOR operations in NAND case.
721 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
723 * wide-int-range.cc (wide_int_range_convert): New.
724 * wide-int-range.h (wide_int_range_convert): New.
725 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
726 code into wide_int_range_convert.
727 (extract_range_into_wide_ints): Do not munge anti range constants
728 into the entire domain. Just return the range back.
730 2018-09-04 Martin Liska <mliska@suse.cz>
732 * genmatch.c (output_line_directive): Add new argument
734 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
736 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
738 * doc/invoke.texi (Option Summary): Add whitespace.
740 * doc/invoke.texi (Option Summary): Add -Waligned-new.
742 2018-09-04 Richard Biener <rguenther@suse.de>
744 PR tree-optimization/87211
745 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
746 backedge value we're supposed to treat as VARYING also number
747 the PHI to VARYING in case it got a different value-number already.
749 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
751 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
752 (extract_range_from_binary_expr_1): Do not call
753 vrp_can_optimize_bit_op.
754 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
756 (wide_int_range_get_mask_and_bounds): New.
757 (wide_int_range_optimize_bit_op): New.
758 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
759 (wide_int_range_bit_and): Same.
760 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
761 (wide_int_range_optimize_bit_op): New.
762 (wide_int_range_get_mask_and_bounds): New.
764 2018-09-04 Richard Biener <rguenther@suse.de>
766 PR tree-optimization/87176
767 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
768 variable. When value-numbering a virtual PHI node make sure
769 to not value-number to the backedge value.
771 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
773 * doc/extend.texi (Long Long, Hex Floats): Document support for
774 long long and hex floats in more recent versions of ISO C++.
776 2018-09-03 Richard Biener <rguenther@suse.de>
778 PR tree-optimization/87177
779 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
782 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
784 * bb-reorder.c (edge_order): Convert to C-qsort-style
785 tri-state comparator.
786 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
788 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
790 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
791 tri-state comparator.
792 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
794 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
796 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
797 (mergesort): ... here as maximum count for using netsort.
798 (gcc_qsort): Set nlim to 3 if stable sort is requested.
799 (gcc_stablesort): New.
800 * system.h (gcc_stablesort): Declare.
802 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
804 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
805 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
806 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
808 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
810 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
811 lxsdx and stxsdx alternatives.
812 (*mov<mode>_hardfloat64): Ditto.
813 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
815 2018-09-03 Richard Biener <rguenther@suse.de>
817 PR tree-optimization/87200
818 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
821 2018-09-03 Martin Liska <mliska@suse.cz>
823 PR tree-optimization/87201
824 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
825 Fix parenthesis in an expression.
827 2018-09-03 Richard Biener <rguenther@suse.de>
829 PR tree-optimization/87197
830 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
831 visited. CSE the VN_INFO hashtable lookup.
833 PR tree-optimization/87169
834 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
835 iterating make sure there's no extra backedges from irreducible
836 regions feeding the header. Mark the destination block
839 2018-09-03 Martin Liska <mliska@suse.cz>
842 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
843 * common/common-targhooks.c (default_get_valid_option_values):
845 * common/common-targhooks.h (default_get_valid_option_values):
847 * common/config/i386/i386-common.c: Move processor_target_table
849 (ix86_get_valid_option_values): New function.
850 (TARGET_GET_VALID_OPTION_VALUES): New macro.
851 * config/i386/i386.c (struct ptt): Move to i386-common.c.
852 (PTA_*): Move all defined masks into i386-common.c.
853 (ix86_function_specific_restore): Use new processor_cost_table.
854 * config/i386/i386.h (struct ptt): Moved from i386.c.
855 (struct pta): Likewise.
856 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
857 * doc/tm.texi.in: Likewise.
858 * opt-suggestions.c (option_proposer::suggest_option):
859 Pass prefix to build_option_suggestions.
860 (option_proposer::get_completions): Likewise.
861 (option_proposer::build_option_suggestions): Use the new target
863 * opts.c (struct option_help_tuple): New struct.
864 (print_filtered_help): Use the new target hook.
866 2018-09-03 Martin Liska <mliska@suse.cz>
869 * predict.c (set_even_probabilities): Add likely_edges
870 argument and handle cases where we have precisely one
872 (combine_predictions_for_bb): Catch also likely_edges.
873 (tree_predict_by_opcode): Handle gswitch statements.
874 * tree-cfg.h (find_case_label_for_value): New declaration.
875 (find_taken_edge_switch_expr): Likewise.
876 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
877 Find pivot in decision tree based on probabily, not by number of
880 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
882 * doc/standards.texi (Standards): Update Objective-C reference.
884 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
886 * doc/install.texi (Prerequisites): Update link for MPC.
888 2018-09-01 Michael Matz <matz@suse.de>
890 PR tree-optimization/87074
891 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
892 PHIs for outer-loop uses.
894 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
896 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
897 * doc/invoke.texi (C Dialect Options): Ditto.
899 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
901 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
903 2018-08-31 Richard Biener <rguenther@suse.de>
905 PR tree-optimization/87168
906 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
907 (rpo_elim::eliminate_avail): When OP was not visited it must
910 2018-08-31 David Malcolm <dmalcolm@redhat.com>
912 * tree-vrp.c (copy_value_range): Convert param "from" from
913 "value_range *" to "const value_range *".
914 (range_is_null): Likewise for param "vr".
915 (range_int_cst_p): Likewise.
916 (range_int_cst_singleton_p): Likewise.
917 (symbolic_range_p): Likewise.
918 (value_ranges_intersect_p): Likewise for both params.
919 (value_range_nonnegative_p): Likewise for param "vr".
920 (value_range_constant_singleton): Likewise.
921 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
922 (extract_range_into_wide_ints): Likewise for param "vr".
923 (extract_range_from_multiplicative_op): Likewise for params "vr0"
925 (vrp_can_optimize_bit_op): Likewise.
926 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
928 (extract_range_from_unary_expr): Likewise.
929 (debug_value_range): Likewise for param "vr".
930 (value_range::dump): Add "const" qualifier.
931 (vrp_prop::check_array_ref): Convert local "vr" from
932 "value_range *" to "const value_range *".
933 (vrp_prop::check_mem_ref): Likewise.
934 (vrp_prop::visit_stmt): Likewise for local "old_vr".
935 (vrp_intersect_ranges_1): Likewise for param "vr_1".
936 (vrp_intersect_ranges): Likewise.
937 (simplify_stmt_for_jump_threading): Likewise for local "vr".
938 (vrp_prop::vrp_finalize): Likewise.
939 * tree-vrp.h (value_range::dump): Add "const" qualifier.
940 (vrp_intersect_ranges): Add "const" qualifier to params as above.
941 (extract_range_from_unary_expr): Likewise.
942 (value_range_constant_singleton): Likewise.
943 (symbolic_range_p): Likewise.
944 (copy_value_range): Likewise.
945 (extract_range_from_binary_expr_1): Likewise.
946 (range_int_cst_p): Likewise.
947 (vrp_set_zero_nonzero_bits): Likewise.
948 (range_int_cst_singleton_p): Likewise.
950 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
952 * config/aarch64/arm_neon.h (vabsd_s64): New.
953 (vnegd_s64): Likewise.
955 2018-08-31 Martin Jambor <mjambor@suse.cz>
957 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
959 2018-08-31 Martin Liska <mliska@suse.cz>
961 * ipa-icf.c (sem_item::add_type): Use
962 sem_item::m_type_hash_cache.
963 * ipa-icf.h: Move the cache from sem_item_optimizer
966 2018-08-31 Nathan Sidwell <nathan@acm.org>
968 * doc/extend.texi (Backwards Compatibility): Remove implicit
969 extern C leeway of () being (...).
971 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
973 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
975 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
979 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
981 2018-08-31 Jakub Jelinek <jakub@redhat.com>
984 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
985 gen_int_mode. Formatting fixes.
987 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
989 * target.def (custom_function_descriptors): Improve documentation.
990 * doc/tm.texi.in (Trampolines): Expand discussion of function
991 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
992 beginning of the section.
993 * doc/tm.texi: Regenerated.
995 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
997 * cfg.h (class auto_edge_flag): Spell out the template-id of the
998 base class in the initializer list. This is a workaround for
999 building with older GCC.
1000 (class auto_bb_flag): Likewise.
1002 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1004 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1005 (altivec_vcmpequ<VI_char>_p): Remove star.
1006 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1008 (expand_strncmp_vec_sequence): New function.
1009 (emit_final_str_compare_vec): New function.
1010 (expand_strn_compare): Add support for vector strncmp.
1011 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1012 length specification to bytes.
1013 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1014 (vcmpnezb_p): New pattern.
1015 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1016 for option -mstring-compare-inline-limit.
1018 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
1020 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1021 (PTA_SKYLAKE): Add PTA_AES.
1022 (PTA_GOLDMONT): Likewise.
1024 2018-08-29 Jan Hubicka <jh@suse.cz>
1027 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1028 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1030 2018-08-29 Jan Hubicka <jh@suse.cz>
1032 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1034 (hash_tree): Do not visit TYPE_STUB_DECL.
1035 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1036 stream TYPE_STUB_DECL.
1037 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1038 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1039 after free_lang_data.
1040 (type_in_anonymous_namespace_p): Likewise.
1042 2018-08-29 Jan Hubicka <jh@suse.cz>
1044 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1045 comment that it has to be even number.
1046 (class sreal): Change m_sig type to int32_t.
1047 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1048 int64_t for temporary calculations.
1049 (sreal_verify_basics): Drop one bit from minimum and maximum.
1051 2018-08-30 Richard Biener <rguenther@suse.de>
1053 PR tree-optimization/87147
1054 * tree-ssa-sccvn.c (SSA_VISITED): New function.
1055 (visit_phi): When the degenerate result is from the backedge and
1056 we didn't visit its definition yet drop to VARYING.
1057 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1059 2018-08-29 Jan Hubicka <jh@suse.cz>
1061 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1063 (hash_tree): Likewise.
1065 2018-08-29 Jan Hubicka <jh@suse.cz>
1067 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1068 and TYPE_NEXT_REF_TO.
1070 2018-08-29 Jan Hubicka <jh@suse.cz>
1072 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1073 comment that it has to be even number.
1074 (class sreal): Change m_sig type to int32_t.
1075 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1076 int64_t for temporary calculations.
1077 (sreal_verify_basics): Drop one bit from minimum and maximum.
1079 2018-08-30 Tamar Christina <tamar.christina@arm.com>
1081 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1083 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
1086 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1087 if to_add is negative.
1089 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
1092 * builtins.c (c_strlen): Improve range checks.
1094 2018-08-29 Martin Sebor <msebor@redhat.com>
1095 Jeff Law <law@redhat.com>
1097 PR tree-optimization/86714
1098 PR tree-optimization/86711
1099 * builtins.c (c_strlen): Add arguments to call to string_constant.
1100 * expr.c (string_constant): Add argument. Detect missing nul
1101 terminator and outermost declaration it's missing in.
1102 * expr.h (string_constant): Add argument.
1103 * fold-const.c (read_from_constant_string): Add arguments to call to
1105 (c_getstr): Likewise.
1106 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1108 * tree-ssa-strlen.c (get_stridx): Likewise.
1110 2018-08-29 Jan Hubicka <jh@suse.cz>
1112 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1113 Do not stream DECL_VINDEX.
1114 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1115 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1116 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1118 2018-08-29 Richard Biener <rguenther@suse.de>
1120 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1121 virtual operands that are not default defs to honor region
1123 (rpo_vn_valueize): Remove ineffective code here.
1125 2018-08-29 Richard Biener <rguenther@suse.de>
1127 PR tree-optimization/87132
1128 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1129 when skipping defs reachable over backedges.
1131 2018-08-29 Richard Biener <rguenther@suse.de>
1133 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1134 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1135 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1136 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1137 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1138 (vn_reference_lookup_3): Remove use of const_parms.
1139 (free_rpo_vn): Do not free const_parms.
1140 (do_rpo_vn): Do not call init_const_parms.
1141 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1142 SSA_NAME_POINTS_TO_READONLY_MEMORY.
1143 (call_may_clobber_ref_p_1): Likewise.
1145 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
1148 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1150 (-ftree-scev-cprop): Document.
1152 2018-08-29 Jan Hubicka <jh@suse.cz>
1154 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1156 (sreal constructor): Update.
1157 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1158 sreal:operator/): Update.
1160 2018-08-29 Martin Liska <mliska@suse.cz>
1162 * tree-switch-conversion.c (switch_conversion::expand):
1163 Strenghten assumption about gswitch statements.
1165 2018-08-29 Richard Biener <rguenther@suse.de>
1167 PR tree-optimization/87117
1168 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1169 re-value-number released SSA VDEFs.
1171 2018-08-29 Richard Biener <rguenther@suse.de>
1173 PR tree-optimization/87126
1174 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1176 2018-08-28 Jim Wilson <jimw@sifive.com>
1178 * config/riscv/pic.md: Rewrite.
1179 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1181 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1182 (SOFTF, default_load, softload, softstore): New.
1184 2018-08-28 Jeff Law <law@redhat.com>
1186 * fold-const.c (fold_binary_loc): Remove recently added assert.
1188 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1190 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1191 to OP parmeter of generated function.
1193 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1195 PR tree-optimization/87009
1196 * match.pd: Add boolean optimizations.
1198 2018-08-28 Martin Sebor <msebor@redhat.com>
1201 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1202 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1203 (pass_walloca::gate): Use it.
1204 (alloca_call_type): Same.
1205 (pass_walloca::execute): Same.
1206 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1208 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1210 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1211 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1214 2018-08-28 Richard Biener <rguenther@suse.de>
1216 PR tree-optimization/87124
1217 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1218 constants before looking up avail.
1220 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1223 * calls.c (maybe_warn_nonstring_arg): Punt early if
1224 warn_stringop_overflow is zero. Don't call get_range_strlen
1225 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1226 Swap comparison operands to have constants on rhs. Only use
1227 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1228 increment lenrng[0].
1230 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1232 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1233 use of tree_to_shwi. Remove duplicated test for the size being
1234 a whole number of bytes.
1236 2018-08-28 Richard Biener <rguenther@suse.de>
1238 PR tree-optimization/87117
1239 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1240 Handle removed stmt without LHS (GIMPLE_NOP).
1242 2018-08-28 Richard Biener <rguenther@suse.de>
1244 PR tree-optimization/87117
1245 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1246 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1248 2018-08-28 Richard Biener <rguenther@suse.de>
1250 PR tree-optimization/87117
1251 * tree-ssa-pre.c (compute_avail): Do not make expressions
1252 with predicated values available.
1253 (get_expr_value_id): Assert we do not run into predicated value
1256 2018-08-28 Richard Biener <rguenther@suse.de>
1258 PR tree-optimization/87117
1259 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1260 get virtual operands.
1261 (get_expr_operands): Handle STRING_CST like other decls.
1263 2018-08-28 Martin Liska <mliska@suse.cz>
1265 * tree.h: Update documentation of fndecl_built_in_p
1269 2018-08-27 Jeff Law <law@redhat.com>
1270 PR tree-optimization/87110
1271 * tree-ssa-dse.c (compute_trims): Handle non-constant
1274 2018-08-27 Martin Sebor <msebor@redhat.com>
1276 PR tree-optimization/86914
1277 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1279 2018-08-27 Martin Sebor <msebor@redhat.com>
1281 PR tree-optimization/87112
1282 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1283 the type of the bound argument.
1285 2018-08-27 Jeff Law <law@redhat.com>
1287 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1288 type does not have a TYPE_SIZE_UNIT.
1290 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1292 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1293 with include of backend.h.
1295 2018-08-27 Richard Biener <rguenther@suse.de>
1297 PR tree-optimization/86927
1298 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1299 use const cond reduction code.
1301 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1303 PR tree-optimization/85758
1304 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1306 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1309 * diagnostic-show-locus.c (class layout_range): Update for
1310 conversion of show_caret_p to a tri-state.
1311 (layout_range::layout_range): Likewise.
1312 (make_range): Likewise.
1313 (layout::maybe_add_location_range): Likewise.
1314 (layout::should_print_annotation_line_p): Don't show annotation
1315 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1316 (layout::get_state_at_point): Update for conversion of
1317 show_caret_p to a tri-state. Bail out early for
1318 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1319 underlining or source colorization.
1320 (gcc_rich_location::add_location_if_nearby): Update for conversion
1321 of show_caret_p to a tri-state.
1322 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1323 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1325 (selftest::test_one_liner_labels): Likewise.
1326 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1327 conversion of show_caret_p to a tri-state.
1328 * pretty-print.c (text_info::set_location): Likewise.
1329 * pretty-print.h (text_info::set_location): Likewise.
1330 * substring-locations.c (format_warning_n_va): Likewise.
1331 * tree-diagnostic.c (default_tree_printer): Likewise.
1332 * tree-pretty-print.c (newline_and_indent): Likewise.
1334 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1337 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1338 line above for line-insertion fix-it hints.
1339 (selftest::test_fixit_insert_containing_newline): Update the
1340 expected results, and add a test with line-numbering enabled.
1342 2018-08-27 Martin Liska <mliska@suse.cz>
1345 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1346 params with DECL_HAS_VALUE_EXPR_P.
1348 2018-08-27 Martin Liska <mliska@suse.cz>
1350 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1351 selected expansion strategy.
1353 2018-08-27 Martin Liska <mliska@suse.cz>
1355 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1356 * builtins.c (is_builtin_fn): Likewise.
1357 * attribs.c (diag_attr_exclusions): Use new function
1358 fndecl_built_in_p and remove check for FUNCTION_DECL if
1360 (builtin_mathfn_code): Likewise.
1361 (fold_builtin_expect): Likewise.
1362 (fold_call_expr): Likewise.
1363 (fold_builtin_call_array): Likewise.
1364 (fold_call_stmt): Likewise.
1365 (set_builtin_user_assembler_name): Likewise.
1366 (is_simple_builtin): Likewise.
1367 * calls.c (gimple_alloca_call_p): Likewise.
1368 (maybe_warn_nonstring_arg): Likewise.
1369 * cfgexpand.c (expand_call_stmt): Likewise.
1370 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1371 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1372 (cgraph_node::verify_node): Likewise.
1373 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1374 (cgraph_node::create_clone): Likewise.
1375 * config/arm/arm.c (arm_insert_attributes): Likewise.
1376 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1377 * dse.c (scan_insn): Likewise.
1378 * expr.c (expand_expr_real_1): Likewise.
1379 * fold-const.c (operand_equal_p): Likewise.
1380 (fold_binary_loc): Likewise.
1381 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1382 * gimple-low.c (lower_stmt): Likewise.
1383 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1384 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1385 * gimple.c (gimple_build_call_from_tree): Likewise.
1386 (gimple_call_builtin_p): Likewise.
1387 (gimple_call_combined_fn): Likewise.
1388 * gimplify.c (gimplify_call_expr): Likewise.
1389 (gimple_boolify): Likewise.
1390 (gimplify_modify_expr): Likewise.
1391 (gimplify_addr_expr): Likewise.
1392 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1393 * ipa-cp.c (determine_versionability): Likewise.
1394 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1395 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1396 * ipa-split.c (visit_bb): Likewise.
1397 (split_function): Likewise.
1398 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1399 * lto-cgraph.c (input_node): Likewise.
1400 * lto-streamer-out.c (write_symbol): Likewise.
1401 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1402 (lower_omp_1): Likewise.
1403 * predict.c (strip_predict_hints): Likewise.
1404 * print-tree.c (print_node): Likewise.
1405 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1406 * trans-mem.c (is_tm_irrevocable): Likewise.
1407 (is_tm_load): Likewise.
1408 (is_tm_simple_load): Likewise.
1409 (is_tm_store): Likewise.
1410 (is_tm_simple_store): Likewise.
1411 (is_tm_abort): Likewise.
1412 (tm_region_init_1): Likewise.
1413 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1414 * tree-cfg.c (verify_gimple_call): Likewise.
1415 (move_stmt_r): Likewise.
1416 (stmt_can_terminate_bb_p): Likewise.
1417 * tree-eh.c (lower_eh_constructs_2): Likewise.
1418 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1419 * tree-inline.c (remap_gimple_stmt): Likewise.
1420 (copy_bb): Likewise.
1421 (estimate_num_insns): Likewise.
1422 (fold_marked_statements): Likewise.
1423 * tree-sra.c (scan_function): Likewise.
1424 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1425 (optimize_stack_restore): Likewise.
1426 (pass_fold_builtins::execute): Likewise.
1427 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1428 (mark_all_reaching_defs_necessary_1): Likewise.
1429 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1430 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1431 (pass_forwprop::execute): Likewise.
1432 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1433 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1434 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1435 * tree-ssa-strlen.c (get_string_length): Likewise.
1436 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1437 (find_func_aliases_for_call): Likewise.
1438 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1439 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1440 * tree-tailcall.c (find_tail_calls): Likewise.
1441 * tree.c (need_assembler_name_p): Likewise.
1442 (free_lang_data_in_decl): Likewise.
1443 (get_call_combined_fn): Likewise.
1444 * ubsan.c (is_ubsan_builtin_p): Likewise.
1445 * varasm.c (incorporeal_function_p): Likewise.
1446 * tree.h (DECL_BUILT_IN): Remove and replace with
1448 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1449 (fndecl_built_in_p): New.
1451 2018-08-27 Martin Liska <mliska@suse.cz>
1453 PR tree-optimization/86847
1454 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1455 Dump also subtree probability.
1456 (switch_decision_tree::do_jump_if_equal): New function.
1457 (switch_decision_tree::emit_case_nodes): Handle special
1458 situations in balanced tree that can be emitted much simpler.
1459 Fix calculation of probabilities that happen in tree expansion.
1460 * tree-switch-conversion.h (struct cluster): Add
1462 (struct simple_cluster): Likewise.
1463 (struct case_tree_node): Add new function has_child.
1464 (do_jump_if_equal): New.
1466 2018-08-27 Martin Liska <mliska@suse.cz>
1468 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1469 Add new argument to bit_test_cluster constructor.
1470 (bit_test_cluster::emit): Set bits really number of values
1472 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1473 probability argument.
1474 * tree-switch-conversion.h (struct bit_test_cluster):
1475 Add m_handles_entire_switch.
1477 2018-08-27 Martin Liska <mliska@suse.cz>
1479 PR tree-optimization/86702
1480 * tree-switch-conversion.c (jump_table_cluster::emit):
1481 Make probabilities even for values in jump table
1482 according to number of cases handled.
1483 (switch_decision_tree::compute_cases_per_edge): Pass
1484 argument to reset_out_edges_aux function.
1485 (switch_decision_tree::analyze_switch_statement): Likewise.
1486 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1489 2018-08-27 Martin Liska <mliska@suse.cz>
1491 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1492 cfun argument explicitly.
1493 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1494 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1495 function gimple_switch_default_bb.
1496 (convert_switch_statements):
1498 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1499 * stmt.c (label_to_block_fn): Use label_to_block and pass
1500 cfun argument explicitly and use gimple_switch_label_bb.
1501 (expand_case): Likewise.
1502 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1503 cfun argument explicitly. Likewise.
1504 (make_edges_bb): Likewise.
1505 (make_cond_expr_edges): Likewise.
1506 (get_cases_for_edge): Likewise.
1507 (make_gimple_switch_edges): Likewise.
1508 (label_to_block_fn): Likewise.
1509 (label_to_block): Likewise.
1510 (make_goto_expr_edges): Likewise.
1511 (make_gimple_asm_edges): Likewise.
1512 (main_block_label): Likewise.
1513 (group_case_labels_stmt): Likewise.
1514 (find_taken_edge_computed_goto): Likewise.
1515 (find_taken_edge_switch_expr): Likewise.
1516 (gimple_verify_flow_info): Likewise.
1517 (gimple_redirect_edge_and_branch): Likewise.
1518 (gimple_switch_label_bb): New function.
1519 (gimple_switch_default_bb): Likewise.
1520 (gimple_switch_edge): Likewise.
1521 (gimple_switch_default_edge): Likewise.
1522 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1523 (label_to_block): ... with this.
1524 (gimple_switch_label_bb): New.
1525 (gimple_switch_default_bb): Likewise.
1526 (gimple_switch_edge): Likewise.
1527 (gimple_switch_default_edge): Likewise.
1528 * tree-cfgcleanup.c (convert_single_case_switch): Use
1529 new gimple functions and pass new argument to label_to_block.
1530 (cleanup_control_flow_bb):
1531 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1532 cfun argument explicitly.
1533 (make_eh_edges): Likewise.
1534 (redirect_eh_dispatch_edge): Likewise.
1535 (lower_resx): Likewise.
1536 (lower_eh_dispatch): Likewise.
1537 (maybe_remove_unreachable_handlers): Likewise.
1538 (unsplit_eh): Likewise.
1539 (cleanup_empty_eh): Likewise.
1540 (verify_eh_edges): Likewise.
1541 (verify_eh_dispatch_edge): Likewise.
1542 * tree-ssa-dom.c (record_edge_info): Likewise.
1543 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1544 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1545 (thread_through_normal_block): Likewise.
1546 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1547 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1548 * tree-switch-conversion.c (switch_conversion::collect): Use new
1550 (switch_conversion::check_final_bb): Likewise.
1551 (switch_conversion::gather_default_values): Pass new argument
1553 (switch_conversion::build_constructors): Likewise.
1554 (switch_decision_tree::compute_cases_per_edge): Use new
1555 gimple_switch_edge function.
1556 (switch_decision_tree::analyze_switch_statement): Pass new argument
1558 (switch_decision_tree::try_switch_expansion): Use
1559 gimple_switch_default_edge.
1560 * tree-vrp.c (find_switch_asserts): Pass new argument
1562 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1563 (vr_values::simplify_switch_using_ranges): Likewise.
1565 2018-08-27 Richard Biener <rguenther@suse.de>
1567 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1568 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1570 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1571 (struct vn_nary_op_s): Add unwind_to member. Add
1572 predicated_values flag and put result into a union together
1573 with a linked list of vn_pval.
1574 (struct vn_ssa_aux): Add name member to make maintaining
1575 a map of SSA name to vn_ssa_aux possible. Remove no longer
1576 needed info, dfsnum, low, visited, on_sccstack, use_processed
1577 and range_info_anti_range_p members.
1578 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1579 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1581 (vn_valueize): New global.
1582 (vn_context_bb): Likewise.
1583 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1584 VN_INFO_PTR_INFO): Remove.
1585 * tree-ssa-sccvn.c: ... (rewrite)
1586 (pass_fre::execute): For -O2+ initialize loops and run
1587 RPO VN in optimistic mode (iterating). For -O1 and -Og
1588 run RPO VN in non-optimistic mode.
1589 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1590 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1591 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1592 (rpo-vn-max-loop-depth): Document.
1593 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1594 when valuezing the VUSE signals we walked out of the region.
1595 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1596 (phi_translate): Set VN context block to use for availability
1598 (compute_avail): Likewise.
1599 (pre_valueize): New function.
1600 (pass_pre::execute): Adjust to the RPO VN API.
1602 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1603 (propagate_constants_for_unrolling): Remove.
1604 (tree_unroll_loops_completely): Perform value-numbering
1605 on the unrolled bodies loop parent.
1607 2018-08-27 Richard Biener <rguenther@suse.de>
1609 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1610 for partial antic compute.
1612 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1614 PR rtl-optimization/87065
1615 * combine.c (simplify_if_then_else): Formatting fix.
1616 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1618 (known_cond): Don't return const_true_rtx for vector modes. Use
1619 CONST0_RTX instead of const0_rtx. Formatting fixes.
1621 2018-08-27 Martin Liska <mliska@suse.cz>
1623 PR gcov-profile/87069
1624 * gcov.c (process_file): Record files already processed
1625 and warn about a file being processed multiple times.
1627 2018-08-27 Martin Liska <mliska@suse.cz>
1630 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1631 Set default values for x_aarch64_*_string strings.
1632 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1633 prefix. For -mabi do not print '=ABI' in help and use
1634 <option_value> format for -msve-vector-bits and -moverride
1637 2018-08-26 Jeff Law <law@redhat.com>
1639 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1642 2018-08-26 Marek Polacek <polacek@redhat.com>
1644 PR c++/87029, Implement -Wredundant-move.
1645 * doc/invoke.texi: Document -Wredundant-move.
1647 2018-08-25 Martin Sebor <msebor@redhat.com>
1649 PR tree-optimization/87059
1650 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1651 to the same type as the other.
1652 * fold-const.c (fold_binary_loc): Assert expectation.
1654 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1656 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1657 extraneous parentheses, dead code section and formatting.
1659 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1662 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1663 wide enough for jumps in the line-numbering to be visible.
1664 (layout::print_gap_in_line_numbering): New member function.
1665 (layout::calculate_line_spans): When using line numbering, merge
1666 line spans that are only 1 line apart.
1667 (diagnostic_show_locus): When printing line numbers, show gaps in
1668 line numbering directly, rather than printing headers.
1669 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1670 line-numbering with multiple line spans.
1671 (selftest::test_fixit_insert_containing_newline_2): Add test of
1672 line-numbering, in which the spans are close enough to be merged.
1674 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1676 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1677 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1678 * tree-vrp.c (range_is_nonnull): Remove.
1679 (range_includes_zero_p): Accept value_range instead of min/max.
1680 (extract_range_from_binary_expr_1): Do not early bail on
1682 Use range_includes_zero_p instead of range_is_nonnull.
1683 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1684 of range_is_nonnull.
1685 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1686 special case VR_ANTI_RANGE.
1687 (vrp_finalize): Same.
1688 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1690 (range_is_nonnull): Remove.
1691 * vr-values.c (vrp_stmt_computes_nonzero): Use
1692 range_includes_zero_p instead of range_is_nonnull.
1693 (extract_range_basic): Pass value_range to range_includes_zero_p
1694 instead of range_is_nonnull.
1696 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1698 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1699 * emit-rtl.h (rtl_data): Remove return_bnd.
1700 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1701 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1702 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1703 (POINTER_BOUNDS_MODE): Remove definition.
1704 (make_pointer_bounds_mode): Remove.
1705 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1706 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1707 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1708 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1709 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1710 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1711 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1713 * config/i386/i386-modes.def (BND32, BND64): Remove.
1714 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1715 (dbx64_register_map): Ditto.
1716 (svr4_dbx_register_map): Ditto.
1717 (indirect_thunk_bnd_needed): Remove.
1718 (indirect_thunks_bnd_used): Ditto.
1719 (indirect_return_bnd_needed): Ditto.
1720 (indirect_return_via_cx_bnd): Ditto.
1721 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1722 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1723 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1724 (output_indirect_thunk_function): Remove handling of
1725 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1726 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1727 (ix86_save_reg): Remove handling of crtl->return_bnd.
1728 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1729 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1730 and UNSPEC_BNDLX_ADDR.
1731 (ix86_output_indirect_branch_via_reg): Remove handling of
1732 indirect_thunk_prefix_bnd.
1733 (ix86_output_indirect_branch_via_push): Ditto.
1734 (ix86_output_function_return): Ditto.
1735 (ix86_output_indirect_function_return): Ditto.
1736 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1737 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1738 (CALL_USED_REGISTERS): Ditto.
1739 (REG_ALLOC_ORDER): Update for removal of bound registers.
1740 (HI_REGISTER_NAMES): Ditto.
1741 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1742 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1743 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1744 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1745 (FIRST_PSEUDO_REG): Update.
1746 (BND): Remove mode iterator.
1747 * config/i386/predicates.md (bnd_mem_operator): Remove.
1749 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1751 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1754 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1756 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1757 the case in which the permute needs only a single element and
1758 repeats for every vector of the result. Extend that case to
1759 handle variable-length vectors.
1760 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1762 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1765 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1766 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1768 2018-08-24 Richard Biener <rguenther@suse.de>
1770 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1771 bb_flags_allocated members.
1772 (auto_flag): New RAII class for allocating flags.
1773 (auto_edge_flag): New RAII class for allocating edge flags.
1774 (auto_bb_flag): New RAII class for allocating bb flags.
1775 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1777 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1778 in favor of temporarily allocated BB flag.
1779 * hsa-brig.c: Re-order includes.
1780 * hsa-dump.c: Likewise.
1781 * hsa-regalloc.c: Likewise.
1782 * print-rtl.c: Likewise.
1783 * profile-count.c: Likewise.
1785 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1788 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1791 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1794 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1795 from wide_int_range_multiplicative_op.
1797 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1799 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1802 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1804 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1807 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1809 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1810 full GENERIC expression used for replacement.
1812 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1814 * tree-vrp.c (abs_extent_range): Remove.
1815 (extract_range_into_wide_ints): Pass wide ints by reference.
1816 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1817 Pass wide ints by reference in all calls to
1818 extract_range_into_wide_ints.
1819 * wide-int-range.cc (wide_int_range_div): New.
1820 * wide-int-range.h (wide_int_range_div): New.
1821 (wide_int_range_includes_zero_p): New.
1822 (wide_int_range_zero_p): New.
1824 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1826 * config/aarch64/aarch64.md (arches): New enum.
1827 (arch): New enum attr.
1828 (arch_enabled): New attr.
1829 (enabled): Now uses arch_enabled only.
1830 (simd, sve, fp16): Removed attribute.
1831 (fp): Attr now defined in terms of 'arch'.
1832 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1833 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1834 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1835 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1836 attributes into 'arch'.
1837 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1838 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1839 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1840 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1841 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1842 'simd' attribute into 'arch'.
1843 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1844 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1845 Convert use of 'fp' attribute to 'arch'.
1846 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1847 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1849 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1850 (different modes) Merge 'fp' and 'simd' into 'arch'.
1851 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1854 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1856 PR rtl-optimization/87026
1857 * expmed.c (canonicalize_comparison): If we can no longer create
1858 pseudoregisters, don't.
1860 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1863 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1865 * config/arm/arm.c (speculation_barrier_libfunc): New static
1867 (arm_init_libfuncs): Initialize it.
1868 (arm_emit_speculation_barrier): New function.
1869 * config/arm/arm.md (speculation_barrier): Call
1870 arm_emit_speculation_barrier for architectures that do not have
1872 (speculation_barrier_insn): Only match on Armv7 or later.
1874 2018-08-23 Richard Biener <rguenther@suse.de>
1877 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1880 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1882 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1883 of single-vector TBLs.
1884 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1887 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1890 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1891 aarch64_evpc_tbl guard.
1893 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1895 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1898 2018-08-22 Martin Sebor <msebor@redhat.com>
1901 * tree-pretty-print.c (pretty_print_string): Add argument.
1902 (dump_generic_node): Call to pretty_print_string with string size.
1904 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1906 PR rtl-optimization/86771
1907 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1908 of two SETs into those two SETs, one to be placed at i2, if that SETs
1909 destination is modified between i2 and i3.
1911 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1913 PR tree-optimization/86725
1914 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1916 (vect_analyze_scalar_cycles_1): Check it.
1918 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1920 PR tree-optimization/86725
1921 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1922 an outer loop phi as a double reduction, make sure that the
1923 single user of the phi result is an inner loop phi.
1925 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1927 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1928 grouped stores with gaps to a strided group.
1930 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1932 * tree-vect-stmts.c (get_group_load_store_type)
1933 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1934 first statement in a group.
1936 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1938 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1939 the sequence used in gcc/gcc.c.
1941 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1944 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1947 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1949 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1950 Darwin10-specific unwinder-shim.
1951 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1952 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1953 New to cater for Darwin10 Rosetta.
1955 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1957 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1958 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1960 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1965 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1966 (dwarf2out_switch_text_section): Generate a local label for the
1967 second function sub-section and apply it as the second FDE start
1969 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1970 second sub-section start.
1972 2018-08-22 Richard Biener <rguenther@suse.de>
1974 PR tree-optimization/86988
1975 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1977 2018-08-22 Richard Biener <rguenther@suse.de>
1979 PR tree-optimization/86945
1980 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1982 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1984 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1985 a comment about how uses of r2 for .sdata2 come about.
1987 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1989 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1991 2018-08-21 Marek Polacek <polacek@redhat.com>
1993 PR c++/86981, Implement -Wpessimizing-move.
1994 * doc/invoke.texi: Document -Wpessimizing-move.
1996 2018-08-21 Jan Hubicka <jh@suse.cz>
1998 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1999 * tree.h (is_redundant_typedef): Remove.
2000 * dwarf2out.c (is_redundant_typedef): Turn into static function.
2002 2018-08-21 Jan Hubicka <jh@suse.cz>
2004 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2007 2018-08-21 Tamar Christina <tamar.christina@arm.com>
2009 * expmed.c (extract_low_bits): Reject invalid subregs early.
2011 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2014 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2017 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2019 * config/vxworks.h: Guard vxworks_asm_out_constructor and
2020 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2021 * config/vxworks.c: Likewise.
2023 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2025 * config/vxworks.c: Set targetm.have_ctors_dtors
2026 if HAVE_INITFINI_ARRAY_SUPPORT.
2027 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2028 if HAVE_INITFINI_ARRAY_SUPPORT.
2030 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2032 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2033 default search path for VxWorks < 7.
2035 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2037 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2038 (get_format_string): Refer to c_getstr.
2040 2018-08-21 Tom de Vries <tdevries@suse.de>
2042 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2043 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2044 (debuginfo_early_stop): Declare.
2045 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2046 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2047 (debuginfo_early_stop): New function.
2048 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2049 and debuginfo_early_stop.
2050 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2051 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2052 (general_init): Call debuginfo_early_init.
2053 (finalize): Call debuginfo_fini.
2054 (do_compile): Call debuginfo_init.
2055 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2057 (@item -fdump-debug, @item -fdump-earlydebug): Add.
2059 2018-08-21 Tom de Vries <tdevries@suse.de>
2061 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2062 flag_dump_noaddr and flag_dump_unnumbered.
2064 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
2066 * wide-int-range.cc (wide_int_range_abs): New.
2067 (wide_int_range_order_set): Rename from wide_int_range_min_max.
2068 * wide-int-range.h (wide_int_range_abs): New.
2069 (wide_int_range_min_max): New.
2070 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2071 case to call wide_int_range_abs.
2072 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2073 (extract_range_from_abs_expr): Delete.
2075 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2078 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2079 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2082 2018-08-20 Nathan Sidwell <nathan@acm.org>
2083 Jeff Law <law@redhat.com>
2085 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2086 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2088 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2091 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2092 (decl_attributes): Likewise.
2093 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2095 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2096 * diagnostic-core.h (class auto_diagnostic_group): New class.
2097 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2098 (diagnostic_report_diagnostic): Handle the first diagnostics within
2100 (emit_diagnostic): Add auto_diagnostic_group instance.
2102 (inform_n): Likewise.
2103 (warning): Likewise.
2104 (warning_at): Likewise.
2105 (warning_n): Likewise.
2106 (pedwarn): Likewise.
2107 (permerror): Likewise.
2109 (error_n): Likewise.
2110 (error_at): Likewise.
2112 (fatal_error): Likewise.
2113 (internal_error): Likewise.
2114 (internal_error_no_backtrace): Likewise.
2115 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2116 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2117 * diagnostic.h (struct diagnostic_context): Add fields
2118 "diagnostic_group_nesting_depth",
2119 "diagnostic_group_emission_count", "begin_group_cb",
2121 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2122 Add auto_diagnostic_group instance(s).
2123 (find_explicit_erroneous_behavior): Likewise.
2124 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2125 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2126 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2127 (gimplify_va_arg_expr): Likewise.
2128 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2129 (HSA_SORRY_AT): Likewise.
2130 * ipa-devirt.c (compare_virtual_tables): Likewise.
2131 (warn_odr): Likewise.
2132 * multiple_target.c (expand_target_clones): Likewise.
2133 * opts-common.c (cmdline_handle_error): Likewise.
2134 * reginfo.c (globalize_reg): Likewise.
2135 * substring-locations.c (format_warning_n_va): Likewise.
2136 * tree-inline.c (expand_call_inline): Likewise.
2137 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2138 * tree-ssa-loop-niter.c
2139 (do_warn_aggressive_loop_optimizations): Likewise.
2140 * tree-ssa-uninit.c (warn_uninit): Likewise.
2141 * tree.c (warn_deprecated_use): Likewise.
2143 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
2146 * config/i386/i386.md (eh_return): Always update EH return
2147 address in word_mode.
2149 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
2151 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2152 TARGET_SPLIT_COMPLEX_ARG is defined.
2154 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2156 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2158 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2161 * expr.c (expand_assignment): Assert that bitpos is positive.
2162 (store_field): Likewise
2163 (expand_expr_real_1): Make sure that bitpos is positive.
2164 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2167 2018-08-20 Nathan Sidwell <nathan@acm.org>
2169 * Makefile.in (CPP_ID_DATA_H): Delete.
2170 (CPP_INTERNAL_H): Don't add it.
2171 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2172 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2174 2018-08-20 Richard Biener <rguenther@suse.de>
2176 PR tree-optimization/78655
2177 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2178 pointer + offset nonnull if either operand is nonnull work.
2180 2018-08-20 Tom de Vries <tdevries@suse.de>
2182 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2183 unless the referenced die describes the added property using
2184 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2185 Otherwise, add a DW_AT_location to the referenced die.
2187 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2190 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2191 register_operand when calling ix86_set_reg_reg_cost.
2192 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2193 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2194 predicate and to 1 otherwise.
2196 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2198 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2199 emit a diagnostic that it is not supported and reset the option.
2200 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2201 supported and consume the option. (ASM_FINAL_SPEC): New.
2203 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2205 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2208 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2210 C-SKY port: Documentation
2212 * doc/extend.texi (C-SKY Function Attributes): New section.
2213 * doc/invoke.texi (Option Summary): Add C-SKY options.
2214 (C-SKY Options): New section.
2215 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2217 2018-08-17 Jojo <jijie_rong@c-sky.com>
2218 Huibin Wang <huibin_wang@c-sky.com>
2219 Sandra Loosemore <sandra@codesourcery.com>
2220 Chung-Lin Tang <cltang@codesourcery.com>
2222 C-SKY port: Backend implementation
2224 * config/csky/*: New.
2225 * common/config/csky/*: New.
2227 2018-08-17 Jojo <jijie_rong@c-sky.com>
2228 Huibin Wang <huibin_wang@c-sky.com>
2229 Sandra Loosemore <sandra@codesourcery.com>
2230 Chung-Lin Tang <cltang@codesourcery.com>
2231 Andrew Jenner <andrew@codesourcery.com>
2233 C-SKY port: Configury
2235 * config.gcc (csky-*-*): New.
2236 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2237 * configure: Regenerated.
2239 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2241 * dump-context.h: Include "dumpfile.h".
2242 (dump_context::dump_printf_va): Convert final param from va_list
2243 to va_list *. Convert from ATTRIBUTE_PRINTF to
2244 ATTRIBUTE_GCC_DUMP_PRINTF.
2245 (dump_context::dump_printf_loc_va): Likewise.
2246 * dumpfile.c: Include "stringpool.h".
2247 (make_item_for_dump_printf_va): Delete.
2248 (make_item_for_dump_printf): Delete.
2249 (class dump_pretty_printer): New class.
2250 (dump_pretty_printer::dump_pretty_printer): New ctor.
2251 (dump_pretty_printer::emit_items): New member function.
2252 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2254 (dump_pretty_printer::emit_item): New member function.
2255 (dump_pretty_printer::stash_item): New member function.
2256 (dump_pretty_printer::format_decoder_cb): New member function.
2257 (dump_pretty_printer::decode_format): New member function.
2258 (dump_context::dump_printf_va): Reimplement in terms of
2259 dump_pretty_printer.
2260 (dump_context::dump_printf_loc_va): Convert final param from va_list
2262 (dump_context::begin_scope): Reimplement call to
2263 make_item_for_dump_printf.
2264 (dump_printf): Update for change to dump_printf_va.
2265 (dump_printf_loc): Likewise.
2266 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2267 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2268 with %T, %E, and %G.
2269 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2270 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2271 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2272 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2273 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2274 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2275 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2276 within a dump_printf_loc call to "%wu".
2277 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2278 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2279 missing space after "=".
2280 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2281 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2282 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2283 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2284 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2285 duplicate "vectorized" from message.
2287 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2289 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2290 polyNxK_t element's TYPE_STRING_FLAG.
2292 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2294 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2295 (they were unnamed before). Fix comments.
2297 2018-08-17 Nathan Sidwell <nathan@acm.org>
2299 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2301 2018-08-17 Richard Biener <rguenther@suse.de>
2303 PR tree-optimization/86841
2304 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2306 2018-08-17 Martin Liska <mliska@suse.cz>
2308 * common.opt: Remove Warn, Init and Report for options with
2309 Ignore/Deprecated flag. Warning is done automatically for
2311 * config/i386/i386.opt: Likewise.
2312 * config/ia64/ia64.opt: Likewise.
2313 * config/rs6000/rs6000.opt: Likewise.
2314 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2315 Remove usage of flag_check_pointer_bounds.
2316 * lto-wrapper.c (merge_and_complain): Do not handle
2317 OPT_fcheck_pointer_bounds.
2318 (append_compiler_options): Likewise.
2319 * opt-functions.awk: Do not handle Deprecated.
2320 * optc-gen.awk: Check that Var, Report and Init are not
2321 used for an option with Ignore/Deprecated flag.
2322 * opts-common.c (decode_cmdline_option): Do not report
2324 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2326 * opts.h (struct cl_option): Remove cl_deprecated flag.
2327 (CL_ERR_DEPRECATED): Remove error enum value.
2329 2018-08-17 Richard Biener <rguenther@suse.de>
2332 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2333 across a va-arg-pack using call adjust its return value accordingly.
2335 2018-08-16 Martin Sebor <msebor@redhat.com>
2337 PR tree-optimization/86853
2338 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2339 (struct fmtresult): Add member and initialize it in ctors.
2340 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2341 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2342 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2343 (parse_directive): Handle %C same as %c.
2344 (sprintf_dom_walker::compute_format_length): Adjust.
2345 (is_call_safe): Adjust.
2347 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2349 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2350 for determining how to count the elements.
2351 * builtins.h (c_strlen): Adjust prototype.
2352 * expr.c (string_constant): Add new parameter mem_size.
2353 Set *mem_size appropriately.
2354 * expr.h (string_constant): Adjust protoype.
2355 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2356 * gimple-fold.h (get_range_strlen): Adjust prototype.
2357 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2358 (format_string): Call get_string_length with eltsize.
2360 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2362 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2363 to emit the span, rather than setting it as the prefix.
2365 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2367 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2368 "margin_char" parameter, defaulting to space. Use it in place
2369 of pp_space for the initial part of the margin.
2370 (layout::print_leading_fixits): Use '+' when filling the margin
2371 of line-insertion fix-it hints.
2373 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2375 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2378 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2380 * config/rs6000/altivec.md: Don't set length attribute to the default
2382 * config/rs6000/darwin.md: Ditto.
2383 * config/rs6000/dfp.md: Ditto.
2384 * config/rs6000/htm.md: Ditto.
2385 * config/rs6000/rs6000.md: Ditto.
2386 * config/rs6000/sync.md: Ditto.
2387 * config/rs6000/vsx.md: Ditto.
2389 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2391 * config/rs6000/altivec.md: Don't set length attribute to the default
2392 value, for branch instructions.
2393 * config/rs6000/darwin.md: Ditto.
2394 * config/rs6000/rs6000.md: Ditto.
2396 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2398 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2399 (unnamed conditional branch define_insn): Set length to 4 or 8
2400 depending on offset.
2401 (<bd>_<mode>): Similar, for alternative 0.
2402 (<bd>tf_<mode>): Ditto.
2404 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2406 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2408 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2410 * doc/rtl.texi: Replace old RTX class names with new names.
2413 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2415 * expmed.h (canonicalize_comparison): New declaration.
2416 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2417 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2418 * optabs.c (prepare_cmp_insn): Likewise.
2419 * rtl.h (unsigned_condition_p): New function which checks if a
2420 comparison operator is unsigned.
2422 2018-08-16 Nathan Sidwell <nathan@acm.org>
2424 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2425 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2427 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2430 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2431 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2432 (mov<mov>): ..this and enable unconditionally.
2434 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2436 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2438 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2440 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2441 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2442 "Common" with "Target".
2444 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2446 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2447 * doc/invoke.texi (mmitigate-rop): Remove.
2448 * config/i386/i386.c: Do not include "regrename.h".
2449 (ix86_rop_should_change_byte_p, reg_encoded_number)
2450 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2452 (ix86_reorg): Remove call to ix86_mitigate_rop.
2453 * config/i386/i386.md (attr "modrm_class"): Remove.
2454 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2455 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2456 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2458 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2460 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2461 allow folding of mergeh() and mergel() for the float and double types.
2462 (fold_mergehl_helper): Rework to handle building a permute tree
2465 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2467 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2470 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2472 * common.opt (fdiagnostics-show-labels): New option.
2473 * diagnostic-show-locus.c (class layout_range): Add field
2475 (class layout): Add field "m_show_labels_p".
2476 (layout_range::layout_range): Add param "label" and use it to
2478 (make_range): Pass in NULL for new "label" param of layout_range's
2480 (layout::layout): Initialize m_show_labels_p.
2481 (layout::maybe_add_location_range): Pass in loc_range->m_label
2482 when constructing layout_range instances.
2483 (struct line_label): New struct.
2484 (layout::print_any_labels): New member function.
2485 (layout::print_line): Call it if label-printing is enabled.
2486 (selftest::test_one_liner_labels): New test.
2487 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2488 * diagnostic.c (diagnostic_initialize): Initialize
2489 context->show_labels_p.
2490 * diagnostic.h (struct diagnostic_context): Add field
2492 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2493 -fno-diagnostics-show-labels.
2494 * dwarf2out.c (gen_producer_string): Add
2495 OPT_fdiagnostics_show_labels to the ignored options.
2496 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2498 (gcc_rich_location::maybe_add_expr): Likewise.
2499 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2500 label" param, defaulting to NULL.
2501 (gcc_rich_location::add_expr): Add "label" param.
2502 (gcc_rich_location::maybe_add_expr): Likewise.
2503 (class text_range_label): New class.
2504 (class range_label_for_type_mismatch): New class.
2505 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2506 of format_warning_va.
2507 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2508 * lto-wrapper.c (merge_and_complain): Add
2509 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2510 (append_compiler_options): Likewise to the dropped options.
2511 (append_diag_options): Likewise to the passed-on options.
2512 * opts.c (common_handle_option): Handle the new option.
2513 * selftest-diagnostic.c
2514 (test_diagnostic_context::test_diagnostic_context): Enable
2516 * substring-locations.c: Include "gcc-rich-location.h".
2517 (format_warning_n_va): Add "fmt_label" and "param_label" params
2518 and use them as appropriate.
2519 (format_warning_va): Add "fmt_label" and "param_label" params,
2520 passing them on to format_warning_n_va.
2521 (format_warning_at_substring): Likewise.
2522 (format_warning_at_substring_n): Likewise.
2523 * substring-locations.h (format_warning_va): Add "fmt_label" and
2524 "param_label" params.
2525 (format_warning_n_va): Likewise.
2526 (format_warning_at_substring): Likewise.
2527 (format_warning_at_substring_n): Likewise.
2528 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2530 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2533 * builtins.c (expand_builtin_memcmp): Do not expand the call
2534 when overflow is detected.
2536 2018-08-15 Martin Sebor <msebor@redhat.com>
2538 PR tree-optimization/71625
2539 * config/aarch64/aarch64-builtins.c
2540 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2542 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2544 * config/s390/s390.c (s390_reorg): Remove loop.
2546 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2549 (darwin_function_switched_text_sections): Delete.
2550 * gcc/config/darwin.h
2551 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2553 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2556 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2557 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2558 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2560 2018-08-15 Martin Liska <mliska@suse.cz>
2562 PR tree-optimization/86925
2563 * predict.c (expr_expected_value_1): When taking
2564 later predictor, assign also probability.
2565 Use fold_build2_initializer_loc in order to fold
2566 the expression in -frounding-math.
2568 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2570 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2572 (expand_vec_perm_1): Try the new method.
2574 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2577 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2578 Check whether lra_live_max_point is 0 before dividing.
2580 2018-08-14 Martin Sebor <msebor@redhat.com>
2582 PR tree-optimization/86650
2583 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2584 (vrp_prop::check_mem_ref): Same.
2586 2018-08-13 Liu Hao <lh_mouse@126.com>
2588 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2589 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2590 and clear it thereafter, as it only works for DBCS.
2592 2018-08-13 Liu Hao <lh_mouse@126.com>
2594 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2595 handle returned by _get_osf_handle().
2597 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2599 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2600 for folding vec_perm.
2602 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2604 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2605 Add support for gimple-folding of vec_pack() and vec_unpack()
2608 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2610 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2611 vec_xst variants to the list.
2612 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2613 vector loads and stores.
2615 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2617 * config.gcc (rs6000-ibm-aix4.x): Delete.
2618 (rs6000-ibm-aix5.1): Delete.
2619 (rs6000-ibm-aix5.2): Delete.
2620 (rs6000-ibm-aix5.3): Delete.
2621 * config/rs6000/aix43.h: Delete.
2622 * config/rs6000/aix51.h: Delete.
2623 * config/rs6000/aix52.h: Delete.
2624 * config/rs6000/t-aix43: Delete.
2626 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2628 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2630 (s390_decompose_address): Factor out constant pool ref
2633 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2635 * config/nds32/nds32-predicates.c
2636 (nds32_can_use_bclr_p): Change return type as bool.
2637 (nds32_can_use_bset_p): Ditto.
2638 (nds32_can_use_btgl_p): Ditto.
2639 (nds32_can_use_bitci_p): Ditto.
2640 * config/nds32/nds32-protos.h
2641 (nds32_can_use_bclr_p): Change declaration.
2642 (nds32_can_use_bset_p): Ditto.
2643 (nds32_can_use_btgl_p): Ditto.
2644 (nds32_can_use_bitci_p): Ditto.
2646 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2648 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2649 Support -msched-prolog-epilog option.
2650 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2652 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2654 * common/config/nds32/nds32-common.c
2655 (nds32_option_optimization_table): Enalbe -malways-align.
2657 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2659 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2661 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2662 OPT_misr_secure_ case.
2663 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2664 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2665 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2667 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2668 (nds32_isr_info): New field security_level.
2669 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2670 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2671 * config/nds32/nds32.opt (misr-secure): New option.
2672 * config/nds32/nds32_init.inc: New file.
2673 * config/nds32/nds32_isr.h: New file.
2675 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2677 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2678 Update comment for atomic instructions.
2679 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2680 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2682 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2683 load for __ATOMIC_SEQ_CST model.
2684 (atomic_loaddi_1): Remove float register target.
2685 (atomic_storedi): Handle CONST_INT values.
2686 (atomic_storedi_1): Remove float register source. Add special case
2688 (memory_barrier): New expander and insn.
2690 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2692 PR tree-optimization/86835
2693 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2694 new_stmt after def_gsi, make sure to insert new_square_stmt after
2695 that stmt, not 2 stmts before it.
2697 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2700 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2703 2018-08-10 Martin Liska <mliska@suse.cz>
2706 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2708 * builtins.c (expand_builtin_expect_with_probability):
2710 (expand_builtin_expect_with_probability): New function.
2711 (build_builtin_expect_predicate): Add new argumnet probability
2712 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2713 (fold_builtin_expect):
2716 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2717 * builtins.h (fold_builtin_expect): Set new argument.
2718 * doc/extend.texi: Document __builtin_expect_with_probability.
2719 * doc/invoke.texi: Likewise.
2720 * gimple-fold.c (gimple_fold_call): Pass new argument.
2721 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2722 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2723 * predict.c (get_predictor_value): New function.
2724 (expr_expected_value): Add new argument probability. Assume
2725 that predictor and probability are always non-null.
2726 (expr_expected_value_1): Likewise. For __builtin_expect and
2727 __builtin_expect_with_probability set probability. Handle
2728 combination in binary expressions.
2729 (tree_predict_by_opcode): Simplify code by simply calling
2730 get_predictor_value.
2731 (pass_strip_predict_hints::execute): Add handling of
2732 BUILT_IN_EXPECT_WITH_PROBABILITY.
2733 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2735 * tree.h (DECL_BUILT_IN_P): New function.
2737 2018-08-10 Martin Liska <mliska@suse.cz>
2739 PR tree-optimization/85799
2740 * passes.def: Add argument for pass_strip_predict_hints.
2741 * predict.c (class pass_strip_predict_hints): Add new argument
2743 (strip_predictor_early): New function.
2744 (pass_strip_predict_hints::execute): Call the function to
2746 (strip_predict_hints): New function.
2747 * predict.def: Fix comment.
2749 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2751 * Makefile.in: Clarify which tm.texi to copy over to assert the
2752 right to grant a GFDL license for all.
2754 2018-08-09 Jeff Law <law@redhat.com>
2756 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2759 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2761 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2764 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2766 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2767 reductions for variable-length vectors.
2769 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2772 * common.opt (fdiagnostics-show-line-numbers): New option.
2773 * diagnostic-show-locus.c (class layout): Add fields
2774 "m_show_line_numbers_p" and "m_linenum_width";
2775 (num_digits): New function.
2776 (test_num_digits): New function.
2777 (layout::layout): Initialize new fields. Update m_x_offset
2778 logic to handle any left margin.
2779 (layout::print_source_line): Print line number when requested.
2780 (layout::start_annotation_line): New member function.
2781 (layout::print_annotation_line): Call it.
2782 (layout::print_leading_fixits): Likewise.
2783 (layout::print_trailing_fixits): Likewise. Update calls to
2784 move_to_column for new parameter.
2785 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2786 it to potentially call start_annotation_line.
2787 (layout::show_ruler): Call start_annotation_line.
2788 (selftest::test_line_numbers_multiline_range): New selftest.
2789 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2790 and selftest::test_line_numbers_multiline_range.
2791 * diagnostic.c (diagnostic_initialize): Initialize
2792 show_line_numbers_p.
2793 * diagnostic.h (struct diagnostic_context): Add field
2794 "show_line_numbers_p".
2795 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2796 -fno-diagnostics-show-line-numbers.
2797 * dwarf2out.c (gen_producer_string): Add
2798 OPT_fdiagnostics_show_line_numbers to the ignored options.
2799 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2800 one setting" options.
2801 (append_compiler_options): Likewise to the dropped options.
2802 (append_diag_options): Likewise to the passed-on options.
2803 * opts.c (common_handle_option): Handle the new option.
2804 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2806 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2808 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2809 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2810 third argument of type "const signed char" to descriptions of
2811 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2812 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2813 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2814 __builtin_bcdsub_ov functions.
2816 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2818 PR tree-optimization/86858
2819 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2820 flow_bb_inside_loop_p calls.
2822 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2824 PR tree-optimization/86871
2825 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2826 instead of gimple_assign_lhs.
2828 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2831 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2832 register constraint to operand 0.
2833 (add<mode>3_carryinC): Likewise.
2834 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2836 2018-08-09 Martin Liska <mliska@suse.cz>
2839 * common.opt: Remove extra line.
2841 2018-08-09 Martin Liska <mliska@suse.cz>
2843 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2844 at the end of a line, make first letter capital and end up
2845 a sentence with a dot.
2846 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2847 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2848 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2849 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2850 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2851 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2852 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2853 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2854 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2855 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2856 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2857 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2858 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2859 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2860 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2861 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2862 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2863 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2865 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2868 * config/s390/s390.c (s390_option_override_internal): Reduce the
2869 stack-clash-protection-probe-interval param if it would be too big
2872 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2875 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2876 * config/m68k/m68k.c (handle_move_double): Don't call
2877 m68k_final_prescan_insn.
2878 (m68k_adjust_decorated_operand): Renamed from
2879 m68k_final_prescan_insn, remove first and third operand and
2881 (print_operand): Call it.
2882 (print_operand_address): Call it.
2884 2018-08-08 Nathan Sidwell <nathan@acm.org>
2886 * diagnostic.c (diagnostic_report_current_module): Use
2887 linemap_included_from & linemap_included_from_linemap.
2889 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2891 * config/aarch64/aarch64-cores.def: Add phecda core.
2892 * config/aarch64/aarch64-tune.md: Regenerate.
2893 * doc/invoke.texi: Add phecda core.
2895 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2898 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2900 * config/s390/s390.md ("movti"): Add more alternatives for
2901 constant to GPR copies.
2903 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2905 * config/s390/s390.c: Fix whitespace damage throughout the file.
2906 * config/s390/s390.h: Likewise.
2907 * config/s390/tpf.h: Likewise.
2909 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2911 * config/s390/s390.c (s390_loadrelative_operand_p):
2912 Remove TARGET_CPU_ZARCH usages.
2913 (s390_rtx_costs): Likewise.
2914 (s390_legitimate_constant_p): Likewise.
2915 (s390_cannot_force_const_mem): Likewise.
2916 (legitimate_reload_constant_p): Likewise.
2917 (s390_preferred_reload_class): Likewise.
2918 (legitimize_pic_address): Likewise.
2919 (legitimize_tls_address): Likewise.
2920 (s390_split_branches): Removed.
2921 (s390_add_execute): Removed.
2922 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2923 (s390_mainpool_start): Likewise.
2924 (s390_mainpool_finish): Likewise.
2925 (s390_mainpool_cancel): Removed.
2926 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2927 (s390_chunkify_cancel): Likewise.
2928 (s390_return_addr_rtx): Likewise.
2929 (s390_register_info): Remove split_branches_pending_p uages.
2930 (s390_optimize_register_info): Likewise.
2931 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2932 split_branches_pending_p usages.
2933 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2934 (s390_load_got): Likewise.
2935 (s390_expand_split_stack_prologue): Likewise.
2936 (output_asm_nops): Likewise.
2937 (s390_function_profiler): Likewise.
2938 (s390_emit_call): Likewise.
2939 (s390_conditional_register_usage): Likewise.
2940 (s390_optimize_prologue): Likewise.
2941 (s390_reorg): Remove TARGET_CPU_ZARCH and
2942 split_branches_pending_p usages.
2943 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2945 (s390_output_indirect_thunk_function): Likewise.
2946 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2947 (TARGET_CPU_ZARCH_P): Removed.
2948 (struct machine_function): Remove split_branches_pending_p.
2949 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2951 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2953 * common/config/s390/s390-common.c (processor_flags_table):
2955 * config.gcc: Remove with_arch/with_tune support.
2956 * config/s390/2064.md: Remove cpu attribute comparisons.
2957 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2959 * config/s390/linux.h (ASM_SPEC):
2960 Remove -march support.
2961 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2962 Use a table to get an arch level.
2963 * config/s390/s390-opts.h (enum processor_type):
2965 * config/s390/s390.c
2966 (processor_table): Remove entries, add arch_level values.
2967 (s390_issue_rate): Remove cases.
2968 (s390_option_override): Adjust
2969 s390_option_override_internal() call.
2970 (s390_option_override_internal): Remove deprecation warning.
2971 (s390_valid_target_attribute_tree): Adjust
2972 s390_option_override_internal() call.
2973 * config/s390/s390.h (struct s390_processor):
2974 Share with s390-c.c, add arch_level field.
2975 * config/s390/s390.md:
2976 Remove occurrences in cpu attribute.
2977 * config/s390/s390.opt: Remove -march/-mtune support.
2978 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2979 * doc/invoke.texi: Remove deprecation warning.
2981 2018-08-08 Luis Machado <luis.machado@linaro.org>
2983 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2985 (qdf24xx_tunings): Set vector cost structure to
2986 qdf24xx_vector_cost.
2988 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2989 <register_sextend>: Set to 3.
2991 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2994 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2995 * config/aarch64/aarch64-simd.md
2996 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2997 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2998 (aarch64_frecpx<mode>): ...this new pattern.
2999 * config/aarch64/aarch64-simd-builtins.def: Remove comment
3000 about aarch64_frecp<FRECP:frecp_suffix><mode>.
3002 2018-08-07 Martin Liska <mliska@suse.cz>
3005 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3006 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3007 * predict.def (PRED_MALLOC_NONNULL): New predictor.
3008 * doc/extend.texi: Document that malloc attribute adds
3011 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
3014 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3015 Define to speculation_safe_value_not_needed.
3017 2018-08-06 Jeff Law <law@redhat.com>
3019 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3020 the vr_values instance to cprop_into_stmt.
3021 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3022 (cprop_operand): Also query EVRP to determine if OP is a constant.
3024 2018-08-06 Nathan Sidwell <nathan@acm.org>
3026 * diagnostic.c (diagnostic_report_current_module): Reroll
3027 included-at loop. Translate text.
3029 2018-08-06 David Malcolm <dmalcolm@redhat.com>
3031 * function-tests.c (selftest::test_expansion_to_rtl): Call
3032 free_after_compilation.
3034 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3036 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3038 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
3040 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3041 loops with memory block operations from getting unrolled.
3043 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
3046 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3047 Define to speculation_safe_value_not_needed.
3049 2018-08-06 Jeff Law <law@redhat.com>
3051 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3054 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3057 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3058 with all enabled __intN types.
3060 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3062 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3064 * alias.c (record_set): Check for clobber high.
3065 * cfgexpand.c (expand_gimple_stmt): Likewise.
3066 * combine-stack-adj.c (single_set_for_csa): Likewise.
3067 * combine.c (find_single_use_1): Likewise.
3068 (set_nonzero_bits_and_sign_copies): Likewise.
3069 (get_combine_src_dest): Likewise.
3070 (is_parallel_of_n_reg_sets): Likewise.
3071 (try_combine): Likewise.
3072 (record_dead_and_set_regs_1): Likewise.
3073 (reg_dead_at_p_1): Likewise.
3074 (reg_dead_at_p): Likewise.
3075 * dce.c (deletable_insn_p): Likewise.
3076 (mark_nonreg_stores_1): Likewise.
3077 (mark_nonreg_stores_2): Likewise.
3078 * df-scan.c (df_find_hard_reg_defs): Likewise.
3079 (df_uses_record): Likewise.
3080 (df_get_call_refs): Likewise.
3081 * dwarf2out.c (mem_loc_descriptor): Likewise.
3082 * haifa-sched.c (haifa_classify_rtx): Likewise.
3083 * ira-build.c (create_insn_allocnos): Likewise.
3084 * ira-costs.c (scan_one_insn): Likewise.
3085 * ira.c (equiv_init_movable_p): Likewise.
3086 (rtx_moveable_p): Likewise.
3087 (interesting_dest_for_shprep): Likewise.
3088 * jump.c (mark_jump_label_1): Likewise.
3089 * postreload-gcse.c (record_opr_changes): Likewise.
3090 * postreload.c (reload_cse_simplify): Likewise.
3091 (struct reg_use): Add source expr.
3092 (reload_combine): Check for clobber high.
3093 (reload_combine_note_use): Likewise.
3094 (reload_cse_move2add): Likewise.
3095 (move2add_note_store): Likewise.
3096 * print-rtl.c (print_pattern): Likewise.
3097 * recog.c (decode_asm_operands): Likewise.
3098 (store_data_bypass_p): Likewise.
3099 (if_test_bypass_p): Likewise.
3100 * regcprop.c (kill_clobbered_value): Likewise.
3101 (kill_set_value): Likewise.
3102 * reginfo.c (reg_scan_mark_refs): Likewise.
3103 * reload1.c (maybe_fix_stack_asms): Likewise.
3104 (eliminate_regs_1): Likewise.
3105 (elimination_effects): Likewise.
3106 (mark_not_eliminable): Likewise.
3107 (scan_paradoxical_subregs): Likewise.
3108 (forget_old_reloads_1): Likewise.
3109 * reorg.c (find_end_label): Likewise.
3110 (try_merge_delay_insns): Likewise.
3111 (redundant_insn): Likewise.
3112 (own_thread_p): Likewise.
3113 (fill_simple_delay_slots): Likewise.
3114 (fill_slots_from_thread): Likewise.
3115 (dbr_schedule): Likewise.
3116 * resource.c (update_live_status): Likewise.
3117 (mark_referenced_resources): Likewise.
3118 (mark_set_resources): Likewise.
3119 * rtl.c (copy_rtx): Likewise.
3120 * rtlanal.c (reg_referenced_p): Likewise.
3121 (single_set_2): Likewise.
3122 (noop_move_p): Likewise.
3123 (note_stores): Likewise.
3124 * sched-deps.c (sched_analyze_reg): Likewise.
3125 (sched_analyze_insn): Likewise.
3127 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3129 * cse.c (invalidate_reg): New function extracted from...
3130 (invalidate): ...here.
3131 (canonicalize_insn): Check for clobber high.
3132 (invalidate_from_clobbers): invalidate clobber highs.
3133 (invalidate_from_sets_and_clobbers): Likewise.
3134 (count_reg_usage): Check for clobber high.
3135 (insn_live_p): Likewise.
3136 * cselib.c (cselib_expand_value_rtx_1):Likewise.
3137 (cselib_invalidate_regno): Check for clobber in setter.
3138 (cselib_invalidate_rtx): Pass through setter.
3139 (cselib_invalidate_rtx_note_stores):
3140 (cselib_process_insn): Check for clobber high.
3141 * cselib.h (cselib_invalidate_rtx): Add operand.
3143 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3145 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3146 (mark_not_eliminable): Likewise.
3147 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3148 * lra-lives.c (process_bb_lives): Check for clobber high.
3149 * lra.c (new_insn_reg): Remember clobber highs.
3150 (collect_non_operand_hard_regs): Check for clobber high.
3151 (lra_set_insn_recog_data): Likewise.
3152 (add_regs_to_insn_regno_info): Likewise.
3153 (lra_update_insn_regno_info): Likewise.
3155 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3157 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3158 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3160 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3162 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3163 (copy_insn_1): Likewise.
3164 (gen_hard_reg_clobber_high): New gen function.
3165 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3166 * genemit.c (gen_exp): Likewise.
3167 (gen_emit_seq): Pass through info.
3168 (gen_insn): Check for CLOBBER_HIGH.
3169 (gen_expand): Pass through info.
3170 (gen_split): Likewise.
3171 (output_add_clobbers): Likewise.
3172 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3173 (remove_clobbers): Likewise.
3174 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3176 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3178 * doc/rtl.texi (clobber_high): Add.
3179 (parallel): Add in clobber high
3180 * rtl.c (rtl_check_failed_code3): Add function.
3181 * rtl.def (CLOBBER_HIGH): Add expression.
3182 * rtl.h (RTL_CHECKC3): Add macro.
3183 (rtl_check_failed_code3): Add declaration.
3184 (XC3EXP): Add macro.
3186 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3189 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3190 cfun->machine->max_used_stack_alignment if needed.
3192 2018-08-04 Martin Sebor <msebor@redhat.com>
3194 PR tree-optimization/86571
3195 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3198 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3201 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3204 2018-08-03 Jeff Law <law@redhat.com>
3207 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3208 Define to speculation_safe_value_not_needed.
3210 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3212 * doc/gcov.texi (-x): Remove duplicate "to".
3213 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3214 (-Wif-not-aligned): Remove duplicate "is".
3215 (-flto): Remove duplicate "the".
3216 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3217 duplicate "v5.00.b".
3218 (MSP430 Options): Remove duplicate "and" from the description
3219 of "-mgprel-sec=regexp".
3220 (x86 Options): Remove duplicate copies of "vmldLog102" and
3221 vmlsLog104 from description of "-mveclibabi=type".
3223 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3225 * internal-fn.h (first_commutative_argument): Declare.
3226 * internal-fn.c (first_commutative_argument): New function.
3227 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3228 restrictions for pattern statements. Use first_commutative_argument
3229 to look for commutative operands in calls to internal functions.
3231 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3233 * Makefile.in (wide-int-range.o): New.
3234 * tree-vrp.c: Move all the wide_int_* functions to...
3235 * wide-int-range.cc: ...here.
3236 * tree-vrp.h: Move all the wide_int_* prototypes to...
3237 * wide-int-range.h: ...here.
3239 2018-08-03 Tom de Vries <tdevries@suse.de>
3241 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3243 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3244 * except.c (output_function_exception_table): Do early exit if
3245 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3247 2018-08-03 Martin Liska <mliska@suse.cz>
3249 * predict.c (dump_prediction): Change to 2 digits
3252 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3254 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3256 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3258 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3260 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3261 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3262 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3263 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3264 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3266 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3268 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3269 pp_take_prefix when saving the existing prefix.
3270 * diagnostic.c (diagnostic_append_note): Likewise.
3271 * langhooks.c (lhd_print_error_function): Likewise.
3272 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3273 param's type. Free the existing prefix.
3274 (pp_take_prefix): New function.
3275 (pretty_printer::pretty_printer): Drop the prefix parameter.
3276 Rename the length parameter to match the comment.
3277 (pretty_printer::~pretty_printer): Free the prefix.
3278 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3280 (struct pretty_printer): Drop the "const" from "prefix" field's
3281 type and clarify memory management.
3282 (pp_set_prefix): Drop the "const" from the 2nd param.
3283 (pp_take_prefix): New decl.
3285 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3287 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3288 for word_mode_ok here instead of passing as argument.
3289 (expand_block_compare): Change select_block_compare_mode() call.
3290 (expand_strncmp_gpr_sequence): New function.
3291 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3293 2018-08-02 Jeff Law <law@redhat.com>
3296 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3297 Define to speculation_safe_value_not_needed.
3300 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3301 Define to speculation_safe_value_not_needed.
3303 2018-08-02 Tom de Vries <tdevries@suse.de>
3306 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3307 function. Return UI_TARGET unconditionally.
3308 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3309 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3311 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3313 * genemit.c (print_overload_test): Fix typo.
3315 2018-08-02 Richard Biener <rguenther@suse.de>
3317 PR tree-optimization/86816
3318 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3319 which checks for value availability before querying it.
3320 (gvn_uses_equal): Use it.
3321 (same_succ_hash): Likewise.
3322 (gimple_equal_p): Likewise.
3324 2018-08-02 Nick Clifton <nickc@redhat.com>
3327 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3328 Define to speculation_safe_value_not_needed.
3331 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3332 Define to speculation_safe_value_not_needed.
3335 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3336 Define to speculation_safe_value_not_needed.
3339 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3340 Define to speculation_safe_value_not_needed.
3343 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3344 Define to speculation_safe_value_not_needed.
3347 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3348 Define to speculation_safe_value_not_needed.
3351 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3352 Define to speculation_safe_value_not_needed.
3355 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3356 Define to speculation_safe_value_not_needed.
3359 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3360 speculation_safe_value_not_needed.
3363 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3364 to speculation_safe_value_not_needed.
3366 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3368 * doc/md.texi: Expand the documentation of instruction names
3369 to mention port-local uses. Document '@' in pattern names.
3370 * read-md.h (overloaded_instance, overloaded_name): New structs.
3372 (md_reader::handle_overloaded_name): New member function.
3373 (md_reader::get_overloads): Likewise.
3374 (md_reader::m_first_overload): New member variable.
3375 (md_reader::m_next_overload_ptr): Likewise.
3376 (md_reader::m_overloads_htab): Likewise.
3377 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3378 m_next_overload_ptr and m_overloads_htab.
3379 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3380 (get_mode_token, get_code_token, get_int_token): New functions.
3381 (map_attr_string): Add an optional argument that passes back
3382 the associated iterator.
3383 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3384 (md_reader::handle_overloaded_name, add_overload_instance): New
3386 (apply_iterators): Handle '@' names. Report an error if '@'
3387 is used without iterators.
3388 (initialize_iterators): Initialize the new iterator_group fields.
3389 * genopinit.c (handle_overloaded_code_for)
3390 (handle_overloaded_gen): New functions.
3391 (main): Use them to print declarations of maybe_code_for_* and
3392 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3393 * genemit.c (print_overload_arguments, print_overload_test)
3394 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3395 (main): Use it to print definitions of maybe_code_for_* and
3396 maybe_gen_* functions.
3397 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3398 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3399 instead of explicit mode checks.
3400 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3401 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3402 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3403 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3404 (aarch64_expand_compare_and_swap): Likewise
3405 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3406 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3407 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3408 (aarch64_constant_pool_reload_icode): Delete.
3409 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3410 instead of aarch64_constant_pool_reload_icode. Use
3411 code_for_aarch64_reload_mov instead of explicit mode checks.
3412 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3413 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3414 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3415 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3416 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3417 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3418 (aarch64_atomic_load_op_code): Delete.
3419 (aarch64_emit_atomic_load_op): Likewise.
3420 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3421 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3422 instead of aarch64_emit_atomic_load_op.
3423 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3424 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3425 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3426 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3427 character before the pattern name.
3428 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3429 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3430 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3431 (aarch64_frecps<mode>): Likewise.
3432 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3433 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3434 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3435 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3436 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3438 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3440 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3441 Allow HFmode constants if TARGET_FP_F16INST.
3443 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3446 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3447 No longer check last store for clobber of address register.
3449 2018-08-02 Martin Liska <mliska@suse.cz>
3451 PR gcov-profile/86817
3452 * gcov.c (process_all_functions): New function.
3454 (process_file): Move functions processing to
3455 process_all_functions.
3457 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3459 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3460 "const" to the "gimple *" and "rtx_insn *" parameters.
3461 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3463 (dump_location_t::dump_location_t): Likewise.
3465 2018-08-01 Martin Sebor <msebor@redhat.com>
3467 PR tree-optimization/86650
3468 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3469 rather than a "gcall *". Directly pass the data of interest
3470 to percent_K_format, rather than building a temporary CALL_EXPR
3472 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3473 (gimple_fold_builtin_strncat): Adjust.
3474 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3475 gcall* argument with gimple*.
3476 * gimple-ssa-warn-restrict.c (check_call): Same.
3477 (wrestrict_dom_walker::before_dom_children): Same.
3478 (builtin_access::builtin_access): Same.
3479 (check_bounds_or_overlap): Same
3480 (maybe_diag_overlap): Same.
3481 (maybe_diag_offset_bounds): Same.
3482 * tree-diagnostic.c (default_tree_printer): Move usage of
3483 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3485 * tree-pretty-print.c (percent_K_format): Add argument.
3486 * tree-pretty-print.h: Add argument.
3487 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3488 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3489 (maybe_diag_stxncpy_trunc): Same.
3490 (handle_builtin_stxncpy): Same.
3491 (handle_builtin_strcat): Same.
3493 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3495 * match.pd: Optimise pointer range checks.
3497 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3499 PR tree-optimization/86758
3500 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3501 to remove pattern statements.
3503 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3505 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3506 result of dfs_enumerate_from when constructing stmt_vec_infos,
3507 instead of additionally calling get_loop_body.
3509 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3511 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3513 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3514 When creating an iv, assert that the step is not known to be zero.
3515 (vect_setup_realignment): Update call accordingly.
3516 * tree-vect-stmts.c (vectorizable_store): Likewise.
3517 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3519 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3521 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3522 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3523 (vectorizable_reduction): Likewise.
3524 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3525 (vect_detect_hybrid_slp_stmts): Likewise.
3526 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3528 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3530 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3531 (wide_int_set_zero_nonzero_bits): ...this.
3532 (zero_nonzero_bits_from_vr): Rename to...
3533 (vrp_set_zero_nonzero_bits): ...this.
3534 (extract_range_from_multiplicative_op_1): Abstract wide int
3536 (wide_int_range_multiplicative_op): ...here.
3537 (extract_range_from_binary_expr_1): Extract wide int binary
3538 operations into their own functions.
3539 (wide_int_range_lshift): New.
3540 (wide_int_range_can_optimize_bit_op): New.
3541 (wide_int_range_shift_undefined_p): New.
3542 (wide_int_range_bit_xor): New.
3543 (wide_int_range_bit_ior): New.
3544 (wide_int_range_bit_and): New.
3545 (wide_int_range_trunc_mod): New.
3546 (extract_range_into_wide_ints): New.
3547 (vrp_shift_undefined_p): New.
3548 (extract_range_from_multiplicative_op): New.
3549 (vrp_can_optimize_bit_op): New.
3550 * tree-vrp.h (value_range::dump): New.
3551 (wide_int_range_multiplicative_op): New.
3552 (wide_int_range_lshift):New.
3553 (wide_int_range_shift_undefined_p): New.
3554 (wide_int_range_bit_xor): New.
3555 (wide_int_range_bit_ior): New.
3556 (wide_int_range_bit_and): New.
3557 (wide_int_range_trunc_mod): New.
3558 (zero_nonzero_bits_from_bounds): Rename to...
3559 (wide_int_set_zero_nonzero_bits): ...this.
3560 (zero_nonzero_bits_from_vr): Rename to...
3561 (vrp_set_zero_nonzero_bits): ...this.
3562 (range_easy_mask_min_max): Rename to...
3563 (wide_int_range_can_optimize_bit_op): this.
3564 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3565 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3567 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3569 * tree-vectorizer.h (vect_orig_stmt): New function.
3570 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3571 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3572 (vect_create_epilog_for_reduction): Likewise.
3573 (vectorizable_live_operation): Likewise.
3574 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3575 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3576 * tree-vect-stmts.c (vectorizable_call): Likewise.
3577 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3579 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3581 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3583 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3584 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3585 (vect_transform_loop): Likewise.
3586 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3588 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3590 * tree-vectorizer.h (vect_schedule_slp): Return void.
3591 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3592 (vect_schedule_slp): Likewise.
3594 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3596 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3598 (vect_transform_loop): Update calls accordingly. Schedule SLP
3599 instances before the main loop, if any exist.
3601 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3603 PR tree-optimization/86749
3604 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3605 If the lhs is used in a COND_EXPR, check that it is being used
3606 as the "then" or "else" value.
3608 2018-08-01 Tom de Vries <tdevries@suse.de>
3611 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3612 speculation_safe_value_not_needed.
3614 2018-08-01 Richard Biener <rguenther@suse.de>
3616 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3619 2018-08-01 Martin Liska <mliska@suse.cz>
3621 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3622 format how successful transformation is dumped.
3623 (gimple_mod_pow2_value_transform): Likewise.
3624 (gimple_mod_subtract_transform): Likewise.
3625 (gimple_stringops_transform): Likewise.
3627 2018-08-01 Martin Liska <mliska@suse.cz>
3630 * value-prof.c (interesting_stringop_to_profile_p):
3631 Simplify the code and add BUILT_IN_MEMMOVE.
3632 (gimple_stringops_transform): Likewise.
3634 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3636 * config/aarch64/aarch64-simd.md
3637 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3638 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3639 use GPI iterator instead of SI mode.
3641 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3643 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3644 rs6000_speculation_barrier.
3645 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3646 new barrier pattern name.
3648 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3650 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3651 (speculation_barrier): New insn.
3653 2018-08-01 Richard Biener <rguenther@suse.de>
3656 * graphite.h: Include isl/id.h and isl/space.h to allow build
3659 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3662 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3663 mode for COFF targets.
3664 * defaults.h (TARGET_COFF): Define.
3665 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3666 TARGET_COFF): Define.
3667 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3668 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3669 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3671 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3673 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3674 * gimple-streamer-out.c (output_bb): Save it.
3675 * lto-streamer-in.c (input_struct_function_base): Restore
3676 instance discriminator if available. Create map on demand.
3677 * lto-streamer-out.c (output_struct_function_base): Save it if
3679 * final.c (decl_to_instance_map): Document LTO strategy.
3681 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3682 Olivier Hainque <hainque@adacore.com>
3684 * debug.h (decl_to_instance_map_t): New type.
3685 (decl_to_instance_map): Declare.
3686 (maybe_create_decl_to_instance_map): New inline function.
3687 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3688 to track basic block discriminators.
3689 (final_start_function_1): Initialize them.
3690 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3692 (decl_to_instance_map): New variable.
3693 (map_decl_to_instance, maybe_set_discriminator): New functions.
3694 (notice_source_line): Set discriminator.
3696 2018-07-31 Ian Lance Taylor <iant@golang.org>
3698 * targhooks.c (default_have_speculation_safe_value): Add
3701 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3703 * dump-context.h: Include "pretty-print.h".
3704 (dump_context::refresh_dumps_are_enabled): New decl.
3705 (dump_context::emit_item): New decl.
3706 (class dump_context): Add fields "m_test_pp" and
3708 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3709 (temp_dump_context::get_dumped_text): New decl.
3710 (class temp_dump_context): Add field "m_pp".
3711 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3712 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3714 (set_dump_file): Update for above change.
3715 (set_alt_dump_file): Likewise.
3716 (dump_loc): New overload, taking a pretty_printer *.
3717 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3718 to any test pretty-printer.
3719 (make_item_for_dump_gimple_stmt): New function, adapted from
3720 optinfo::add_gimple_stmt.
3721 (dump_context::dump_gimple_stmt): Call it, and use the result,
3722 eliminating the direct usage of dump_file and alt_dump_file in
3723 favor of indirectly using them via emit_item.
3724 (make_item_for_dump_gimple_expr): New function, adapted from
3725 optinfo::add_gimple_expr.
3726 (dump_context::dump_gimple_expr): Call it, and use the result,
3727 eliminating the direct usage of dump_file and alt_dump_file in
3728 favor of indirectly using them via emit_item.
3729 (make_item_for_dump_generic_expr): New function, adapted from
3731 (dump_context::dump_generic_expr): Call it, and use the result,
3732 eliminating the direct usage of dump_file and alt_dump_file in
3733 favor of indirectly using them via emit_item.
3734 (make_item_for_dump_printf_va): New function, adapted from
3735 optinfo::add_printf_va.
3736 (make_item_for_dump_printf): New function.
3737 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3738 and use the result, eliminating the direct usage of dump_file and
3739 alt_dump_file in favor of indirectly using them via emit_item.
3740 (make_item_for_dump_dec): New function.
3741 (dump_context::dump_dec): Call it, and use the result,
3742 eliminating the direct usage of dump_file and alt_dump_file in
3743 favor of indirectly using them via emit_item.
3744 (make_item_for_dump_symtab_node): New function, adapted from
3745 optinfo::add_symtab_node.
3746 (dump_context::dump_symtab_node): Call it, and use the result,
3747 eliminating the direct usage of dump_file and alt_dump_file in
3748 favor of indirectly using them via emit_item.
3749 (dump_context::begin_scope): Reimplement, avoiding direct usage
3750 of dump_file and alt_dump_file in favor of indirectly using them
3752 (dump_context::emit_item): New member function.
3753 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3754 Set up test pretty-printer on the underlying context. Call
3755 refresh_dumps_are_enabled.
3756 (temp_dump_context::~temp_dump_context): Call
3757 refresh_dumps_are_enabled.
3758 (temp_dump_context::get_dumped_text): New member function.
3759 (selftest::verify_dumped_text): New function.
3760 (ASSERT_DUMPED_TEXT_EQ): New macro.
3761 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3762 and then without optinfo enabled. Add uses of
3763 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3764 * dumpfile.h: Update comment for the dump_* API.
3765 * optinfo-emit-json.cc
3766 (selftest::test_building_json_from_dump_calls): Update for new
3767 param for temp_dump_context ctor.
3768 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3769 and "m_owned" field.
3770 (optinfo_item::~optinfo_item): Likewise.
3771 (optinfo::add_item): New member function.
3772 (optinfo::emit): Update comment.
3773 (optinfo::add_string): Delete.
3774 (optinfo::add_printf): Delete.
3775 (optinfo::add_printf_va): Delete.
3776 (optinfo::add_gimple_stmt): Delete.
3777 (optinfo::add_gimple_expr): Delete.
3778 (optinfo::add_tree): Delete.
3779 (optinfo::add_symtab_node): Delete.
3780 (optinfo::add_dec): Delete.
3781 * optinfo.h (class dump_context): New forward decl.
3782 (optinfo::add_item): New decl.
3783 (optinfo::add_string): Delete.
3784 (optinfo::add_printf): Delete.
3785 (optinfo::add_printf_va): Delete.
3786 (optinfo::add_gimple_stmt): Delete.
3787 (optinfo::add_gimple_expr): Delete.
3788 (optinfo::add_tree): Delete.
3789 (optinfo::add_symtab_node): Delete.
3790 (optinfo::add_dec): Delete.
3791 (optinfo::add_poly_int): Delete.
3792 (optinfo_item::optinfo_item): Remove "owned" param.
3793 (class optinfo_item): Remove field "m_owned".
3795 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3798 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3799 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3800 requested variable alignment.
3801 (expand_one_ssa_partition): Likewise.
3802 (expand_one_var): Likewise.
3804 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3806 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3807 to speculation_safe_value_not_needed.
3809 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3811 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3812 * targhooks.c (speculation_safe_value_not_needed): New function.
3813 * target.def (have_speculation_safe_value): Update documentation.
3814 * doc/tm.texi: Regenerated.
3816 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3818 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3819 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3821 (despeculate_copy<ALLI:mode>_insn): New insn.
3822 (despeculate_copyti_insn): New insn.
3823 (despeculate_simple<ALLI:mode>): New insn
3824 (despeculate_simpleti): New insn.
3825 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3827 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3828 aarch64_speculation_safe_value.
3829 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3831 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3833 * config/aarch64/aarch64-speculation.cc: New file.
3834 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3835 before pass_reorder_blocks.
3836 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3838 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3839 X14 and X15 when tracking speculation.
3840 * config/aarch64/aarch64.md (register name constants): Add
3841 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3842 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3843 (speculation_barrier): New insn attribute.
3844 (cmp<mode>): Allow SP in comparisons.
3845 (speculation_tracker): New insn.
3846 (speculation_barrier): Add speculation_barrier attribute.
3847 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3848 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3849 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3851 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3853 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3854 aarch64_track_speculation is true.
3855 (tb<optab><mode>1): Likewise.
3856 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3857 generate CB[N]Z when tracking speculation.
3858 (aarch64_split_compare_and_swap): Likewise.
3859 (aarch64_split_atomic_op): Likewise.
3861 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3863 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3865 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3867 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3868 (speculation_barrier): New insn.
3870 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3872 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3873 * config/arm/arm.md (speculation_barrier): New expand.
3874 (speculation_barrier_insn): New pattern.
3876 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3878 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3879 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3880 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3881 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3883 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3884 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3885 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3886 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3887 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3888 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3889 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3890 * builtins.c (expand_speculation_safe_value): New function.
3891 (expand_builtin): Call it.
3892 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3893 * doc/extend.texi: Document __builtin_speculation_safe_value.
3894 * doc/md.texi: Document "speculation_barrier" pattern.
3895 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3896 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3897 * doc/tm.texi: Regenerated.
3898 * target.def (have_speculation_safe_value, speculation_safe_value): New
3900 * targhooks.c (default_have_speculation_safe_value): New function.
3901 (default_speculation_safe_value): New function.
3902 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3903 (default_speculation_safe_value): Add prototype.
3905 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3907 * dump-context.h (dump_context::dump_loc): New decl.
3908 * dumpfile.c (dump_context::dump_loc): New member function.
3909 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3910 and dump_gimple_stmt.
3911 (dump_context::dump_gimple_expr_loc): Likewise, using
3913 (dump_context::dump_generic_expr_loc): Likewise, using
3915 (dump_context::dump_printf_loc_va): Likewise, using
3917 (dump_context::begin_scope): Explicitly using the global function
3918 "dump_loc", rather than the member function.
3920 2018-07-31 Martin Sebor <msebor@redhat.com>
3922 PR tree-optimization/86741
3923 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3925 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3927 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3928 depend on whether prefetch instructions will be emitted or not.
3929 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3930 will be emitted or not.
3931 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3932 (TARGET_SETMEM_PFD): New macros.
3934 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3936 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3937 (NULL_STMT_VEC_INFO): Delete.
3938 (stmt_vec_info::operator*): Likewise.
3939 (stmt_vec_info::operator gimple *): Likewise.
3940 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3941 of NULL_STMT_VEC_INFO.
3942 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3943 (vect_reassociating_reduction_p): Likewise.
3944 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3945 (vectorizable_store): Likewise.
3946 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3947 (vec_info::free_stmt_vec_infos): Likewise.
3949 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3951 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3952 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3954 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3956 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3957 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3958 (vec_info::free_stmt_vec_info): New private member functions.
3959 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3960 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3961 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3962 set_stmt_vec_info_vec and free_stmt_vec_infos.
3963 * tree-vect-loop.c (_loop_vec_info): Remove call to
3964 set_stmt_vec_info_vec.
3965 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3966 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3967 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3968 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3969 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3970 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3971 with the clearing in the xcalloc.
3972 (stmt_vec_info_vec): Delete.
3973 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3974 (vectorize_loops): Likewise.
3975 (vec_info::~vec_info): Remove argument from call to
3976 free_stmt_vec_infos.
3977 (vec_info::add_stmt): Remove vinfo argument from call to
3980 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3982 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3983 rather than a gimple stmt.
3984 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3985 information for pattern statements when passed the original
3986 statement; instead wait to be passed the pattern statement itself.
3987 Don't call set_vinfo_for_stmt here.
3988 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3989 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3990 stmt_vec_infos here.
3991 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3992 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3993 stmt_vec_infos entry.
3995 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3997 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3998 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3999 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4000 * tree-vect-stmts.c (vectorizable_call): Likewise.
4001 (vectorizable_simd_clone_call): Likewise.
4003 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4005 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4006 * tree-vectorizer.c (vec_info::remove_stmt): New function.
4007 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4008 * tree-vect-loop.c (vect_transform_loop): Likewise.
4009 * tree-vect-slp.c (vect_schedule_slp): Likewise.
4010 * tree-vect-stmts.c (vect_remove_stores): Likewise.
4012 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4014 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4015 (vect_dr_stmt): Delete.
4016 * tree-vectorizer.c (vec_info::lookup_dr): New function.
4017 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4019 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4020 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4021 (vect_verify_datarefs_alignment, vect_peeling_supportable)
4022 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4023 (vect_analyze_data_refs): Likewise.
4024 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
4026 (vect_find_same_alignment_drs): Likewise.
4027 (vect_slp_analyze_node_dependences): Update calls accordingly.
4028 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4029 instead of DR_VECT_AUX.
4030 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4031 of a vector data references. Use vec_info::lookup_dr instead of
4033 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4034 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4035 instead of DR_VECT_AUX.
4037 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4039 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4041 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4043 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4044 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4045 (vect_gen_prolog_loop_niters): Likewise.
4047 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4049 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4050 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4051 (vect_known_alignment_in_bytes, vect_dr_behavior)
4052 (vect_get_scalar_dr_size): Take references as dr_vec_infos
4053 instead of data_references. Update calls to other routines for
4054 which the same change has been made.
4055 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4056 dr_vec_infos instead of stmt_vec_infos.
4057 (vect_analyze_data_ref_dependence): Update call accordingly.
4058 (vect_slp_analyze_data_ref_dependence)
4059 (vect_record_base_alignments): Use DR_VECT_AUX.
4060 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4061 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4062 (vector_alignment_reachable_p, vect_get_data_access_cost)
4063 (vect_peeling_supportable, vect_analyze_group_access_1)
4064 (vect_analyze_group_access, vect_analyze_data_ref_access)
4065 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4066 (vect_compile_time_alias, vect_small_gap_p)
4067 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4068 (vect_supportable_dr_alignment): Take references as dr_vec_infos
4069 instead of data_references. Update calls to other routines for
4070 which the same change has been made.
4071 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4072 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4073 (vect_slp_analyze_and_verify_node_alignment)
4074 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4075 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4076 (vect_setup_realignment): Use dr_vec_infos. Update calls after
4078 (_vect_peel_info::dr): Replace with...
4079 (_vect_peel_info::dr_info): ...this new field.
4080 (vect_peeling_hash_get_most_frequent)
4081 (vect_peeling_hash_choose_best_peeling): Update accordingly.
4082 (vect_peeling_hash_get_lowest_cost):
4083 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
4084 routines for which the same change has been made.
4085 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
4087 * tree-vect-loop-manip.c (get_misalign_in_elems)
4088 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
4090 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4091 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4092 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4093 (get_group_load_store_type, get_negative_load_store_type)
4094 (vect_get_data_ptr_increment, vectorizable_store)
4095 (vectorizable_load): Likewise.
4096 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4097 Update calls to other routines for which the same change has been made.
4099 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4101 * tree-vectorizer.h (vec_info::move_dr): New member function.
4102 (dataref_aux): Rename to...
4103 (dr_vec_info): ...this and add "dr" and "stmt" fields.
4104 (_stmt_vec_info::dr_aux): Update accordingly.
4105 (_stmt_vec_info::data_ref_info): Delete.
4106 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4107 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4108 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4109 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4111 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
4112 (STMT_VINFO_DR_INFO): New macro.
4113 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4114 (set_dr_misalignment): Update after rename of dataref_aux.
4115 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
4116 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4117 initialization of STMT_VINFO_DATA_REF.
4118 * tree-vectorizer.c (vec_info::move_dr): New function.
4119 * tree-vect-patterns.c (vect_recog_bool_pattern)
4120 (vect_recog_mask_conversion_pattern)
4121 (vect_recog_gather_scatter_pattern): Use it.
4122 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4123 the "dr" and "stmt" fields of dr_vec_info instead of
4124 STMT_VINFO_DATA_REF.
4126 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4128 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4129 (is_pattern_stmt_p): Use it.
4130 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4131 on pattern statements.
4133 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4135 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4136 original stmt as a stmt_vec_info rather than a gimple stmt.
4137 (vect_pattern_recog_1): Take the statement directly as a
4138 stmt_vec_info, rather than via a gimple_stmt_iterator.
4139 Update call to vect_mark_pattern_stmts.
4140 (vect_pattern_recog): Update calls accordingly.
4142 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4144 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4145 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4146 a vect_def_type for the first argument.
4147 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4148 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
4149 operand if it isn't defined by a vectorized statement.
4150 (vect_build_gather_load_calls): Remove the mask_dt argument and
4151 update calls to vect_get_vec_def_for_stmt_copy.
4152 (vectorizable_bswap): Likewise the dt argument.
4153 (vectorizable_call): Update calls to vectorizable_bswap and
4154 vect_get_vec_def_for_stmt_copy.
4155 (vectorizable_simd_clone_call, vectorizable_assignment)
4156 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4157 (vectorizable_comparison): Update calls to
4158 vect_get_vec_def_for_stmt_copy.
4159 (vectorizable_store): Likewise. Remove now-unnecessary calls to
4161 (vect_get_loop_based_defs): Remove dt argument and update call
4162 to vect_get_vec_def_for_stmt_copy.
4163 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4164 and vect_get_vec_def_for_stmt_copy.
4165 (vectorizable_load): Update calls to vect_build_gather_load_calls
4166 and vect_get_vec_def_for_stmt_copy.
4167 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4168 (vectorizable_reduction, vectorizable_live_operation): Update calls
4169 to vect_get_vec_def_for_stmt_copy.
4171 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4173 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4174 and gimple stmt arguments with a stmt_vec_info.
4175 (vect_record_base_alignments): Update calls accordingly.
4176 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4177 and gimple stmt arguments with a stmt_vec_info.
4178 (vect_build_slp_tree_1): Remove vinfo argument and update call
4179 to vect_record_max_nunits.
4180 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4181 and vect_record_max_nunits.
4183 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4185 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4186 file and take a stmt_vec_info instead of a gimple stmt.
4187 (supportable_widening_operation, vect_finish_replace_stmt)
4188 (vect_finish_stmt_generation, vect_get_store_rhs)
4189 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4190 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4191 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4192 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4193 (vect_create_data_ref_ptr, bump_vector_ptr)
4194 (vect_permute_store_chain, vect_setup_realignment)
4195 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4196 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4197 (vectorizable_reduction, vectorizable_induction)
4198 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4199 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4200 than gimple stmts as arguments.
4201 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4202 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4203 (can_group_stmts_p, vect_check_gather_scatter)
4204 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4205 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4206 (vect_permute_load_chain, vect_shift_permute_load_chain)
4207 (vect_transform_grouped_load)
4208 (vect_record_grouped_load_vectors): Likewise.
4209 * tree-vect-loop.c (vect_fixup_reduc_chain)
4210 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4211 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4212 (vectorizable_reduction, vectorizable_induction)
4213 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4214 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4215 (vect_get_load_store_mask): Likewise.
4216 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4217 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4218 * tree-vect-stmts.c (vect_mark_relevant)
4219 (is_simple_and_all_uses_invariant)
4220 (exist_non_indexing_operands_for_use_p, process_use)
4221 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4222 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4223 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4224 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4225 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4226 (get_negative_load_store_type, get_load_store_type)
4227 (vect_check_load_store_mask, vect_check_store_rhs)
4228 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4229 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4230 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4231 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4232 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4233 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4234 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4235 (supportable_widening_operation): Likewise.
4237 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4239 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4240 a stmt_vec_info instead of a gcall.
4241 (vect_check_gather_scatter): Update call accordingly.
4242 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4244 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4245 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4246 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4247 instead of a gimple stmt.
4248 (vect_transform_loop): Update calls accordingly.
4249 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4250 stmt_vec_infos instead of gimple stmts.
4251 (vect_analyze_slp_instance): Update use accordingly.
4252 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4253 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4254 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4255 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4256 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4257 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4258 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4259 down to subroutines.
4261 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4263 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4264 of the worklist from a vector of gimple stmts to a vector of
4266 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4267 (vect_mark_stmts_to_be_vectorized): Likewise
4269 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4271 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4272 statement before passing it to vect_analyze_stmt.
4273 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4274 the chain of phi vector definitions. Track the exit phi via its
4276 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4277 STMT_VINFO_REDUC_DEF.
4278 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4279 stmt_vec_infos to handle the statement chains.
4280 (vect_get_slp_defs): Record the first statement in the node
4281 using a stmt_vec_info.
4282 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4283 statements here and pass their stmt_vec_info down to subroutines.
4284 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4285 down to vect_finish_stmt_generation.
4286 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4287 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4288 stmt_vec_infos to subroutines.
4289 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4292 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4294 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4295 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4296 (vect_permute_store_chain, vect_setup_realignment)
4297 (vect_permute_load_chain, vect_shift_permute_load_chain)
4298 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4299 stmts internally, and when passing values to other vectorizer routines.
4300 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4301 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4302 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4303 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4304 (vectorizable_reduction, vectorizable_induction)
4305 (vectorizable_live_operation, vect_transform_loop_stmt)
4306 (vect_transform_loop): Likewise.
4307 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4308 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4309 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4310 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4311 (vect_slp_analyze_node_operations_1): Likewise.
4312 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4313 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4314 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4315 (vect_finish_stmt_generation_1, get_group_load_store_type)
4316 (get_load_store_type, vect_build_gather_load_calls)
4317 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4318 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4319 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4320 (vectorizable_store, vectorizable_load, vectorizable_condition)
4321 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4322 (supportable_widening_operation): Likewise.
4323 (vect_get_vector_types_for_stmt): Likewise.
4324 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4326 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4328 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4329 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4330 (vect_permute_store_chain, vect_permute_load_chain)
4331 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4332 repeated stmt_vec_info lookups.
4333 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4334 (vect_update_ivs_after_vectorizer): Likewise.
4335 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4336 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4337 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4338 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4339 (vect_bb_slp_scalar_cost): Likewise.
4340 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4342 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4344 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4345 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4346 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4347 to get gassigns and gcalls, rather than operating on generc gimple
4349 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4350 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4351 (vectorizable_load, vect_analyze_stmt): Likewise.
4352 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4354 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4356 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4357 return stmt_vec_infos rather than gimple stmts. Do not accept
4359 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4361 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4362 Update use of get_later_stmt.
4363 (vect_get_constant_vectors): Update call accordingly.
4364 (vect_schedule_slp_instance): Likewise
4365 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4366 (vect_slp_analyze_instance_dependence): Likewise.
4367 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4369 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4371 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4372 (stmt_info_for_cost::stmt_info): ...this new field.
4373 (add_stmt_costs): Update accordingly.
4374 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4375 (vect_get_known_peeling_cost): Likewise.
4376 (vect_estimate_min_profitable_iters): Likewise.
4377 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4379 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4381 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4382 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4383 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4385 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4387 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4389 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4390 a gimple stmt to a stmt_vec_info.
4391 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4393 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4395 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4396 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4397 (_loop_vec_info::reduction_chains): Likewise.
4398 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4400 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4402 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4404 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4405 a gimple stmt to a stmt_vec_info.
4406 (_stmt_vec_info::next_element): Likewise.
4407 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4408 (vect_slp_analyze_and_verify_node_alignment)
4409 (vect_analyze_group_access_1, vect_analyze_group_access)
4410 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4411 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4412 (vect_supportable_dr_alignment): Update accordingly.
4413 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4414 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4415 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4416 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4417 * tree-vect-slp.c (vect_build_slp_tree_1)
4418 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4419 (vect_split_slp_store_group, vect_analyze_slp_instance)
4420 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4421 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4422 (get_group_load_store_type, get_load_store_type)
4423 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4424 (vect_transform_stmt, vect_remove_stores): Likewise.
4426 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4428 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4430 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4431 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4432 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4433 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4434 (vector_alignment_reachable_p, vect_get_data_access_cost)
4435 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4436 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4437 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4438 (vect_analyze_group_access_1, vect_analyze_group_access)
4439 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4440 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4441 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4442 result of vect_dr_stmt and use the stmt_vec_info instead of
4443 the associated gimple stmt.
4444 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4445 (vect_gen_prolog_loop_niters): Likewise.
4446 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4448 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4450 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4451 to a vec<stmt_vec_info>.
4452 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4453 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4455 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4456 to a vec<stmt_vec_info>.
4457 (bst_traits::value_type, bst_traits::value_type): Likewise.
4458 (bst_traits::hash): Update accordingly.
4459 (vect_get_and_check_slp_defs): Change the stmts parameter from
4460 a vec<gimple *> to a vec<stmt_vec_info>.
4461 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4462 (vect_build_slp_tree): Likewise.
4463 (vect_build_slp_tree_2): Likewise. Update uses of
4464 SLP_TREE_SCALAR_STMTS.
4465 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4466 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4467 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4468 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4469 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4470 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4471 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4472 (vect_get_constant_vectors, vect_get_slp_defs)
4473 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4474 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4475 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4476 instead of gimple stmts.
4477 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4478 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4479 (vect_slp_analyze_instance_dependence): Update uses of
4480 SLP_TREE_SCALAR_STMTS.
4481 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4482 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4483 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4484 (get_initial_defs_for_reduction): Likewise.
4485 (vect_create_epilog_for_reduction): Likewise.
4486 (vectorize_fold_left_reduction): Likewise.
4487 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4488 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4489 (can_vectorize_live_stmts): Likewise.
4491 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4493 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4494 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4495 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4497 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4499 (gather_scalar_reductions): Update after above interface changes.
4500 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4501 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4503 (vect_force_simple_reduction): Likewise.
4504 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4505 LOOP_VINFO_REDUCTIONS.
4506 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4508 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4510 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4511 a gimple stmt to a stmt_vec_info.
4512 * tree-vect-loop.c (vect_active_double_reduction_p)
4513 (vect_force_simple_reduction, vectorizable_reduction): Update
4516 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4518 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4519 vec<gimple *> to a vec<stmt_vec_info>.
4520 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4521 the reduction_phis argument from a vec<gimple *> to a
4523 (vectorizable_reduction): Likewise the phis local variable that
4524 is passed to vect_create_epilog_for_reduction. Update for new type
4525 of SLP_TREE_VEC_STMTS.
4526 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4527 (vectorizable_live_operation): Likewise.
4528 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4529 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4531 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4533 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4534 a gimple stmt to a stmt_vec_info.
4535 (vectorizable_condition, vectorizable_live_operation)
4536 (vectorizable_reduction, vectorizable_induction): Pass back the
4537 vectorized statement as a stmt_vec_info.
4538 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4539 use of STMT_VINFO_VEC_STMT.
4540 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4541 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4542 as stmt_vec_infos rather than gimple stmts.
4543 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4545 (vectorizable_live_operation): Likewise.
4546 (vectorizable_reduction, vectorizable_induction): Likewise,
4547 updating use of STMT_VINFO_VEC_STMT.
4548 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4549 of STMT_VINFO_VEC_STMT.
4550 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4551 (vectorizable_simd_clone_call, vectorizable_conversion)
4552 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4553 (vectorizable_store, vectorizable_load, vectorizable_condition)
4554 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4555 from a gimple stmt to a stmt_vec_info.
4556 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4557 pointer to a stmt_vec_info to the vectorizable_* routines.
4559 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4561 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4562 a gimple stmt to a stmt_vec_info.
4563 (is_pattern_stmt_p): Update accordingly.
4564 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4565 (vect_record_grouped_load_vectors): Likewise.
4566 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4567 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4568 (vect_model_reduction_cost): Likewise.
4569 (vect_create_epilog_for_reduction): Likewise.
4570 (vectorizable_reduction, vectorizable_induction): Likewise.
4571 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4572 Return the stmt_vec_info for the pattern statement.
4573 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4574 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4575 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4576 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4577 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4578 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4579 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4580 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4582 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4584 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4585 (vect_finish_stmt_generation): Likewise.
4586 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4587 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4588 (vect_build_gather_load_calls): Use the return value of the above
4589 functions instead of a separate call to vinfo_for_stmt. Use narrow
4590 scopes for the input gimple stmt and wider scopes for the associated
4591 stmt_vec_info. Use vec_info::lookup_def when setting these
4592 stmt_vec_infos from an SSA_NAME definition.
4593 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4594 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4595 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4596 (vectorizable_store, vectorizable_load, vectorizable_condition)
4597 (vectorizable_comparison): Likewise.
4598 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4599 (vectorizable_reduction): Likewise.
4601 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4603 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4604 stmt_vec_info * parameter before the optional gimple **.
4605 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4606 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4607 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4608 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4609 (vectorizable_live_operation): Likewise.
4610 * tree-vect-patterns.c (type_conversion_p): Likewise.
4611 (vect_look_through_possible_promotion): Likewise.
4612 (vect_recog_rotate_pattern): Likewise.
4613 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4615 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4617 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4618 a typedef to a wrapper class.
4619 (NULL_STMT_VEC_INFO): New macro.
4620 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4621 (stmt_vec_info::operator*): New function.
4622 (stmt_vec_info::operator gimple *): Likewise.
4623 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4624 (add_stmt_costs): Likewise.
4625 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4626 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4627 (vect_get_known_peeling_cost): Likewise.
4628 (vect_estimate_min_profitable_iters): Likewise.
4629 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4630 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4631 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4632 (vectorizable_store, free_stmt_vec_infos): Likewise.
4633 (new_stmt_vec_info): Change return type of xcalloc to
4636 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4638 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4639 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4640 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4641 a single_imm_use-based sequence.
4642 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4644 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4646 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4647 * tree-vectorizer.c (vec_info::lookup_def): New function.
4648 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4649 (vect_widened_op_tree): Likewise.
4650 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4651 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4652 (vectorizable_reduction): Likewise.
4653 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4655 (vect_is_slp_reduction): Update calls accordingly. Use
4656 vec_info::lookup_def.
4657 (vect_is_simple_reduction): Likewise
4658 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4660 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4662 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4663 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4664 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4666 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4667 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4668 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4669 (vect_is_slp_reduction, vectorizable_induction)
4670 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4671 * tree-vect-patterns.c (vect_init_pattern_stmt):
4672 (vect_determine_min_output_precision_1, vect_determine_precisions)
4673 (vect_pattern_recog): Likewise.
4674 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4675 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4676 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4677 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4678 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4679 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4680 info field from a loop to a loop_vec_info.
4682 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4684 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4685 (vec_info::add_stmt): Declare.
4686 * tree-vectorizer.c (vec_info::add_stmt): New function.
4687 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4688 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4689 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4690 (vectorizable_induction): Likewise.
4691 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4692 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4693 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4694 (vectorizable_load): Likewise.
4695 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4696 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4697 (vect_recog_gather_scatter_pattern): Likewise.
4698 (append_pattern_def_seq): Likewise. Remove a check that is
4699 performed by add_stmt itself.
4701 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4703 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4704 which make_ssa_name was called with new_stmt before new_stmt
4707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4709 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4711 (vect_is_slp_reduction): ...here...
4712 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4713 that are already known to be false.
4715 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4717 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4718 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4719 STMT_VINFO_NUM_SLP_USES when it's true.
4720 (vect_free_slp_instance): Add a final_p parameter and pass it to
4722 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4723 (vect_analyze_slp_instance): Likewise.
4724 (vect_slp_analyze_operations): Likewise.
4725 (vect_slp_analyze_bb_1): Likewise.
4726 * tree-vectorizer.c (vec_info): Likewise.
4727 * tree-vect-loop.c (vect_transform_loop): Likewise.
4729 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4731 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4732 function is not called for second and subsequent members of
4735 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4737 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4738 cases for nested loops from here to ...
4739 (vect_create_epilog_for_reduction): ...here. Only call
4740 vect_is_simple_use for inner-loop reductions.
4742 2018-07-31 Martin Liska <mliska@suse.cz>
4744 PR gcov-profile/85338
4745 PR gcov-profile/85350
4746 PR gcov-profile/85372
4747 * profile.c (struct location_triplet): New.
4748 (struct location_triplet_hash): Likewise.
4749 (output_location): Do not output a BB that
4750 is already recorded for a line.
4751 (branch_prob): Use streamed_locations.
4753 2018-07-31 Martin Liska <mliska@suse.cz>
4755 PR gcov-profile/85370
4756 * coverage.c (coverage_begin_function): Do not mark target
4757 clones as artificial functions.
4759 2018-07-31 Martin Liska <mliska@suse.cz>
4761 PR gcov-profile/83813
4762 PR gcov-profile/84758
4763 PR gcov-profile/85217
4764 PR gcov-profile/85332
4765 * profile.c (branch_prob): Do not record GOTO expressions
4766 for GIMPLE statements which locations are already streamed.
4768 2018-07-31 Olivier Hainque <hainque@adacore.com>
4770 * gcc.c (handle_spec_function): Accept a soft_matched_part
4771 argument, as do_spec_1. Pass it down to ...
4772 (eval_spec_function): Accept a soft_matched_part argument,
4773 and pass it down to ...
4774 (do_spec_2): Accept a soft_matched_part argument, and pass
4775 it down to do_spec_1.
4776 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4777 (handle_braces): Update call to handle_spec_function.
4778 (driver::set_up_specs): Update calls to do_spec_2.
4779 (compare_debug_dump_opt_spec_function): Likewise.
4780 (compare_debug_self_opt_spec_function): Likewise.
4782 2018-07-31 Olivier Hainque <hainque@adacore.com>
4784 * common.opt (nolibc): New option.
4785 * doc/invoke.texi (Link Options): Document it.
4786 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4787 * config/alpha/linux.h: Likewise.
4788 * config/arc/elf.h: Likewise.
4789 * config/arm/uclinux-elf.h: Likewise.
4790 * config/arm/unknown-elf.h: Likewise.
4791 * config/avr/avrlibc.h: Likewise.
4792 * config/bfin/bfin.h: Likewise.
4793 * config/bfin/linux.h: Likewise.
4794 * config/bfin/uclinux.h: Likewise.
4795 * config/darwin.h: Likewise.
4796 * config/darwin10.h: Likewise.
4797 * config/darwin12.h: Likewise.
4798 * config/gnu-user.h: Likewise.
4799 * config/lm32/uclinux-elf.h: Likewise.
4800 * config/pa/pa-hpux11.h: Likewise.
4801 * config/pa/pa64-hpux.h: Likewise.
4802 * config/sparc/sparc.h: Likewise.
4804 2018-07-31 Olivier Hainque <hainque@adacore.com>
4806 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4807 undefined variables.
4809 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4812 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4815 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4817 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4818 terminated string literal.
4820 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4822 PR rtl-optimization/85160
4823 * combine.c (is_just_move): New function.
4824 (try_combine): Allow combining two instructions into two if neither of
4825 the original instructions was a move.
4827 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4830 * doc/extend.texi (Global Register Variables): Discourage use of type
4832 (Local Register Variables): Likewise.
4834 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4836 PR tree-optimization/86506
4837 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4839 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4842 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4843 hard_regno, make sure no insn between `from` and `to` clobbers it.
4845 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4846 Tom de Vries <tdevries@suse.de>
4848 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4849 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4850 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4851 PTX_DEFAULT_RUNTIME_DIM.
4852 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4854 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4856 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4857 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4858 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4860 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4862 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4864 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4865 predicate to reflect toc fusion has been deleted.
4866 (toc_fusion_mem_raw): Delete, no longer used.
4867 (toc_fusion_mem_wrapped): Likewise.
4868 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4870 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4871 Delete, no longer used.
4872 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4873 meant to be used for toc fusion.
4874 (rs6000_debug_print_mode): Delete toc fusion debugging.
4875 (rs6000_debug_reg_global): Likewise.
4876 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4877 fusion and secondary reload support that were never used.
4878 (rs6000_option_override_internal): Delete TOC fusion, that was only
4879 partially defined, and it did not work unless you also used the
4881 (rs6000_legitimate_address_p): Delete TOC fusion support.
4882 (rs6000_opt_masks): Likewise.
4883 (fusion_wrap_memory_address): Delete function, no longer used.
4884 (fusion_split_address); Delete TOC fusion support.
4885 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4886 longer used with toc fusion being deleted.
4887 (TARGET_TOC_FUSION_FP): Likewise.
4888 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4890 (toc fusion spliter): Delete TOC fusion support.
4891 (toc_fusionload_<mode>): Likewise.
4892 (toc_fusionload_di): Likewise.
4893 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4894 longer needs to be named. Rename predicate to delete TOC fusion.
4895 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4896 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4897 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4898 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4899 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4901 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4903 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4904 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4905 __int128 in built-in function prototypes.
4906 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4907 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4909 2018-07-27 Martin Sebor <msebor@redhat.com>
4911 PR tree-optimization/86696
4912 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4913 types, including enums.
4914 (handle_char_store): Be prepared for the above function to fail.
4916 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4918 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4919 when optimization level is lower than 2 or optimize for size.
4921 2018-07-26 Martin Sebor <msebor@redhat.com>
4923 PR tree-optimization/86043
4924 PR tree-optimization/86042
4925 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4926 (get_string_cst_length): Rename...
4927 (get_min_string_length): ...to this. Add argument.
4928 (handle_char_store): Extend to handle multi-character stores by
4930 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4931 * tree.h (initializer_zerop): Add argument.
4933 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4936 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4937 declare target to variables if they have always,{to,from,tofrom} map
4940 2018-07-26 Martin Liska <mliska@suse.cz>
4943 * lto-wrapper.c: Add linker_output as prefix
4944 for ltrans_output_file.
4946 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4948 PR rtl-optimization/85805
4949 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4950 value for hard registers if that was written in the same mode.
4952 2018-07-26 Martin Liska <mliska@suse.cz>
4954 PR gcov-profile/86536
4955 * gcov.c (format_gcov): Use printf format %.*f directly
4956 and do not handle special values.
4958 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4960 * common/config/arc/arc-common.c (arc_option_optimization_table):
4961 Update default optimizations for size.
4963 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4965 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4966 * config/arc/constraints.md (CfZ): New constraint.
4967 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4968 (subsf3_fpu): Likewise.
4969 (cmpsf_fpu): Likewise.
4970 (cmpsf_fpu_uneq): Likewise.
4972 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4974 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4976 (arc_is_uncached_mem_p): uncached applies to both the variable and
4979 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4981 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4984 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4986 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4987 field "m_scopes" from vec to auto_vec.
4989 2018-07-25 Martin Liska <mliska@suse.cz>
4991 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4994 2018-07-25 Richard Biener <rguenther@suse.de>
4997 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4998 special wrt context_die late.
4999 (gen_subprogram_die): Re-use DIEs in local scope.
5001 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
5003 PR tree-optimization/86644
5004 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
5006 2018-07-25 Martin Liska <mliska@suse.cz>
5009 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5010 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5012 2018-07-25 Martin Liska <mliska@suse.cz>
5015 * params.def: Explain ASan abbreviation and provide
5016 a documentation link.
5018 2018-07-24 Martin Sebor <msebor@redhat.com>
5020 PR tree-optimization/86622
5021 PR tree-optimization/86532
5022 * builtins.h (string_length): Declare.
5023 * builtins.c (c_strlen): Correct handling of non-constant offsets.
5024 (check_access): Be prepared for non-constant length ranges.
5025 (string_length): Make extern.
5026 * expr.c (string_constant): Only handle the minor non-constant
5027 array index. Use string_constant to compute the length of
5028 a generic string constant.
5030 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
5032 PR tree-optimization/86618
5033 * tree-vect-stmts.c (vectorizable_call): Don't take the address
5034 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5036 2018-07-24 David Malcolm <dmalcolm@redhat.com>
5038 PR tree-optimization/86636
5039 * json.cc (json::object::set): Fix comment. Add assertions.
5040 (json::array::append): Move here from json.h. Add comment and an
5042 (json::string::string): Likewise.
5043 * json.h (json::array::append): Move to json.cc.
5044 (json::string::string): Likewise.
5045 * optinfo-emit-json.cc
5046 (optrecord_json_writer::impl_location_to_json): Assert that we
5047 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5048 wrapper around it. Expand the location once, rather than three
5050 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5051 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5053 (optrecord_json_writer::optinfo_to_json): Likewise, in four
5054 places. Fix some overlong lines.
5056 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
5058 * config/aarch64/aarch64-simd.md
5059 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5060 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5061 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5062 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5063 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5064 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5065 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5066 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5067 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5069 2018-07-24 Jakub Jelinek <jakub@redhat.com>
5072 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5073 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
5074 and abs_d == d, do the power of two handling if profitable.
5076 2018-07-24 Richard Biener <rguenther@suse.de>
5078 * match.pd: Add BIT_FIELD_REF canonicalizations.
5080 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5083 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5085 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5087 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5088 terminated STRING_CST object.
5090 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5092 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5094 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5096 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5097 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5098 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5099 the elements into a register.
5100 (rs6000_split_v4si_init_di_reg): Delete.
5101 (rs6000_split_v4si_init): Delete.
5102 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5103 (vsx_init_v4si): Rewrite as a define_expand.
5105 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5107 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5108 zero_extend argument from memory): New.
5110 2018-07-22 Martin Sebor <msebor@redhat.com>
5113 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5114 diagnosing calls with unknown arguments unless -Walloca-larger-than
5115 is restricted to less than PTRDIFF_MAX bytes.
5117 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
5119 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5121 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5123 * pretty-print.c (text_info::set_location): Remove redundant
5124 "line_table" parameter from call to rich_location::set_range.
5126 2018-07-20 Martin Sebor <msebor@redhat.com>
5129 * builtins.c (expand_builtin_alloca): Adjust.
5130 * calls.c (alloc_max_size): Simplify.
5131 * cgraphunit.c (cgraph_node::expand): Adjust.
5132 * common.opt (larger_than_size, warn_frame_larger_than): Remove
5134 (frame_larger_than_size): Same.
5135 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5136 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5138 * doc/invoke.texi (GCC Command Options): Document option arguments.
5139 Explain byte-size arguments and suffixes.
5140 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5141 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5142 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5143 * doc/options.texi (UInteger): Expand.
5144 (Host_Wide_Int, ByteSize): Document new properties.
5145 * final.c (final_start_function_1): Include sizes in an error message.
5146 * function.c (frame_offset_overflow): Same.
5147 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5148 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5149 Diagnose unbounded alloca calls only for limits of less than
5151 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
5152 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
5154 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
5155 only for limits of less than PTRDIFF_MAX.
5156 * langhooks-def.h (lhd_handle_option): Change function argument
5158 * langhooks.c (lhd_handle_option): Same.
5159 * langhooks.h (handle_option): Same.
5160 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5162 (var_type, var_type_struct): Same.
5163 (var_set): Handle ByteSize flag.
5164 * optc-gen.awk: Add comments to output to ease debugging. Make
5165 use of HOST_WIDE_INT where appropriate.
5166 * opts-gen-save.awk: Use %lx to format unsigned long.
5167 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5168 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5169 arguments. Parse bytes-size suffixes.
5170 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5171 (enum_value_to_arg): Same.
5172 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
5173 (handle_option): Adjust.
5174 (generate_option): Change function argument to HOST_WIDE_INT.
5175 (cmdline_handle_error): Adjust.
5176 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5177 (set_option): Change function argument to HOST_WIDE_INT.
5178 (option_enabled): Handle cl_host_wide_int.
5179 (get_option_state): Handle CLVC_SIZE.
5180 (control_warning_option): Same.
5181 * opts.c (common_handle_option): Change function argument to
5182 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5183 OPT_Wvla_larger_than_.
5184 * opts.h (enum cl_var_type): Add an enumerator.
5185 * stor-layout.c (layout_decl): Print a more meaningful warning.
5186 * toplev.c (output_stack_usage): Adjust.
5188 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5190 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5191 call to inline_expand_builtin_string_cmp.
5192 (expand_builtin_strcmp): Likewise.
5193 (expand_builtin_strncmp): Likewise.
5194 (inline_string_cmp): Delete the last parameter, change char_type_node
5195 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5197 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5198 the inlining expansion on target where the type of the call has same or
5199 narrower precision than unsigned char.
5201 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5203 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5204 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5205 * common.opt (fsave-optimization-record): New option.
5206 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5207 * doc/invoke.texi (-fsave-optimization-record): New option.
5208 * dumpfile.c: Include "optinfo-emit-json.h".
5209 (struct kv_pair): Move to coretypes.h.
5210 (optgroup_options): Make non-static.
5211 (dump_context::end_scope): Call
5212 optimization_records_maybe_pop_dump_scope.
5213 * dumpfile.h (optgroup_options): New decl.
5214 * json.cc: New file.
5216 * optinfo-emit-json.cc: New file.
5217 * optinfo-emit-json.h: New file.
5218 * optinfo.cc: Include "optinfo-emit-json.h".
5219 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5220 (optinfo_enabled_p): Check optimization_records_enabled_p.
5221 (optinfo_wants_inlining_info_p): Likewise.
5222 * optinfo.h: Update comment.
5223 * profile-count.c (profile_quality_as_string): New function.
5224 * profile-count.h (profile_quality_as_string): New decl.
5225 (profile_count::quality): New accessor.
5226 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5227 and optinfo_emit_json_cc_tests.
5228 * selftest.h (selftest::json_cc_tests): New decl.
5229 (selftest::optinfo_emit_json_cc_tests): New decl.
5230 * toplev.c: Include "optinfo-emit-json.h".
5231 (compile_file): Call optimization_records_finish.
5232 (do_compile): Call optimization_records_start.
5233 * tree-ssa-live.c: Include optinfo.h.
5234 (remove_unused_scope_block_p): Retain inlining information if
5235 optinfo_wants_inlining_info_p returns true.
5237 2018-07-20 Richard Biener <rguenther@suse.de>
5240 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5241 to cover -flto-partition=none.
5243 2018-07-20 Martin Liska <mliska@suse.cz>
5245 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5246 (get_decl_source_range): Remove unused function.
5248 2018-07-20 Richard Biener <rguenther@suse.de>
5250 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5251 (struct vn_phi_s): Likewise.
5252 (struct vn_reference_s): Likewise.
5253 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5254 for searching the slot of an entry known to be in the hash itself.
5255 (vn_phi_hasher::equal): Likewise.
5256 (vn_reference_hasher::equal): Likewise.
5257 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5259 (optimistic_info, current_info): Remove, keeping only valid_info.
5260 (vn_reference_lookup_1): Remove fallback lookup.
5261 (vn_reference_lookup_2): Likewise.
5262 (vn_nary_op_lookup_1): Likewise.
5263 (vn_phi_lookup): Likewise.
5264 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5266 (vn_reference_insert): Adjust, chain the inserted hash element
5267 at last_inserted_ref.
5268 (vn_reference_insert_pieces): Likewise.
5269 (visit_reference_op_call): Likewise.
5270 (vn_nary_op_insert_into): Chain the inserted hash element at
5272 (vn_nary_op_insert_pieces): Adjust.
5273 (vn_nary_op_insert): Likewise.
5274 (vn_nary_op_insert_stmt): Likewise.
5275 (vn_phi_insert): Adjust, chain the inserted hash element at
5277 (process_scc): Remove clearing and copying the optimistic
5278 table. Instead remove elements inserted during an optimistic
5279 iteration from the single table we maintain.
5280 (init_scc_vn): Adjust.
5281 (free_scc_vn): Likewise.
5282 (sccvn_dom_walker::record_cond): Likewise.
5283 (sccvn_dom_walker::after_dom_children): Likewise.
5285 2018-07-19 Martin Sebor <msebor@redhat.com>
5287 PR tree-optimization/84047
5288 PR tree-optimization/83776
5289 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5290 (check_array_bounds): Call it.
5292 2018-07-19 Martin Sebor <msebor@redhat.com>
5294 * align.h (align_flags): Use member initialization.
5296 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5298 * Makefile.in (OBJS): Add optinfo.o.
5299 * coretypes.h (class symtab_node): New forward decl.
5300 (struct cgraph_node): New forward decl.
5301 (class varpool_node): New forward decl.
5302 * dump-context.h: New file.
5303 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5305 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5306 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5307 (set_alt_dump_file): Likewise.
5308 (dump_context::~dump_context): New dtor.
5309 (dump_gimple_stmt): Move implementation to...
5310 (dump_context::dump_gimple_stmt): ...this new member function.
5311 Add the stmt to any pending optinfo, creating one if need be.
5312 (dump_gimple_stmt_loc): Move implementation to...
5313 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5314 Start a new optinfo and add the stmt to it.
5315 (dump_gimple_expr): Move implementation to...
5316 (dump_context::dump_gimple_expr): ...this new member function.
5317 Add the stmt to any pending optinfo, creating one if need be.
5318 (dump_gimple_expr_loc): Move implementation to...
5319 (dump_context::dump_gimple_expr_loc): ...this new member function.
5320 Start a new optinfo and add the stmt to it.
5321 (dump_generic_expr): Move implementation to...
5322 (dump_context::dump_generic_expr): ...this new member function.
5323 Add the tree to any pending optinfo, creating one if need be.
5324 (dump_generic_expr_loc): Move implementation to...
5325 (dump_context::dump_generic_expr_loc): ...this new member
5326 function. Add the tree to any pending optinfo, creating one if
5328 (dump_printf): Move implementation to...
5329 (dump_context::dump_printf_va): ...this new member function. Add
5330 the text to any pending optinfo, creating one if need be.
5331 (dump_printf_loc): Move implementation to...
5332 (dump_context::dump_printf_loc_va): ...this new member function.
5333 Start a new optinfo and add the stmt to it.
5334 (dump_dec): Move implementation to...
5335 (dump_context::dump_dec): ...this new member function. Add the
5336 value to any pending optinfo, creating one if need be.
5337 (dump_context::dump_symtab_node): New member function.
5338 (dump_context::get_scope_depth): New member function.
5339 (dump_context::begin_scope): New member function.
5340 (dump_context::end_scope): New member function.
5341 (dump_context::ensure_pending_optinfo): New member function.
5342 (dump_context::begin_next_optinfo): New member function.
5343 (dump_context::end_any_optinfo): New member function.
5344 (dump_context::s_current): New global.
5345 (dump_context::s_default): New global.
5346 (dump_scope_depth): Delete global.
5347 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5348 (dump_symtab_node): New function.
5349 (get_dump_scope_depth): Reimplement in terms of dump_context.
5350 (dump_begin_scope): Likewise.
5351 (dump_end_scope): Likewise.
5352 (selftest::temp_dump_context::temp_dump_context): New ctor.
5353 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5354 (selftest::verify_item): New function.
5355 (ASSERT_IS_TEXT): New macro.
5356 (ASSERT_IS_TREE): New macro.
5357 (ASSERT_IS_GIMPLE): New macro.
5358 (selftest::test_capture_of_dump_calls): New test.
5359 (selftest::dumpfile_c_tests): Call it.
5360 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5361 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5362 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5363 descriptive comment.
5364 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5365 (dump_node, dump_bb): Move these unrelated decls.
5366 (class dump_manager): Add leading comment.
5367 * optinfo.cc: New file.
5368 * optinfo.h: New file.
5370 2018-07-19 Michael Collison <michael.collison@arm.com>
5371 Richard Henderson <rth@redhat.com>
5373 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5374 (subti): Handle op1 zero.
5375 (subvti4, usub4ti4): New.
5376 (*sub<GPI>3_compare1_imm): New.
5377 (sub<GPI>3_carryinCV): New.
5378 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5379 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5381 2018-07-19 Michael Collison <michael.collison@arm.com>
5382 Richard Henderson <rth@redhat.com>
5384 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5385 (addti3): Create simpler code if low part is already known to be 0.
5386 (addvti4, uaddvti4): New.
5387 (*add<GPI>3_compareC_cconly_imm): New.
5388 (*add<GPI>3_compareC_cconly): New.
5389 (*add<GPI>3_compareC_imm): New.
5390 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5391 handle constants within this pattern..
5392 (*add<GPI>3_compareV_cconly_imm): New.
5393 (*add<GPI>3_compareV_cconly): New.
5394 (*add<GPI>3_compareV_imm): New.
5395 (add<GPI>3_compareV): New.
5396 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5397 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5398 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5399 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5400 with 'comparison' operator.
5401 (*add<GPI>3_compareV_cconly_imm): Ditto.
5402 (*add<GPI>3_compareV_cconly): Ditto.
5403 (*add<GPI>3_compareV_imm): Ditto.
5404 (add<GPI>3_compareV): Ditto.
5405 (add<mode>3_carryinC): Ditto.
5406 (*add<mode>3_carryinC_zero): Ditto.
5407 (*add<mode>3_carryinC): Ditto.
5408 (add<mode>3_carryinV): Ditto.
5409 (*add<mode>3_carryinV_zero): Ditto.
5410 (*add<mode>3_carryinV): Ditto.
5412 2018-07-19 Michael Collison <michael.collison@arm.com>
5413 Richard Henderson <rth@redhat.com>
5415 * config/aarch64/aarch64-modes.def (CC_V): New.
5416 * config/aarch64/aarch64-protos.h
5417 (aarch64_addti_scratch_regs): Declare
5418 (aarch64_subvti_scratch_regs): Declare.
5419 (aarch64_expand_subvti): Declare.
5420 (aarch64_gen_unlikely_cbranch): Declare
5421 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5422 for signed overflow using CC_Vmode.
5423 (aarch64_get_condition_code_1): Handle CC_Vmode.
5424 (aarch64_gen_unlikely_cbranch): New function.
5425 (aarch64_addti_scratch_regs): New function.
5426 (aarch64_subvti_scratch_regs): New function.
5427 (aarch64_expand_subvti): New function.
5429 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5431 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5433 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5434 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5437 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5440 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5441 address check not strict.
5443 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5445 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5447 (store_pair_lanes<mode>): Likewise.
5448 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5449 enum value 'ADDR_QUERY_LDP_STP_N'.
5450 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5451 (aarch64_print_address_internal): Add declaration.
5452 (aarch64_print_ldpstp_address): Remove.
5453 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5454 (aarch64_print_operand): Change printing of 'y'.
5455 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5456 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5457 'true' rather than '1'.
5458 * config/aarch64/constraints.md (Uml): Likewise.
5459 (Uml): Rename to Umn.
5462 2018-07-19 Richard Biener <rguenther@suse.de>
5464 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5466 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5467 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5468 (vn_reference_hasher): Likewise.
5469 (struct vn_tables_s): Remove obstack and alloc-pool members.
5470 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5471 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5472 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5473 (vn_reference_insert_pieces): Likewise.
5474 (alloc_vn_nary_op_noinit): Adjust.
5475 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5476 (vn_phi_eq): Adjust.
5477 (shared_lookup_phiargs): Remove.
5478 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5479 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5480 (visit_reference_op_call): Likewise.
5481 (copy_nary, copy_phi, copy_reference): Remove.
5482 (process_scc): Rewind the obstack when iterating. Do not
5483 copy the elements to valid_info but just move them from one
5484 hashtable to the other.
5485 (allocate_vn_table): Adjust.
5486 (free_vn_table): Likewise.
5487 (init_scc_vn): Likewise.
5488 (free_scc_vn): Likewise.
5490 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5493 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5494 indirect_return as function type attribute.
5495 (ix86_attribute_table): Change indirect_return to function
5497 * doc/extend.texi: Update indirect_return attribute.
5499 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5501 * wide-int.h (widest2_int): New.
5502 * gimple-fold.c (arith_overflowed_p): Use it.
5503 * tree.h (widest2_int_cst): New.
5504 * tree-vrp.c (wide_int_binop_overflow): Rename from
5505 vrp_int_const_binop.
5506 Rewrite to work on trees.
5507 (extract_range_from_multiplicative_op_1): Abstract code to...
5508 (wide_int_range_min_max): ...here.
5509 (wide_int_range_cross_product): ...and here.
5510 (extract_range_from_binary_expr_1): Abstract overflow code to...
5511 (wide_int_range_mult_wrapping): ...here.
5512 * tree-vrp.h (wide_int_range_cross_product): New.
5513 (wide_int_range_mult_wrapping): New.
5515 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5516 Julia Koval <julia.koval@intel.com>
5518 * config/i386/x86-tune-costs.h (skylake_memcpy,
5519 skylake_memset): Replace rep_prefix with unrolling for size 512.
5521 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5524 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5525 comparision with EQ_EXPR in last stmt.
5527 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5529 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5530 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5531 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5532 previously known as "PowerPC AltiVec Built-in Functions". Move
5533 some material to new subsubsections "PowerPC AltiVec Built-in
5534 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5536 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5537 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5538 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5539 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5541 2018-07-18 Richard Biener <rguenther@suse.de>
5543 PR tree-optimization/86557
5544 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5547 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5549 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5551 2018-07-17 Jeff Law <law@redhat.com>
5553 * config/arm/arm.c (get_label_padding): Update for recent
5554 changes to label_to_alignment.
5556 PR tree-optimization/86010
5557 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5559 * config/mips/mips.c (vr4130_align_insns): Update for recent
5560 changes to label_to_alignment.
5562 * config/frv/frv.c (frv_label_align): Update for recent changes
5563 to label_to_alignment.
5565 * config/nios2/nios2.c (nios2_label_align): Update for recent
5566 changes which dropped ALIGN_LABELS_LOG.
5568 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5570 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5571 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5573 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5575 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5576 deprecated align_labels_log.
5578 2018-07-17 Richard Biener <rguenther@suse.de>
5581 * dwarf2out.c (init_sections_and_labels): Always generate
5582 a debug_line_str_section for early LTO debug.
5583 (dwarf2out_finish): Reset debug_line_str_hash output early.
5584 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5586 (dwarf2out_early_finish): Output debug_line_str.
5588 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5590 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5591 index register on z196 or later.
5593 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5595 * config/s390/s390.c (s390_default_align): Set default function
5597 (s390_override_options_after_change): Call s390_default align.
5598 (s390_option_override_internal): Call s390_default_align.
5599 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5601 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5604 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5605 to _looptemp_ clauses, other than the first two.
5607 2018-07-17 Martin Liska <mliska@suse.cz>
5609 * opts.c: Do not enable OPT_falign_* for -Os.
5611 2018-07-17 Martin Liska <mliska@suse.cz>
5613 * align.h (MAX_CODE_ALIGN): New.
5614 (MAX_CODE_ALIGN_VALUE): New.
5615 * common/config/i386/i386-common.c (ix86_handle_option):
5616 (MAX_CODE_ALIGN): Moved to align.h.
5617 * final.c (MAX_CODE_ALIGN): Likewise.
5618 * opts.c (parse_and_check_align_values):
5619 (MAX_CODE_ALIGN): Likewise.
5620 (MAX_CODE_ALIGN_VALUE): Likewise.
5622 2018-07-17 Martin Liska <mliska@suse.cz>
5624 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5625 in order to fulfil coding style.
5626 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5627 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5628 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5629 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5630 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5631 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5632 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5633 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5634 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5636 2018-07-17 Martin Liska <mliska@suse.cz>
5638 * align.h: New file.
5639 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5641 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5642 align_flags of label_to_alignment.
5643 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5645 * config/m68k/m68k.c: Do not use removed align_labels_value and
5647 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5648 (LOOP_ALIGN): Likewise.
5649 (LABEL_ALIGN): Likewise.
5650 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5651 Remove not used macro.
5652 (rs6000_loop_align): Change return type to align_flags.
5653 (rs6000_loop_align_max_skip): Remove.
5654 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5655 Change return type to align_flags.
5656 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5657 Remove not used macro.
5658 (rs6000_loop_align): Change return type to align_flags.
5659 (rs6000_loop_align_max_skip): Remove.
5660 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5661 * config/rx/rx-protos.h (rx_align_for_label): Make it
5663 * config/rx/rx.c (rx_align_for_label): Change return type
5665 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5667 into align_flags class.
5668 (LABEL_ALIGN): Likewise.
5669 (LOOP_ALIGN): Likewise.
5670 * config/s390/s390.c (s390_label_align): Use align_flags
5672 (s390_asm_output_function_label): Likewise.
5673 * config/sh/sh.c (sh_override_options_after_change):
5674 Use align_flags class directly without macros.
5675 (find_barrier): Likewise.
5676 (barrier_align): Likewise.
5677 (sh_loop_align): Likewise.
5678 * config/spu/spu.c (spu_option_override):
5679 Use align_flags_tuple::get_value instead of removed macros.
5680 (spu_sched_init): Likewise.
5681 * config/spu/spu.h (GTY): Likewise.
5682 * config/visium/visium.c (visium_option_override):
5683 Set "8" as default secondary alignment.
5684 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5685 in order to guarantee secondary alignment of 8.
5686 * coretypes.h: Include align.h header file.
5687 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5688 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5689 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5690 * doc/tm.texi.in: Likewise.
5691 * final.c (struct label_alignment): Remove not used structure.
5692 (LABEL_ALIGN): Change type to align_flags.
5693 (LOOP_ALIGN): Likewise.
5694 (JUMP_ALIGN): Likewise.
5695 (default_loop_align_max_skip): Remove.
5696 (default_label_align_max_skip): Likewise.
5697 (default_jump_align_max_skip): Likewise.
5698 (default_label_align_after_barrier_max_skip):
5699 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5700 (LABEL_TO_MAX_SKIP): Remove.
5701 (label_to_alignment): Return align_flags type instead of integer.
5702 (label_to_max_skip): Remove.
5703 (align_fuzz): Use align_flags type.
5704 (compute_alignments): Use align_flags type and use align_flags::max
5705 to combine multiple alignments.
5706 (grow_label_align): Grow vec instead of C array.
5707 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5708 (shorten_branches): Use align_flags type and use align_flags::max
5709 to combine multiple alignments.
5710 (final_scan_insn_1): Remove usage of secondary alignment that comes
5711 from label alignment, but instead use proper secondary alignment
5712 which is computed in grow_label_align.
5713 * flags.h (struct align_flags_tuple): Move to align.h.
5714 (struct align_flags): Likewise.
5715 (state_align_loops): Rename to align_loops.
5716 (state_align_jumps): Rename to align_jumps.
5717 (state_align_labels): Rename to align_labels.
5718 (state_align_functions): Rename to align_functions.
5719 (align_loops_log): Remove.
5720 (align_jumps_log): Remove.
5721 (align_labels_log): Remove.
5722 (align_functions_log): Remove.
5723 (align_loops_max_skip): Remove.
5724 (align_jumps_max_skip): Remove.
5725 (align_labels_max_skip): Remove.
5726 (align_functions_max_skip): Remove.
5727 (align_loops_value): Remove.
5728 (align_jumps_value): Remove.
5729 (align_labels_value): Remove.
5730 (align_functions_value): Remove.
5731 * output.h (label_to_alignment): Change return type to align_flags.
5732 (label_to_max_skip): Remove.
5733 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5734 jump_align_max_skip macros.
5735 * targhooks.h (default_loop_align_max_skip): Remove.
5736 (default_label_align_max_skip): Likewise.
5737 (default_jump_align_max_skip): Likewise.
5738 (default_label_align_after_barrier_max_skip): Remove.
5739 * toplev.c (read_log_maxskip): Use ::normalize function.
5740 (parse_N_M): Remove not used argument and also call ::normalize.
5741 (parse_alignment_opts): Do not pass unused arguments.
5742 * varasm.c (assemble_start_function): Use directly align_functions
5743 instead of removed macros.
5744 * system.h: Do not poison removed macros.
5746 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5749 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5750 and cond temporaries don't have reference type if iterator has
5751 pointer type. For init use &for_pre_body instead of pre_p if
5752 for_pre_body is non-empty.
5754 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5756 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5757 double-double modes to SFmode directly directly.
5758 (trunc<mode>sf2_fprs): Delete.
5760 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5762 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5763 for conversions between IFmode and the decimal floating point modes.
5764 (init_float128_ieee): Use the correct names for conversions between
5765 KFmode and the decimal floating point modes.
5767 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5769 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5770 for the conversions between TDmode and IFmode.
5771 (init_float128_ieee): Use more correct names for the conversions
5772 between TDmode and KFmode.
5774 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5776 PR tree-optimization/86526
5777 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5778 (inline_expand_builtin_string_cmp): Likewise.
5779 (inline_string_cmp): Likewise. Use c_readstr instead of
5780 builtin_memcpy_read_str. Add unit_mode temporary.
5782 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5785 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5786 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5788 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5790 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5791 Alphabetize prototypes of built-in functions, separating out
5792 built-in functions that are listed in this section but should be
5793 described elsewhere.
5795 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5798 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5799 conditional move when trapping comparison was split to a
5800 non-trapping one (and vice versa).
5802 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5804 * config/s390/s390.c (s390_function_profiler): Generate nops
5805 instead of profiler call sequences.
5806 * config/s390/s390.opt: Add the new option.
5808 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5810 * config/s390/s390.c (s390_function_profiler): Generate
5811 __mcount_loc section.
5812 * config/s390/s390.opt: Add the new option.
5814 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5816 * common.opt: Add the new warning.
5817 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5818 %r0,__fentry__" when -mfentry is specified.
5819 (s390_option_override_internal): Disallow -mfentry for 31-bit
5821 * config/s390/s390.opt: Add the new option.
5823 2018-07-16 Richard Biener <rguenther@suse.de>
5826 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5827 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5829 2018-07-16 Martin Liska <mliska@suse.cz>
5832 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5835 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5837 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5839 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5841 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5843 * config/arc/arc-cpus.def (hs4x): New cpu.
5845 * config/arc/arc-tables.opt: Regenerate.
5846 * config/arc/arc.c (arc_sched_issue_rate): New function.
5847 (TARGET_SCHED_ISSUE_RATE): Define.
5848 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5849 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5851 (attr tune): Add ARCHS4x tune values.
5852 (attr tune_dspmpy): Define.
5853 (*tst): Correct instruction type.
5854 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5855 * config/arc/arcHS4x.md: New file.
5856 * config/arc/fpu.md: Update instruction type attributes.
5857 * config/arc/t-multilib: Regenerate.
5859 2018-07-16 Tom de Vries <tdevries@suse.de>
5862 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5864 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5866 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5869 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5871 PR tree-optimization/86514
5872 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5873 conversion to a boolean type from a type with greater precision.
5875 2018-07-16 Tom de Vries <tdevries@suse.de>
5877 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5878 dump_flags request TDF_SLIM.
5880 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5882 * fold-const.c (int_const_binop_1): Abstract...
5883 (wide_int_binop): ...wide int code here.
5884 (poly_int_binop): ...poly int code here.
5885 Abstract the rest of int_const_binop_1 into int_const_binop.
5886 * fold-const.h (wide_int_binop): New.
5887 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5888 Remove useless PLUS/MINUS_EXPR case.
5889 (zero_nonzero_bits_from_vr): Move wide int code...
5890 (zero_nonzero_bits_from_bounds): ...here.
5891 (extract_range_from_binary_expr_1): Move mask optimization code...
5892 (range_easy_mask_min_max): ...here.
5893 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5894 (range_easy_mask_min_max): New.
5896 2018-07-15 Jeff Law <law@redhat.com>
5899 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5902 2018-07-14 Jim Wilson <jimw@sifive.com>
5904 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5906 2018-07-14 Paul Koning <ni1d@arrl.net>
5908 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5910 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5912 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5915 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5916 Steve Munroe <munroesj52@gmail.com>
5918 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5919 (_mm_andnot_si128): Likewise.
5920 (_mm_or_si128): Likewise.
5921 (_mm_xor_si128): Likewise.
5923 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5926 * builtins.c (expand_builtin_memcmp): Inline the calls first
5927 when result_eq is false.
5928 (expand_builtin_strcmp): Inline the calls first.
5929 (expand_builtin_strncmp): Likewise.
5930 (inline_string_cmp): New routine. Expand a string compare
5931 call by using a sequence of char comparison.
5932 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5933 a call to str(n)cmp/memcmp.
5934 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5936 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5938 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5940 * config/arm/driver-arm.c: Include arm-native.h.
5941 (host_detect_local_cpu): Use auto-generated data tables.
5942 (vendors, arm_cpu_table): Delete. Move part information to ...
5943 * config/arm/arm-cpus.in: ... here.
5944 * config/arm/parsecpu.awk (gen_native): New function.
5945 (vendor, part): New CPU fields.
5946 (END): Add support for building the native CPU detection tables.
5947 * config/arm/t-arm (arm-native.h): Add build rule.
5948 (driver-arm.o): Add dependency on arm-native.h.
5950 2018-07-13 Richard Biener <rguenther@suse.de>
5953 * match.pd (addr1 - addr2): Allow either of the operand to
5956 2018-07-13 Tom de Vries <tdevries@suse.de>
5958 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5961 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5963 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5964 arrays instead of numbered variables.
5966 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5968 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5969 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5971 2018-07-13 Richard Biener <rguenther@suse.de>
5974 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5975 instead of get_context_die.
5977 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5978 Richard Biener <rguenther@suse.de>
5981 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5982 that the loop latch destination where phi is defined.
5984 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5986 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5987 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5988 (riscv_set_current_function): Extract getting interrupt type to new
5990 (riscv_get_interrupt_type): New function.
5991 (riscv_merge_decl_attributes): New function, checking interrupt type is
5993 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5995 2018-07-12 Paul Koning <ni1d@arrl.net>
5997 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6000 2018-07-12 Paul Koning <ni1d@arrl.net>
6002 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6003 zero reference, add doloop_end instead.
6004 * doc/md.texi (decrement_and_branch_until_zero): Remove.
6005 (Looping patterns): Remove decrement_and_branch_until_zero. Add
6006 detail for doloop_end.
6008 2018-07-12 Martin Sebor <msebor@redhat.com>
6011 * attribs.c (decl_attributes): Reject conflicting attributes before
6012 calling attribute handlers.
6014 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6016 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6018 (gcc::dump_manager::get_dump_file_name): likewise.
6019 (dump_begin): Likewise.
6020 * dumpfile.h (dump_begin): Update prototype.
6021 (gcc::dump_manager::get_dump_file_name,
6022 gcc::dump_manager::get_dump_file_name): Update prototype.
6024 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6026 * internal-fn.h (vectorizable_internal_fn_p): New function.
6027 * tree-vect-slp.c (compatible_calls_p): Likewise.
6028 (vect_build_slp_tree_1): Remove nops argument. Handle calls
6029 to internal functions.
6030 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6032 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6034 * fold-const.h (inverse_conditions_p): Declare.
6035 * fold-const.c (inverse_conditions_p): New function.
6036 * match.pd: Use inverse_conditions_p. Add folds of view_converts
6037 that test the inverse condition of a conditional internal function.
6038 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6039 * internal-fn.c (internal_fn_mask_index): Handle conditional
6041 (vectorized_internal_fn_supported_p): New function.
6042 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6043 (any_pred_load_store): Replace with...
6044 (need_to_predicate): ...this new variable.
6045 (redundant_ssa_names): New variable.
6046 (ifcvt_can_use_mask_load_store): Move initial checks to...
6047 (ifcvt_can_predicate): ...this new function. Handle tree codes
6048 for which a conditional internal function exists.
6049 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6050 instead of ifcvt_can_use_mask_load_store. Update after variable
6052 (predicate_load_or_store): New function, split out from
6053 predicate_mem_writes.
6054 (check_redundant_cond_expr): New function.
6055 (value_available_p): Likewise.
6056 (predicate_rhs_code): Likewise.
6057 (predicate_mem_writes): Rename to...
6058 (predicate_statements): ...this. Use predicate_load_or_store
6059 and predicate_rhs_code.
6060 (combine_blocks, tree_if_conversion): Update after above name changes.
6061 (ifcvt_local_dce): Handle redundant_ssa_names.
6062 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6063 general conditional functions.
6064 * tree-vect-stmts.c (vectorizable_call): Likewise.
6066 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6067 Alan Hayward <alan.hayward@arm.com>
6068 David Sherwood <david.sherwood@arm.com>
6070 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6071 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6072 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6073 plus and minus and convert them into IFN_COND_FMA-based sequences.
6074 (convert_mult_to_fma): Handle conditional plus and minus.
6076 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6078 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6079 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6080 (cond_fnms_optab): New optabs.
6081 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6083 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6084 * internal-fn.h (get_conditional_internal_fn): Declare.
6085 (get_unconditional_internal_fn): Likewise.
6086 * internal-fn.c (cond_ternary_direct): New macro.
6087 (expand_cond_ternary_optab_fn): Likewise.
6088 (direct_cond_ternary_optab_supported_p): Likewise.
6089 (FOR_EACH_COND_FN_PAIR): Likewise.
6090 (get_conditional_internal_fn): New function.
6091 (get_unconditional_internal_fn): Likewise.
6092 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6093 (gimple_match_op::gimple_match_op): Add a new overload for 5
6095 (gimple_match_op::set_op): Likewise.
6096 (gimple_resimplify5): Declare.
6097 * genmatch.c (decision_tree::gen): Generate simplifications for
6099 * gimple-match-head.c (gimple_simplify): Define an overload for
6100 5 operands. Handle calls with 5 arguments in the top-level overload.
6101 (convert_conditional_op): Handle conversions from unconditional
6102 internal functions to conditional ones.
6103 (gimple_resimplify5): New function.
6104 (build_call_internal): Pass a fifth operand.
6105 (maybe_push_res_to_seq): Likewise.
6106 (try_conditional_simplification): Try converting conditional
6107 internal functions to unconditional internal functions.
6108 Handle 3-operand unconditional forms.
6109 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6110 Define ternary equivalents of the current rules for binary conditional
6112 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6114 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6115 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6116 (optab): Handle them.
6117 (SVE_COND_FP_TERNARY): New int iterator.
6118 (sve_fmla_op, sve_fmad_op): New int attributes.
6119 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6120 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6121 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6123 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6125 * target.def (preferred_else_value): New target hook.
6126 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6127 * doc/tm.texi: Regenerate.
6128 * targhooks.h (default_preferred_else_value): Declare.
6129 * targhooks.c (default_preferred_else_value): New function.
6130 * internal-fn.h (conditional_internal_fn_code): Declare.
6131 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6132 (get_conditional_internal_fn): Use it.
6133 (conditional_internal_fn_code): New function.
6134 * gimple-match.h (gimple_match_cond): New struct.
6135 (gimple_match_op): Add a cond member function.
6136 (gimple_match_op::gimple_match_op): Update all forms to take a
6138 * genmatch.c (expr::gen_transform): Use the same condition as res_op
6139 for the suboperation, but don't specify a particular else_value.
6140 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6141 (visit_nary_op, visit_reference_op_load): Pass
6142 gimple_match_cond::UNCOND to the gimple_match_op constructor.
6143 * gimple-match-head.c: Include tree-eh.h
6144 (convert_conditional_op): New function.
6145 (maybe_resimplify_conditional_op): Likewise.
6146 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6147 (gimple_resimplify2): Likewise.
6148 (gimple_resimplify3): Likewise.
6149 (gimple_resimplify4): Likewise.
6150 (maybe_push_res_to_seq): Return null for conditional operations.
6151 (try_conditional_simplification): New function.
6152 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
6154 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6156 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6158 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6160 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6162 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6164 (hash_tree): Do not hash DECL_FCONTEXT
6165 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6166 Do not stream DECL_FCONTEXT.
6167 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6168 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6170 2018-07-12 Richard Biener <rguenther@suse.de>
6173 * dwarf2out.c (gen_block_die): Only output blocks when they have
6174 at least one !DECL_IGNORED_P variable.
6176 2018-07-12 Richard Biener <rguenther@suse.de>
6179 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6180 Remove -mieee-fp handling.
6182 2018-07-12 Richard Biener <rguenther@suse.de>
6184 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6185 left-over from last patch.
6187 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6189 PR tree-optimization/86492
6190 * gimple-ssa-store-merging.c
6191 (imm_store_chain_info::coalesce_immediate_stores): Call
6192 check_no_overlap even for the merge_overlapping case. Formatting fix.
6194 2018-07-12 Richard Biener <rguenther@suse.de>
6197 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6198 move possibly trapping operations into the conditional.
6200 2018-07-12 Richard Biener <rguenther@suse.de>
6202 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6203 (vn_lookup_simplify_result): Remove recursion limit applied
6205 (vn_nary_build_or_lookup_1): Adjust.
6206 (try_to_simplify): Likewise.
6207 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6209 (gimple_resimplify2): Likewise.
6210 (gimple_resimplify3): Likewise.
6211 (gimple_resimplify4): Likewise.
6213 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6215 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6216 Use __mmask64 type instead of __mmask8 for __M argument.
6217 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6218 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6220 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6221 __mmask16 for __M argument.
6222 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6223 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6224 to __mmask16 instead of __mmask8.
6225 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6226 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6227 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6228 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6229 instead of __mmask16 for __U argument.
6230 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6231 __mmask16 instead of __mmask8 for __U argument.
6232 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6234 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6236 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6238 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6240 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6242 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6244 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6246 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6248 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6250 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6252 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6253 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6254 return type as well as __M argument type and all casts from __mmask8
6256 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6257 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6258 return type as well as __M argument type and all casts from __mmask8
6260 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6261 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6262 return type as well as __M argument type and all casts from __mmask8
6264 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6265 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6266 return type as well as __M argument type and all casts from __mmask8
6268 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6269 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6272 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6274 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6275 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6278 2018-07-11 Paul Koning <ni1d@arrl.net>
6280 * doc/md.texi (define_subst): Document how multiple occurrences of
6281 the same argument in the replacement pattern are handled.
6283 2018-07-11 Paul Koning <ni1d@arrl.net>
6285 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6287 (Common Type Attributes): Add "mode" attribute.
6289 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6291 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6292 stream DECL_ORIGINAL_TYPE.
6293 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6294 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6295 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6296 Do not walk original type.
6297 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6299 (write_ts_decl_non_common_tree_pointers): Do not stream
6301 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6302 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6304 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6306 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6307 thread twice from the same starting edge.
6309 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6311 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6312 * gimple.c (gimple_call_nonnull_result_p): ...here...
6313 (gimple_call_nonnull_arg): ...and here.
6314 * gimple.h (gimple_call_nonnull_result_p): New.
6315 (gimple_call_nonnull_arg): New.
6317 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6319 * config/arm/arm-cpus.in: Move information from fpu field of each
6320 cpu definition to the isa field.
6321 * config/arm/parsecpu.awk (fpu): Delete match rule.
6322 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6324 2018-07-11 Richard Biener <rguenther@suse.de>
6327 * dwarf2out.c (init_sections_and_labels): Use
6328 output_asm_line_debug_info consistently.
6329 (dwarf2out_early_finish): Likewise.
6330 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6333 2018-07-11 Richard Biener <rguenther@suse.de>
6335 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6336 Rework father_bb setting in a way to avoid propagating constants
6337 multiple times on a loop body.
6339 2018-07-10 Mark Wielaard <mark@klomp.org>
6342 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6344 2018-07-10 Richard Biener <rguenther@suse.de>
6346 * hash-map.h (hash_map::iterator::operator*): Return
6347 references to key and value.
6349 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6352 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6353 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6354 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6355 (gimplify_omp_for): For composite loops, move outer
6356 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6357 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6358 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6359 TREE_LIST for both the original class iterator and the "last" helper
6360 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6361 loop, remember has_decl_expr from outer composite loops for the
6362 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6364 2018-07-09 Martin Sebor <msebor@redhat.com>
6368 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6369 accessing implicitly initialized array elements.
6370 * expr.c (string_constant): Handle string initializers of
6371 character arrays within aggregates.
6372 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6373 Store element offset. As a special case, handle zero size.
6374 (fold_nonarray_ctor_reference): Same.
6375 (fold_ctor_reference): Add argument. Store subobject offset.
6376 * gimple-fold.h (fold_ctor_reference): Add argument.
6378 2018-07-09 Paul Koning <ni1d@arrl.net>
6380 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6381 (pdp11_insn_cost): New function.
6382 (pdp11_md_asm_adjust): New function.
6383 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6384 (pdp11_rtx_costs): Update to match machine better.
6385 (output_addr_const_pdp11): Correct format mismatch warnings.
6386 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6387 * config/pdp11/pdp11.md: General change to add base_cost and/or
6388 length attributes for use by new pdp11_insn_cost function.
6389 (MIN_BRANCH): Correct definition.
6391 (doloop_end): Use standard pattern name for looping pattern.
6392 (doloop_end_nocc): New.
6393 (movsf): Add another constraint alternative.
6394 (zero_extendqihi2): Add constraint alternatives for not in place
6396 (zero_extendhisi2): Remove.
6397 (shift patterns): Add CC handling variants.
6401 (define_peephole2): New peephole to recognize mov that sets CC for
6404 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6406 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6407 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6410 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6413 * real.c (real_nextafter): Return true if result is denormal.
6415 2018-07-09 Martin Liska <mliska@suse.cz>
6417 * common.opt: Add back wrongly removed attribute.
6419 2018-07-09 Richard Biener <rguenther@suse.de>
6422 * dwarf2out.c (gen_block_die): For an early generated DIE
6423 always output high/low PC attributes.
6425 2018-07-09 Tom de Vries <tdevries@suse.de>
6427 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6428 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6429 onto VAR_DECL with abstract origin.
6431 2018-07-07 Jim Wilson <jimw@sifive.com>
6433 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6435 2018-07-07 Tom de Vries <tdevries@suse.de>
6437 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6439 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6441 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6443 (combine_bound): Use wide-int overflow calculation instead of
6445 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6447 * fold-const.c (int_const_binop_2): Same.
6448 (extract_muldiv_1): Same.
6449 (fold_div_compare): Same.
6450 (fold_abs_const): Same.
6452 * poly-int.h (add): Same.
6456 * predict.c (predict_iv_comparison): Same.
6457 * profile-count.c (slow_safe_scale_64bit): Same.
6458 * simplify-rtx.c (simplify_const_binary_operation): Same.
6459 * tree-chrec.c (tree_fold_binomial): Same.
6460 * tree-data-ref.c (split_constant_offset_1): Same.
6461 * tree-if-conv.c (idx_within_array_bound): Same.
6462 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6463 * tree-ssa-phiopt.c (minmax_replacement): Same.
6464 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6465 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6466 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6467 * wide-int.cc (wi::add_large): Same.
6468 (wi::mul_internal): Same.
6469 (wi::sub_large): Same.
6470 (wi::divmod_internal): Same.
6471 * wide-int.h: Change overflow type to overflow_type for neg, add,
6472 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6473 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6474 mul_internal, divmod_internal.
6475 (overflow_type): New enum.
6476 (accumulate_overflow): New.
6478 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6480 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6481 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6483 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6485 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6486 argument is checked for zero before entering loop, avoid checking again.
6488 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6490 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6491 * gimplify.h (generic_expr_could_trap_p): Likwise.
6492 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6494 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6496 PR tree-optimization/86401
6497 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6498 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6499 (fold_bit_and_mask): ... here. New helper function for match.pd.
6500 * fold-const.h (fold_bit_and_mask): Declare.
6501 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6503 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6506 * target.def (translate_mode_attribute): New hook.
6507 * targhooks.h (default_translate_mode_attribute): Declare.
6508 * targhooks.c (default_translate_mode_attribute): New function.
6509 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6510 * doc/tm.texi: Regenerate.
6511 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6512 (rs6000_translate_mode_attribute): New function.
6514 2018-07-06 Paul Koning <ni1d@arrl.net>
6516 * doc/md.texi (define_split): Document DONE and FAIL.
6517 (define_peephole2): Ditto.
6519 2018-07-05 Jeff Law <law@redhat.com>
6521 PR tree-optimization/86010
6522 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6523 both the head and tail of mem* and str* calls.
6525 2018-07-05 Jim Wilson <jimw@sifive.com>
6527 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6529 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6531 * config/aarch64/aarch64-simd.md: correct flags text for
6532 MIN_EXPR replacement.
6534 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6536 * configure: Regenerated.
6538 2018-07-05 Carl Love <cel@us.ibm.com>
6540 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6541 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6542 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6543 VSX_BUILTIN_DOUBLEL_V4SF.
6545 2018-07-05 Martin Sebor <msebor@redhat.com>
6548 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6549 than its domain to compute its the upper bound of a char array.
6551 2018-07-05 Nathan Sidwell <nathan@acm.org>
6553 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6554 * doc/cpp.texi: Update comment.
6555 * doc/tm.texi: Rebuilt.
6556 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6557 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6558 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6559 headers affected by extern "C".
6560 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6561 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6562 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6563 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6564 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6565 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6566 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6567 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6568 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6569 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6570 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6571 config/sparc/sp64-elf.h, config/spu/spu.h,
6572 config/stormy16/stormy16.h, config/v850/v850.h,
6573 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6574 define NO_IMPLICIT_EXTERN_C.
6575 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6577 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6580 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6581 instead of GET_MODE_SIZE when comparing Units.
6583 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6586 * rtlanal.c (set_noop_p): Constrain on mode change,
6587 include hard-reg-set.h
6589 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6591 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6593 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6596 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6599 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6601 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6603 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6606 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6608 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6610 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6613 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6615 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6617 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6618 neg_*_op* variables.
6620 2018-07-04 Martin Liska <mliska@suse.cz>
6622 * tree-switch-conversion.c: Define
6623 max_ratio_for_speed and max_ratio_for_size constants.
6625 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6626 Martin Liska <mliska@suse.cz>
6631 * common.opt: Rename align options with 'str_' prefix.
6632 * common/config/i386/i386-common.c (set_malign_value): New
6634 (ix86_handle_option): Use it to set -falign-* options/
6635 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6636 type from int to string.
6637 * config/aarch64/aarch64.c: Update default values from int
6639 * config/alpha/alpha.c (alpha_override_options_after_change):
6641 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6642 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6643 max skip conditionally.
6644 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6645 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6646 max skip conditionally.
6647 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6648 max skip conditionally.
6649 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6650 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6651 max skip conditionally.
6652 * config/i386/i386.c (struct ptt): Change type from int to
6654 (ix86_default_align): Set default values.
6655 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6656 max skip conditionally.
6657 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6658 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6659 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6660 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6661 max skip conditionally.
6662 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6663 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6664 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6665 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6666 max skip conditionally.
6667 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6668 * config/ia64/ia64.c (ia64_option_override): Set default values
6669 for alignment options.
6670 * config/m68k/m68k.c: Handle new str_align_* options.
6671 * config/mips/mips.c (mips_set_compression_mode): Change
6673 (mips_option_override): Set default values for options.
6674 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6676 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6678 * config/rx/rx.c (rx_option_override): Likewise.
6679 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6680 (LABEL_ALIGN): Use align_labels_log.
6681 (LOOP_ALIGN): Use align_loops_align.
6682 * config/s390/s390.c (s390_asm_output_function_label): Use new
6684 * config/sh/sh.c (sh_override_options_after_change):
6685 Change type of constants.
6686 * config/spu/spu.c (spu_sched_init): Likewise.
6687 * config/sparc/sparc.c (sparc_option_override): Set default
6689 * config/visium/visium.c (visium_option_override): Likewise.
6690 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6691 emit p2align format with last argument if it's not needed.
6692 * doc/invoke.texi: Document extended format of -falign-*.
6693 * final.c: Use align_labels alignment.
6694 * flags.h (struct target_flag_state): Change type to use
6696 (struct align_flags_tuple): New.
6697 (struct align_flags): Likewise.
6698 (align_loops_log): Redefine macro to use new types.
6699 (align_loops_max_skip): Redefine macro to use new types.
6700 (align_jumps_log): Redefine macro to use new types.
6701 (align_jumps_max_skip): Redefine macro to use new types.
6702 (align_labels_log): Redefine macro to use new types.
6703 (align_labels_max_skip): Redefine macro to use new types.
6704 (align_functions_log): Redefine macro to use new types.
6705 (align_loops): Redefine macro to use new types.
6706 (align_jumps): Redefine macro to use new types.
6707 (align_labels): Redefine macro to use new types.
6708 (align_functions): Redefine macro to use new types.
6709 (align_functions_max_skip): Redefine macro to use new types.
6710 (align_loops_value): New macro.
6711 (align_jumps_value): New macro.
6712 (align_labels_value): New macro.
6713 (align_functions_value): New macro.
6714 * function.c (invoke_set_current_function_hook): Propagate
6715 alignment values from flags to global variables default in
6717 * ipa-icf.c (sem_function::equals_wpa): Use
6718 cl_optimization_option_eq instead of memcmp.
6719 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6721 (cl_optimization_stream_in): Likewise.
6722 * optc-save-gen.awk: Support strings in cl_optimization.
6723 * opth-gen.awk: Likewise.
6724 * opts.c (finish_options): Remove error checking of invalid
6726 (MAX_CODE_ALIGN): Remove.
6727 (MAX_CODE_ALIGN_VALUE): Likewise.
6728 (parse_and_check_align_values): New function.
6729 (check_alignment_argument): Likewise.
6730 (common_handle_option): Use check_alignment_argument.
6731 * opts.h (parse_and_check_align_values): Declare.
6732 * toplev.c (init_alignments): Remove.
6733 (read_log_maxskip): New.
6734 (parse_N_M): Likewise.
6735 (parse_alignment_opts): Likewise.
6736 (backend_init_target): Remove usage of init_alignments.
6737 * toplev.h (parse_alignment_opts): Declare.
6738 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6740 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6741 * tree.c (cl_option_hasher::equal): New.
6742 * varasm.c: Use new global macros.
6744 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6746 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6747 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6748 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6749 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6750 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6751 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6752 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6753 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6754 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6755 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6756 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6757 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6758 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6760 2018-07-04 Martin Liska <mliska@suse.cz>
6761 Jonathan Wakely <jwakely@redhat.com>
6763 * coverage.c: Use correct type.
6764 * doc/invoke.texi: Language correction.
6766 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6769 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6770 ENDBRANCH for non-tail call which may return via indirect branch.
6771 * doc/extend.texi: Document indirect_return attribute.
6773 2018-07-03 Martin Sebor <msebor@redhat.com>
6775 PR tree-optimization/86274
6776 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6778 (format_floating): Correct handling of infinities and NaNs.
6780 2018-07-03 Martin Sebor <msebor@redhat.com>
6782 * print-tree.c (print_real_cst): New function.
6783 (print_node_brief): Call it.
6784 (print_node): Ditto.
6786 2018-07-03 Jeff Law <law@redhat.com>
6788 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6789 into a single pattern.
6791 * config/h8300/h8300.md (ors code_iterator): New.
6792 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6793 a single pattern and single splitter.
6794 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6795 (iorqi3_1, xorqi3_1): Likewise.
6796 (iorqi3, xorqi3 expanders): Similarly.
6798 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6799 (movmd_internal) into a single pattern using the P mode iterator.
6800 (movmd splitters): Similarly.
6801 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6802 (movsd splitters): Similarly.
6804 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6805 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6806 right table based on the size of the operand.
6807 * config/h8300/h8300.md (length_table): Corresponding changes. All
6808 references to "addb", "addw" and "addl" changed to "add".
6809 (btst patterns): Merge two variants into a single pattern.
6810 (tstqi, tsthi): Likewise.
6811 (addhi3_incdec, addsi3_incdec): Likewise.
6812 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6813 (mulhi3, mulsi3): Likewise.
6814 (udivhi3, udivsi3): Likewise.
6815 (divhi3, divsi3): Likewise.
6816 (andorqi3, andorhi3, andorsi3): Likewise.
6818 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6821 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6822 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6824 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6826 PR tree-optimization/85694
6827 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6828 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6830 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6831 (<u>avg<mode>3_ceil): New patterns.
6833 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6835 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6836 scan-tree-dump directive.
6837 * gcc.dg/vect/slp-perm-2.c: Likewise.
6838 * gcc.dg/vect/slp-perm-3.c: Likewise.
6839 * gcc.dg/vect/slp-perm-5.c: Likewise.
6840 * gcc.dg/vect/slp-perm-6.c: Likewise.
6841 * gcc.dg/vect/slp-perm-7.c: Likewise.
6842 * gcc.dg/vect/slp-perm-8.c: Likewise.
6844 2018-07-03 Marek Polacek <polacek@redhat.com>
6847 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6849 2018-07-03 Richard Biener <rguenther@suse.de>
6852 * tree-ssa-structalias.c (find_func_clobbers): Properly
6853 handle indirect calls.
6855 2018-07-03 Jeff Law <law@redhat.com>
6857 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6858 (shifts): New code iterator.
6859 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6860 expander. Fix HImode handling on H8/SX.
6861 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6862 (subqi3, subhi3, subsi3 expanders): Likewise.
6863 (andqi3, andhi3, andsi3 expanders): Likewise.
6864 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6865 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6866 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6867 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6868 (zero_extendqihi2, zero_extendqisi2): Likewise.
6869 (extendqihi2, extendqisi2): Likewise.
6870 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6871 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6872 (rotlqi3_1, rotlhi3_1): Likewise.
6873 (logicalhi3_sn, logicalsi3_sn): Likewise.
6874 (logicalhi3, logicalsi3): Likewise.
6876 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6878 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6879 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6880 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6881 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6882 type to append_pattern_def_seq instead of creating a stmt_vec_info
6884 (build_mask_conversion): Likewise. Remove vinfo argument.
6885 (vect_add_conversion_to_patterm): Likewise, renaming to...
6886 (vect_add_conversion_to_pattern): ...this.
6887 (vect_recog_mask_conversion_pattern): Update call to
6888 build_mask_conversion. Pass the vector type to
6889 append_pattern_def_seq here too.
6890 (vect_recog_gather_scatter_pattern): Update call to
6891 vect_add_conversion_to_pattern.
6893 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6895 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6896 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6897 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6898 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6899 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6900 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6901 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6902 append_pattern_def_seq instead of new_pattern_def_seq.
6903 (vect_recog_divmod_pattern): Do both of the above.
6904 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6907 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6909 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6910 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6911 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6912 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6913 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6914 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6915 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6916 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6917 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6918 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6919 parameter with a single stmt_vec_info.
6920 (vect_recog_func_ptr): Likewise.
6921 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6922 (vect_try_gather_scatter_pattern): ...this.
6923 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6924 the stmt_vec_info of the statement to be matched. Don't clear
6925 STMT_VINFO_RELATED_STMT.
6926 (vect_pattern_recog): Update call accordingly.
6928 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6930 PR tree-optimization/85694
6931 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6932 (uavgM3_ceil): Document new optabs.
6933 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6934 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6936 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6937 (savg_ceil_optab): New optabs.
6938 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6939 (vect_vect_recog_func_ptrs): Add it.
6940 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6941 constant directly from the associated lhs.
6943 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6945 * tree-vect-patterns.c (vect_split_statement): New function.
6946 (vect_convert_input): Use it to try to split an existing cast.
6948 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6950 * poly-int.h (print_hex): New function.
6951 * dumpfile.h (dump_dec, dump_hex): Declare.
6952 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6953 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6954 min_input_precision, operation_precision and operation_sign.
6955 * tree-vect-patterns.c (vect_get_range_info): New function.
6956 (vect_same_loop_or_bb_p, vect_single_imm_use)
6957 (vect_operation_fits_smaller_type): Delete.
6958 (vect_look_through_possible_promotion): Add an optional
6959 single_use_p parameter.
6960 (vect_recog_over_widening_pattern): Rewrite to use new
6961 stmt_vec_info infomration. Handle one operation at a time.
6962 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6963 (vect_truncatable_operation_p, vect_set_operation_type)
6964 (vect_set_min_input_precision): New functions.
6965 (vect_determine_min_output_precision_1): Likewise.
6966 (vect_determine_min_output_precision): Likewise.
6967 (vect_determine_precisions_from_range): Likewise.
6968 (vect_determine_precisions_from_users): Likewise.
6969 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6970 (vect_vect_recog_func_ptrs): Put over_widening first.
6972 (vect_pattern_recog): Call vect_determine_precisions.
6974 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6976 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6977 statements that have been replaced by further pattern statements.
6978 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6980 2018-07-03 Richard Biener <rguenther@suse.de>
6982 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6983 always set *dt. Dump vectype in vectype overload.
6984 * dumpfile.h (dump_gimple_expr): New function.
6985 (dump_gimple_expr_loc): Likewise.
6986 * dumpfile.c (dump_gimple_expr): New function.
6987 (dump_gimple_expr_loc): Likewise.
6989 2018-07-02 Jeff Law <law@redhat.com>
6991 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6992 the H8/300, H8/300H and H8/S variants into a single pattern.
6993 (movhi_h8300, movqi_h8300hs): Similarly.
6994 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6995 (QHI mode iterator): New.
6997 * config/h8300/h8300.md: Remove trailing whitespace.
6999 2018-07-02 Jim Wilson <jimw@sifive.com>
7001 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7002 instead of emit_insn for interrupt returns.
7003 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7004 (riscv_sret, riscv_uret): Likewise.
7006 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7008 * pretty-print.c (selftest::test_pp_format): Move save and restore
7009 of quotes to class auto_fix_quotes, and add an instance.
7010 * selftest.c: Include "intl.h".
7011 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7012 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7013 * selftest.h (selftest::auto_fix_quotes): New class.
7015 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
7017 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7018 (aarch64_sve_prepare_conditional_op): Remove.
7019 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7020 Allow aarch64_simd_reg_or_zero as select operand; remove
7021 the aarch64_sve_prepare_conditional_op call.
7022 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7023 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7024 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7025 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7026 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7027 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7028 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7029 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7030 and a splitters to match all of the *_any patterns.
7031 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7033 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7034 (SVE_COND_FP_BINARY_REV): Remove.
7035 (sve_int_op_rev, sve_fp_op_rev): New.
7036 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7037 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7038 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7039 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7040 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7041 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7042 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7043 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7044 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7046 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7047 Remove match_dup 1 from the inner unspec.
7048 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7050 * config/aarch64/aarch64.md (movprfx): New attr.
7051 (length): Default movprfx to 8.
7052 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7053 (*madd<SVE_I>, *msub<SVE_I): Likewise.
7054 (*<su>mul<SVE_I>3_highpart): Likewise.
7055 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7056 (*v<ASHIFT><SVE_I>3): Likewise.
7057 (*<su><MAXMIN><SVE_I>3): Likewise.
7058 (*<su><MAXMIN><SVE_F>3): Likewise.
7059 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7060 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7061 (*div<SVE_F>4): Likewise.
7063 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
7065 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7068 2018-07-02 Richard Biener <rguenther@suse.de>
7070 PR tree-optimization/86363
7071 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7072 memset argument refers to a non-variable address.
7074 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7076 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7077 {PLUS,MINUS}_EXPR code to...
7078 (adjust_symbolic_bound): ...here,
7079 (combine_bound): ...here,
7080 (set_value_range_with_overflow): ...and here.
7082 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7084 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7086 (extract_range_from_abs_expr): ...here.
7088 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
7090 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7091 -fno-omit-frame-pointer when not optimizing.
7093 2018-07-02 Martin Liska <mliska@suse.cz>
7096 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7097 (propagate_nothrow): Likewise.
7099 2018-07-02 Martin Liska <mliska@suse.cz>
7102 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7104 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7106 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7107 function in r262149, changing "loc" param from source_location to
7108 const dump_location_t &.
7109 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7110 declaration, as above.
7112 2018-07-01 Paul Koning <ni1d@arrl.net>
7114 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7115 -munit-asm, -mgnu-asm, -mdec-asm.
7116 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7117 (pdp11_output_labelref): New.
7118 (pdp11_output_def): New.
7119 (pdp11_output_addr_vec_elt): New.
7120 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
7121 %# and %@ format codes.
7122 (pdp11_option_override): New.
7123 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7124 (pdp11_output_ident): New.
7125 (pdp11_asm_named_section): New.
7126 (pdp11_asm_init_sections): New.
7127 (pdp11_file_start): New.
7128 (pdp11_file_end): New.
7129 (output_ascii): Use .ascii/.asciz for -mdec-asm.
7130 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
7131 %o, like %c but octal.
7132 (pdp11_option_override): New.
7133 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7135 (DATA_SECTION_ASM_OP): Ditto.
7136 (READONLY_DATA_SECTION_ASM_OP): New.
7137 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7138 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7139 (ASM_OUTPUT_LABELREF): Ditto.
7140 (ASM_OUTPUT_DEF): Ditto.
7141 (ASM_OUTPUT_EXTERNAL): New.
7142 (ASM_OUTPUT_SOURCE_FILENAME): New.
7143 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7144 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7145 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
7146 %# and %@ format codes.
7147 * config/pdp11/pdp11.opt (mgnu-asm): New.
7148 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7149 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7150 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7152 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
7154 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7155 dereferencing path[] beyond its length.
7157 (debug_all_paths): New.
7158 (rewire_first_differing_edge): New.
7159 (adjust_paths_after_duplication): New.
7160 (duplicate_thread_path): Call adjust_paths_after_duplication.
7162 (thread_through_all_blocks): Add new argument to
7163 duplicate_thread_path.
7165 2018-06-30 Jim Wilson <jimw@sifive.com>
7167 * config/riscv/predicates.md (p2m1_shift_operand): New.
7168 (high_mask_shift_operand): New.
7169 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7170 pattern using p2m1_shift_operand.
7171 (lshsi3_zero_extend_3+2): New combiner pattern using
7172 high_mask_shift_operand.
7174 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7176 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7178 (vect_recog_rotate_pattern): ...here.
7179 (vect_convert_input): Try to insert casts of invariants in the
7181 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7182 preheader to be empty.
7184 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7186 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7187 vector type. If given, install it in the new statement's
7189 (vect_element_precision): New function.
7190 (vect_unpromoted_value): New struct.
7191 (vect_unpromoted_value::vect_unpromoted_value): New function.
7192 (vect_unpromoted_value::set_op): Likewise.
7193 (vect_look_through_possible_promotion): Likewise.
7194 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7195 (vect_widened_op_tree, vect_convert_input): Likewise.
7196 (vect_convert_inputs, vect_convert_output): Likewise.
7197 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7198 to handle the optional cast of the multiplication result and
7199 vect_widened_op_tree to detect the widened multiplication itself.
7200 Do not require the input and output of promotion casts to have
7201 the same sign, but base the signedness of the operation on the
7202 input rather than the result. If the pattern includes two
7203 promotions, check that those promotions have the same sign.
7204 Do not restrict the MULT_EXPR handling to a double-width result;
7205 handle quadruple-width results and wider. Use vect_convert_inputs
7206 to convert the inputs to the common type.
7207 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7208 to handle the optional cast of the ABS result. Also allow a sign
7209 change or a sign extension between the ABS and MINUS.
7210 Use vect_widened_op_tree to detect the widened subtraction and use
7211 vect_convert_inputs to convert the inputs to the common type.
7212 (vect_handle_widen_op_by_const): Delete.
7213 (vect_recog_widen_op_pattern): New function.
7214 (vect_recog_widen_mult_pattern): Use it.
7215 (vect_recog_widen_shift_pattern): Likewise.
7216 (vect_recog_widen_sum_pattern): Use
7217 vect_look_through_possible_promotion to handle the promoted
7220 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7222 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7223 the containing gimple_seq *.
7224 * gimple-iterator.h (gsi_for_stmt): Declare it.
7225 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7226 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7227 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7228 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7229 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7231 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7233 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7234 statement being replaced is part of an existing pattern
7235 definition sequence, inserting the new pattern statements before
7237 (vect_pattern_recog_1): Don't return a bool. If the statement
7238 is already part of a pattern, instead apply pattern matching
7239 to the pattern definition statements. Don't clear the
7240 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7241 (vect_pattern_recog): Don't break after the first match;
7242 continue processing the pattern definition statements instead.
7243 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7245 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7247 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7248 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7249 (vect_recog_widen_sum_pattern): Use it.
7251 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7253 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7254 phi is not a pattern statement and has not been replaced by
7255 a pattern statement.
7256 * tree-vect-patterns.c (type_conversion_p): Don't check
7257 STMT_VINFO_IN_PATTERN_P.
7258 (vect_recog_vector_vector_shift_pattern): Likewise.
7259 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7260 the pattern statement rather than the original statement; check
7261 directly for a WIDEN_MULT_EXPR here.
7262 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7263 vect_is_simple_use to return the pattern statement rather
7264 than the original statement; use is_pattern_stmt_p to check
7265 for such a pattern statement.
7266 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7267 to return the pattern statement rather than the original statement;
7268 don't do the same transformation here.
7269 (vect_is_simple_use): If the defining statement has been replaced
7270 by a pattern statement, return the pattern statement instead.
7271 Remove the corresponding (local) transformation from the vectype
7274 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7276 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7277 end and default to null.
7278 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7279 (vectorizable_reduction): Update calls accordingly, dropping the
7280 gimple ** argument if the passed-back statement isn't needed.
7281 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7282 (vect_recog_rotate_pattern): Likewise.
7283 (vect_recog_mask_conversion_pattern): Likewise.
7284 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7285 (vect_mask_constant_operand_p): Likewise.
7286 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7287 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7288 (get_group_load_store_type, get_load_store_type): Likewise.
7289 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7290 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7291 (vectorizable_conversion, vectorizable_assignment): Likewise.
7292 (vectorizable_shift, vectorizable_operation): Likewise.
7293 (vectorizable_store, vect_is_simple_cond): Likewise.
7294 (vectorizable_condition, vectorizable_comparison): Likewise.
7295 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7296 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7297 and move it to the end. Cope with null def_stmt_outs.
7299 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7301 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7303 2018-06-29 Jeff Law <law@redhat.com>
7305 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7306 displacements for TARGET_V850E2V3 and newer.
7307 (TARGET_LRA_P): Remove. Defaults to LRA now.
7308 * config/v850/v850.md (sign23byte_load): Remove.
7309 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7310 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7312 2018-06-29 Martin Liska <mliska@suse.cz>
7315 * coverage.c (coverage_init): Mangle full path name.
7316 * doc/invoke.texi: Document the change.
7317 * gcov-io.c (mangle_path): New.
7318 * gcov-io.h (mangle_path): Likewise.
7319 * gcov.c (mangle_name): Use mangle_path for path mangling.
7321 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7323 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7324 if starting source register is not even.
7326 2018-06-29 Martin Liska <mliska@suse.cz>
7328 PR tree-optimization/86263
7329 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7330 Make edge redirection.
7332 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7334 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7335 (dump_scope_depth): New variable.
7336 (get_dump_scope_depth): New function.
7337 (dump_begin_scope): New function.
7338 (dump_end_scope): New function.
7339 * dumpfile.h (get_dump_scope_depth): New declaration.
7340 (dump_begin_scope): New declaration.
7341 (dump_end_scope): New declaration.
7342 (class auto_dump_scope): New class.
7343 (AUTO_DUMP_SCOPE): New macro.
7344 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7347 2018-06-29 Richard Biener <rguenther@suse.de>
7349 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7350 compute_all_dependences succeeds.
7351 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7352 exceed --param loop-max-datarefs-for-datadeps.
7354 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7356 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7358 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7361 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7362 alternative 0 in preferred_for_speed attribute.
7364 2018-06-28 Paul Koning <ni1d@arrl.net>
7366 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7367 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7368 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7369 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7370 for shift insn patterns.
7372 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7374 * cgraph.c (cgraph_node::get_body): Replace assignments to
7375 "dump_file" with calls to set_dump_file.
7376 * dumpfile.c (alt_dump_file): Make static, and group with...
7377 (alt_flags): ...this definition.
7378 (dumps_are_enabled): New variable.
7379 (refresh_dumps_are_enabled): New function.
7380 (set_dump_file): New function.
7381 (set_alt_dump_file): New function.
7382 (gcc::dump_manager::dump_start): Replace assignments to
7383 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7385 (gcc::dump_manager::dump_finish): Likewise.
7386 * dumpfile.h (alt_dump_file): Delete decl.
7387 (dumps_are_enabled): New variable decl.
7388 (set_dump_file): New function decl.
7389 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7391 * tree-nested.c (lower_nested_functions): Replace assignments to
7392 "dump_file" with calls to set_dump_file.
7394 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7396 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7397 goto_locus of each outgoing edge of each basic block.
7399 2018-06-28 Richard Biener <rguenther@suse.de>
7401 * dwarf2out.c (decl_scope_table): Remove.
7402 (push_decl_scope): Likewise.
7403 (pop_decl_scope): Likewise.
7404 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7405 (gen_struct_or_union_type_die): Likewise.
7406 (gen_tagged_type_die): Likewise.
7407 (dwarf2out_init): Do not initialize decl_scope_table.
7408 (dwarf2out_c_finalize): Do not free it.
7410 2018-06-28 Richard Biener <rguenther@suse.de>
7412 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7413 deciding whether to not re-use a DIE.
7415 2018-06-28 Richard Biener <rguenther@suse.de>
7417 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7418 DW_AT_abstract_origin attribute.
7420 2018-06-28 Martin Liska <mliska@suse.cz>
7422 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7423 Use newly introduced constants.
7424 * tree-switch-conversion.h (struct jump_table_cluster):
7425 Define max_ratio_for_size and max_ratio_for_speed.
7427 2018-06-28 Martin Liska <mliska@suse.cz>
7429 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7430 Add new checking assert to catch invalid state.
7431 (jump_table_cluster::can_be_handled): Handle single case
7433 (jump_table_cluster::is_beneficial): Bail out for such case.
7434 (bit_test_cluster::find_bit_tests):
7435 Add new checking assert to catch invalid state.
7436 (bit_test_cluster::can_be_handled): Handle single case
7438 (bit_test_cluster::is_beneficial): Bail out for such case.
7439 (switch_decision_tree::analyze_switch_statement):
7442 2018-06-28 Martin Liska <mliska@suse.cz>
7444 * common.opt: Introduce -completion option.
7445 * gcc.c (driver_handle_option): Handle it.
7446 (driver::main): Print completions if completion
7448 * opt-suggestions.c (option_proposer::get_completions):
7450 (option_proposer::suggest_completion): Likewise.
7451 (option_proposer::find_param_completions): Likewise.
7452 (verify_autocompletions): Likewise.
7453 (test_completion_valid_options): Likewise.
7454 (test_completion_valid_params): Likewise.
7455 (in_completion_p): Likewise.
7456 (empty_completion_p): Likewise.
7457 (test_completion_partial_match): Likewise.
7458 (test_completion_garbage): Likewise.
7459 (opt_proposer_c_tests): Likewise.
7460 * opt-suggestions.h: Declare new functions.
7461 * opts.c (common_handle_option): Handle OPT__completion_.
7462 * selftest-run-tests.c (selftest::run_tests): Add
7463 opt_proposer_c_tests.
7464 * selftest.c (assert_str_startswith): New.
7465 * selftest.h (assert_str_startswith): Likewise.
7466 (opt_proposer_c_tests): New.
7467 (ASSERT_STR_STARTSWITH): Likewise.
7469 2018-06-28 Martin Liska <mliska@suse.cz>
7471 * Makefile.in: Add opt-suggestions.o.
7472 * gcc-main.c: Include opt-suggestions.h.
7473 * gcc.c (driver::driver): Likewise.
7474 (driver::~driver): Remove m_option_suggestions.
7475 (driver::build_option_suggestions): Moved to option_proposer.
7476 (driver::suggest_option): Likewise.
7477 (driver::handle_unrecognized_options): Use option_proposer.
7478 * gcc.h (class driver): Add new memver m_option_proposer.
7479 * opt-suggestions.c: New file.
7480 * opt-suggestions.h: New file.
7482 2018-06-28 Martin Liska <mliska@suse.cz>
7484 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7485 (auto_string_vec::~auto_string_vec): Likewise.
7487 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7489 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7490 prevent_decl_creation_for_types fields up and add reset_location field.
7491 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7492 statement if id->reset_location is true.
7493 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7494 id->reset_location is true.
7495 (copy_phis_for_bb): Force input_location on the arguments if
7496 id->reset_location is true.
7497 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7498 is set on the function to be inlined.
7500 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7502 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7504 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7506 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7507 registers for Pmode.
7508 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7509 hard registers for the clobbered pseudo.
7511 2018-06-27 Paul Koning <ni1d@arrl.net>
7513 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7514 mutually exclusive options.
7515 * config/pdp11/constraints.md (h): New constraint.
7516 (O): Update definition to match shift code generation.
7517 (D): New constraint.
7518 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7520 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7522 (output_jump): Change arguments.
7523 (pdp11_fixed_cc_regs): New function.
7524 (pdp11_cc_mode): Ditto.
7525 (pdp11_expand_shift): Ditto.
7526 (pdp11_assemble_shift): Ditto.
7527 (pdp11_small_shift): Ditto.
7528 (pdp11_branch_cost): Remove.
7529 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7531 (pdp11_register_move_cost): Update for CC registers.
7532 (pdp11_rtx_costs): Add case for LSHIFTRT.
7533 (pdp11_output_jump): Add CCNZ mode conditional branches.
7534 (notice_update_cc_on_set): Remove.
7535 (pdp11_cc_mode): New function.
7536 (simple_memory_operand): Correct pre/post decrement case.
7537 (no_side_effect_operand): New function.
7538 (pdp11_regno_reg_class): Add CC_REGS class.
7539 (pdp11_fixed_cc_regs): New function.
7540 (pdp11_small_shift): New function.
7541 (pdp11_expand_shift): New function to expand shift insns.
7542 (pdp11_assemble_shift): New function to output shifts.
7543 (pdp11_branch_cost): Remove.
7544 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7545 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7546 (WCHAR_TYPE): Ditto.
7547 (PTRDIFF_TYPE): Ditto.
7548 (ADJUST_INSN_LENGTH): New macro.
7549 (FIXED_REGISTERS): Add CC registers.
7550 (CALL_USED_REGISTERS): Ditto.
7552 (REG_CLASS_NAMES): Ditto.
7553 (REG_CLASS_CONTENTS): Ditto.
7554 (SELECT_CC_MODE): Use new function.
7555 (TARGET_FLAGS_REGNUM): New macro.
7556 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7557 (cc0_reg_rtx): Remove.
7558 (CC_STATUS_MDEP): Remove.
7559 (CC_STATUS_MDEFP_INIT): Remove.
7560 (CC_IN_FPU): Remove.
7561 (NOTICE_UPDATE_CC): Remove.
7562 (REGISTER_NAMES): Add CC registers.
7563 (BRANCH_COST): Change to constant 1.
7564 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7566 * config/pdp11/pdp11.opt (mbcopy): Remove.
7567 (mbcopy-builtin): Remove.
7568 (mbranch-cheap): Remove.
7569 (mbranch-expensive): Remove.
7570 * config/pdp11/predicates.md (expand_shift_operand): Update to
7571 match shift code generation.
7572 (ccnz_operator): New predicate.
7573 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7574 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7575 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7577 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7578 description of O constraint.
7580 2018-06-27 Jeff Law <law@redhat.com>
7581 Austin Law <austinklaw@gmail.com>
7583 * config/v850/v850.md (addsi3_set_flags): New pattern.
7584 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7585 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7586 (zero_extendhisi2_v850_set_flags): Likewise.
7587 (zero_extendqisi2_v850_set_flags): Likewise.
7588 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7589 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7590 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7592 * config/v850/v850-protos.h (notice_update_cc): Remove.
7593 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7594 (v850_print_operand): Handle 'D' and "d".
7595 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7596 Add handling of arithmetic/logical operations compared against zero.
7597 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7598 Do not look at v850_compare_op, instead get mode from last argument.
7599 (v850_gen_compare): Remove
7600 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7601 after reload for prologue insns.
7602 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7604 (construct_save_jarl): Likewise.
7605 (TARGET_FLAGS_REGNUM): Define.
7606 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7607 (NOTICE_UPDATE_CC): Remove.
7608 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7609 than cc0. Conditionalize on reload_completed.
7610 (cmpsi_insn, setfcc_insn): Likewise.
7611 (tst1 splitter): Turn into define_and_split which sets the flags
7613 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7614 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7615 (cstoresf4, cstoredf4): Clobber the flags.
7616 (cmpsi, cmpsf, cmpdf): Remove expanders.
7617 (setf_insn): Remove pattern.
7618 (addsi3): Turn into define_and_split which clobbers the flags after
7619 reload and a suitable pattern (addsi3_clobber_flags) for use after
7621 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7622 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7623 (ashrsi3, ashrsi3_v850e2): Likewise.
7624 (bins): Clobber the flags.
7625 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7626 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7627 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7628 (call_value_internal_short, call_value_internal_long): Likewise.
7629 (callt_save_interrupt, callt_return_interrupt): Likewise.
7630 (save_interrupt, return_interrupt): Likewise.
7631 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7632 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7633 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7634 (All FP comparisons): Only allow after reload has completed.
7636 (divh, divhu): Tweak output template.
7637 (branch_z_normal, branch_z_invert): Remove
7638 (branch_nz_normal, branch_nz_invert): Likewise.
7639 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7641 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7642 * config/v850/v850.c (notice_update_cc): Remove.
7643 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7644 (CC_NO_CARRY): Likewise.
7645 (NOTICE_UPDATE_CC): Define to nothing.
7646 * config/v850/v850.md: Remove block comment on cc0 handling
7647 Remove "cc" attribute from all patterns. Remove cc_status handling
7648 from all patterns. Minor formatting fixes.
7650 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7652 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7653 (cortex-a76.cortex-a55): Likewise.
7654 * config/aarch64/aarch64-tune.md: Regenerate.
7655 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7656 cortex-a76.cortex-a55.
7658 2018-06-27 Jeff Law <law@redhat.com>
7660 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7661 (MULTILIB_DIRNAMES): Similarly.
7663 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7665 * gimple.h (gimple_return_retbnd): Delete.
7666 (gimple_return_set_retbnd): Likewise.
7667 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7668 gimple_return_set_retbnd.
7669 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7670 gimple_return_retbnd and adjust.
7671 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7672 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7673 Explicitly return NULL in a couple more cases. Move assertion
7674 on debug statements and remove unreachable code.
7675 (reset_debug_binding): Do not test id->retbnd.
7676 (expand_call_inline): Do not set it.
7678 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7680 * configure.ac: Add --disable-gcov option.
7681 * configure: Regenerate.
7682 * Makefile.in: Honour @enable_gcov@.
7683 * doc/install.texi: Document --disable-gcov.
7685 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7687 * config/arm/arm-cpus.in (cortex-a76): New entry.
7688 (cortex-a76.cortex-a55): Likewise.
7689 * config/arm/arm-tables.opt: Regenerate.
7690 * config/arm/arm-tune.md: Likewise.
7691 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7692 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7693 cortex-a76.cortex-a55.
7695 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7698 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7700 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7702 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7704 (EPILOGUE_USES): Likewise.
7706 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7708 * tree-inline.c (remap_location): New function extracted from...
7709 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7710 (copy_phis_for_bb): ...here. Call remap_location.
7711 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7713 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7715 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7716 unaligned vsx for 16B memset.
7718 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7721 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7722 ieee128_float_type_node to long_double_type_node unless
7723 TARGET_LONG_DOUBLE_128 is set.
7725 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7727 * cfgloop.c (get_loop_location): Convert return type from
7728 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7729 by implicit construction from rtx_insn *, and using
7730 dump_user_location_t::from_function_decl for the fallback case.
7731 * cfgloop.h (get_loop_location): Convert return type from
7732 location_t to dump_user_location_t.
7733 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7734 dump_printf_loc to pass in a dump_location_t rather than a
7735 location_t, via the gimple stmt.
7736 * coverage.c (get_coverage_counts): Update calls to
7737 dump_printf_loc to pass in dump_location_t rather than a
7739 * doc/optinfo.texi (Dump types): Convert example of
7740 dump_printf_loc from taking "locus" to taking "insn". Update
7741 description of the "_loc" calls to cover dump_location_t.
7742 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7744 (dump_user_location_t::dump_user_location_t): New constructors,
7745 from gimple *stmt and rtx_insn *.
7746 (dump_user_location_t::from_function_decl): New function.
7747 (dump_loc): Make static.
7748 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7749 const dump_location_t &.
7750 (dump_generic_expr_loc): Delete.
7751 (dump_printf_loc): Convert param "loc" from location_t to
7752 const dump_location_t &.
7753 (selftest::test_impl_location): New function.
7754 (selftest::dumpfile_c_tests): New function.
7755 * dumpfile.h: Include "profile-count.h".
7756 (class dump_user_location_t): New class.
7757 (struct dump_impl_location_t): New struct.
7758 (class dump_location_t): New class.
7759 (dump_printf_loc): Convert 2nd param from source_location to
7760 const dump_location_t &.
7761 (dump_generic_expr_loc): Delete.
7762 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7763 const dump_location_t &.
7764 * gimple-fold.c (fold_gimple_assign): Update call to
7765 dump_printf_loc to pass in a dump_location_t rather than a
7766 location_t, via the gimple stmt.
7767 (gimple_fold_call): Likewise.
7768 * gimple-loop-interchange.cc
7769 (loop_cand::analyze_iloop_reduction_var): Update for change to
7770 check_reduction_path.
7771 (tree_loop_interchange::interchange): Update for change to
7773 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7774 change in return-type of find_loop_location.
7775 (graphite_regenerate_ast_isl): Likewise.
7776 * graphite-optimize-isl.c (optimize_isl): Likewise.
7777 * graphite.c (graphite_transform_loops): Likewise.
7778 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7779 pass in a dump_location_t rather than a location_t, via the
7781 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7782 * ipa.c (walk_polymorphic_call_targets): Likewise.
7783 * loop-unroll.c (report_unroll): Convert "locus" param from
7784 location_t to dump_location_t.
7785 (decide_unrolling): Update for change to get_loop_location's
7787 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7788 location_t to dump_user_location_t.
7789 (grid_find_single_omp_among_assignments_1): Updates calls to
7790 dump_printf_loc to pass in a dump_location_t rather than a
7791 location_t, via the gimple stmt.
7792 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7793 location_t to dump_location_t. Updates calls to dump_printf_loc
7794 to pass in a dump_location_t rather than a location_t, via the
7796 (grid_inner_loop_gridifiable_p): Likewise.
7797 (grid_dist_follows_simple_pattern): Likewise.
7798 (grid_gfor_follows_tiling_pattern): Likewise.
7799 (grid_target_follows_gridifiable_pattern): Likewise.
7800 (grid_attempt_target_gridification): Convert initialization
7801 of local "grid" from memset to zero-initialization; FIXME: does
7802 this require C++11? Update call to dump_printf_loc to pass in a
7803 optinfo_location rather than a location_t, via the gimple stmt.
7804 * profile.c (read_profile_edge_counts): Updates call to
7805 dump_printf_loc to pass in a dump_location_t rather than a
7807 (compute_branch_probabilities): Likewise.
7808 * selftest-run-tests.c (selftest::run_tests): Call
7810 * selftest.h (dumpfile_c_tests): New decl.
7811 * tree-loop-distribution.c (pass_loop_distribution::execute):
7812 Update for change in return type of find_loop_location.
7813 * tree-parloops.c (parallelize_loops): Likewise.
7814 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7815 "locus" from location_t to dump_user_location_t.
7816 (canonicalize_loop_induction_variables): Likewise.
7817 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7818 for change in return type of find_loop_location.
7819 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7820 to dump_printf_loc to pass in a dump_location_t rather than a
7821 location_t, via the stmt.
7822 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7824 * tree-vect-loop-manip.c (find_loop_location): Convert return
7825 type from source_location to dump_user_location_t.
7826 (vect_do_peeling): Update for above change.
7827 (vect_loop_versioning): Update for change in type of
7829 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7830 from location_t to dump_user_location_t.
7831 (vect_estimate_min_profitable_iters): Update for change in type
7833 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7834 location_t to dump_location_t.
7835 (vect_slp_bb): Update for change in type of vect_location.
7836 * tree-vectorizer.c (vect_location): Convert from source_location
7837 to dump_user_location_t.
7838 (try_vectorize_loop_1): Update for change in vect_location's type.
7839 (vectorize_loops): Likewise.
7840 (increase_alignment): Likewise.
7841 * tree-vectorizer.h (vect_location): Convert from source_location
7842 to dump_user_location_t.
7843 (find_loop_location): Convert return type from source_location to
7844 dump_user_location_t.
7845 (check_reduction_path): Convert 1st param from location_t to
7846 dump_user_location_t.
7847 * value-prof.c (check_counter): Update call to dump_printf_loc to
7848 pass in a dump_user_location_t rather than a location_t; update
7849 call to error_at for change in type of "locus".
7850 (check_ic_target): Update call to dump_printf_loc to
7851 pass in a dump_user_location_t rather than a location_t, via the
7854 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7856 * config/s390/s390.h (enum processor_flags): Do not use
7857 default tune parameter when -march was specified.
7859 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7862 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7863 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7866 2018-06-26 Richard Biener <rguenther@suse.de>
7868 PR tree-optimization/86287
7870 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7871 (vect_analyze_loop): Initialize n_stmts.
7873 2018-06-26 Richard Biener <rguenther@suse.de>
7876 * fold-const.c (fold_convertible_p): Pointer extension
7879 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7882 * dwarf2out.c (loc_list_has_views): Adjust comments.
7883 (dw_loc_list): Split single cross-partition range with
7886 2018-06-25 Jeff Law <law@redhat.com>
7888 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7889 on -mbig-switch by default.
7891 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7893 (const_float_0_operand): Remove unused predicate.
7894 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7895 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7896 (recipsf2): New expander. Original pattern now called
7898 (recipdf2, recipdf2_insn): Similarly.
7899 (rsqrtsf2, rsqrtsf2_insn): Similarly
7900 (rsqrtdf2, rsqrtdf2_insn): Similarly
7902 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7904 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7905 Simplify logic for FreeBSD (twice).
7907 2018-06-25 Martin Sebor <msebor@redhat.com>
7909 PR tree-optimization/86204
7910 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7911 a strnlen result if it's less than the length of the string.
7913 2018-06-25 Martin Sebor <msebor@redhat.com>
7915 PR tree-optimization/85700
7916 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7917 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7918 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7920 2018-06-25 Martin Sebor <msebor@redhat.com>
7922 * doc/extend.texi (Zero-length arrays): Update and clarify.
7924 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7926 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7927 added IEEE/IBM long double multilib support on PowerPC little
7928 endian Linux systems.
7929 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7930 (MULTILIB_DEFAULTS): Likewise.
7931 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7933 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7934 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7935 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7937 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7940 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7941 (REORDER_45): Likewise.
7943 2018-06-25 Jeff Law <law@redhat.com>
7945 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7946 dividend to 32 bits. Adjust length.
7947 (udivmodhi4): Cleanup output template. Fix length.
7949 2018-06-25 Carl Love <cel@us.ibm.com>
7951 * config/rs6000/vsx.md: Change word selector to prefered location.
7953 2018-06-25 Richard Biener <rguenther@suse.de>
7955 PR tree-optimization/86304
7956 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7957 epilogue-if-converted loops as well.
7959 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7961 * lto-section-out.c (lto_begin_section): Do not print section
7962 name for noaddr and unnumbered dumps.
7964 2018-06-25 Richard Biener <rguenther@suse.de>
7966 * tree-vectorizer.h (struct vec_info_shared): New structure
7967 with parts split out from struct vec_info and loop_nest from
7968 struct _loop_vec_info.
7969 (struct vec_info): Adjust accordingly.
7970 (struct _loop_vec_info): Likewise.
7971 (LOOP_VINFO_LOOP_NEST): Adjust.
7972 (LOOP_VINFO_DATAREFS): Likewise.
7973 (LOOP_VINFO_DDRS): Likewise.
7974 (struct _bb_vec_info): Likewise.
7975 (BB_VINFO_DATAREFS): Likewise.
7976 (BB_VINFO_DDRS): Likewise.
7977 (struct _stmt_vec_info): Add dr_aux member.
7978 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7979 (DR_MISALIGNMENT_UNINITIALIZED): New.
7980 (set_dr_misalignment): Adjust.
7981 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7982 (vect_analyze_loop): Adjust prototype.
7983 (vect_analyze_loop_form): Likewise.
7984 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7985 Compute dependences lazily.
7986 (vect_record_base_alignments): Use shared datarefs/ddrs.
7987 (vect_verify_datarefs_alignment): Likewise.
7988 (vect_analyze_data_refs_alignment): Likewise.
7989 (vect_analyze_data_ref_accesses): Likewise.
7990 (vect_analyze_data_refs): Likewise.
7991 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7992 constructor parameter for shared part.
7993 (vect_analyze_loop_form): Pass in shared part and adjust.
7994 (vect_analyze_loop_2): Pass in storage for the number of
7995 stmts. Move loop nest finding to the caller. Compute
7997 (vect_analyze_loop): Pass in shared part.
7998 (vect_transform_loop): Verify shared datarefs are unchanged.
7999 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8000 constructor parameter for shared part.
8001 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8002 (vect_slp_bb): Verify shared datarefs are unchanged before
8004 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8006 (new_stmt_vec_info): Initialize DR_AUX misalignment to
8007 DR_MISALIGNMENT_UNINITIALIZED.
8008 * tree-vectorizer.c (vec_info::vec_info): Add constructor
8009 parameter for shared part.
8010 (vec_info::~vec_info): Adjust.
8011 (vec_info_shared::vec_info_shared): New.
8012 (vec_info_shared::~vec_info_shared): Likewise.
8013 (vec_info_shared::save_datarefs): Likewise.
8014 (vec_info_shared::check_datarefs): Likewise.
8015 (try_vectorize_loop_1): Construct shared part live for analyses
8016 of a single loop for multiple vector sizes.
8017 * tree-parloops.c (gather_scalar_reductions): Adjust.
8019 2018-06-25 Richard Biener <rguenther@suse.de>
8021 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8022 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8023 (vect_analyze_data_refs): Remove similar code from here and
8024 simplify accordingly.
8026 2018-06-25 Richard Biener <rguenther@suse.de>
8028 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8029 for reverse storage order accesses rather than asserting
8030 they cannot happen here.
8032 2018-06-25 Tom de Vries <tdevries@suse.de>
8035 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8036 Use data16 instead of .byte for insn prefix.
8038 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
8041 * parser.c (make_char_string_pack): Pass this literal chars
8042 through cpp_interpret_string.
8043 (cp_parser_userdef_numeric_literal): Check the result of
8044 make_char_string_pack.
8046 2018-06-24 Maya Rashish <coypu@sdf.org>
8048 * ginclude/stddef.h: Simplify conditions around avoiding
8049 re-definition of __size_t.
8051 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8053 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8054 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8056 2018-06-22 Maya Rashish <coypu@sdf.org>
8058 * doc/invoke.texi (mno-fancy-math-387): Update for changes
8059 made to OpenBSD and NetBSD through the years.
8061 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8063 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8064 behavior of vec_pack (vector double, vector double) to match
8065 behavior of vec_float2 (vector double, vector double).
8067 2018-06-22 Olivier Hainque <hainque@adacore.com>
8069 * gimplify.c (gimplify_function_tree): Prevent creation
8070 of a trampoline for the address of the current function
8071 passed to entry/exit instrumentation hooks.
8073 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
8076 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8079 2018-06-22 Martin Liska <mliska@suse.cz>
8081 PR tree-optimization/86263
8082 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8083 Bail out if is_enabled is false.
8084 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8086 (jump_table_cluster::is_enabled): New function.
8088 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8090 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8091 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8092 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8093 (lto_input_ts_binfo_tree_pointers): Likewise.
8094 * tree-streamer-out.c (streamer_write_tree_bitfields,
8095 write_ts_binfo_tree_pointers): Likewise.
8096 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8098 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8100 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8102 2018-06-22 Martin Liska <mliska@suse.cz>
8104 * symbol-summary.h (get): Make it pure and inline move
8105 functionality from ::get function.
8106 (get): Remove and inline into ::get and ::get_create.
8107 (get_create): Move code from ::get function.
8109 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8112 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8113 -x assembler-with-cpp.
8115 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8117 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8118 _FILE_OFFSET_BITS=64 for C++.
8120 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
8122 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8123 conversion insn that shows up when pr85657-3.c is compiled using
8124 IEEE 128-bit long double.
8125 (neg<mode>2_internal): Use the correct mode to check whether the
8126 mode is IBM extended.
8127 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8128 multiply and divide external functions from being created more
8131 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8133 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8135 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
8136 the edge can be forwarded.
8137 (cfg_layout_merge_blocks): Likewise.
8139 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8141 * except.c (finish_eh_generation): Commit edge insertions only after
8142 the EH edges have been redirected from post-landing to landing pads.
8144 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8146 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8147 create_tmp_var_for to create the FRAME decl.
8148 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8150 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8152 * tree-inline.c (copy_edges_for_bb): Minor tweak.
8153 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8154 debug statement when resetting its value.
8155 (expand_call_inline): Copy the locus of the call onto the assignment
8156 of the return value, if any. Use local variable in more cases.
8158 2018-06-21 Martin Liska <mliska@suse.cz>
8160 * ipa-pure-const.c (propagate_nothrow): Use
8161 funct_state_summaries->get.
8162 (dump_malloc_lattice): Likewise.
8163 (propagate_malloc): Likewise.
8165 2018-06-21 Richard Biener <rguenther@suse.de>
8167 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8168 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8169 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8171 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8172 BLOCK_ABSTRACT_ORIGIN unconditionally.
8174 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8176 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8178 * ipa-reference.c (ipa_reference_c_finalize): Delete
8179 ipa_ref_opt_sum_summaries and set it to NULL.
8181 2018-06-21 Tom de Vries <tdevries@suse.de>
8183 PR tree-optimization/85859
8184 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8185 test with comment from bb_no_side_effects_p.
8187 2018-06-21 Richard Biener <rguenther@suse.de>
8189 PR tree-optimization/86232
8190 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8191 max for constant niter.
8193 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8195 * config/aarch64/aarch64-simd.md
8196 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8198 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8200 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8201 Make opernads of the unspec commutative.
8203 2018-06-21 Richard Biener <rguenther@suse.de>
8205 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8206 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8207 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8208 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8210 (vect_record_base_alignments): Do not record base alignment
8211 for gathers or scatters.
8212 (vect_compute_data_ref_alignment): Drop return value that is always
8213 true. Bail out early for gathers or scatters.
8214 (vect_enhance_data_refs_alignment): Bail out early for gathers
8216 (vect_find_same_alignment_drs): Likewise.
8217 (vect_analyze_data_refs_alignment): Remove dead code.
8218 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8219 (vect_analyze_data_refs): For possible gathers or scatters do
8220 not create an alternate DR, just check their possible validity
8221 and mark them. Adjust DECL_NONALIASED handling to not rely
8223 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8224 update inits of gathers or scatters.
8225 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8226 Also copy gather/scatter flag to pattern vinfo.
8228 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8230 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8231 behavior of vec_packsu (vector unsigned long long, vector unsigned
8232 long long) to match behavior of vec_packs with same signature.
8234 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8235 Thomas Schwinge <thomas@codesourcery.com>
8236 Cesar Philippidis <cesar@codesourcery.com>
8238 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8239 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8240 (gimplify_adjust_omp_clauses): Likewise.
8241 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8242 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8243 (gimplify_omp_target_update): Update handling of acc update and
8245 * omp-low.c (install_var_field): Remove unused parameter
8246 base_pointers_restrict.
8247 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8248 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8250 (omp_target_base_pointers_restrict_p): Delete.
8251 (scan_omp_target): Update call to scan_sharing_clauses.
8252 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8254 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8255 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8256 (convert_local_omp_clauses): Likewise.
8257 * tree-pretty-print.c (dump_omp_clause): Likewise.
8258 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8260 (omp_clause_code_name): Likewise.
8262 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8265 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8268 PR tree-optimization/86231
8269 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8270 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8272 2018-06-20 Tom de Vries <tdevries@suse.de>
8274 PR tree-optimization/86097
8275 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8276 iv type if signedness of iv type is not the same as that of *nit.
8278 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8280 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8281 EDGE_EH edges, verify they are all EDGE_EH.
8283 2018-06-20 Maya Rashish <coypu@sdf.org>
8285 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8287 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8289 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8290 * config/aarch64/aarch64.c (xgene1_tunings): Add
8291 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8292 (aarch64_mode_valid_for_sched_fusion_p):
8293 Allow 16-byte modes.
8294 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8295 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8297 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8299 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8300 * config/aarch64/iterators.md (VQ2): New mode iterator.
8302 2018-06-20 Martin Liska <mliska@suse.cz>
8304 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8305 Change default ratio from 10 to 8.
8307 2018-06-20 Martin Liska <mliska@suse.cz>
8309 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8311 (bit_test_cluster::find_bit_tests): Likewise.
8312 (switch_decision_tree::analyze_switch_statement): Find clusters.
8313 * tree-switch-conversion.h (struct jump_table_cluster): Document
8316 2018-06-20 Martin Liska <mliska@suse.cz>
8318 * tree-switch-conversion.c (switch_conversion::collect):
8319 Record m_uniq property.
8320 (switch_conversion::expand): Bail out for special conditions.
8321 (group_cluster::~group_cluster): New.
8322 (group_cluster::group_cluster): Likewise.
8323 (group_cluster::dump): Likewise.
8324 (jump_table_cluster::emit): New.
8325 (switch_decision_tree::fix_phi_operands_for_edges): New.
8326 (struct case_node): Remove struct.
8327 (jump_table_cluster::can_be_handled): New.
8328 (case_values_threshold): Moved to header.
8329 (reset_out_edges_aux): Likewise.
8330 (jump_table_cluster::is_beneficial): New.
8331 (bit_test_cluster::can_be_handled): Likewise.
8332 (add_case_node): Remove.
8333 (bit_test_cluster::is_beneficial): New.
8334 (case_bit_test::cmp): New.
8335 (bit_test_cluster::emit): New.
8336 (expand_switch_as_decision_tree_p): Remove.
8337 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8338 (fix_phi_operands_for_edge): Likewise.
8339 (switch_decision_tree::analyze_switch_statement): New.
8340 (compute_cases_per_edge): Move ...
8341 (switch_decision_tree::compute_cases_per_edge): ... here.
8342 (try_switch_expansion): Likewise.
8343 (switch_decision_tree::try_switch_expansion): Likewise.
8344 (record_phi_operand_mapping): Likewise.
8345 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8346 (emit_case_decision_tree): Likewise.
8347 (switch_decision_tree::emit): Likewise.
8348 (balance_case_nodes): Likewise.
8349 (switch_decision_tree::balance_case_nodes): Likewise.
8350 (dump_case_nodes): Likewise.
8351 (switch_decision_tree::dump_case_nodes): Likewise.
8352 (emit_jump): Likewise.
8353 (switch_decision_tree::emit_jump): Likewise.
8354 (emit_cmp_and_jump_insns): Likewise.
8355 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8356 (emit_case_nodes): Likewise.
8357 (switch_decision_tree::emit_case_nodes): Likewise.
8358 (conditional_probability): Remove.
8359 * tree-switch-conversion.h (enum cluster_type): New.
8361 (struct cluster): Likewise.
8362 (cluster::cluster): Likewise.
8363 (struct simple_cluster): Likewise.
8364 (simple_cluster::simple_cluster): Likewise.
8365 (struct group_cluster): Likewise.
8366 (struct jump_table_cluster): Likewise.
8367 (struct bit_test_cluster): Likewise.
8368 (struct min_cluster_item): Likewise.
8369 (struct case_tree_node): Likewise.
8370 (case_tree_node::case_tree_node): Likewise.
8371 (jump_table_cluster::case_values_threshold): Likewise.
8372 (struct case_bit_test): Likewise.
8373 (struct switch_decision_tree): Likewise.
8374 (struct switch_conversion): Likewise.
8375 (switch_decision_tree::reset_out_edges_aux): Likewise.
8377 2018-06-20 Martin Liska <mliska@suse.cz>
8379 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8380 (hoist_edge_and_branch_if_true): Likewise.
8381 (expand_switch_using_bit_tests_p): Likewise.
8382 (struct case_bit_test): Likewise.
8383 (case_bit_test_cmp): Likewise.
8384 (emit_case_bit_tests): Likewise.
8385 (switch_conversion::switch_conversion): New class.
8386 (struct switch_conv_info): Remove old struct.
8387 (collect_switch_conv_info): More to ...
8388 (switch_conversion::collect): ... this.
8389 (check_range): Likewise.
8390 (switch_conversion::check_range): Likewise.
8391 (check_all_empty_except_final): Likewise.
8392 (switch_conversion::check_all_empty_except_final): Likewise.
8393 (check_final_bb): Likewise.
8394 (switch_conversion::check_final_bb): Likewise.
8395 (create_temp_arrays): Likewise.
8396 (switch_conversion::create_temp_arrays): Likewise.
8397 (free_temp_arrays): Likewise.
8398 (gather_default_values): Likewise.
8399 (switch_conversion::gather_default_values): Likewise.
8400 (build_constructors): Likewise.
8401 (switch_conversion::build_constructors): Likewise.
8402 (constructor_contains_same_values_p): Likewise.
8403 (switch_conversion::contains_same_values_p): Likewise.
8404 (array_value_type): Likewise.
8405 (switch_conversion::array_value_type): Likewise.
8406 (build_one_array): Likewise.
8407 (switch_conversion::build_one_array): Likewise.
8408 (build_arrays): Likewise.
8409 (switch_conversion::build_arrays): Likewise.
8410 (gen_def_assigns): Likewise.
8411 (switch_conversion::gen_def_assigns): Likewise.
8412 (prune_bbs): Likewise.
8413 (switch_conversion::prune_bbs): Likewise.
8414 (fix_phi_nodes): Likewise.
8415 (switch_conversion::fix_phi_nodes): Likewise.
8416 (gen_inbound_check): Likewise.
8417 (switch_conversion::gen_inbound_check): Likewise.
8418 (process_switch): Use the newly created class.
8419 (switch_conversion::expand): New.
8420 (switch_conversion::~switch_conversion): New.
8421 * tree-switch-conversion.h: New file.
8423 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8425 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8426 tree-vect-patterns.c.
8427 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8428 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8429 (vect_recog_sad_pattern): Likewise.
8430 (vect_recog_widen_sum_pattern): Likewise.
8431 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8432 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8433 (vect_recog_rotate_pattern): Likewise.
8434 (vect_recog_mult_pattern): Likewise.
8435 (vect_recog_vector_vector_shift_pattern): Likewise.
8436 (vect_recog_divmod_pattern): Likewise.
8437 (vect_recog_mixed_size_cond_pattern): Likewise.
8438 (vect_recog_bool_pattern): Likewise.
8439 (vect_recog_mask_conversion_pattern): Likewise.
8440 (vect_try_gather_scatter_pattern): Likewise.
8441 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8442 (vect_recog_over_widening_pattern): Likewise.
8443 (vect_recog_gather_scatter_pattern): Likewise.
8444 (vect_recog_func_ptr): Move from tree-vectorizer.h
8445 (vect_vect_recog_func_ptrs): Move further down the file.
8446 (vect_recog_func): Likewise. Remove the third argument.
8447 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8448 (vect_pattern_recog_1): Expect the pattern function to do any
8449 necessary target tests. Also expect it to provide a vector type.
8450 Remove the type_in handling.
8452 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8454 * tree-vect-patterns.c (vect_pattern_detected): New function.
8455 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8456 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8457 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8458 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8459 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8460 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8461 (vect_recog_mask_conversion_pattern)
8462 (vect_try_gather_scatter_pattern): Likewise.
8464 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8466 * tree-vect-patterns.c (vect_get_internal_def): New function.
8467 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8468 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8469 (search_type_for_mask_1): Use it.
8471 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8473 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8474 redundant WIDEN_SUM_EXPR handling.
8475 (vect_recog_sad_pattern): Likewise.
8477 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8479 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8480 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8481 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8482 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8483 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8485 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8487 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8488 use the stmt_vec_info of the original bb statement for the
8489 new zero assignment, even if the call is part of a pattern.
8491 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8493 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8494 that the sequence is attached to the original statement rather
8495 than the pattern statement.
8496 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8497 PATTERN_DEF_SEQ from the original statement rather than
8498 the main pattern statement.
8499 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8500 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8501 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8503 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8505 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8506 definition statements before the early exit for statements that aren't
8508 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8510 (vect_transform_loop): ...here. Process pattern definition
8511 statements without first checking whether the main pattern
8512 statement is live or relevant.
8514 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8516 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8517 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8519 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8521 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8522 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8523 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8524 (expand_block_compare): Change select_block_compare_mode call.
8525 (expand_strncmp_align_check): Use new functions, fix comment.
8526 (emit_final_str_compare_gpr): New function.
8527 (expand_strn_compare): Refactor and clean up code.
8528 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8530 2018-06-19 Tony Reix <tony.reix@atos.com>
8531 Damien Bergamini <damien.bergamini@atos.com>
8532 David Edelsohn <dje.gcc@gmail.com>
8534 * collect2.c (static_obj): New variable.
8535 (static_libs): New variable.
8536 (is_in_list): Uncomment declaration.
8537 (main): Track AIX libraries linked statically.
8538 (is_in_list): Uncomment definition.
8539 (scan_prog_file): Don't add AIX shared libraries initializer
8540 to constructor list if linking statically.
8542 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8544 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8546 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8548 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8550 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8553 2018-06-19 Martin Liska <mliska@suse.cz>
8555 * config/i386/i386.c (ix86_can_inline_p): Do not use
8556 ipa_fn_summaries::get_create.
8557 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8559 (devirtualization_time_bonus): Likewise.
8560 (ipcp_propagate_stage): Likewise.
8561 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8562 (edge_set_predicate): Likewise.
8563 (evaluate_conditions_for_known_args): Likewise.
8564 (evaluate_properties_for_edge): Likewise.
8565 (ipa_call_summary::reset): Tranform to ...
8566 (ipa_call_summary::~ipa_call_summary): ... this.
8567 (ipa_fn_summary::reset): Transform to ...
8568 (ipa_fn_summary::~ipa_fn_summary): ... this.
8569 (ipa_fn_summary_t::remove): Rename to ...
8570 (ipa_fn_summary_t::remove_callees): ... this.
8571 (ipa_fn_summary_t::duplicate): Use placement new
8572 instead of memory copy.
8573 (ipa_call_summary_t::duplicate): Likewise.
8574 (ipa_call_summary_t::remove): Remove.
8575 (dump_ipa_call_summary): Change get_create to get.
8576 (ipa_dump_fn_summary): Dump only when summary exists.
8577 (analyze_function_body): Use symbol_summary::get instead
8579 (compute_fn_summary): Likewise.
8580 (estimate_edge_devirt_benefit): Likewise.
8581 (estimate_edge_size_and_time): Likewise.
8582 (inline_update_callee_summaries): Likewise.
8583 (remap_edge_change_prob): Likewise.
8584 (remap_edge_summaries): Likewise.
8585 (ipa_merge_fn_summary_after_inlining): Likewise.
8586 (write_ipa_call_summary): Likewise.
8587 (ipa_fn_summary_write): Likewise.
8588 (ipa_free_fn_summary): Likewise.
8589 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8590 (struct ipa_call_summary): Likewise.
8591 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8593 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8594 (estimate_size_after_inlining): Likewise.
8595 (estimate_growth): Likewise.
8596 (growth_likely_positive): Likewise.
8597 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8598 (inline_call): Likewise.
8599 * ipa-inline.c (caller_growth_limits): Likewise.
8600 (can_inline_edge_p): Likewise.
8601 (can_inline_edge_by_limits_p): Likewise.
8602 (compute_uninlined_call_time): Likewise.
8603 (compute_inlined_call_time): Likewise.
8604 (want_inline_small_function_p): Likewise.
8605 (edge_badness): Likewise.
8606 (update_caller_keys): Likewise.
8607 (update_callee_keys): Likewise.
8608 (inline_small_functions): Likewise.
8609 (inline_to_all_callers_1): Likewise.
8610 (dump_overall_stats): Likewise.
8611 (early_inline_small_functions): Likewise.
8612 (early_inliner): Likewise.
8613 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8614 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8615 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8616 * ipa-split.c (execute_split_functions): Likewise.
8617 * symbol-summary.h: Likewise.
8618 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8620 2018-06-19 Richard Biener <rguenther@suse.de>
8622 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8623 (vectorize_loops): ... here. Fix dbgcnt handling.
8624 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8626 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8629 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8630 ieee128 argument takes up only one (vector) register, not two (floating
8633 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8635 * gimplify.c (gimplify_init_constructor): Really never clear for an
8636 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8638 2018-06-19 Richard Biener <rguenther@suse.de>
8640 PR tree-optimization/86179
8641 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8642 after failed recognition.
8644 2018-06-18 Martin Sebor <msebor@redhat.com>
8647 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8648 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8649 Handle integer subtraction.
8650 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8651 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8653 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8655 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8656 param from rtx to rtx_insn *.
8657 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8659 (frv_ifcvt_modify_insn): Likwise.
8660 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8661 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8662 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8663 as_a <rtx_insn *> cast to local "unprotected_region" once
8664 it's been established that it's not NULL or pc_rtx.
8665 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8666 param "sethi" from rtx to rtx_insn *.
8667 (nds32_group_float_insns): Likewise for param "insn".
8668 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8670 (vax_output_int_subtract): Likewise.
8671 * config/vax/vax.c (vax_output_int_add): Likewise for param
8673 (vax_output_int_subtract): Likewise.
8674 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8675 (emit_pattern_after): Likewise for param "after".
8676 (emit_insn_after): Likewise.
8677 (emit_jump_insn_after): Likewise.
8678 (emit_call_insn_after): Likewise.
8679 (emit_debug_insn_after): Likewise.
8680 (emit_pattern_before): Likewise for param "before".
8681 (emit_insn_before): Likewise.
8682 (emit_jump_insn_before): Likewise.
8683 * final.c (get_insn_template): Likewise for param "insn", removing
8685 * output.h (get_insn_template): Likewise for 2nd param.
8686 * rtl.h (emit_insn_before): Likewise.
8687 (emit_jump_insn_before): Likewise.
8688 (emit_debug_insn_before_noloc): Likewise.
8689 (emit_insn_after): Likewise.
8690 (emit_jump_insn_after): Likewise.
8691 (emit_call_insn_after): Likewise.
8692 (emit_debug_insn_after): Likewise.
8693 (set_insn_deleted): Likewise for param.
8695 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8698 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8699 floating point modes, so that IFmode is numerically greater than
8700 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8701 to declare the ordering. This prevents IFmode from being
8702 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8703 machine. Include rs6000-modes.h to share the fractional values
8704 between genmodes* and the rest of the compiler.
8708 * config/rs6000/rs6000-modes.h: New file.
8709 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8710 meaning of rs6000_long_double_size so that 126..128 selects an
8711 appropriate 128-bit floating point type.
8712 (rs6000_option_override_internal): Likewise.
8713 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8714 (TARGET_LONG_DOUBLE_128): Change the meaning of
8715 rs6000_long_double_size so that 126..128 selects an appropriate
8716 128-bit floating point type.
8717 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8718 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8719 source and destination to match the standard usage.
8720 (truncifkf2): Likewise.
8721 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8722 ISA 2.07 to use an explicit clobber, instead of passing in a
8724 (copysign<mode>3_soft): Likewise.
8726 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8728 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8729 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8730 (vect_slp_analyze_instance_dependence): Likewise.
8731 (vect_enhance_data_refs_alignment): Likewise.
8732 (vect_analyze_data_refs_alignment): Likewise.
8733 (vect_slp_analyze_and_verify_instance_alignment
8734 (vect_analyze_data_ref_accesses): Likewise.
8735 (vect_prune_runtime_alias_test_list): Likewise.
8736 (vect_analyze_data_refs): Likewise.
8737 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8738 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8739 (vect_analyze_scalar_cycles_1): Likewise.
8740 (vect_get_loop_niters): Likewise.
8741 (vect_analyze_loop_form_1): Likewise.
8742 (vect_update_vf_for_slp): Likewise.
8743 (vect_analyze_loop_operations): Likewise.
8744 (vect_analyze_loop): Likewise.
8745 (vectorizable_induction): Likewise.
8746 (vect_transform_loop): Likewise.
8747 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8748 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8749 (vect_make_slp_decision): Likewise.
8750 (vect_detect_hybrid_slp): Likewise.
8751 (vect_slp_analyze_operations): Likewise.
8752 (vect_slp_bb): Likewise.
8753 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8754 (vectorizable_bswap): Likewise.
8755 (vectorizable_call): Likewise.
8756 (vectorizable_simd_clone_call): Likewise.
8757 (vectorizable_conversion): Likewise.
8758 (vectorizable_assignment): Likewise.
8759 (vectorizable_shift): Likewise.
8760 (vectorizable_operation): Likewise.
8761 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8763 2018-06-18 Martin Sebor <msebor@redhat.com>
8765 PR tree-optimization/81384
8766 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8767 * builtins.c (expand_builtin_strnlen): New function.
8768 (expand_builtin): Call it.
8769 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8770 * builtins.def (BUILT_IN_STRNLEN): New.
8771 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8772 Warn for bounds in excess of maximum object size.
8773 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8774 single-value ranges. Handle strnlen.
8775 (handle_builtin_strlen): Handle strnlen.
8776 (strlen_check_and_optimize_stmt): Same.
8777 * doc/extend.texi (Other Builtins): Document strnlen.
8779 2018-06-18 Maya Rashish <coypu@sdf.org>
8781 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8782 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8783 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8785 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8787 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8789 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8791 * tree.c (escaped_string::escape): Replace cast to char * by
8792 const_cast<char *> (unescaped).
8794 2018-06-18 Nick Clifton <nickc@redhat.com>
8797 * tree.c (escaped_string): New class. Converts an unescaped
8798 string into its escaped equivalent.
8799 (warn_deprecated_use): Use the new class to convert the
8800 deprecation message, if present.
8801 (test_escaped_strings): New self test.
8802 (test_c_tests): Add test_escaped_strings.
8803 * doc/extend.texi (deprecated): Add a note that the
8804 deprecation message is affected by the -fmessage-length
8805 option, and that control characters will be escaped.
8806 (#pragma GCC error): Document this pragma.
8807 (#pragma GCC warning): Likewise.
8808 * doc/invoke.texi (-fmessage-length): Document this option's
8809 effect on the #warning and #error preprocessor directives and
8810 the deprecated attribute.
8812 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8814 * tree.c (decl_value_expr_lookup): Revert latest change.
8815 (decl_value_expr_insert): Likewise.
8817 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8819 * gimplify.c (nonlocal_vlas): Delete.
8820 (nonlocal_vla_vars): Likewise.
8821 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8823 (gimplify_body): Do not create and destroy nonlocal_vlas.
8824 * tree-nested.c: Include diagnostic.h.
8825 (use_pointer_in_frame): Tweak.
8826 (lookup_field_for_decl): Add assertion and declare the transformation.
8827 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8828 internal error when the reference is in a wrong context. Do not
8829 create a debug decl by default.
8830 (note_nonlocal_block_vlas): Delete.
8831 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8832 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8833 create a debug decl by default.
8834 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8835 call is in a wrong context.
8836 (fixup_vla_decls): New function.
8837 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8838 debug variables were created.
8839 * tree.c (decl_value_expr_lookup): Add checking assertion.
8840 (decl_value_expr_insert): Likewise.
8842 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8845 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8846 * tree-scalar-evolution.c (interpret_expr): Likewise.
8847 (expression_expensive_p): Likewise.
8848 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8849 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8850 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8851 (ssa_defined_by_minus_one_stmt_p): New.
8853 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8856 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8857 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8858 * dojump.c (do_jump): Likewise.
8859 * expr.c (expand_expr_real_2): Check operand type's sign.
8860 * fold-const.c (const_unop): Handle ABSU_EXPR.
8861 (fold_abs_const): Likewise.
8862 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8863 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8864 (strip_sign_op_1): Likesise.
8865 * match.pd: Add new pattern to generate ABSU_EXPR.
8866 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8867 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8868 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8869 * tree-inline.c (estimate_operator_cost): Likewise.
8870 * tree-pretty-print.c (dump_generic_node): Likewise.
8871 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8872 * tree.def (ABSU_EXPR): New.
8874 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8877 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8878 documented as preserved for backward compatibility only.
8879 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8881 PR rtl-optimization/86108
8882 * bb-reorder.c (create_forwarder_block): Renamed to ...
8883 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8884 jump from new landing pad to the second part.
8885 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8888 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8891 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8892 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8893 Only call store_expr for halves if the mode is the same.
8896 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8897 Fix up comment formatting.
8899 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8901 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8902 (typed_splay_tree::closure,
8903 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8904 (typed_splay_tree::typed_splay_tree,
8905 typed_splay_tree::operator =): Declared private.
8906 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8907 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8908 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8909 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8910 typed_splay_tree::splay_tree_splay,
8911 typed_splay_tree::splay_tree_foreach_helper,
8912 typed_splay_tree::splay_tree_insert,
8913 typed_splay_tree::splay_tree_remove,
8914 typed_splay_tree::splay_tree_lookup,
8915 typed_splay_tree::splay_tree_predecessor,
8916 typed_splay_tree::splay_tree_successor,
8917 typed_splay_tree::splay_tree_min,
8918 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8919 (typed_splay_tree::root, typed_splay_tree::comp,
8920 typed_splay_tree::delete_key,
8921 typed_splay_tree::delete_value): New data members.
8922 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8923 typed_splay_tree::remove.
8925 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8927 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8928 -mginv and -mno-ginv to the assembler.
8929 * config/mips/mips.opt (-mcrc): New option.
8931 * doc/invoke.text (-mcrc): Document.
8934 2018-06-15 Nick Clifton <nickc@redhat.com>
8937 * tree.c (escaped_string): New class. Converts an unescaped
8938 string into its escaped equivalent.
8939 (warn_deprecated_use): Use the new class to convert the
8940 deprecation message, if present.
8941 (test_escaped_strings): New self test.
8942 (test_c_tests): Add test_escaped_strings.
8943 * doc/extend.texi (deprecated): Add a note that the
8944 deprecation message is affected by the -fmessage-length
8945 option, and that control characters will be escaped.
8946 (#pragma GCC error): Document this pragma.
8947 (#pragma GCC warning): Likewise.
8948 * doc/invoke.texi (-fmessage-length): Document this option's
8949 effect on the #warning and #error preprocessor directives and
8950 the deprecated attribute.
8952 2018-06-15 Richard Biener <rguenther@suse.de>
8954 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8955 here, also noting vector size used.
8956 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8957 size used in MSG_OPTIMIZED_LOCATIONS dump.
8958 (pass_slp_vectorize::execute): Adjust.
8960 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8963 * config/arc/arc.c (arc_return_address_register): Fix
8966 2018-06-15 Richard Biener <rguenther@suse.de>
8969 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8970 leave useless conversion stripping to force_gimple_operand_gsi.
8971 (gimplify_build2): Likewise.
8972 (gimplify_build1): Likewise.
8974 2018-06-15 Richard Biener <rguenther@suse.de>
8977 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8978 before adjusting their block.
8980 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8982 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8983 multilibs for *-*-rtems*.
8984 * config/riscv/t-rtems: New file.
8986 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8989 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8990 unsigned_type_for returns NULL.
8993 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8994 subregs of multi-word pseudos unless the float mode has word size.
8996 2018-06-14 Richard Biener <rguenther@suse.de>
8999 * tree-vect-generic.c (build_word_mode_vector_type): Remove
9000 duplicate and harmful type_hash_canon.
9001 * tree.c (type_hash_canon): Assert we didn't find ourselves.
9003 2018-06-14 Richard Biener <rguenther@suse.de>
9006 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9009 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
9011 * config/rtems.h (STDINT_LONG32): Define.
9013 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
9014 Prachi Godbole <prachi.godbole@imgtec.com>
9016 * config/mips/mips-cpus.def: Define P6600.
9017 * config/mips/mips-tables.opt: Regenerate.
9018 * config/mips/mips.c (mips_ucbranch_type): New enum.
9019 (mips_rtx_cost_data): Add support for P6600.
9020 (mips_issue_rate): Likewise.
9021 (mips_multipass_dfa_lookahead): Likewise.
9022 (mips_avoid_hazard): Likewise.
9023 (mips_reorg_process_insns): Likewise.
9024 (mips_classify_branch_p6600): New function.
9025 * config/mips/mips.h (TUNE_P6600): New define.
9026 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9027 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9028 * config/mips/mips.md: Include p6600.md.
9029 (processor): Add p6600.
9030 * config/mips/p6600.md: New file.
9031 * doc/invoke.texi: Add p6600 to supported architectures.
9033 2018-06-13 Martin Sebor <msebor@redhat.com>
9035 PR tree-optimization/86114
9036 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9038 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9040 2018-06-13 Richard Biener <rguenther@suse.de>
9042 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9043 Properly set vector type of the intermediate stmt.
9044 * tree-vect-stmts.c (vectorizable_operation): The destination
9045 var always has vectype_out type.
9047 2018-06-13 Jeff Law <law@redhat.com>
9049 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9050 integer 0 for argument to print_rtl_with_bb.
9051 (rl78_reorg): Likewise.
9053 2018-06-13 David Malcolm <dmalcolm@redhat.com>
9055 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9056 from rtx to rtx_insn *.
9057 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9059 (add_sched_insns_for_speculation): Likewise for local "target",
9060 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9061 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9062 from rtx_insn ** to rtx_code_label **.
9063 (reorg_emit_nops): Likewise.
9064 (c6x_reorg): Likewise for local "call_labels".
9065 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9067 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9068 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9069 the loops over LABEL_REFS.
9070 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9072 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9073 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9074 (split_branches): Strengthen local "olabel" from rtx to
9075 rtx_insn *, adding a safe_as_a cast.
9076 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9078 (add_insn_after): Likewise for first two params.
9079 (add_insn_before): Likewise.
9080 (remove_insn): Likewise for param.
9081 (emit_pattern_before_noloc): Likewise for second and third params.
9082 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9083 (emit_call_insn_before_noloc): Likewise.
9084 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9086 (emit_barrier_before): Likewise.
9087 (emit_label_before): Strengthen "label" param from "rtx" to
9088 "rtx_code_label *". Strengthen "before" param from "rtx" to
9090 (emit_insn_after_1): Strengthen "after" param from "rtx" to
9092 (emit_pattern_after_noloc): Likewise.
9093 (emit_insn_after_noloc): Likewise.
9094 (emit_jump_insn_after_noloc): Likewise.
9095 (emit_call_insn_after_noloc): Likewise.
9096 (emit_debug_insn_after_noloc): Likewise.
9097 (emit_barrier_after): Likewise.
9098 (emit_label_after): Likewise for both params.
9099 (emit_pattern_after_setloc): Likewise for "after" param. Convert
9100 "loc" param from "int" to "location_t".
9101 (emit_insn_after_setloc): Likewise.
9102 (emit_jump_insn_after_setloc): Likewise.
9103 (emit_call_insn_after_setloc): Likewise.
9104 (emit_debug_insn_after_setloc): Likewise.
9105 (emit_pattern_before_setloc): Likewise for "before" param. Convert
9106 "loc" param from "int" to "location_t".
9107 (emit_pattern_before): Convert NULL_RTX to NULL.
9108 (emit_insn_before_setloc): Convert "loc" param from "int" to
9110 (emit_jump_insn_before_setloc): Likewise.
9111 (emit_call_insn_before_setloc): Likewise.
9112 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9113 rtx_insn *. Convert "loc" param from "int" to "location_t".
9114 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9115 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9116 Convert 3rd param from "int" to "location_t".
9117 (emit_barrier_before, emit_barrier_after, next_real_insn):
9118 Strengthen param from rtx to rtx_insn *.
9119 (emit_label_before): Strengthen 1st param from "rtx" to
9120 "rtx_code_label *". Strengthen 2nd param from "rtx" to
9122 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9123 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9124 Strengthen 2nd param from "rtx" to "rtx_insn *".
9125 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9126 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9127 Likewise. Convert 3rd param from "int" to "location_t".
9128 (emit_label_after): Strengthen 1st param from "rtx" to
9130 (next_real_insn, remove_insn): Strengthen param from "rtx" to
9132 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9133 from "rtx" to "rtx_insn *".
9135 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
9137 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9138 bodies streamed in with -Q.
9139 * dumpfile.c (dump_files): Add lto-stream-out dump file.
9140 * dumpfile.h (tree_dump_index): Add lto_stream_out.
9141 * gimple-streamer-out.c: Include gimple-pretty-print.h
9142 (output_bb): Dump stmts streamed.
9143 * lto-section-out.c: Include print-tree.h
9144 (lto_begin_section): Dump sections created.
9145 (lto_output_decl_index): Dump decl encoded.
9146 * lto-streamer-out.c: Include print-tree.h
9147 (create_output_block): Dump output block created.
9148 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9149 (output_function): Dump function output.
9150 (output_constructor): Dump constructor streamed.
9151 (write_global_stream): Output indexes encoded.
9152 (produce_asm_for_decls): Dump streams encoded.
9153 * lto-streamer.c (streamer_dump_file): New global var.
9154 * lto-streamer.h (streamer_dump_file): Declare.
9155 * passes.c (ipa_write_summaries): Initialize streamer dump.
9156 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9159 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
9162 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9163 offsets for register save directives. Emit a second batch of save
9164 directives, if need be, when the function accesses prior frames.
9166 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9168 * config/arc/fpu.md (fmasf4): Force operand to register.
9169 (fnmasf4): Likewise.
9171 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9173 * config/arc/arc-protos.h (arc_pad_return): Remove.
9174 * config/arc/arc.c (machine_function): Remove force_short_suffix
9176 (arc_print_operand): Adjust printing of '&'.
9177 (arc_verify_short): Remove conditional printing of short suffix.
9178 (arc_final_prescan_insn): Remove reference to size_reason.
9179 (pad_return): New function.
9180 (arc_reorg): Call pad_return.
9181 (arc_pad_return): Remove.
9182 (arc_init_machine_status): Remove reference to force_short_suffix.
9183 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9184 (attr length): When attribute iscompact is true force to 2
9185 regardless; in the case of maybe check if we want to force the
9186 instruction to have 4 bytes length.
9187 (nopv): Change it to generate 4 byte long nop as well.
9188 (blockage): New pattern.
9189 (simple_return): Remove call to arc_pad_return.
9190 (p_return_i): Likewise.
9192 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9194 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9196 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9198 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9201 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9203 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9204 for ARC700 and ARCv2.
9206 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9209 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9210 operands[2] instead of operands[1].
9213 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9215 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9216 case, check whether the outer register overlaps an unallocatable
9217 register, not just whether it fits the required class.
9219 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9221 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9223 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9224 (memrefs_conflict_p): Likewise.
9225 (init_alias_analysis): Likewise.
9226 * cfgexpand.c (expand_debug_expr): Likewise.
9227 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9228 * cse.c (fold_rtx): Likewise.
9229 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9230 * expr.c (emit_block_move_hints): Likewise.
9231 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9232 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9233 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9234 (emit_group_store): Likewise.
9235 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9236 to read the PRE/POST_MODIFY increment.
9237 * calls.c (store_one_arg): Use strip_offset.
9238 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9240 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9242 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9243 (simplify_binary_operation_1): Extend CONST_INT handling to
9245 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9246 than a HOST_WIDE_INT.
9247 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9249 (adjust_mems, add_stores): Update accodingly.
9250 (vt_canonicalize_addr): Track polynomial offsets.
9251 (emit_note_insn_var_location): Likewise.
9252 (vt_add_function_parameter): Likewise.
9253 (vt_initialize): Likewise.
9255 2018-06-12 Jeff Law <law@redhat.com>
9257 * config.gcc (alpha*-*-freebsd*): Remove.
9258 * config/alpha/freebsd.h: Remove.
9260 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9263 * spellcheck-tree.c (levenshtein_distance): Rename to...
9264 (get_edit_distance): ...this, and update for underlying renaming.
9265 * spellcheck-tree.h (levenshtein_distance): Rename to...
9266 (get_edit_distance): ...this.
9267 * spellcheck.c (levenshtein_distance): Rename to...
9268 (get_edit_distance): ...this. Convert from Levenshtein distance
9269 to Damerau-Levenshtein distance by supporting transpositions of
9270 adjacent characters. Rename "v1" to "v_next" and "v0" to
9272 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9273 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9274 update for underlying renaming.
9275 (selftest::levenshtein_distance_unit_test): Rename to...
9276 (selftest::test_get_edit_distance_unit): ...this, and update for
9277 underlying renaming.
9278 (selftest::test_find_closest_string): Add example from PR 69968
9279 where transposition helps
9280 (selftest::test_metric_conditions): Update for renaming.
9281 (selftest::test_metric_conditions): Likewise.
9282 (selftest::spellcheck_c_tests): Likewise.
9283 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9284 (get_edit_distance): ...this.
9285 (best_match::consider): Update for renaming.
9287 2018-06-12 Martin Sebor <msebor@redhat.com>
9289 PR tree-optimization/85259
9290 * builtins.c (compute_objsize): Handle constant offsets.
9291 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9292 true iff a warning has been issued.
9293 * gimple.h (gimple_nonartificial_location): New function.
9294 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9295 gimple_nonartificial_location and handle -Wno-system-headers.
9296 (handle_builtin_stxncpy): Same.
9298 2018-06-12 Martin Sebor <msebor@redhat.com>
9301 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9303 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9305 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9306 BUILTIN_VEC_XST entries for pointer to double and long long.
9308 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9311 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9313 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9316 2018-06-12 Martin Liska <mliska@suse.cz>
9318 * doc/options.texi: Document IntegerRange.
9320 2018-06-12 Martin Liska <mliska@suse.cz>
9322 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9323 * opt-functions.awk: Handle Deprecated flag.
9324 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9326 (read_cmdline_option): Report warning for a deprecated option.
9327 * opts.h (struct cl_option): Add new field cl_deprecated.
9328 (CL_ERR_DEPRECATED): New.
9330 2018-06-12 Martin Liska <mliska@suse.cz>
9332 * doc/options.texi: Document Deprecated option flag.
9334 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9336 * config/arc/arc-arch.h (arc_extras): New enum.
9337 (arc_cpu_t):Add field extra.
9338 (arc_cpu_types): Consider the extras.
9339 * config/arc/arc-cpus.def: Add extras info.
9340 * config/arc/arc-opts.h (processor_type): Consider extra field.
9341 * config/arc/arc.c (arc_override_options): Handle extra field.
9343 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9345 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9346 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9348 * config/arc/arc.c (arc_init): Update pic warning.
9349 (irq_range): Update irq range parsing warnings.
9350 (arc_override_options): Update various warning messages.
9351 (arc_handle_aux_attribute): Likewise.
9353 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9355 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9357 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9359 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9360 compiler messages directives.
9362 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9364 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9365 * config/mips/mips-tables.opt: Regenerate.
9366 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9368 * doc/invoke.texi: Document -march=i6500.
9370 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9372 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9373 (i6400_gpmul): Add cpu_unit.
9374 (i6400_gpdiv): Likewise.
9375 (i6400_msa_add_d): Update reservations.
9376 (i6400_msa_int_add) Likewise.
9377 (i6400_msa_short_logic3) Likewise.
9378 (i6400_msa_short_logic2) Likewise.
9379 (i6400_msa_short_logic) Likewise.
9380 (i6400_msa_move) Likewise.
9381 (i6400_msa_cmp) Likewise.
9382 (i6400_msa_short_float2) Likewise.
9383 (i6400_msa_div_d) Likewise.
9384 (i6400_msa_long_logic1) Likewise.
9385 (i6400_msa_long_logic2) Likewise.
9386 (i6400_msa_mult) Likewise.
9387 (i6400_msa_long_float2) Likewise.
9388 (i6400_msa_long_float4) Likewise.
9389 (i6400_msa_long_float5) Likewise.
9390 (i6400_msa_long_float8) Likewise.
9391 (i6400_fpu_fadd): Include frint type.
9392 (i6400_fpu_store): New define_insn_reservation.
9393 (i6400_fpu_load): Likewise.
9394 (i6400_fpu_move): Likewise.
9395 (i6400_fpu_fcmp): Likewise.
9396 (i6400_fpu_fmadd): Likewise.
9397 (i6400_int_mult): Include imul3nc type and update reservation.
9398 (i6400_int_div): Include idiv3 type and update reservation.
9399 (i6400_int_load): Update to check type not move_type.
9400 (i6400_int_store): Likewise.
9401 (i6400_int_prefetch): Set zero latency.
9403 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9405 * gcc.c: Document new %@{...} sequence.
9406 (LINK_COMMAND_SPEC): Use it for the -L switches.
9407 (cpp_unique_options): Use it for the -I switches.
9408 (at_file_argbuf): New global variable.
9409 (in_at_file): Likewise.
9410 (alloc_args): Create at_file_argbuf.
9411 (clear_args): Truncate at_file_argbuf.
9412 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9413 (open_at_file): New function.
9414 (close_at_file): Likewise.
9415 (create_at_file): Delete.
9416 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9419 (validate_switches_from_spec): Deal with %@{...} sequence.
9420 (validate_switches): Likewise.
9421 (driver::finalize): Call clear_args.
9423 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9425 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9427 2018-06-11 Martin Sebor <msebor@redhat.com>
9429 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9430 (Wno-class-memaccess): Add @opindex.
9431 (Wno-templates, Wno-multiple-inheritance): Same.
9432 (Wno-virtual-inheritance, Wno-namespaces): Same.
9433 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9434 (Wno-format-overflow, Wno-format-truncation): Same.
9435 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9436 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9437 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9438 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9439 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9440 (Wno-misspelled-isr): Same.
9442 2018-06-11 Martin Sebor <msebor@redhat.com>
9444 * PR tree-optimization/86083
9445 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9447 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9449 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9451 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9454 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9455 on the correct operand.
9456 (*movdi_internal64): Ditto.
9458 2018-06-11 Martin Liska <mliska@suse.cz>
9460 PR tree-optimization/86089
9461 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9463 2018-06-11 Julia Koval <julia.koval@intel.com>
9465 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9466 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9467 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9469 2018-06-11 Olivier Hainque <hainque@adacore.com>
9471 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9472 for Ada with strict dwarf2.
9474 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9477 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9480 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9482 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9484 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9486 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9489 2018-06-08 Martin Liska <mliska@suse.cz>
9491 * tree-cfg.h (debug_function): Fix argument type to match
9494 2018-06-08 Martin Liska <mliska@suse.cz>
9496 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9497 Remove usage of MPX-related (and removed) fields.
9498 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9500 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9502 * cfg.c (debug): Use TDF_NONE rather than 0.
9503 * cfghooks.c (debug): Likewise.
9504 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9505 (struct dump_option_value_info): Convert to...
9506 (struct kv_pair): ...this template type.
9507 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9509 (optinfo_verbosity_options): Likewise.
9510 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9512 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9513 than int for "optgroup_flags" param.
9514 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9516 (dump_dec): Likewise.
9517 (dump_finish): Use TDF_NONE rather than 0.
9518 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9519 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9520 than 0. Update for change to option_ptr.
9521 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9522 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9523 0. Update for changes to optinfo_verbosity_options and
9525 (opt_info_switch_p): Convert optgroup_flags from int to
9527 (dump_basic_block): Use dump_flags_t rather than int
9528 for "dump_kind" param.
9529 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9530 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9531 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9532 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9533 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9534 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9535 TDF_NONE): Convert from macros to...
9536 (enum dump_flag): ...this new enum.
9537 (dump_flags_t): Update to use enum.
9538 (operator|, operator&, operator~, operator|=, operator&=):
9539 Implement for dump_flags_t.
9540 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9541 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9542 Convert from macros to...
9543 (enum optgroup_flag): ...this new enum.
9544 (optgroup_flags_t): New typedef.
9545 (operator|, operator|=): Implement for optgroup_flags_t.
9546 (struct dump_file_info): Convert field "alt_flags" to
9547 dump_flags_t. Convert field "optgroup_flags" to
9549 (dump_basic_block): Use dump_flags_t rather than int for param.
9550 (dump_generic_expr_loc): Likewise.
9551 (dump_dec): Likewise.
9552 (dump_register): Convert param "optgroup_flags" to
9554 (opt_info_enable_passes): Likewise.
9555 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9557 * gimple-pretty-print.c (debug): Likewise.
9558 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9559 (merged_store_group::apply_stores): Likewise.
9560 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9561 * gimple.c (verify_gimple_pp): Likewise.
9562 * graphite-poly.c (print_pbb_body): Likewise.
9563 * passes.c (pass_manager::register_one_dump_file): Convert
9564 local "optgroup_flags" to optgroup_flags_t.
9565 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9567 (debug_body): Likewise.
9568 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9569 to optgroup_flags_t.
9570 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9572 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9573 (convert_mult_to_fma): Likewise.
9574 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9575 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9576 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9577 "dump_kind" to dump_flags_t.
9579 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9581 * config/rs6000/rs6000.c (min, max): Delete.
9583 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9585 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9586 -mabi=spe and -mabi=no-spe.
9588 2018-06-08 Martin Liska <mliska@suse.cz>
9590 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9591 where we expect an existing summary.
9593 2018-06-08 Martin Liska <mliska@suse.cz>
9595 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9596 * ipa-inline.h (estimate_edge_growth): Likewise.
9598 2018-06-08 Martin Liska <mliska@suse.cz>
9600 * cgraph.c (function_version_hasher::hash): Use
9601 cgraph_node::get_uid ().
9602 (function_version_hasher::equal):
9603 * cgraph.h (cgraph_node::get_uid): New method.
9604 * ipa-inline.c (update_caller_keys): Use
9605 cgraph_node::get_uid ().
9606 (update_callee_keys): Likewise.
9607 * ipa-utils.c (searchc): Likewise.
9608 (ipa_reduced_postorder): Likewise.
9609 * lto-cgraph.c (input_node): Likewise.
9610 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9611 * symbol-summary.h (symtab_insertion): Likewise.
9612 (symtab_removal): Likewise.
9613 (symtab_duplication): Likewise.
9614 * tree-pretty-print.c (dump_function_header): Likewise.
9615 * tree-sra.c (convert_callers_for_node): Likewise.
9617 2018-06-08 Martin Liska <mliska@suse.cz>
9619 * cgraph.c (symbol_table::create_edge): Always assign a new
9621 (symbol_table::free_edge): Do not recycle numbers.
9622 * cgraph.h (cgraph_edge::get): New method.
9623 * symbol-summary.h (symtab_removal): Use it.
9624 (symtab_duplication): Likewise.
9625 (call_summary::hashable_uid): Remove.
9627 2018-06-08 Martin Liska <mliska@suse.cz>
9629 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9630 (initialize_growth_caches): Remove.
9631 (free_growth_caches): Likewise.
9632 (do_estimate_edge_time): Use edge_growth_cache.
9633 (do_estimate_edge_size): Likewise.
9634 (do_estimate_edge_hints): Likewise.
9635 * ipa-inline.c (reset_edge_caches): Likewise.
9636 (recursive_inlining): Likewise.
9637 (inline_small_functions): Likewise.
9638 * ipa-inline.h (initialize_growth_caches): Remove.
9639 (estimate_edge_size): Likewise.
9640 (estimate_edge_time): Likewise.
9641 (estimate_edge_hints): Likewise.
9642 (reset_edge_growth_cache): Likewise.
9643 * symbol-summary.h (call_summary::remove): New method.
9645 2018-06-08 Martin Liska <mliska@suse.cz>
9647 * ipa-cp.c (class edge_clone_summary): New summary.
9648 (grow_edge_clone_vectors): Remove.
9649 (ipcp_edge_duplication_hook): Remove.
9650 (class edge_clone_summary_t): New call_summary class.
9651 (ipcp_edge_removal_hook): Remove.
9652 (edge_clone_summary_t::duplicate): New function.
9653 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9654 (create_specialized_node): Likewise.
9655 (ipcp_driver): Initialize edge_clone_summaries and do not
9658 2018-06-08 Martin Liska <mliska@suse.cz>
9660 * symbol-summary.h (get): New function.
9661 (call_summary::m_initialize_when_cloning): New class member.
9663 2018-06-08 Martin Liska <mliska@suse.cz>
9665 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9666 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9667 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9668 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9669 (remove_cgraph_node_from_order): Use the removed_nodes set.
9670 (do_per_function_toporder): Likwise.
9671 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9672 instead of summary_uid.
9673 (symtab_removal): Likewise.
9674 (symtab_duplication): Likewise.
9676 2018-06-08 Martin Liska <mliska@suse.cz>
9678 * ipa-cp.c (ipcp_store_bits_results): Use
9679 ipcp_transformation_sum.
9680 (ipcp_store_vr_results): Likewise.
9681 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9683 (ipcp_transformation_initialize): ... this.
9684 (ipa_set_node_agg_value_chain):
9685 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9686 (write_ipcp_transformation_info): Likewise.
9687 (read_ipcp_transformation_info): Likewise.
9688 (ipcp_update_bits): Likewise.
9689 (ipcp_update_vr): Likewise.
9690 (ipcp_transform_function): Likewise.
9691 * ipa-prop.h: Rename ipcp_transformation_summary to
9692 ipcp_transformation.
9693 (class ipcp_transformation_t): New function summary.
9694 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9695 (ipa_get_agg_replacements_for_node): Likewise.
9697 2018-06-08 Martin Liska <mliska@suse.cz>
9699 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9701 (class funct_state_summary_t): New function_summary class.
9702 (has_function_state): Remove.
9703 (get_function_state): Likewise.
9704 (set_function_state): Likewise.
9705 (add_new_function): Likewise.
9706 (funct_state_summary_t::insert): New function.
9707 (duplicate_node_data): Remove.
9708 (remove_node_data): Remove.
9709 (funct_state_summary_t::duplicate): New function.
9710 (register_hooks): Create new funct_state_summaries.
9711 (pure_const_generate_summary): Use it.
9712 (pure_const_write_summary): Likewise.
9713 (pure_const_read_summary): Likewise.
9714 (propagate_pure_const): Likewise.
9715 (propagate_nothrow): Likewise.
9716 (dump_malloc_lattice): Likewise.
9717 (propagate_malloc): Likewise.
9718 (execute): Do not register hooks, just remove summary
9720 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9723 2018-06-08 Martin Liska <mliska@suse.cz>
9725 * ipa-reference.c (remove_node_data): Remove.
9726 (duplicate_node_data): Likewise.
9727 (class ipa_ref_var_info_summary_t): New class.
9728 (class ipa_ref_opt_summary_t): Likewise.
9729 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9730 (get_reference_optimization_summary): Use
9731 ipa_ref_opt_sum_summaries.
9732 (set_reference_vars_info): Remove.
9733 (set_reference_optimization_summary): Likewise.
9734 (ipa_init): Create summaries.
9735 (init_function_info): Use function summary.
9736 (ipa_ref_opt_summary_t::duplicate): New function.
9737 (ipa_ref_opt_summary_t::remove): New function.
9738 (get_read_write_all_from_node): Fix GNU coding style.
9739 (propagate): Use function summary.
9740 (write_node_summary_p): Fix GNU coding style.
9741 (stream_out_bitmap): Likewise.
9742 (ipa_reference_read_optimization_summary): Use function summary.
9743 (ipa_reference_c_finalize): Do not release hooks.
9745 2018-06-08 Martin Liska <mliska@suse.cz>
9747 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9748 (analyze_function_body): Extract multiple calls of get_create.
9749 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9750 * ipa-inline.c (recursive_inlining): Use ::get method.
9751 * ipa-inline.h (estimate_edge_growth): Likewise.
9753 2018-06-08 Martin Liska <mliska@suse.cz>
9755 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9757 (hsa_function_summary::hsa_function_summary): Use the new enum
9759 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9760 * hsa-gen.c (hsa_get_host_function): Likewise.
9761 (get_brig_function_name): Likewise.
9762 * ipa-hsa.c (process_hsa_functions): Likewise.
9763 (ipa_hsa_write_summary): Likewise.
9764 * symbol-summary.h (symtab_duplication): Use ::get function/
9765 (get): New function.
9767 2018-06-08 Martin Liska <mliska@suse.cz>
9769 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9771 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9772 (hsa_register_kernel): Likewise.
9773 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9774 * hsa-gen.c (hsa_get_host_function): Likewise.
9775 (get_brig_function_name): Likewise.
9776 (generate_hsa): Likewise.
9777 (pass_gen_hsail::execute): Likewise.
9778 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9779 (devirtualization_time_bonus): Likewise.
9780 (ipcp_propagate_stage): Likewise.
9781 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9782 (edge_set_predicate): Likewise.
9783 (evaluate_conditions_for_known_args): Likewise.
9784 (evaluate_properties_for_edge): Likewise.
9785 (ipa_fn_summary::reset): Likewise.
9786 (ipa_fn_summary_t::duplicate): Likewise.
9787 (dump_ipa_call_summary): Likewise.
9788 (ipa_dump_fn_summary): Likewise.
9789 (analyze_function_body): Likewise.
9790 (compute_fn_summary): Likewise.
9791 (estimate_edge_devirt_benefit): Likewise.
9792 (estimate_edge_size_and_time): Likewise.
9793 (estimate_calls_size_and_time): Likewise.
9794 (estimate_node_size_and_time): Likewise.
9795 (inline_update_callee_summaries): Likewise.
9796 (remap_edge_change_prob): Likewise.
9797 (remap_edge_summaries): Likewise.
9798 (ipa_merge_fn_summary_after_inlining): Likewise.
9799 (ipa_update_overall_fn_summary): Likewise.
9800 (read_ipa_call_summary): Likewise.
9801 (inline_read_section): Likewise.
9802 (write_ipa_call_summary): Likewise.
9803 (ipa_fn_summary_write): Likewise.
9804 (ipa_free_fn_summary): Likewise.
9805 * ipa-hsa.c (process_hsa_functions): Likewise.
9806 (ipa_hsa_write_summary): Likewise.
9807 (ipa_hsa_read_section): Likewise.
9808 * ipa-icf.c (sem_function::merge): Likewise.
9809 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9810 (do_estimate_edge_time): Likewise.
9811 (estimate_size_after_inlining): Likewise.
9812 (estimate_growth): Likewise.
9813 (growth_likely_positive): Likewise.
9814 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9815 (inline_call): Likewise.
9816 * ipa-inline.c (caller_growth_limits): Likewise.
9817 (can_inline_edge_p): Likewise.
9818 (can_inline_edge_by_limits_p): Likewise.
9819 (compute_uninlined_call_time): Likewise.
9820 (compute_inlined_call_time): Likewise.
9821 (want_inline_small_function_p): Likewise.
9822 (edge_badness): Likewise.
9823 (update_caller_keys): Likewise.
9824 (update_callee_keys): Likewise.
9825 (recursive_inlining): Likewise.
9826 (inline_small_functions): Likewise.
9827 (inline_to_all_callers_1): Likewise.
9828 (dump_overall_stats): Likewise.
9829 (early_inline_small_functions): Likewise.
9830 (early_inliner): Likewise.
9831 * ipa-inline.h (estimate_edge_growth): Likewise.
9832 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9833 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9834 * ipa-prop.h (IPA_NODE_REF): Likewise.
9835 (IPA_EDGE_REF): Likewise.
9836 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9837 (propagate_malloc): Likewise.
9838 * ipa-split.c (execute_split_functions): Likewise.
9839 * symbol-summary.h: Rename get to get_create.
9841 (get_create): Likewise.
9842 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9844 2018-06-08 Martin Liska <mliska@suse.cz>
9846 * symbol-summary.h (release): Move definition out of class
9848 (symtab_removal): Likewise.
9849 (symtab_duplication): Likewise.
9851 2018-06-08 Martin Liska <mliska@suse.cz>
9853 * symbol-summary.h (function_summary): Move constructor
9854 implementation out of class declaration.
9855 (release): Likewise.
9856 (symtab_insertion): Likewise.
9857 (symtab_removal): Likewise.
9858 (symtab_duplication): Likewise.
9861 2018-06-08 Martin Liska <mliska@suse.cz>
9863 * Makefile.in: Remove support for MPX (macros, related functions,
9864 fields in cgraph_node, ...).
9865 * builtin-types.def (BT_BND): Likewise.
9866 (BT_FN_BND_CONST_PTR): Likewise.
9867 (BT_FN_CONST_PTR_BND): Likewise.
9868 (BT_FN_VOID_PTR_BND): Likewise.
9869 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9870 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9871 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9872 (expand_builtin_mempcpy_with_bounds): Likewise.
9873 (expand_builtin_memset_with_bounds): Likewise.
9874 (expand_builtin_memset_args): Likewise.
9875 (std_expand_builtin_va_start): Likewise.
9876 (expand_builtin): Likewise.
9877 (expand_builtin_with_bounds): Likewise.
9878 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9879 (DEF_LIB_BUILTIN_CHKP): Likewise.
9880 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9881 (DEF_CHKP_BUILTIN): Likewise.
9882 (BUILT_IN_MEMCPY): Likewise.
9883 (BUILT_IN_MEMMOVE): Likewise.
9884 (BUILT_IN_MEMPCPY): Likewise.
9885 (BUILT_IN_MEMSET): Likewise.
9886 (BUILT_IN_STPCPY): Likewise.
9887 (BUILT_IN_STRCAT): Likewise.
9888 (BUILT_IN_STRCHR): Likewise.
9889 (BUILT_IN_STRCPY): Likewise.
9890 (BUILT_IN_STRLEN): Likewise.
9891 (BUILT_IN_MEMCPY_CHK): Likewise.
9892 (BUILT_IN_MEMMOVE_CHK): Likewise.
9893 (BUILT_IN_MEMPCPY_CHK): Likewise.
9894 (BUILT_IN_MEMSET_CHK): Likewise.
9895 (BUILT_IN_STPCPY_CHK): Likewise.
9896 (BUILT_IN_STRCAT_CHK): Likewise.
9897 (BUILT_IN_STRCPY_CHK): Likewise.
9898 * calls.c (store_bounds): Likewise.
9899 (emit_call_1): Likewise.
9900 (special_function_p): Likewise.
9901 (maybe_warn_nonstring_arg): Likewise.
9902 (initialize_argument_information): Likewise.
9903 (finalize_must_preallocate): Likewise.
9904 (compute_argument_addresses): Likewise.
9905 (expand_call): Likewise.
9906 * cfgexpand.c (expand_call_stmt): Likewise.
9907 (expand_return): Likewise.
9908 (expand_gimple_stmt_1): Likewise.
9909 (pass_expand::execute): Likewise.
9910 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9911 (cgraph_node::remove): Likewise.
9912 (cgraph_node::dump): Likewise.
9913 (cgraph_node::verify_node): Likewise.
9914 * cgraph.h (chkp_function_instrumented_p): Likewise.
9915 (symtab_node::get_alias_target): Likewise.
9916 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9917 (cgraph_local_p): Likewise.
9918 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9919 (cgraph_edge::rebuild_references): Likewise.
9920 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9921 (walk_polymorphic_call_targets): Likewise.
9922 (cgraph_node::expand_thunk): Likewise.
9923 (symbol_table::output_weakrefs): Likewise.
9924 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9925 (ix86_handle_option): Likewise.
9926 * config/i386/constraints.md: Likewise.
9927 * config/i386/i386-builtin-types.def (BND): Likewise.
9931 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9932 (BDESC_FIRST): Likewise.
9934 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9935 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9936 * config/i386/i386.c (enum reg_class): Likewise.
9937 (ix86_target_string): Likewise.
9938 (ix86_option_override_internal): Likewise.
9939 (ix86_conditional_register_usage): Likewise.
9940 (ix86_valid_target_attribute_inner_p): Likewise.
9941 (ix86_set_indirect_branch_type): Likewise.
9942 (ix86_set_current_function): Likewise.
9943 (ix86_function_arg_regno_p): Likewise.
9944 (init_cumulative_args): Likewise.
9945 (ix86_function_arg_advance): Likewise.
9946 (ix86_function_arg): Likewise.
9947 (ix86_pass_by_reference): Likewise.
9948 (ix86_function_value_regno_p): Likewise.
9949 (ix86_function_value_1): Likewise.
9950 (ix86_function_value_bounds): Likewise.
9951 (ix86_return_in_memory): Likewise.
9952 (ix86_setup_incoming_vararg_bounds): Likewise.
9953 (ix86_va_start): Likewise.
9954 (indirect_thunk_need_prefix): Likewise.
9955 (print_reg): Likewise.
9956 (ix86_print_operand): Likewise.
9957 (ix86_expand_call): Likewise.
9958 (ix86_output_function_return): Likewise.
9959 (reg_encoded_number): Likewise.
9960 (BDESC_VERIFYS): Likewise.
9961 (ix86_init_mpx_builtins): Likewise.
9962 (ix86_init_builtins): Likewise.
9963 (ix86_emit_cmove): Likewise.
9964 (ix86_emit_move_max): Likewise.
9965 (ix86_expand_builtin): Likewise.
9966 (ix86_builtin_mpx_function): Likewise.
9967 (ix86_get_arg_address_for_bt): Likewise.
9968 (ix86_load_bounds): Likewise.
9969 (ix86_store_bounds): Likewise.
9970 (ix86_load_returned_bounds): Likewise.
9971 (ix86_store_returned_bounds): Likewise.
9972 (ix86_class_likely_spilled_p): Likewise.
9973 (ix86_hard_regno_mode_ok): Likewise.
9974 (x86_order_regs_for_local_alloc): Likewise.
9975 (ix86_mitigate_rop): Likewise.
9976 (ix86_bnd_prefixed_insn_p): Likewise.
9977 (ix86_mpx_bound_mode): Likewise.
9978 (ix86_make_bounds_constant): Likewise.
9979 (ix86_initialize_bounds): Likewise.
9980 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9981 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9982 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9983 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9984 (TARGET_CHKP_BOUND_MODE): Likewise.
9985 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9986 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9987 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9988 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9989 * config/i386/i386.h (TARGET_MPX): Likewise.
9990 (TARGET_MPX_P): Likewise.
9991 (VALID_BND_REG_MODE): Likewise.
9992 (FIRST_BND_REG): Likewise.
9993 (LAST_BND_REG): Likewise.
9994 (enum reg_class): Likewise.
9995 (BND_REG_P): Likewise.
9996 (BND_REGNO_P): Likewise.
9997 (BNDmode): Likewise.
9998 (ADJUST_INSN_LENGTH): Likewise.
9999 * config/i386/i386.md: Likewise.
10000 * config/i386/i386.opt: Likewise.
10001 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10002 (defined): Likewise.
10003 (LINK_MPX): Likewise.
10004 (MPX_SPEC): Likewise.
10005 (LIBMPX_SPEC): Likewise.
10006 (LIBMPXWRAPPERS_SPEC): Likewise.
10007 (CHKP_SPEC): Likewise.
10008 * config/i386/predicates.md: Likewise.
10009 * dbxout.c (dbxout_type): Likewise.
10010 * doc/extend.texi: Likewise.
10011 * doc/invoke.texi: Likewise.
10012 * doc/md.texi: Likewise.
10013 * doc/tm.texi: Likewise.
10014 * doc/tm.texi.in: Likewise.
10015 * dwarf2out.c (is_base_type): Likewise.
10016 (gen_formal_types_die): Likewise.
10017 (gen_subprogram_die): Likewise.
10018 (gen_type_die_with_usage): Likewise.
10019 (gen_decl_die): Likewise.
10020 (dwarf2out_late_global_decl): Likewise.
10021 * expr.c (expand_assignment): Likewise.
10022 (emit_storent_insn): Likewise.
10023 (store_expr_with_bounds): Likewise.
10024 (store_expr): Likewise.
10025 (expand_expr_real_1): Likewise.
10026 * expr.h (store_expr_with_bounds): Likewise.
10027 * function.c (use_register_for_decl): Likewise.
10028 (struct bounds_parm_data): Likewise.
10029 (assign_parms_augmented_arg_list): Likewise.
10030 (assign_parm_find_entry_rtl): Likewise.
10031 (assign_parm_is_stack_parm): Likewise.
10032 (assign_parm_load_bounds): Likewise.
10033 (assign_bounds): Likewise.
10034 (assign_parms): Likewise.
10035 (expand_function_start): Likewise.
10036 * gcc.c (CHKP_SPEC): Likewise.
10037 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10038 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10039 (wrestrict_dom_walker::check_call): Likewise.
10040 * gimple.c (gimple_build_call_from_tree): Likewise.
10041 * gimple.h (enum gf_mask): Likewise.
10042 (gimple_call_with_bounds_p): Likewise.
10043 (gimple_call_set_with_bounds): Likewise.
10044 * gimplify.c (gimplify_init_constructor): Likewise.
10045 * ipa-cp.c (initialize_node_lattices): Likewise.
10046 (propagate_constants_across_call): Likewise.
10047 (find_more_scalar_values_for_callers_subset): Likewise.
10048 * ipa-hsa.c (process_hsa_functions): Likewise.
10049 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10050 * ipa-icf.c (sem_function::merge): Likewise.
10051 * ipa-inline.c (early_inliner): Likewise.
10052 * ipa-pure-const.c (warn_function_noreturn): Likewise.
10053 (warn_function_cold): Likewise.
10054 (propagate_pure_const): Likewise.
10055 * ipa-ref.h (enum GTY): Likewise.
10056 * ipa-split.c (find_retbnd): Likewise.
10057 (consider_split): Likewise.
10058 (split_function): Likewise.
10059 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10060 * ipa.c (walk_polymorphic_call_targets): Likewise.
10061 (symbol_table::remove_unreachable_nodes): Likewise.
10062 (process_references): Likewise.
10063 (cgraph_build_static_cdtor_1): Likewise.
10064 * lto-cgraph.c (lto_output_node): Likewise.
10065 (output_refs): Likewise.
10066 (compute_ltrans_boundary): Likewise.
10067 (input_overwrite_node): Likewise.
10068 (input_node): Likewise.
10069 (input_cgraph_1): Likewise.
10070 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10071 * passes.c (pass_manager::execute_early_local_passes): Likewise.
10072 (class pass_chkp_instrumentation_passes): Likewise.
10073 (make_pass_chkp_instrumentation_passes): Likewise.
10074 * passes.def: Likewise.
10075 * rtl.h (struct GTY): Likewise.
10076 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10077 * stor-layout.c (layout_type): Likewise.
10078 * symtab.c: Likewise.
10079 * target.def: Likewise.
10080 * targhooks.c (default_chkp_bound_type): Likewise.
10081 (default_chkp_bound_mode): Likewise.
10082 (default_builtin_chkp_function): Likewise.
10083 (default_chkp_function_value_bounds): Likewise.
10084 (default_chkp_make_bounds_constant): Likewise.
10085 (default_chkp_initialize_bounds): Likewise.
10086 * targhooks.h (default_chkp_bound_type): Likewise.
10087 (default_chkp_bound_mode): Likewise.
10088 (default_builtin_chkp_function): Likewise.
10089 (default_chkp_function_value_bounds): Likewise.
10090 (default_chkp_make_bounds_constant): Likewise.
10091 (default_chkp_initialize_bounds): Likewise.
10092 * toplev.c (compile_file): Likewise.
10093 (process_options): Likewise.
10094 * tree-core.h (DEF_BUILTIN): Likewise.
10095 (DEF_BUILTIN_CHKP): Likewise.
10096 * tree-inline.c (declare_return_variable): Likewise.
10097 (remap_gimple_stmt): Likewise.
10098 (copy_bb): Likewise.
10099 (initialize_inlined_parameters): Likewise.
10100 (expand_call_inline): Likewise.
10101 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10102 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10103 (make_pass_ipa_chkp_produce_thunks): Likewise.
10104 (make_pass_chkp): Likewise.
10105 (make_pass_chkp_opt): Likewise.
10106 (make_pass_chkp_instrumentation_passes): Likewise.
10107 * tree-pretty-print.c (dump_generic_node): Likewise.
10108 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10109 * tree-ssa-dce.c (propagate_necessity): Likewise.
10110 (eliminate_unnecessary_stmts): Likewise.
10111 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10112 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10113 * tree-ssa-sccvn.h: Likewise.
10114 * tree-ssa-strlen.c (get_string_length): Likewise.
10115 (valid_builtin_call): Likewise.
10116 (adjust_last_stmt): Likewise.
10117 (handle_builtin_strchr): Likewise.
10118 (handle_builtin_strcpy): Likewise.
10119 (handle_builtin_stxncpy): Likewise.
10120 (handle_builtin_memcpy): Likewise.
10121 (handle_builtin_strcat): Likewise.
10122 (strlen_check_and_optimize_stmt): Likewise.
10123 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10124 * tree-streamer-in.c: Likewise.
10125 * tree-streamer.c (record_common_node): Likewise.
10126 * tree.c (tree_code_size): Likewise.
10127 (wide_int_to_tree_1): Likewise.
10128 (type_contains_placeholder_1): Likewise.
10129 (build_common_tree_nodes): Likewise.
10130 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10131 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10132 (POINTER_BOUNDS_P): Likewise.
10133 (BOUNDED_TYPE_P): Likewise.
10134 (BOUNDED_P): Likewise.
10135 (CALL_WITH_BOUNDS_P): Likewise.
10136 (pointer_bounds_type_node): Likewise.
10137 * value-prof.c (gimple_ic): Likewise.
10138 * var-tracking.c (vt_add_function_parameters): Likewise.
10139 * varasm.c (make_decl_rtl): Likewise.
10140 (assemble_start_function): Likewise.
10141 (output_constant): Likewise.
10142 (maybe_assemble_visibility): Likewise.
10143 * varpool.c (ctor_for_folding): Likewise.
10144 * chkp-builtins.def: Remove.
10145 * ipa-chkp.c: Remove.
10146 * ipa-chkp.h: Remove.
10147 * rtl-chkp.c: Remove.
10148 * rtl-chkp.h: Remove.
10149 * tree-chkp-opt.c: Remove.
10150 * tree-chkp.c: Remove.
10151 * tree-chkp.h: Remove.
10153 2018-06-07 Carl Love <cel@us.ibm.com>
10155 * config/rs6000/vsx.md (vextract_fp_from_shorth,
10156 vextract_fp_from_shortl): Add BE support.
10158 2018-06-07 Paul Koning <ni1d@arrl.net>
10160 * compare-elim.c (try_merge_compare): Don't merge compare if
10161 address contains a side effect.
10162 (try_eliminate_compare): Likewise.
10164 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
10166 * config.gcc: Support "tremont".
10167 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10168 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10170 * config/i386/i386.c (m_TREMONT): Define.
10171 (processor_target_table): Add "tremont".
10172 (PTA_TREMONT): Define.
10173 (ix86_lea_outperforms): Add TARGET_TREMONT.
10174 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10175 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10176 and M_INTEL_GOLDMONT_PLUS.
10177 (fold_builtin_cpu): Add "tremont".
10178 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10179 (ix86_option_override_internal): Add "tremont".
10180 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10181 (processor_type): Add PROCESSOR_TREMONT.
10182 * config/i386/x86-tune.def: Add m_TREMONT.
10183 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10185 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10187 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10188 symbol defined for msp430i* devices to be lower case.
10190 2018-06-07 Richard Biener <rguenther@suse.de>
10192 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10193 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10194 Properly wrap signed arithmetic if overflow wraps.
10196 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10198 PR tree-optimization/69615
10199 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10200 of a cast from a same precision integral SSA_NAME in a bb dominated
10201 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10202 cast to utype if rhs2 has already a compatible type.
10204 2018-06-07 Richard Biener <rguenther@suse.de>
10206 PR tree-optimization/85935
10207 * graphite-scop-detection.c (find_params_in_bb): Analyze
10208 condition operands with respect to the correct loop. Assert
10209 the analysis doesn't fail.
10211 2018-06-04 Carl Love <cel@us.ibm.com>
10213 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10214 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10215 as it is slightly cheaper.
10216 (first_match_or_eos_index_<mode>):
10217 Calculate index using natural element order.
10218 (first_match_index_<mode>):
10219 Calculate index using natural element order.
10220 (first_match_or_eos_index_<mode>):
10221 Calculate index using natural order.
10222 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10223 for BE and LE modes.
10224 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10225 P9V_BUILTIN_VCLZLSBB_V16QI.
10226 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10229 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10231 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10232 indentation and line wrap for many prototypes. Add missing
10233 @smallexample directives around block of prototypes for vec_xl and
10236 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10238 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10239 track if we pass or return IEEE 128-bit floating point.
10240 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10241 C++ mangling that is compatible with GCC 8.1.
10242 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10243 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10244 floating point types.
10245 (rs6000_function_arg_advance_1): Likewise.
10246 (rs6000_mangle_type): Optionally generate mangled names that match
10247 what GCC 8.1 generated for IEEE 128-bit floating point types.
10248 (rs6000_globalize_decl_name): If we have an external function that
10249 passes or returns IEEE 128-bit types, generate a weak reference
10250 from the mangled name used in GCC 8.1 to the current mangled
10252 (rs6000_init_builtins): Make __ibm128 use the long double type if
10253 long double is IBM extended double. Make __float128 use the long
10254 double type if long double is IEEE 128-bit.
10257 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10258 macro for __ibm128 built-in functions.
10259 (PACK_IF): Add __ibm128 pack/unpack functions.
10260 (UNPACK_IF): Likewise.
10261 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10262 enable long double built-in functions if long double is IEEE
10263 128-bit floating point.
10264 (rs6000_invalid_builtin): Update long double built-in function
10266 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10267 functions, adjust the built-in function to use the long double
10268 built-in function if __ibm128 and long double are the same type.
10269 * doc/extend.texi (PowerPC builtins): Update documention for
10270 __builtin_{,un}pack_longdouble. Add documentation for
10271 __builtin_{,un}pack_ibm128.
10273 2018-06-06 Jim Wilson <jimw@sifive.com>
10275 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10276 (struct machine_function): New field interrupt_mode.
10277 (riscv_handle_type_attribute): New function. Add forward declaration.
10278 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10279 (riscv_expand_epilogue): Check interrupt_mode field.
10280 (riscv_set_current_function): Check interrupt attribute args and
10281 set interrupt_mode field.
10282 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10283 (riscv_sret, riscv_uret): New.
10284 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10285 new arguments to interrupt attribute.
10287 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10290 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10291 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10293 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10295 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10296 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10297 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10298 several redundant entries.
10300 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10302 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10303 type from "rtx" to "rtx_insn *".
10304 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10305 for local "call_insn", removing cast.
10306 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10308 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10310 PR tree-optimization/86066
10311 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10312 for BIT_INSERT_EXPR stores.
10314 2018-06-06 Richard Biener <rguenther@suse.de>
10316 PR tree-optimization/86062
10317 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10318 component refs ontop
10319 of to be offsetted base.
10321 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10323 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10324 to be static and remove check on interrupt attribute name.
10326 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10328 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10329 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10331 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10334 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10336 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10337 Remove second argument, change how error is called.
10338 (aarch64_layout_arg): Remove second argument from
10339 aarch64_err_no_fpadvsimd call.
10340 (aarch64_init_cumulative_args): Ditto.
10341 (aarch64_gimplify_va_arg_expr): Ditto.
10342 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10344 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10346 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10347 (*simple_return_indirect_internal<mode>): Rename from
10348 simple_return_indirect_internal. Use W mode iterator.
10349 (rstorssp): New expander.
10350 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10351 (clrssbsy): New expander.
10352 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10354 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10356 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10358 (cmse_check_pointed_object): Likewise.
10360 2018-06-05 Martin Liska <mliska@suse.cz>
10362 PR gcov-profile/47618
10363 * doc/invoke.texi: Document how -fprofile-dir format
10366 2018-06-05 Richard Biener <rguenther@suse.de>
10368 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10369 removal pretend DOM info isn't available so we do not update
10370 it and only remove edges, not dominated blocks. Actually free
10371 DOM info in case we removed something. Remove unreachable blocks.
10372 (mfb_keep_latches): Work with either DOM info or marked backedges.
10373 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10374 first. Mark backedges if DOM info isn't available.
10375 (Re-)compute DOM info after cleanup_control_flow_pre.
10377 2018-06-05 Richard Biener <rguenther@suse.de>
10379 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10380 (locus_discrim_hasher::hash): Adjust.
10381 (locus_discrim_hasher::equal): Likewise.
10382 (next_discriminator_for_locus): Work on line directly.
10383 (same_line_p): Pass in expanded locus1 as well.
10384 (assign_discriminators): Avoid redundant location expansions.
10386 2018-06-05 Richard Biener <rguenther@suse.de>
10388 PR tree-optimization/86046
10389 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10390 if required after clearing TREE_ADDRESSABLE.
10392 2018-06-05 Richard Biener <rguenther@suse.de>
10394 PR tree-optimization/86047
10395 * tree-ssa-loop.c (for_each_index): Glob handling of all
10396 decls and constants and really handle all of them.
10398 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10401 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10402 qualifier_void_pointer and qualifier_const_void_pointer.
10403 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10404 (arm_init_builtins): Handle the above.
10405 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10406 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10407 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10410 2018-06-05 Martin Liska <mliska@suse.cz>
10412 * auto-profile.c (read_autofdo_file): Do not use
10413 gcov_ctr_summary struct.
10414 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10415 * coverage.c (struct counts_entry): Likewise.
10416 (read_counts_file): Read just single summary entry.
10417 (get_coverage_counts): Use gcov_summary struct.
10418 * coverage.h (get_coverage_counts): Likewise.
10419 * gcov-dump.c (dump_working_sets): Likewise.
10420 (tag_summary): Dump just single summary.
10421 * gcov-io.c (gcov_write_summary): Write just histogram
10423 (gcov_read_summary): Read just single summary.
10424 (compute_working_sets): Use gcov_summary struct.
10425 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10426 of GCOV_COUNTERS_SUMMABLE.
10427 (GCOV_COUNTERS_SUMMABLE): Remove.
10428 (GCOV_FIRST_VALUE_COUNTER): Replace with
10429 GCOV_COUNTER_V_INTERVAL.
10430 (struct gcov_ctr_summary): Remove.
10431 (struct gcov_summary): Directly use fields of former
10433 (compute_working_sets): Use gcov_summary struct.
10434 * gcov.c (read_count_file): Do not use ctrs fields.
10435 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10437 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10439 * profile.c: Likewise.
10440 * profile.h: Likewise.
10442 2018-06-05 Martin Liska <mliska@suse.cz>
10444 PR gcov-profile/84846
10445 * gcov.c (output_lines): Print working directory only
10446 in intermediate format.
10448 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10450 * config/s390/s390-builtin-types.def: Add void function type.
10451 * config/s390/s390-builtins.def: Use the function type for the
10454 2018-06-04 Jim Wilson <jimw@sifive.com>
10456 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10458 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10459 and maybe_eh_return. Change regno to unsigned int. Use new args to
10460 handle EH_RETURN_DATA_REGNO registers properly.
10461 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10462 (riscv_expand_epilogue): Update comment. Change argument name and
10463 type. Update code to use new name and type. Pass new args to
10464 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10466 * config/riscv/riscv.md (NORMAL_RETURN): New.
10467 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10468 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10469 (eh_return): Call gen_eh_return_internal and emit barrier.
10470 (eh_return_internal): Call riscv_expand_epilogue.
10472 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10474 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10475 bit_insertion field and declare can_be_merged_into method.
10476 (merged_store_group::can_be_merged_into): New method.
10477 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10478 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10479 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10481 2018-06-04 Richard Biener <rguenther@suse.de>
10483 PR tree-optimization/85955
10484 * builtins.c (fold_builtin_sincos): Convert pointers to
10485 destination to appropriate type before dereferencing.
10487 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10489 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10491 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10493 * expr.c (expand_expr_real_1): Force the operand into memory if
10494 its TYPE_MODE is BLKmode and if there is no integer mode for
10495 the number of bits being extracted.
10497 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10501 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10502 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10504 2018-06-04 Richard Biener <rguenther@suse.de>
10506 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10507 (cleanup_tree_cfg_noloop): ... single caller. Do
10508 start_recording_case_labels later.
10510 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10512 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10513 to _IMMINTRIN_H_INCLUDED.
10514 * config/i386/pconfigintrin.h: Ditto.
10515 * config/i386/waitpkgintrin.h: Ditto.
10516 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10517 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10518 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10519 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10520 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10521 waitpkgintrin.h and cldemoteintrin.h.
10523 2018-06-04 Richard Biener <rguenther@suse.de>
10525 PR tree-optimization/86038
10526 * tracer.c (find_best_successor): Check probability for
10527 being initialized, bail out if not.
10529 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10532 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10533 of bits to ignore when comparing architectures.
10535 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10537 PR tree-optimization/69615
10538 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10539 maximum or minimum of the type, try to merge it also as if
10540 range1 is + [-, x - 1] or + [x + 1, -].
10543 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10545 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10547 PR tree-optimization/86034
10548 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10549 the unsigned bitfield type in a bit insertion sequence if it does not
10550 have a larger precision than the bitfield size.
10551 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10553 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10555 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10557 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10559 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10560 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10561 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10562 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10564 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10566 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10567 Disable -fdelete-null-pointer-checks for ELF toolchain.
10569 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10570 Kito Cheng <kito.cheng@gmail.com>
10572 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10573 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10574 (nds32*-*-*): Add glibc and uclibc conditions.
10575 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10576 (TARGET_EXCEPT_UNWIND_INFO): Define.
10577 * config/nds32/elf.h: New file.
10578 * config/nds32/linux.h: New file.
10579 * config/nds32/nds32-elf.opt: New file.
10580 * config/nds32/nds32-linux.opt: New file.
10581 * config/nds32/nds32-fp-as-gp.c
10582 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10583 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10585 (nds32_asm_file_end): Ditto.
10586 (nds32_print_operand): Ditto.
10587 (nds32_insert_attributes): Ditto.
10588 (nds32_init_libfuncs): New function.
10589 (TARGET_HAVE_TLS): Define.
10590 (TARGET_INIT_LIBFUNCS): Define.
10591 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10593 (TARGET_ELF): Apply different mcmodel setting.
10594 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10595 been migrated into elf.h and linux.h files.
10596 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10597 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10598 (mcmodel): The content has been migrated into nds32-elf.opt and
10599 nds32-linux.opt files.
10600 * config/nds32/t-elf: New file.
10601 * config/nds32/t-linux: New file.
10603 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10604 Shiva Chen <shiva0217@gmail.com>
10606 * config/nds32/constants.md (unspec_volatile_element): Add
10607 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10608 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10610 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10611 (make_pass_nds32_fp_as_gp): Declare.
10612 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10614 (nds32_asm_function_end_prologue): Remove unused asm output.
10615 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10616 (nds32_asm_file_start): Output necessary fp_as_gp information.
10617 (nds32_option_override): Adjust register usage.
10618 (nds32_expand_prologue): Consider fp_as_gp situation.
10619 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10620 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10623 (simple_return): Ditto.
10624 (omit_fp_begin): Output special directive for fp_as_gp.
10625 (omit_fp_end): Output special directive for fp_as_gp.
10626 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10627 mforbid-fp-as-gp): New options.
10629 2018-06-01 Mark Wielaard <mark@klomp.org>
10631 * dwarf2out.c (dwarf2out_finish): Remove generation of
10632 DW_AT_loclists_base.
10634 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10636 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10637 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10638 (struct merged_store_group): Add bit_insertion field.
10639 (dump_char_array): Use standard hexadecimal format.
10640 (merged_store_group::merged_store_group): Set bit_insertion to false.
10641 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10642 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10643 also print the mask in the dump file.
10644 (pass_store_merging::gate): Minor tweak.
10645 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10646 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10647 stores with INTEGER_CST stores.
10648 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10649 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10650 and use it throughout. Generate bit insertion sequences if need be.
10651 (pass_store_merging::process_store): Remove redundant condition.
10652 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10654 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10656 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10657 the 128-bit floating point types. Fix function comment.
10659 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10661 * config/aarch64/aarch64-simd.md
10662 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10664 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10667 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10669 PR tree-optimization/85989
10670 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10672 (backprop::intersect_uses): Check it when deciding whether this
10673 is a backedge reference.
10674 (backprop::process_block): Add each phi to m_visited_phis
10675 after visiting it, then clear it at the end.
10677 2018-06-01 Richard Biener <rguenther@suse.de>
10679 * tree-vectorizer.h (vect_dr_stmt): New function.
10680 (vect_get_load_cost): Adjust.
10681 (vect_get_store_cost): Likewise.
10682 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10683 Use vect_dr_stmt instead of DR_SMTT.
10684 (vect_record_base_alignments): Likewise.
10685 (vect_calculate_target_alignment): Likewise.
10686 (vect_compute_data_ref_alignment): Likewise and make static.
10687 (vect_update_misalignment_for_peel): Likewise.
10688 (vect_verify_datarefs_alignment): Likewise.
10689 (vector_alignment_reachable_p): Likewise.
10690 (vect_get_data_access_cost): Likewise. Pass down
10691 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10692 (vect_get_peeling_costs_all_drs): Likewise.
10693 (vect_peeling_hash_get_lowest_cost): Likewise.
10694 (vect_enhance_data_refs_alignment): Likewise.
10695 (vect_find_same_alignment_drs): Likewise.
10696 (vect_analyze_data_refs_alignment): Likewise.
10697 (vect_analyze_group_access_1): Likewise.
10698 (vect_analyze_group_access): Likewise.
10699 (vect_analyze_data_ref_access): Likewise.
10700 (vect_analyze_data_ref_accesses): Likewise.
10701 (vect_vfa_segment_size): Likewise.
10702 (vect_small_gap_p): Likewise.
10703 (vectorizable_with_step_bound_p): Likewise.
10704 (vect_prune_runtime_alias_test_list): Likewise.
10705 (vect_analyze_data_refs): Likewise.
10706 (vect_supportable_dr_alignment): Likewise.
10707 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10708 (vect_gen_prolog_loop_niters): Likewise.
10709 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10710 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10712 (vect_recog_mask_conversion_pattern): Likewise.
10713 (vect_try_gather_scatter_pattern): Likewise.
10714 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10715 to vect_get_store_cost.
10716 (vect_get_store_cost): Get stmt_info instead of DR.
10717 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10718 (vect_get_load_cost): Get stmt_info instead of DR.
10720 2018-06-01 Richard Biener <rguenther@suse.de>
10722 PR middle-end/86017
10723 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10724 vars wrapped in MEM_REFs.
10726 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10728 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10729 Fix subreg tests so that we only return a choice between
10730 GENERAL_REGS and FP_REGS if the original classes included both.
10732 2018-06-01 Richard Biener <rguenther@suse.de>
10735 * tree-ssa-structalias.c (get_function_part_constraint):
10736 Handle NULL fi->decl.
10737 (find_func_aliases_for_call): Properly handle indirect
10738 fi from direct call.
10739 (find_func_clobbers): Likewise.
10740 (ipa_pta_execute): Likewise.
10741 (create_variable_info_for): For functions that are ifunc_resolver
10742 resolve to a varinfo that contains the result of the resolver call.
10743 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10746 2018-05-31 Michael Collison <michael.collison@arm.com>
10748 * config/aarch64/aarch64.md:
10749 (*fix_to_zero_extenddfdi2): New pattern.
10750 * gcc.target/aarch64/fix_extend1.c: New testcase.
10752 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10754 PR middle-end/78809
10755 PR middle-end/83026
10756 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10757 and BUILT_IN_STRNCMP_EQ.
10758 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10759 BUILT_IN_STRNCMP_EQ.
10760 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10761 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10762 (gimple_fold_builtin): Likewise.
10763 * tree-ssa-strlen.c (compute_string_length): New function.
10764 (determine_min_obsize): New function.
10765 (handle_builtin_string_cmp): New function to handle calls to
10766 string compare functions.
10767 (strlen_optimize_stmt): Add handling to builtin string compare
10769 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10770 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10771 * tree.c (build_common_builtin_nodes): Add new defines of
10772 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10774 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10777 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10778 functions with naked attribute.
10780 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10782 * config/i386/sse.md (avx_vec_concat<mode>):
10783 Substitute concat_tg_mode mode attribute with xtg_mode.
10784 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10785 (concat_tg_mode): Remove mode attribute.
10787 2018-05-31 Martin Sebor <msebor@redhat.com>
10790 * calls.c (alloc_max_size): Correct a logic error/typo.
10791 Treat excessive arguments as infinite. Warn for invalid arguments.
10792 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10794 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10797 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10798 and movx for Haswell.
10800 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10801 Cesar Philippidis <cesar@codesourcery.com>
10803 PR middle-end/85879
10804 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10805 when emitting error on private/firstprivate reductions.
10806 * omp-low.c (lower_omp_target): Avoid reference-type processing
10807 on pointers for firstprivate clause.
10809 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10811 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10814 * config/aarch64/aarch64-simd.md
10815 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10816 (aarch64_ld1_x3_<mode>): Likewise
10817 (aarch64_st1x2<VALLDIF:mode>): Likewise
10818 (aarch64_st1_x2_<mode>): Likewise
10819 (aarch64_st1x3<VALLDIF:mode>): Likewise
10820 (aarch64_st1_x3_<mode>): Likewise
10821 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10822 (vld1_s8_x3): Likewise.
10823 (vld1_u16_x3): Likewise.
10824 (vld1_s16_x3): Likewise.
10825 (vld1_u32_x3): Likewise.
10826 (vld1_s32_x3): Likewise.
10827 (vld1_u64_x3): Likewise.
10828 (vld1_s64_x3): Likewise.
10829 (vld1_f16_x3): Likewise.
10830 (vld1_f32_x3): Likewise.
10831 (vld1_f64_x3): Likewise.
10832 (vld1_p8_x3): Likewise.
10833 (vld1_p16_x3): Likewise.
10834 (vld1_p64_x3): Likewise.
10835 (vld1q_u8_x3): Likewise.
10836 (vld1q_s8_x3): Likewise.
10837 (vld1q_u16_x3): Likewise.
10838 (vld1q_s16_x3): Likewise.
10839 (vld1q_u32_x3): Likewise.
10840 (vld1q_s32_x3): Likewise.
10841 (vld1q_u64_x3): Likewise.
10842 (vld1q_s64_x3): Likewise.
10843 (vld1q_f16_x3): Likewise.
10844 (vld1q_f32_x3): Likewise.
10845 (vld1q_f64_x3): Likewise.
10846 (vld1q_p8_x3): Likewise.
10847 (vld1q_p16_x3): Likewise.
10848 (vld1q_p64_x3): Likewise.
10849 (vst1_s64_x2): Likewise.
10850 (vst1_u64_x2): Likewise.
10851 (vst1_f64_x2): Likewise.
10852 (vst1_s8_x2): Likewise.
10853 (vst1_p8_x2): Likewise.
10854 (vst1_s16_x2): Likewise.
10855 (vst1_p16_x2): Likewise.
10856 (vst1_s32_x2): Likewise.
10857 (vst1_u8_x2): Likewise.
10858 (vst1_u16_x2): Likewise.
10859 (vst1_u32_x2): Likewise.
10860 (vst1_f16_x2): Likewise.
10861 (vst1_f32_x2): Likewise.
10862 (vst1_p64_x2): Likewise.
10863 (vst1q_s8_x2): Likewise.
10864 (vst1q_p8_x2): Likewise.
10865 (vst1q_s16_x2): Likewise.
10866 (vst1q_p16_x2): Likewise.
10867 (vst1q_s32_x2): Likewise.
10868 (vst1q_s64_x2): Likewise.
10869 (vst1q_u8_x2): Likewise.
10870 (vst1q_u16_x2): Likewise.
10871 (vst1q_u32_x2): Likewise.
10872 (vst1q_u64_x2): Likewise.
10873 (vst1q_f16_x2): Likewise.
10874 (vst1q_f32_x2): Likewise.
10875 (vst1q_f64_x2): Likewise.
10876 (vst1q_p64_x2): Likewise.
10877 (vst1_s64_x3): Likewise.
10878 (vst1_u64_x3): Likewise.
10879 (vst1_f64_x3): Likewise.
10880 (vst1_s8_x3): Likewise.
10881 (vst1_p8_x3): Likewise.
10882 (vst1_s16_x3): Likewise.
10883 (vst1_p16_x3): Likewise.
10884 (vst1_s32_x3): Likewise.
10885 (vst1_u8_x3): Likewise.
10886 (vst1_u16_x3): Likewise.
10887 (vst1_u32_x3): Likewise.
10888 (vst1_f16_x3): Likewise.
10889 (vst1_f32_x3): Likewise.
10890 (vst1_p64_x3): Likewise.
10891 (vst1q_s8_x3): Likewise.
10892 (vst1q_p8_x3): Likewise.
10893 (vst1q_s16_x3): Likewise.
10894 (vst1q_p16_x3): Likewise.
10895 (vst1q_s32_x3): Likewise.
10896 (vst1q_s64_x3): Likewise.
10897 (vst1q_u8_x3): Likewise.
10898 (vst1q_u16_x3): Likewise.
10899 (vst1q_u32_x3): Likewise.
10900 (vst1q_u64_x3): Likewise.
10901 (vst1q_f16_x3): Likewise.
10902 (vst1q_f32_x3): Likewise.
10903 (vst1q_f64_x3): Likewise.
10904 (vst1q_p64_x3): Likewise.
10906 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10908 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10909 user_label_prefix to name.
10911 * tree-core.h: Update comment about the format of NAME string
10912 passed to handler in attribute_spec.
10914 * config/msp430/msp430.md: Remove erroneous subreg expression from
10915 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10916 zero_extend{q,h}isi2.
10918 2018-05-30 Borislav Petkov <bp@suse.de>
10920 * doc/extend.texi: Document some architecture specific
10921 constraints and sort entries.
10923 2018-05-30 Martin Sebor <msebor@redhat.com>
10925 PR middle-end/85369
10926 * builtins.c (expand_builtin_stpcpy_1): New function.
10927 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10928 only if the former succeeds.
10930 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10932 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10935 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10937 * doc/invoke.texi (-flinker-output): Document
10939 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10941 * passes.c (ipa_write_summaries): Only modify statements if body
10943 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10944 incrementally linking.
10945 (ipa_passes): Likewise.
10946 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10947 pass down resolution info.
10948 * common.opt (flag_incremental_link): Update info.
10949 * gcc.c (plugin specs): Turn flinker-output=* to
10950 -plugin-opt=-linker-output-known
10951 * toplev.c (compile_file): Also cut compilation when doing incremental
10953 * flag-types. (enum lto_partition_model): Add
10954 LTO_LINKER_OUTPUT_NOLTOREL.
10955 (invoke.texi): Add -flinker-output docs.
10956 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10957 link same way as WPA; do not stream in dead initializers.
10959 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10960 darf2out_register_external_decl): Support incremental link.
10962 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10964 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10966 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10968 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10969 it down to simple_object_copy_lto_debug_sections.
10970 (run_gcc): Determine incremental LTO link time and configure
10971 lto1 into non-wpa mode, disable renaming of debug sections.
10973 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10975 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10976 descriptions of various incorrectly documented functions.
10978 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10981 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10982 address check not strict.
10984 2018-05-30 Richard Biener <rguenther@suse.de>
10986 PR tree-optimization/85964
10987 * tracer.c (better_p): Drop initialized count check, we only
10988 call the function with initialized counts now.
10989 (find_best_successor): Do find a best edge if one
10990 has uninitialized count.
10991 (find_best_predecessor): Likewise. Do BB frequency check only
10992 if count is initialized.
10994 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10996 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10997 (aarch64_ldrstr_offset_compare): New.
10998 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10999 load/store orderings.
11000 (aarch64_gen_adjusted_ldpstp): Likewise.
11002 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
11004 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11005 Check for subset of GENERAL_REGS and FP_REGS.
11006 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11009 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
11011 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11012 and wi::to_poly_offset. Add the current offset and then check
11013 whether the sum fits, rather than using an unchecked addition of
11014 a checked term. Check for a shwi rather than a uhwi.
11015 * expr.c (get_bit_range): Use tree_to_poly_uint64.
11016 (store_constructor): Use poly_int_tree_p.
11017 (expand_expr_real_1): Likewise.
11018 * function.c (assign_temp): Likewise.
11019 * fold-const.c (const_binop): Use poly_int_tree_p and
11020 wi::to_poly_offset.
11021 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
11023 * ipa-icf-gimple.c (func_checker::compare_operand): Use
11024 to_poly_offset for MEM offsets.
11025 * ipa-icf.c (sem_variable::equals): Likewise.
11026 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11027 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11028 wi::to_poly_offset for BIT_FIELD_REF offsets.
11029 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11030 wi::to_poly_offset.
11031 * var-tracking.c (emit_note_insn_var_location): Use
11032 tree_to_poly_uint64.
11034 2018-05-29 Jim Wilson <jimw@sifive.com>
11036 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11038 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
11041 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11042 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11044 (sse4_1_round<mode>2): Use nonimmediate_operand
11045 for operand 1 predicate.
11047 2018-05-29 Martin Sebor <msebor@redhat.com>
11048 Richard Biener <rguenther@suse.de>
11051 * calls.c (get_size_range): Call determine_value_range instead
11052 of get_value_range..
11053 * tree-vrp.h (determine_value_range): Declared new function.
11054 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11056 2018-05-29 Richard Biener <rguenther@suse.de>
11058 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11059 sure to use non-pattern stmts for get_earlier_stmt arguments.
11060 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11061 called on pattern stmts.
11062 (get_later_stmt): Likewise.
11064 2018-05-29 Martin Liska <mliska@suse.cz>
11066 PR gcov-profile/85759
11067 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11070 2018-05-29 Jakub Jelinek <jakub@redhat.com>
11072 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11074 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11078 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11079 VEC_PACK_FLOAT_EXPR): New tree codes.
11080 * tree-pretty-print.c (op_code_prio): Handle
11081 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11082 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11083 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11084 * tree-inline.c (estimate_operator_cost): Likewise.
11085 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11086 * fold-const.c (const_binop): Likewise.
11087 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11088 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11089 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11090 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11091 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11092 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11093 * expr.c (expand_expr_real_2): Likewise.
11094 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11095 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11096 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11098 * optabs.c (expand_widen_pattern_expr): For
11099 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11100 sign from result type rather than operand's type.
11101 (expand_binop_directly): For vec_packu_float_optab and
11102 vec_packs_float_optab allow result type to be different from operand's
11104 * optabs-tree.c (optab_for_tree_code): Handle
11105 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11106 VEC_PACK_FLOAT_EXPR. Formatting fixes.
11107 * tree-vect-generic.c (expand_vector_operations_1): Handle
11108 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11109 VEC_PACK_FLOAT_EXPR.
11110 * tree-vect-stmts.c (supportable_widening_operation): Handle
11112 (supportable_narrowing_operation): Handle FLOAT_EXPR.
11113 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11114 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11115 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
11116 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11118 (vec_pack<floatprefix>_float_<mode>): New expander.
11119 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11121 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11122 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11123 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11124 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11125 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11127 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11128 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11129 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11130 VEC_PACK_FLOAT_EXPR): Document.
11132 2018-05-29 Richard Biener <rguenther@suse.de>
11134 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11136 (stmt_vec_info_vec): Make pointer.
11137 (init_stmt_vec_info_vec): Remove.
11138 (free_stmt_vec_info_vec): Likewise.
11139 (set_stmt_vec_info_vec): New function.
11140 (free_stmt_vec_infos): Likewise.
11141 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11142 (set_vinfo_for_stmt): Likewise.
11143 (get_earlier_stmt): Likewise.
11144 (get_later_stmt): Likewise.
11145 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11146 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11147 (vec_info::~vec_info): Free stmt_vec_infos.
11148 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11149 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11150 (pass_slp_vectorize::execute): Likewise.
11151 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11152 (free_stmt_vec_info_vec): Likewise.
11153 (set_stmt_vec_info_vec): New function.
11154 (free_stmt_vec_infos): Likewise.
11155 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11156 the global stmt_vec_info_vec.
11157 * tree-parloops.c (gather_scalar_reductions): Use
11158 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11161 2018-05-29 Richard Biener <rguenther@suse.de>
11163 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11165 2018-05-29 Martin Liska <mliska@suse.cz>
11166 David Malcolm <dmalcolm@redhat.com>
11168 * vec.c (test_reverse): New.
11169 (vec_c_tests): Add new test.
11170 * vec.h (vl_ptr>::reverse): New function.
11172 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11174 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11176 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11179 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11181 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11183 2018-05-28 Richard Biener <rguenther@suse.de>
11185 PR tree-optimization/85933
11186 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11187 look at stmts marked as vectorizable.
11189 2018-05-28 Richard Biener <rguenther@suse.de>
11191 PR tree-optimization/85934
11192 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11193 vector boolean check before scalar optimization.
11195 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11197 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11200 2018-05-28 Mark Wielaard <mark@klomp.org>
11202 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11203 if it is an expression containing a minus sign.
11205 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11207 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11209 2018-05-27 Paul Koning <ni1d@arrl.net>
11211 * config/pdp11/pdp11.md (truncsihi2): Remove.
11213 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11214 Chung-Ju Wu <jasonwucj@gmail.com>
11216 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11218 (unaligned_store_dw): Ditto.
11219 * config/nds32/nds32-memory-manipulation.c
11220 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11221 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11222 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11223 (emit_setmem_word_loop): Rename to ...
11224 (emit_setmem_doubleword_loop): ... this.
11225 (nds32_gen_dup_4_byte_to_word_value): New function.
11226 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11227 (nds32_expand_setmem_loop): Refine implementation.
11228 (nds32_expand_setmem_loop_v3m): Ditto.
11229 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11232 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11234 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11236 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11238 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11239 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11240 machine->attr_no_prologue_p.
11241 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11242 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11243 (nds32_expand_epilogue): Consider attr_naked_p.
11244 (nds32_expand_epilogue_v3pop): Likewise.
11245 (nds32_can_use_return_insn): Likewise.
11246 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11247 attr_no_prologue_p fields.
11248 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11250 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11253 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11255 * config/i386/sse.md
11256 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11258 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11260 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11262 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11264 (*<floatsuffix>floatv2div2sf2): Rename to ...
11265 (*float<floatunssuffix>v2div2sf2): ... this.
11266 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11267 (float<floatunssuffix>v2div2sf2_mask): ... this.
11268 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11269 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11270 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11272 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11274 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11276 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11278 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11280 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11282 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11283 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11284 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11285 gen_ufix_truncv8dfv8si2.
11286 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11287 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11288 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11289 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11290 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11291 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11292 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11293 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11295 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11299 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11301 2018-05-25 Jim Wilson <jimw@sifive.com>
11303 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11304 * config/riscv/riscv.c (struct machine_function): Add
11305 interrupt_handler_p and attribute_checked_p fields.
11306 (riscv_attribute_table): Add interrupt.
11307 (riscv_interrupt_type_p): New.
11308 (riscv_save_reg_p): Save extra regs for interrupt handler.
11309 (riscv_use_save_libcall): Return false for interrupt handler.
11310 (riscv_first_stack_step): Add forward declaration.
11311 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11312 for interrupt handler with large frame. Use it for saved reg list.
11313 (riscv_expand_prologue): Move flag_stack_usage_info support to
11314 eliminate duplication.
11315 (riscv_expand_epilogue): Generate mret for interrupt handler.
11316 (riscv_epilogue_uses): New.
11317 (riscv_can_use_return_insn): Return false for interrupt handler.
11318 (riscv_function_ok_for_sibcall): Likewise.
11319 (riscv_set_current_function): Add interrupt handler support.
11320 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11321 * config/riscv/riscv.md (UNSPECV_MRET): New.
11323 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11325 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11327 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11329 PR tree-optimization/85712
11330 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11331 this candidate has already been replaced in-situ by a copy.
11333 2018-05-25 Jason Merrill <jason@redhat.com>
11335 PR c++/80485 - inline function non-zero address.
11336 * symtab.c (nonzero_address): Check DECL_COMDAT.
11338 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11341 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11342 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11343 extension of SImode operation. Use const123_operand predicate.
11344 (*saddsi_1): Remove.
11345 (*saddl_se_1): Ditto.
11346 (*ssubsi_1): Ditto.
11347 (*ssubl_se_1): Ditto.
11348 * config/alpha/predicates.md (const123_operand): New predicate.
11349 * config/alpha/constraints.md (P): Use IN_RANGE.
11351 2018-05-25 Richard Biener <rguenther@suse.de>
11353 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11355 (ref_maybe_used_by_stmt_p): Likewise.
11356 (stmt_may_clobber_ref_p): Likewise.
11357 (stmt_may_clobber_ref_p_1): Likewise.
11358 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11360 (ref_maybe_used_by_stmt_p): Likewise.
11361 (stmt_may_clobber_ref_p): Likewise.
11362 (stmt_may_clobber_ref_p_1): Likewise.
11363 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11364 the alias oracle to disambiguate DRs with stmts DR analysis
11366 (vect_analyze_data_refs): Do not give up on not analyzable
11367 DRs for BB vectorization. Remove code truncating the dataref
11370 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11373 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11374 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11375 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11377 2018-05-25 Richard Biener <rguenther@suse.de>
11379 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11380 function, combining stmt data ref gathering and fatal analysis
11382 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11383 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11384 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11385 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11386 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11388 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11390 PR tree-optimization/85720
11391 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11392 SCC if all partitions are builtins.
11393 (version_loop_by_alias_check): New parameter. Generate cancelable
11394 runtime alias check if all partitions are builtins.
11395 (distribute_loop): Update call to above function.
11397 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11399 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11400 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11401 (parm_default_def_partition_arg): Ditto.
11402 (set_parm_default_def_partition): Ditto.
11403 (get_parm_default_def_partitions): Ditto and make it static.
11404 (get_undefined_value_partitions): Ditto and make it static.
11405 (remove_ssa_form): Refactor call to init_var_map here.
11406 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11407 computation for loop region.
11408 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11409 (register_default_def): Delete.
11410 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11411 (parm_default_def_partition_arg): Ditto.
11412 (set_parm_default_def_partition): Ditto.
11413 (get_parm_default_def_partitions): Ditto and make it static.
11414 (get_undefined_value_partitions): Ditto and make it static.
11415 (coalesce_with_default, coalesce_with_default): Update comment.
11416 (create_coalesce_list_for_region): New func factored out from
11417 create_outofssa_var_map.
11418 (populate_coalesce_list_for_outofssa): New func factored out from
11419 create_outofssa_var_map and coalesce_ssa_name.
11420 (create_outofssa_var_map): Delete.
11421 (coalesce_ssa_name): Refactor to support live range computation.
11422 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11423 (get_parm_default_def_partitions): Delete.
11424 (get_undefined_value_partitions): Ditto.
11425 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11426 computation for loop region.
11427 (new_tree_live_info, loe_visit_block): Ditto.
11428 (live_worklist, set_var_live_on_entry): Ditto.
11429 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11430 * tree-ssa-live.h (struct _var_map): New fields.
11431 (init_var_map): Change decl.
11432 (region_contains_p): New.
11434 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11436 * tree-ssa-live.h (live_merge_and_clear): Delete.
11438 2018-05-25 Richard Biener <rguenther@suse.de>
11441 * tree-dump.c (dequeue_and_dump): Remove access to removed
11442 operand 2 of a SWITCH_EXPR.
11444 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11446 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11447 multiplication and division.
11448 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11449 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11450 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11451 (cond_udiv_optab, cond_umod_optab): New optabs.
11452 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11453 (IFN_COND_RDIV): New internal functions.
11454 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11455 TRUNC_MOD_EXPR and RDIV_EXPR.
11456 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11457 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11459 (SVE_INT_BINARY): Include mult.
11460 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11461 (optab, sve_int_op): Handle mult.
11462 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11464 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11465 for SVE_INT_BINARY_SD.
11467 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11469 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11470 (optab, sve_int_op): Handle div and udiv.
11471 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11472 for SVE_INT_BINARY_SD.
11473 (*<optab><mode>3): New insn for the same.
11475 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11477 * tree-vect-patterns.c: Include predict.h.
11478 (vect_recog_divmod_pattern): Restrict check for division support
11479 to when optimizing for size.
11481 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11483 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11484 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11485 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11486 (gimple_match_op::set_op): Likewise.
11487 (gimple_resimplify4): Declare.
11488 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11489 (expr::gen_transform): Likewise.
11490 (decision_tree::gen): Generate a simplification routine for 4 operands.
11491 * gimple-match-head.c (gimple_simplify): Add an overload for
11492 4 operands. In the top-level function, handle up to 4 call
11493 arguments and call gimple_resimplify4.
11494 (gimple_resimplify4): New function.
11495 (build_call_internal): Pass a fourth operand.
11496 (maybe_push_to_seq): Likewise.
11497 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11498 Fold VEC_COND_EXPRs of an operation and a default value into
11499 an IFN_COND_* function if possible.
11500 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11502 (SVE_COND_FP_BINARY): Include them.
11503 (optab, sve_fp_op): Handle them.
11504 (SVE_INT_BINARY_REV): New code iterator.
11505 (SVE_COND_FP_BINARY_REV): New int iterator.
11506 (commutative): New int attribute.
11507 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11509 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11511 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11512 (*cond_<optab><mode>): New patterns for reversed operands.
11514 2018-05-25 Richard Biener <rguenther@suse.de>
11516 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11517 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11518 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11519 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11520 * tree-vect-data-refs.c (everywhere): Adjust users.
11521 * tree-vect-loop.c (everywhere): Likewise.
11522 * tree-vect-slp.c (everywhere): Likewise.
11523 * tree-vect-stmts.c (everywhere): Likewise.
11524 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11526 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11528 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11530 (gcc_cv_as_section_exclude): ... this.
11531 Try Solaris as #exclude syntax.
11532 * configure: Regenerate.
11533 * config.in: Regenerate.
11534 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11536 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11537 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11539 * varasm.c (default_elf_asm_named_section): Don't check if
11540 HAVE_GAS_SECTION_EXCLUDE is defined.
11542 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11544 * doc/md.texi: Update the documentation of the cond_* optabs
11545 to mention the new final operand. Fix GET_MODE_NUNITS call.
11546 Describe the scalar case too.
11547 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11548 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11550 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11551 (get_conditional_internal_fn): Update comment.
11552 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11553 accumulator value as a final argument to conditional functions.
11554 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11555 a define_expand and add an "else" operand. Assert for now that
11556 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11557 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11558 (*cond_<optab><mode>): New patterns.
11559 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11560 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11561 (UNSPEC_COND_EOR): Delete.
11562 (optab): Remove associated mappings.
11563 (SVE_INT_BINARY): New code iterator.
11564 (sve_int_op): Remove int attribute and add "minus" to the code
11566 (SVE_COND_INT_OP): Delete.
11567 (SVE_COND_FP_OP): Rename to...
11568 (SVE_COND_FP_BINARY): ...this.
11570 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11572 * optabs.c (can_reuse_operands_p): New function.
11573 (maybe_legitimize_operands): Try to reuse the results for
11576 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11578 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11579 Add {q} suffix to insn mnemonic.
11581 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11583 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11584 (msp430_warn_func_return): New.
11586 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11588 * fold-const.c (tree_nonzero_bits): New function.
11589 * fold-const.h (tree_nonzero_bits): Likewise.
11590 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11591 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11593 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11597 * varasm.c (assemble_alias): Check ifunc_resolver only on
11600 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11603 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11604 when memory input operand is handled.
11606 2018-05-24 Luis Machado <luis.machado@linaro.org>
11608 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11610 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11612 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11614 * match.pd: Delay FMA folds until after vectorization.
11616 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11619 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11620 address check not strict.
11622 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11624 * gimple-match.h (gimple_match_op): New class.
11625 (mprts_hook): Replace parameters with a gimple_match_op *.
11626 (maybe_build_generic_op): Likewise.
11627 (gimple_simplified_result_is_gimple_val): Replace parameters with
11628 a const gimple_match_op *.
11629 (gimple_simplify): Replace code_helper * and tree * parameters with
11630 a gimple_match_op * parameter.
11631 (gimple_resimplify1): Replace code_helper *, tree and tree *
11632 parameters with a gimple_match_op * parameter.
11633 (gimple_resimplify2): Likewise.
11634 (gimple_resimplify3): Likewise.
11635 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11636 parameters with a gimple_match_op * parameter.
11637 * gimple-match-head.c (gimple_simplify): Change prototypes of
11638 auto-generated functions to take a gimple_match_op * instead of
11639 separate code_helper * and tree * parameters. Make the same
11640 change in the top-level overload and update calls to the
11641 gimple_resimplify routines. Update calls to the auto-generated
11642 functions and to maybe_push_res_to_seq in the publicly-facing
11643 operation-specific gimple_simplify overloads.
11644 (gimple_match_op::MAX_NUM_OPS): Define.
11645 (gimple_resimplify1): Replace rcode and ops with a single res_op
11646 parameter. Update call to gimple_simplify.
11647 (gimple_resimplify2): Likewise.
11648 (gimple_resimplify3): Likewise.
11649 (mprts_hook): Replace parameters with a gimple_match_op *.
11650 (maybe_build_generic_op): Likewise.
11651 (build_call_internal): Replace type, nargs and ops with
11652 a gimple_match_op *.
11653 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11654 with a single gimple_match_op *. Update calls to mprts_hook,
11655 build_call_internal and gimple_simplified_result_is_gimple_val.
11656 Factor out code that is common to the tree_code and combined_fn cases.
11657 * genmatch.c (expr::gen_transform): Replace tem_code and
11658 tem_ops with a gimple_match_op called tem_op. Update calls
11659 to the gimple_resimplify functions and maybe_push_res_to_seq.
11660 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11661 res_ops. Update call to the gimple_resimplify functions.
11662 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11663 (decision_tree::gen): Make the functions take a gimple_match_op *
11664 called res_op instead of separate res_code and res_ops parameters.
11665 Update call accordingly.
11666 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11667 and ops with a single res_op parameter. Update calls to
11668 maybe_build_generic_op and maybe_push_res_to_seq.
11669 (fold_stmt_1): Update calls to gimple_simplify and
11670 replace_stmt_with_simplification.
11671 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11672 and gimple_simplified_result_is_gimple_val.
11673 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11675 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11676 with a gimple_match_op *.
11677 (vn_nary_build_or_lookup): Likewise. Update call to
11678 vn_nary_build_or_lookup_1.
11679 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11680 gimple_match_op *. Update calls to the gimple_resimplify routines
11681 and to gimple_simplified_result_is_gimple_val.
11682 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11683 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11684 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11685 (visit_nary_op): Likewise.
11686 (visit_reference_op_load): Likewise.
11688 2018-05-23 Luis Machado <luis.machado@linaro.org>
11690 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11691 modifier for printing the step amount.
11693 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11696 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11699 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11701 * doc/sourcebuild.texi (Endianness): New subsubsection.
11703 2018-05-23 Luis Machado <luis.machado@linaro.org>
11705 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11706 <prefetch_dynamic_strides>: New const bool field.
11707 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11708 prefetch_dynamic_strides.
11709 (exynosm1_prefetch_tune): Likewise.
11710 (thunderxt88_prefetch_tune): Likewise.
11711 (thunderx_prefetch_tune): Likewise.
11712 (thunderx2t99_prefetch_tune): Likewise.
11713 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11715 (aarch64_override_options_internal): Update to set
11716 PARAM_PREFETCH_DYNAMIC_STRIDES.
11717 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11718 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11719 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11720 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11721 prefetch-dynamic-strides setting.
11723 2018-05-23 Luis Machado <luis.machado@linaro.org>
11725 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11726 <minimum_stride>: New const int field.
11727 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11728 minimum_stride field defaulting to -1.
11729 (exynosm1_prefetch_tune): Likewise.
11730 (thunderxt88_prefetch_tune): Likewise.
11731 (thunderx_prefetch_tune): Likewise.
11732 (thunderx2t99_prefetch_tune): Likewise.
11733 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11734 <default_opt_level>: Set to 3.
11735 (aarch64_override_options_internal): Update to set
11736 PARAM_PREFETCH_MINIMUM_STRIDE.
11737 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11738 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11739 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11740 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11741 stride is constant and is below the minimum stride threshold.
11743 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11745 * config/arm/arm-cpus.in (mode26): Delete.
11746 (armv4): Delete mode26 reference.
11747 * config/arm/arm.c (arm_configure_build_target): Delete use of
11750 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11752 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11754 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11755 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11757 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11758 (floatunsdidf2): Ditto.
11760 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11762 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11763 (fixuns_trunc<mode>si2_avx512f): Ditto.
11764 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11765 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11766 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11768 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11770 PR rtl-optimization/79985
11771 * df-scan.c (df_insn_refs_collect): Remove special case for
11772 global registers and asm statements.
11774 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11776 * extend.texi (Global Register Variables): Rewrite the bullet list.
11777 Note that the register is available for allocation. Note that access
11778 via inline asm must use constraints. Add note about async-signal
11779 handlers. Remove paragraph about automagic register selection.
11781 2018-05-23 Richard Biener <rguenther@suse.de>
11783 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11784 of fixed offset from memset VN.
11786 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11788 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11789 first_interp field.
11790 (alloc_cand_and_find_basis): Initialize first_interp field.
11791 (slsr_process_mul): Modify first_interp field.
11792 (slsr_process_add): Likewise.
11793 (slsr_process_cast): Modify first_interp field for each new
11795 (slsr_process_copy): Likewise.
11796 (dump_candidate): Dump first_interp field.
11797 (replace_mult_candidate): Process all interpretations, not just
11799 (replace_rhs_if_not_dup): Likewise.
11800 (replace_one_candidate): Likewise.
11802 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11804 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11806 (aarch64_needs_frame_chain): New function.
11807 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11809 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11812 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11813 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11814 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11815 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11816 as true for strict-align.
11817 (aarch64_can_inline_p): Perform checks even when callee has no
11818 attributes to check for strict alignment.
11819 * doc/extend.texi (AArch64 Function Attributes): Document
11821 * doc/invoke.texi: (AArch64 Options): Likewise.
11823 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11825 PR tree-optimization/85853
11826 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11827 the handling of the root of the node to...
11828 (vect_slp_analyze_node_operations_1): ...this new function,
11829 and run the whole thing with the child nodes' def types
11830 set according to their SLP node's def type.
11832 2018-05-23 Richard Biener <rguenther@suse.de>
11834 PR middle-end/85874
11835 * tree-data-ref.c (create_runtime_alias_checks): Defer
11836 and ignore overflow warnings.
11838 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11840 PR tree-optimization/85822
11841 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11844 2018-05-23 Richard Biener <rguenther@suse.de>
11846 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11847 memset constants via native_interpret_expr.
11849 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11852 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11854 (cgraph_node::create_alias): Likewise.
11855 (cgraph_node::get_availability): Check ifunc_resolver instead
11856 of looking up ifunc attribute.
11857 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11858 * varasm.c (do_assemble_alias): Likewise.
11859 (assemble_alias): Likewise.
11860 (default_binds_local_p_3): Likewise.
11861 * cgraph.h (cgraph_node): Add ifunc_resolver.
11862 (cgraph_node::only_called_directly_or_aliased_p): Return false
11863 for IFUNC resolver.
11864 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11866 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11867 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11868 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11869 instead of looking up ifunc attribute.
11871 2018-05-22 Luis Machado <luis.machado@linaro.org>
11873 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11875 2018-05-22 Martin Sebor <msebor@redhat.com>
11877 PR middle-end/85359
11878 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11879 only when expasion succeeds.
11880 (expand_builtin_strcmp): Same.
11881 (expand_builtin_strncmp): Same.
11883 2018-05-22 Martin Sebor <msebor@redhat.com>
11885 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11887 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11888 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11890 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11891 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11893 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11894 Add check for legitimate_address.
11895 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11896 (aarch64_swap_ldrstr_operands): New.
11897 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11900 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11901 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11903 * config/aarch64/aarch64.md: New patterns to generate stp
11905 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11906 single words and double words.
11907 (load_pair_sw, load_pair_dw): Likewise.
11908 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11910 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11912 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11913 for different mode ldpstp and add peephole for merged zero stores.
11914 Likewise for loads.
11915 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11917 (aarch64_gen_store_pair): Rename calls to match new patterns.
11918 (aarch64_gen_load_pair): Rename calls to match new patterns.
11919 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11920 (load_pair<DREG:mode><DREG2:mode>): ... This.
11921 (store_pair<mode>): Rename to...
11922 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11923 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11924 New mode iterators.
11925 (V_INT_EQUIV): Handle SImode.
11926 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11929 2018-05-22 Martin Sebor <msebor@redhat.com>
11932 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11933 or ajust the presumed bound on an operation to avoid unnecessary
11936 2018-05-22 Martin Sebor <msebor@redhat.com>
11938 PR tree-optimization/85826
11939 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11940 assuming that a DECL necesarily has a constant size.
11942 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11944 PR middle-end/85862
11945 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11947 2018-05-22 Richard Biener <rguenther@suse.de>
11949 PR tree-optimization/85834
11950 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11951 non-constant and non-zero memset arguments.
11953 2018-05-22 Martin Liska <mliska@suse.cz>
11956 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11958 2018-05-22 Richard Biener <rguenther@suse.de>
11960 PR tree-optimization/85863
11961 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11962 comparisons when vectype is specified.
11963 (vectorizable_condition): Do not specify vectype for
11964 vect_is_simple_cond when SLP vectorizing.
11966 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11969 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11970 define __ibm128 as long double.
11971 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11972 as a distinct type when IEEE 128-bit support is enabled.
11973 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11974 128-bit types to use the correct functions.
11975 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11976 convert between 128-bit floating point types that have different
11977 modes but the same representation, instead of using gen_lowpart to
11979 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11981 (IFKF_reg): New attributes to give the register constraints for
11983 (extend<mode>tf2_internal): New insns to mark an explicit
11984 conversion between 128-bit floating point types that have a
11985 different mode but share the same representation.
11987 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11989 PR tree-optimization/85814
11990 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11991 a null return from get_strinfo when unsharing the next
11992 strinfo in the chain.
11994 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11997 * varasm.c (weak_finish): Clean up weak_decls.
11999 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12001 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12002 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12003 UNSPEC_UADALP values.
12004 * config/aarch64/iterators.md (ABAL): New int iterator.
12007 (sur): Add mappings for the above.
12008 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12010 (aarch64_<sur>abal<mode>_4): Likewise.
12011 (aarch64_<sur>adalp<mode>_3): Likewise.
12012 (<sur>sadv16qi): New define_expand.
12014 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
12016 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12017 (*movdf_internal): Ditto.
12018 (*rcpsf2_sse): Ditto.
12019 (*rsqrtsf2_sse): Ditto.
12020 (*sqrt<mode>2_sse): Ditto.
12022 2018-05-21 Tamar Christina <tamar.christina@arm.com>
12024 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12026 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12027 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12028 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12029 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12031 * config/aarch64/arm_neon.h: Likewise.
12032 * config/aarch64/iterators.md (VQ_I): New.
12034 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
12036 * config.gcc: Add arc/t-multilib-linux to tmake_file for
12038 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12041 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12043 * config/nds32/constraints.md (S): New constraint.
12044 * config/nds32/nds32.md (call_internal): Use constraint S.
12045 (call_value_internal): Likewise.
12046 (sibcall_internal): Likewise.
12047 (sibcall_value_internal): Likewise.
12049 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12050 Chung-Ju Wu <jasonwucj@gmail.com>
12052 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12053 into consideration.
12055 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12056 Chung-Ju Wu <jasonwucj@gmail.com>
12058 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12059 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12060 (nds32_rtx_costs_impl): Simplify.
12061 (nds32_address_cost_impl): Simplify.
12062 (nds32_init_rtx_costs): New function.
12063 (nds32_rtx_costs_speed_prefer): Likewise.
12064 (nds32_rtx_costs_size_prefer): Likewise.
12065 (nds32_address_cost_speed_prefer): Likewise.
12066 (nds32_address_cost_speed_fwprop): Likewise.
12067 (nds32_address_cost_size_prefer): Likewise.
12068 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12069 * config/nds32/nds32.c (nds32_option_override): Use
12070 nds32_init_rtx_costs function.
12072 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12074 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12075 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12076 (TARGET_PIPELINE_N8): Likewise.
12077 (TARGET_PIPELINE_N10): Likewise.
12078 (TARGET_PIPELINE_N13): Likewise.
12079 (TARGET_PIPELINE_GRAYWOLF): Likewise.
12081 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
12083 * config/nds32/nds32-fpu.md: Update copyright year.
12085 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12087 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12089 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12091 * config/nds32/nds32.c
12092 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12093 * config/nds32/nds32.opt (minline-asm-r15): New option.
12095 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12097 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12099 * config/nds32/nds32.md (abssi2): New pattern.
12101 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
12103 * config/i386/i386.md (rex64namesuffix): New mode attribute.
12104 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12105 Merge insn pattern from sse_cvtsi2ss<round_name> and
12106 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12107 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12108 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12109 using SWI48 mode iterator.
12110 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12111 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12112 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12113 pattern from sse_cvttss2si<round_saeonly_name>
12114 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12115 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12116 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12117 using SWI48 mode iterator.
12118 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12119 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12120 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12121 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12122 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12123 using SWI48 mode iterator.
12124 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12125 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12126 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12127 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12128 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12129 SWI48 mode iterator.
12130 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12131 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12132 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12133 pattern from sse_cvttsd2si<round_saeonly_name>
12134 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12136 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12138 * config/nds32/nds32-md-auxiliary.c
12139 (nds32_valid_smw_lwm_base_p): Refine.
12140 (nds32_output_smw_single_word): Refine.
12141 (nds32_output_smw_double_word): New.
12142 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12144 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12146 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12147 (nds32_output_stack_pop): Refine.
12148 (nds32_expand_unaligned_load): Refine.
12149 (nds32_expand_unaligned_store): Refine.
12151 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12152 Chung-Ju Wu <jasonwucj@gmail.com>
12154 * config/nds32/constants.md: Add TP_REGNUM constant.
12155 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12156 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12158 * config/nds32/nds32-doubleword.md: Consider flag_pic.
12159 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12160 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12161 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12162 and PIC code generation.
12163 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12165 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12167 * config/nds32/nds32.md: Support TLS and PIC.
12168 * config/nds32/nds32.c: Support TLS and PIC.
12169 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12170 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12173 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12175 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12176 mode with E_ prefix.
12178 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12179 Chung-Ju Wu <jasonwucj@gmail.com>
12181 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12182 * config/nds32/nds32-md-auxiliary.c
12183 (symbolic_reference_mentioned_p): New.
12184 (nds32_legitimize_ict_address): New.
12185 (nds32_expand_ict_move): New.
12186 (nds32_indirect_call_referenced_p): New.
12187 (nds32_symbol_binds_local_p): Delete.
12188 (nds32_long_call_p): Modify.
12189 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12190 * config/nds32/nds32-protos.h
12191 (symbolic_reference_mentioned_p): Declare.
12192 (nds32_legitimize_ict_address): Declare.
12193 (nds32_expand_ict_move): Declare.
12194 (nds32_indirect_call_referenced_p): Declare.
12195 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12196 (nds32_relax_group): Use nds32_ict_const_p as condition.
12197 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12198 (nds32_asm_file_start): Output ict_model directive in asm code.
12199 (nds32_legitimate_address_p): Consider indirect call.
12200 (nds32_print_operand): Consider indirect call.
12201 (nds32_print_operand_address): Consider indirect call.
12202 (nds32_insert_attributes): Handle "indirect_call" attribute.
12203 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12204 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12205 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12206 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12207 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12208 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12209 (TARGET_ICT_MODEL_SMALL): Define.
12210 (TARGET_ICT_MODEL_LARGE): Define.
12211 * config/nds32/nds32.md (movsi): Consider ict model.
12212 (call, call_value): Consider ict model.
12213 (sibcall, sibcall_value): Consider ict model.
12214 * config/nds32/nds32.opt (mict-model): New option.
12215 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12218 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12219 Monk Chiang <sh.chiang04@gmail.com>
12220 Jim Wilson <jimw@sifive.com>
12222 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12223 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12224 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12225 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12226 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12227 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12228 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12229 compute save_libcall_adjustment properly.
12230 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12231 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12232 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12233 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12234 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12235 (ABI_SPEC): Handle mabi=ilp32e.
12236 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12237 (RVE): Add RVE mask.
12238 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12239 <-march>: Add rv32e as an example.
12241 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12244 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12245 (intra_create_variable_infos): Handle C++ constructors.
12247 2018-05-18 Martin Liska <mliska@suse.cz>
12249 * passes.def: Remove a redundant pass.
12251 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12254 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12256 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12258 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12260 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12262 (armv2, armv2a, armv3, armv3m): Delete architectures.
12263 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12264 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12265 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12267 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12268 (*mulsidi3adddi): Likewise.
12269 (mulsidi3): Likewise.
12270 (*mulsidi3_nov6): Likewise.
12271 (umulsidi3): Likewise.
12272 (umulsidi3_nov6): Likewise.
12273 (umaddsidi4): Likewise.
12274 (*umulsidi3adddi): Likewise.
12275 (smulsi3_highpart): Likewise.
12276 (*smulsi3_highpart_nov6): Likewise.
12277 (umulsi3_highpart): Likewise.
12278 (*umulsi3_highpart_nov6): Likewise.
12279 * config/arm/arm.h (arm_arch3m): Delete.
12280 * config/arm/arm.c (arm_arch3m): Delete.
12281 (arm_option_override_internal): Update armv3-related comment.
12282 (arm_configure_build_target): Delete use of isa_bit_mode32.
12283 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12284 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12285 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12286 (mulsa3): Likewise.
12287 (mulusa3): Likewise.
12288 * config/arm/arm-protos.h (arm_arch3m): Delete.
12289 * config/arm/arm-tables.opt: Regenerate.
12290 * config/arm/arm-tune.md: Likewise.
12291 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12292 deleted architectures.
12294 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12296 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12297 (armv5t, armv5te): New features.
12298 (ARMv5, ARMv5e): Delete fgroups.
12299 (ARMv5t, ARMv5te): Adjust for above changes.
12300 (ARMv6m): Likewise.
12301 (armv5, armv5e): Delete arches.
12302 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12304 (*call_reg_arm): Likewise.
12305 (*call_value_reg_armv5): Likewise.
12306 (*call_value_reg_arm): Likewise.
12307 (*call_symbol): Likewise.
12308 (*call_value_symbol): Likewise.
12309 (*sibcall_insn): Likewise.
12310 (*sibcall_value_insn): Likewise.
12311 (clzsi2): Likewise.
12312 (prefetch): Likewise.
12313 (define_split and define_peephole2 dependent on arm_arch5):
12315 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12317 (TARGET_ARM_QBIT): Likewise.
12318 (TARGET_DSP_MULTIPLY): Likewise.
12319 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12320 (arm_arch5, arm_arch5e): Delete.
12321 (arm_arch5t, arm_arch5te): Declare.
12322 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12323 (arm_arch5t): Declare.
12324 (arm_option_reconfigure_globals): Update for the above.
12325 (arm_options_perform_arch_sanity_checks): Update comment, replace
12326 use of arm_arch5 with arm_arch5t.
12327 (use_return_insn): Likewise.
12328 (arm_emit_call_insn): Likewise.
12329 (output_return_instruction): Likewise.
12330 (arm_final_prescan_insn): Likewise.
12331 (arm_coproc_builtin_available): Likewise.
12332 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12333 arm_arch5e with arm_arch5t and arm_arch5te.
12334 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12335 (arm_arch5t, arm_arch5te): Declare.
12336 * config/arm/arm-tables.opt: Regenerate.
12337 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12338 * config/arm/t-multilib: Likewise.
12339 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12340 instead of arm_arch5.
12341 (*call_reg_thumb1): Likewise.
12342 (*call_value_reg_thumb1_v5): Likewise.
12343 (*call_value_reg_thumb1): Likewise.
12344 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12346 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12348 2018-05-18 Martin Liska <mliska@suse.cz>
12350 PR gcov-profile/84846
12351 * doc/gcov.texi: Document -t option of gcov tool.
12353 2018-05-18 Martin Liska <mliska@suse.cz>
12355 PR gcov-profile/84846
12356 * gcov.c (print_usage): Add new -t option.
12357 (process_args): Handle the option.
12358 (generate_results): Use stdout as output when requested by
12361 2018-05-18 Martin Liska <mliska@suse.cz>
12363 PR gcov-profile/84846
12364 * coverage.c (coverage_init): Write PWD to .gcno file.
12365 * doc/gcov.texi: Document how working directory is printed.
12366 * gcov-dump.c (dump_gcov_file): Print PWD.
12367 * gcov.c (output_intermediate_file): Likewise.
12368 (read_graph_file): Read PWD string.
12369 (output_lines): Print PWD.
12371 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12373 PR middle-end/85817
12374 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12375 for retval and return false if all args to phi are zero.
12377 2018-05-18 Richard Biener <rguenther@suse.de>
12379 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12381 (evrp_dom_walker::before_dom_children): Call it.
12383 2018-05-18 Richard Biener <rguenther@suse.de>
12385 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12386 results when processing array refs with variable index.
12388 2018-05-18 Toon Moene <toon@moene.org>
12390 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12391 directly after that of -floop-interchange. Indicate that both
12392 options are enabled by default when specifying -O3.
12394 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12396 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12397 iterator. Delete separate integer-mode vec_set<mode> expander.
12398 (aarch64_simd_vec_setv2di): Delete.
12399 (vec_setv2di): Delete.
12400 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12401 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12402 the "w, r" alternative.
12404 2018-05-18 Martin Liska <mliska@suse.cz>
12406 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12407 * tree-pass.h (make_pass_lower_switch_O0): New function.
12408 * tree-switch-conversion.c (node_has_low_bound): Remove.
12409 (node_has_high_bound): Likewise.
12410 (node_is_bounded): Likewise.
12411 (class pass_lower_switch): Make it a template type and create
12413 (pass_lower_switch::execute): Add template argument.
12414 (make_pass_lower_switch): New function.
12415 (make_pass_lower_switch_O0): New function.
12416 (do_jump_if_equal): Remove.
12417 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12418 all the hard work to tree optimization passes.
12420 2018-05-18 Martin Liska <mliska@suse.cz>
12422 * dbgcnt.c (limit_low): Renamed from limit.
12423 (limit_high): New variable.
12424 (dbg_cnt_is_enabled): Check for upper limit.
12425 (dbg_cnt): Adjust dumping.
12426 (dbg_cnt_set_limit_by_index): Add new argument for high
12428 (dbg_cnt_set_limit_by_name): Likewise.
12429 (dbg_cnt_process_single_pair): Parse new format.
12430 (dbg_cnt_process_opt): Use strtok.
12431 (dbg_cnt_list_all_counters): Remove 'value' and add
12433 * doc/invoke.texi: Document changes.
12435 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12437 * doc/sourcebuild.texi (scalar_all_fma): Document.
12438 * tree.def (FMA_EXPR): Delete.
12439 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12440 * internal-fn.c (ternary_direct): New macro.
12441 (expand_ternary_optab_fn): Likewise.
12442 (direct_ternary_optab_supported_p): Likewise.
12443 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12444 * builtins.c (fold_builtin_fma): Delete.
12445 (fold_builtin_3): Don't call it.
12446 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12447 * expr.c (expand_expr_real_2): Likewise.
12448 * fold-const.c (operand_equal_p): Likewise.
12449 (fold_ternary_loc): Likewise.
12450 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12451 * gimple.c (DEFTREECODE): Likewise.
12452 * gimplify.c (gimplify_expr): Likewise.
12453 * optabs-tree.c (optab_for_tree_code): Likewise.
12454 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12455 * tree-eh.c (operation_could_trap_p): Likewise.
12456 (stmt_could_throw_1_p): Likewise.
12457 * tree-inline.c (estimate_operator_cost): Likewise.
12458 * tree-pretty-print.c (dump_generic_node): Likewise.
12459 (op_code_prio): Likewise.
12460 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12461 * tree-ssa-operands.c (get_expr_operands): Likewise.
12462 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12463 * fold-const-call.h (fold_fma): Delete.
12464 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12465 CFN_FNMA and CFN_FNMS.
12466 (fold_fma): Delete.
12467 * genmatch.c (combined_fn): New enum.
12468 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12469 (commutative_op): New function.
12470 (commutate): Use it. Handle more than 2 operands.
12471 (dt_operand::gen_gimple_expr): Use commutative_op.
12472 (parser::parse_expr): Allow :c to be used with non-binary
12473 operators if the commutative operand is known.
12474 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12475 CFN_FMS, CFN_FNMA and CFN_FNMS.
12476 (backprop::process_assign_use): Remove FMA_EXPR handling.
12477 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12478 (gen_hsa_fma): New function.
12479 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12480 IFN_FNMA and IFN_FNMS.
12481 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12482 * gimple-fold.h (follow_all_ssa_edges): Declare.
12483 * gimple-fold.c (follow_all_ssa_edges): New function.
12484 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12485 gimple_build interface and use follow_all_ssa_edges to fold the result.
12486 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12487 instead of checking for optabs directly.
12488 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12489 rather than FMA_EXPRs.
12490 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12491 call to IFN_FMA instead of an FMA_EXPR.
12493 2018-05-17 Jim Wilson <jimw@sifive.com>
12495 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12496 sign extended promoted subreg, and the range does not have the sign bit
12497 set, then do a sign extend.
12499 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12500 test, check for sign extended subreg and/or constant operands, and
12501 do a sign extend in that case.
12503 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12505 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12506 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12508 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12509 Change logics_shift_reg to logics_shift_imm.
12510 (thunderx2t99_fp_loadpair_basic): Delete.
12511 (thunderx2t99_fp_storepair_basic): Delete.
12512 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12513 (thunderx2t99_asimd_polynomial): Delete.
12514 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12515 and neon_fp_mul_d_scalar_q.
12516 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12517 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12518 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12519 (thunderx2t99_asimd_lut): Add missing tbl types.
12520 (thunderx2t99_asimd_ext): Delete.
12521 (thunderx2t99_asimd_load1_1_mult): Delete.
12522 (thunderx2t99_asimd_load1_2_mult): Delete.
12523 (thunderx2t99_asimd_load1_ldp): New.
12524 (thunderx2t99_asimd_load1): New.
12525 (thunderx2t99_asimd_load2): Add missing *load2* types.
12526 (thunderx2t99_asimd_load3): New.
12527 (thunderx2t99_asimd_load4): New.
12528 (thunderx2t99_asimd_store1_1_mult): Delete.
12529 (thunderx2t99_asimd_store1_2_mult): Delete.
12530 (thunderx2t99_asimd_store2_mult): Delete.
12531 (thunderx2t99_asimd_store2_onelane): Delete.
12532 (thunderx2t99_asimd_store_stp): New.
12533 (thunderx2t99_asimd_store1): New.
12534 (thunderx2t99_asimd_store2): New.
12535 (thunderx2t99_asimd_store3): New.
12536 (thunderx2t99_asimd_store4): New.
12538 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12540 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12541 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12543 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12544 Segher Boessenkool <segher@kernel.crashing.org>
12547 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12550 2018-05-17 Richard Biener <rguenther@suse.de>
12552 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12553 for pruning loop and prune defs feeding only already visited PHIs.
12555 2018-05-17 Richard Biener <rguenther@suse.de>
12557 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12559 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12560 Richard Biener <rguenther@suse.de>
12562 PR tree-optimization/85793
12563 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12564 for VMAT_ELEMENTWISE.
12566 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12568 * internal-fn.h (lookup_internal_fn): Declare
12569 * internal-fn.c (lookup_internal_fn): New function.
12570 * gimple.c (gimple_build_call_from_tree): Handle calls to
12571 internal functions.
12572 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12573 internal function names.
12574 * tree-pretty-print.c (dump_generic_node): Likewise.
12575 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12577 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12579 * gimple-fold.h (gimple_build): Make the function forms take
12580 combined_fn rather than built_in_function.
12581 (gimple_simplify): Likewise.
12582 * gimple-match-head.c (gimple_simplify): Likewise.
12583 * gimple-fold.c (gimple_build): Likewise.
12584 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12585 rather than gimple_build_call_internal.
12586 (get_initial_defs_for_reduction): Likewise.
12587 (vect_create_epilog_for_reduction): Likewise.
12588 (vectorizable_live_operation): Likewise.
12590 2018-05-17 Martin Liska <mliska@suse.cz>
12592 * gimple-ssa-sprintf.c (format_directive): Do not use
12593 space in between 'G_' and '('.
12595 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12598 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12599 even if the mask is not all ones.
12602 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12604 (ix86_gimple_fold_builtin): Likewise.
12607 * config/i386/i386.c: Include tree-vector-builder.h.
12608 (ix86_vector_shift_count): New function.
12609 (ix86_fold_builtin): Fold shift builtins by scalar count.
12610 (ix86_gimple_fold_builtin): Likewise.
12612 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12613 _mm512_setzero): New intrinsics.
12615 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12616 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12618 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12619 code generation for cases where splatting a value is not useful.
12620 * simplify-rtx.c (simplify_ternary_operation): Simplify
12621 vec_merge across a vec_duplicate and a paradoxical subreg forming
12622 a vector mode to a vec_concat.
12624 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12626 * config.gcc: Support "goldmont-plus".
12627 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12629 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12630 PROCESSOR_GOLDMONT_PLUS.
12631 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12632 (processor_target_table): Add "goldmont-plus".
12633 (PTA_GOLDMONT_PLUS): Define.
12634 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12635 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12636 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12637 (fold_builtin_cpu): Add "goldmont-plus".
12638 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12639 (ix86_option_override_internal): Add "goldmont-plus".
12640 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12641 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12642 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12643 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12645 2018-05-17 Richard Biener <rguenther@suse.de>
12647 PR tree-optimization/85757
12648 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12649 remove defs that only feed that PHI from further processing.
12651 2018-05-16 Jim Wilson <jimw@sifive.com>
12653 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12655 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12657 2018-05-16 Mark Wielaard <mark@klomp.org>
12659 * dwarf2out.c (count_index_strings): New function.
12660 (output_indirect_strings): Call count_index_strings and generate
12661 header for dwarf_version >= 5.
12663 2018-05-16 Mark Wielaard <mark@klomp.org>
12665 * dwarf2out.c (dwarf_FORM): New function.
12666 (set_indirect_string): Use dwarf_FORM.
12667 (reset_indirect_string): Likewise.
12668 (size_of_die): Likewise.
12669 (value_format): Likewise.
12670 (output_die): Likewise.
12671 (add_skeleton_AT_string): Likewise.
12672 (output_macinfo_op): Likewise.
12673 (index_string): Likewise.
12674 (output_index_string_offset): Likewise.
12675 (output_index_string): Likewise.
12676 (count_index_strings): Likewise.
12678 2018-05-16 Carl Love <cel@us.ibm.com>
12680 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12681 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12683 2018-05-16 Martin Jambor <mjambor@suse.cz>
12685 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12686 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12688 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12690 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12691 (fnma<mode>4): Likewise.
12692 (fms<mode>4): Likewise.
12693 (fnms<mode>4): Likewise.
12694 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12695 (aarch64_fnma<mode>4): Likewise.
12696 (aarch64_fms<mode>4): Likewise.
12697 (aarch64_fnms<mode>4): Likewise.
12698 (aarch64_fnmadd<mode>4): Likewise.
12700 2018-05-16 Jason Merrill <jason@redhat.com>
12702 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12704 2018-05-16 Richard Biener <rguenther@suse.de>
12706 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12707 (dump_stmt_cost): Declare.
12708 (add_stmt_cost): Dump cost we add.
12709 (add_stmt_costs): New function.
12710 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12711 No longer exported.
12712 (vect_analyze_stmt): Adjust prototype.
12713 (vectorizable_condition): Likewise.
12714 (vectorizable_live_operation): Likewise.
12715 (vectorizable_reduction): Likewise.
12716 (vectorizable_induction): Likewise.
12717 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12718 cost vector to pass to vectorizable_ and record afterwards.
12719 (vect_model_reduction_cost): Take cost vector argument and adjust.
12720 (vect_model_induction_cost): Likewise.
12721 (vectorizable_reduction): Likewise.
12722 (vectorizable_induction): Likewise.
12723 (vectorizable_live_operation): Likewise.
12724 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12725 SLP_TREE_NUMBER_OF_VEC_STMTS.
12726 (vect_analyze_slp_cost_1): Remove.
12727 (vect_analyze_slp_cost): Likewise.
12728 (vect_slp_analyze_node_operations): Take visited args and
12729 a target cost vector. Avoid processing already visited stmt sets.
12730 (vect_slp_analyze_operations): Use a local cost vector to gather
12731 costs and register those of non-discarded instances.
12732 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12733 (vect_schedule_slp_instance): Remove copying of
12734 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12736 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12737 adding cost. Record cost entry location.
12738 (vect_prologue_cost_for_slp_op): Function to compute cost of
12739 a constant or invariant generated for SLP vect in the prologue,
12740 split out from vect_analyze_slp_cost_1.
12741 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12742 (vect_model_promotion_demotion_cost): Likewise.
12743 (vect_model_store_cost): Likewise, make static.
12744 (vect_model_load_cost): Likewise.
12745 (vectorizable_bswap): Add cost vector arg and adjust.
12746 (vectorizable_call): Likewise.
12747 (vectorizable_simd_clone_call): Likewise.
12748 (vectorizable_conversion): Likewise.
12749 (vectorizable_assignment): Likewise.
12750 (vectorizable_shift): Likewise.
12751 (vectorizable_operation): Likewise.
12752 (vectorizable_store): Likewise.
12753 (vectorizable_load): Likewise.
12754 (vectorizable_condition): Likewise.
12755 (vectorizable_comparison): Likewise.
12756 (can_vectorize_live_stmts): Likewise.
12757 (vect_analyze_stmt): Likewise.
12758 (vect_transform_stmt): Adjust calls to vectorizable_*.
12759 * tree-vectorizer.c: Include gimple-pretty-print.h.
12760 (dump_stmt_cost): New function.
12762 2018-05-16 Richard Biener <rguenther@suse.de>
12764 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12765 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12766 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12767 (check_name): New callback.
12768 (dse_classify_store): Track cycles via a visited bitmap of PHI
12769 defs and simplify handling of in-loop and across loop dead stores
12770 and properly fail for loop-variant refs. Handle byte-tracking with
12771 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12774 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12776 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12777 (vect_get_mask_type_for_stmt): Likewise.
12778 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12780 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12781 to determine the statement's vector type and the vector type that
12782 should be used for calculating nunits. Deal with cases in which
12783 the type has to be deferred.
12784 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12785 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12786 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12787 (vect_determine_vf_for_stmt): New functions, split out from...
12788 (vect_determine_vectorization_factor): ...here.
12789 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12790 (vect_get_mask_type_for_stmt): New functions, split out from
12791 vect_determine_vectorization_factor.
12793 2018-05-16 Richard Biener <rguenther@suse.de>
12795 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12796 verify the [VEC_]COND_EXPR embedded comparison.
12798 2018-05-15 Martin Sebor <msebor@redhat.com>
12800 PR tree-optimization/85753
12801 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12802 RECORD_TYPE in addition to ARRAY_TYPE.
12804 2018-05-15 Martin Sebor <msebor@redhat.com>
12806 PR middle-end/85643
12807 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12809 2018-05-15 Richard Biener <rguenther@suse.de>
12811 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12812 add by_clobber_p one. Change algorithm to collect all defs
12813 representing uses we need to walk and try reducing them to
12814 a single one before failing.
12815 (dse_dom_walker::dse_optimize_stmt): Adjust.
12817 2018-05-13 Mark Wielaard <mark@klomp.org>
12819 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12820 (size_of_loc_descr): Likewise.
12821 (output_loc_operands): Likewise.
12822 (output_loc_operands_raw): Likewise.
12823 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12824 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12825 (hash_loc_operands): Likewise.
12826 (compare_loc_operands): Likewise.
12828 2018-05-14 Mark Wielaard <mark@klomp.org>
12830 * dwarf2out.c (count_index_addrs): New function.
12831 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12833 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12835 PR tree-optimization/83648
12836 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12837 return value as malloc candidate.
12839 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12842 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12843 param as true in call to suggest_attribute.
12845 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12847 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12848 -mreadonly-in-sdata.
12850 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12852 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12854 (aarch64_crypto_aesd_fused): Likewise.
12856 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12858 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12859 (movsi_aarch64): Likewise.
12860 (load_pairsi): Likewise.
12861 (load_pairdi): Likewise.
12862 (store_pairsi): Likewise.
12863 (store_pairdi): Likewise.
12864 (load_pairsf): Likewise.
12865 (load_pairdf): Likewise.
12866 (store_pairsf): Likewise.
12867 (store_pairdf): Likewise.
12868 (zero_extend): Likewise.
12869 (trunc): Swap alternatives.
12870 (fcvt_target): Add '?' to prefer w over r.
12872 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12875 * config/i386/i386.md: Disallow non-commutative arithmetics in
12876 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12877 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12878 in the peephole2 before it.
12880 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12882 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12883 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12884 (ix86_handle_option): Handle -mcldemote.
12885 * config.gcc: New header.
12886 * config/i386/cldemoteintrin.h: New file.
12887 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12888 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12890 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12891 OPTION_MASK_ISA_CLDEMOTE.
12892 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12893 (ix86_valid_target_attribute_inner_p): Ditto.
12894 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12895 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12896 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12897 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12898 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12900 * config/i386/i386.opt: Add -mcldemote.
12901 * config/i386/x86intrin.h: New header.
12902 * doc/invoke.texi: Add -mcldemote.
12904 2018-05-14 Richard Biener <rguenther@suse.de>
12906 * doc/match-and-simplify.texi: Adjust :s documentation.
12908 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12910 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12911 intended memcpy size.
12912 (REORDER_45): Likewise.
12914 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12916 * sort.cc: New file.
12917 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12918 * vec.c (qsort_chk): Use gcc_qsort.
12919 * Makefile.in (OBJS-libcommon): Add sort.o.
12920 (build/sort.o): New target. Use it...
12921 (BUILD_RTL): ... here, and...
12922 (build/gencfn-macros): ... here, and...
12923 (build/genmatch): ... here.
12925 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12926 Chung-Ju Wu <jasonwucj@gmail.com>
12928 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12929 * config/nds32/nds32-graywolf.md: New file.
12930 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12931 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12933 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12934 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12935 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12936 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12937 * config/nds32/pipelines.md: Include n15 settings.
12939 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12940 Chung-Ju Wu <jasonwucj@gmail.com>
12942 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12943 * config/nds32/nds32-n13.md: New file.
12944 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12945 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12947 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12948 * config/nds32/nds32.md (pipeline_model): Add n13.
12949 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12950 * config/nds32/pipelines.md: Include n13 settings.
12952 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12953 Chung-Ju Wu <jasonwucj@gmail.com>
12955 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12956 * config/nds32/nds32-n10.md: New file.
12957 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12958 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12960 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12961 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12962 * config/nds32/nds32.md (pipeline_model): Add n10.
12963 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12964 * config/nds32/pipelines.md: Include n10 settings.
12966 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12967 Kito Cheng <kito.cheng@gmail.com>
12968 Chung-Ju Wu <jasonwucj@gmail.com>
12970 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12971 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12972 Add enum values for DSP extension instructions.
12973 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12975 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12976 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12977 New code iterators.
12978 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12979 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12980 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12981 * config/nds32/nds32-intrinsic.md: Likewise.
12982 * config/nds32/nds32_intrinsic.h: Likewise.
12983 * config/nds32/nds32-md-auxiliary.c: Likewise.
12984 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12985 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12986 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12987 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12988 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12989 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12990 TYPE_DMAC in switch statement.
12991 * config/nds32/nds32.c: New checking and implementation for DSP
12992 extension instructions.
12993 * config/nds32/nds32.h: Likewise.
12994 * config/nds32/nds32.md: Likewise.
12995 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12996 * config/nds32/predicates.md: Implement new predicates for DSP
12999 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13001 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13002 Reformat alternatives and attributes so it is easier to identify
13003 which constraints/attributes go with which instruction.
13004 (mov<mode>_hardfloat32, FMOVE64): Likewise.
13005 (mov<mode>_softfloat32, FMOVE64): Likewise.
13006 (mov<mode>_hardfloat64, FMOVE64): Likewise.
13007 (mov<mode>_softfloat64, FMOVE64): Likewise.
13009 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
13011 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13013 (Basic PowerPC Built-in Functions): The new name of the
13014 subsection previously known as "PowerPC Built-in Functions".
13015 (Basic PowerPC Built-in Functions Available on all Configurations):
13017 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13018 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13019 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13020 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13022 2018-05-11 Martin Jambor <mjambor@suse.cz>
13025 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13028 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13031 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13033 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
13035 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13036 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13037 (ix86_handle_option): Handle -mwaitpkg.
13038 * config.gcc: New header.
13039 * config/i386/cpuid.h (bit_WAITPKG): New bit.
13040 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13041 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13043 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13044 OPTION_MASK_ISA_WAITPKG.
13045 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13046 (ix86_option_override_internal): Add PTA_WAITPKG.
13047 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13048 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13049 IX86_BUILTIN_TPAUSE.
13050 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13051 __builtin_ia32_umwait and __builtin_ia32_tpause.
13052 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13053 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13054 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13055 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13056 UNSPECV_TPAUSE): New.
13057 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13058 * config/i386/i386.opt: Add -mwaitpkg.
13059 * config/i386/waitpkgintrin.h: New file.
13060 * config/i386/x86intrin.h: New header.
13061 * doc/invoke.texi: Add -mwaitpkg.
13063 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13066 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13068 (cortex-m0): Use armv6s-m isa.
13069 (cortex-m0plus): Likewise.
13070 (cortex-m1): Likewise.
13071 (cortex-m0.small-multiply): Likewise.
13072 (cortex-m0plus.small-multiply): Likewise.
13073 (cortex-m1.small-multiply): Likewise.
13075 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
13076 Jakub Jelinek <jakub@redhat.com>
13078 PR tree-optimization/85692
13079 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13080 source permute as well.
13082 2018-05-11 Martin Liska <mliska@suse.cz>
13085 * doc/extend.texi: Document LLVM style format for no_sanitize
13088 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13090 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13091 mode_supports_vsx_dform_quad to mode_supports_dq_form.
13092 (mode_supports_vsx_dform_quad): Likewise.
13093 (mode_supports_vmx_dform): Move these functions to be next to the
13094 other mode_supports functions.
13095 (mode_supports_dq_form): Likewise.
13096 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13097 mode_supports_dq_form.
13098 (reg_offset_addressing_ok_p): Likewise.
13099 (offsettable_ok_by_alignment): Likewise.
13100 (rs6000_legitimate_offset_address_p): Likewise.
13101 (legitimate_lo_sum_address_p): Likewise.
13102 (rs6000_legitimize_address): Likewise.
13103 (rs6000_legitimize_reload_address): Likewise.
13104 (rs6000_secondary_reload_inner): Likewise.
13105 (rs6000_preferred_reload_class): Likewise.
13106 (rs6000_output_move_128bit): Likewise.
13108 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13110 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13111 Generate SImode target register for null target.
13112 <case IX86_BUILTIN_XGETBV>: Ditto.
13113 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13114 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13116 2018-05-10 Carl Love <cel@us.ibm.com>
13118 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13119 dcbtt and dcbtstt if operands[2] is 0.
13121 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13124 * config/i386/sse.md (usadv64qi): New expander.
13126 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
13128 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13129 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13130 -maltivec=be support.
13131 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13132 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13133 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13134 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13135 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13136 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13137 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13138 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13139 altivec_vsumsws): Adjust.
13140 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13141 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13142 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13144 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13145 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13146 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13147 (altivec_lve<VI_char>x): Delete expand.
13148 (*altivec_lve<VI_char>x_internal): Rename to...
13149 (altivec_lve<VI_char>x): ... this.
13150 (altivec_lvxl_<mode>): Delete expand.
13151 (*altivec_lvxl_<mode>_internal): Rename to ...
13152 (altivec_lvxl_<mode>): ... this.
13153 (altivec_stvxl_<mode>): Delete expand.
13154 (*altivec_stvxl_<mode>_internal): Rename to ...
13155 (altivec_stvxl_<mode>): ... this.
13156 (altivec_stve<VI_char>x): Delete expand.
13157 (*altivec_stve<VI_char>x_internal): Rename to ...
13158 (altivec_stve<VI_char>x): ... this.
13159 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13160 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13161 reduc_plus_scal_<mode>): Adjust.
13162 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13164 (rs6000_cpu_cpp_builtins): Adjust.
13165 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13166 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13167 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13168 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13169 -maltivec=be support.
13170 (rs6000_split_vec_extract_var): Adjust.
13171 (rs6000_split_v4si_init): Adjust.
13172 (swap_selector_for_mode): Delete.
13173 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13174 altivec_expand_stvex_be): Delete.
13175 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13176 -maltivec=be support.
13177 (rs6000_gimple_fold_builtin): Ditto.
13178 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13180 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13181 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13182 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13183 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13184 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13185 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13186 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13187 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13188 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13189 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13190 anonymous split): Adjust.
13191 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13192 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13194 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13196 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13197 when --with-gxx-include-dir is also specified.
13198 * configure: Regenerate.
13200 2018-05-09 Jim Wilson <jimw@sifive.com>
13203 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13204 * config/riscv/t-withmultilib: New.
13205 * config/riscv/withmultilib.h: New.
13206 * doc/install.texi: Document RISC-V --with-multilib-list support.
13208 2018-05-09 Richard Biener <rguenther@suse.de>
13210 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13212 (vect_bb_vectorization_profitable_p): Adjust. Compute
13213 actual scalar cost using the cost vector and the add_stmt_cost
13216 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13218 PR rtl-optimization/85645
13219 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13220 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13222 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13224 PR rtl-optimization/85645
13225 * shrink-wrap.c (spread_components): Return a boolean saying if
13226 anything was changed.
13227 (try_shrink_wrapping_separate): Iterate spread_components until
13228 nothing changes anymore.
13230 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13232 PR rtl-optimization/85645
13233 * regrename.c (build_def_use): Also kill the chains that include the
13234 destination of a REG_CFA_REGISTER note.
13236 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13238 PR rtl-optimization/85645
13239 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13240 insn that has a REG_CFA_REGISTER note.
13242 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13244 * cfgexpand.c (expand_clobber): New function.
13245 (expand_gimple_stmt_1): Use it.
13246 * tree-vect-stmts.c (vect_clobber_variable): New function,
13248 (vectorizable_simd_clone_call): ...here.
13249 (vectorizable_store): Emit a clobber either side of an
13250 IFN_STORE_LANES sequence.
13251 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13253 2018-05-09 Tom de Vries <tom@codesourcery.com>
13256 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13257 (define_insn "trap_if_false"): Add exit after trap.
13259 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13261 PR rtl-optimization/85638
13262 * bb-reorder.c: Include common/common-target.h.
13263 (create_forwarder_block): New function extracted from...
13264 (fix_up_crossing_landing_pad): ...here. Rename into...
13265 (dw2_fix_up_crossing_landing_pad): ...this.
13266 (sjlj_fix_up_crossing_landing_pad): New function.
13267 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13268 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13269 from both partitions and exit the loop after one iteration.
13271 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13274 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13276 (Basic PowerPC Built-in Functions): The new name of the
13277 subsection previously known as "PowerPC Built-in Functions".
13278 (Basic PowerPC Built-in Functions Available on all Configurations):
13280 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13282 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13284 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13286 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13289 2018-05-08 Jim Wilson <jimw@sifive.com>
13291 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13292 (LD_EMUL_SUFFIX): New.
13293 (LINK_SPEC): Use it.
13295 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13297 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13299 (Basic PowerPC Built-in Functions): The new name of the
13300 subsection previously known as "PowerPC Built-in Functions".
13301 (Basic PowerPC Built-in Functions Available on all Configurations):
13303 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13305 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13307 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13309 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13312 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13315 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13316 after cmpelim optimization.
13318 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13320 * config.gcc: Support "goldmont".
13321 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13322 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13323 PROCESSOR_GOLDMONT.
13324 * config/i386/i386.c (m_GOLDMONT): Define.
13325 (processor_target_table): Add "goldmont".
13326 (PTA_GOLDMONT): Define.
13327 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13328 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13329 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13330 (fold_builtin_cpu): Add "goldmont".
13331 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13332 (ix86_option_override_internal): Add "goldmont".
13333 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13334 (processor_type): Add PROCESSOR_GOLDMONT.
13335 * config/i386/i386.md: Add CPU "glm".
13336 * config/i386/glm.md: New file.
13337 * config/i386/x86-tune.def: Add m_GOLDMONT.
13338 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13340 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13343 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13345 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13346 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13347 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13350 * config/i386/i386.c (ix86_fold_builtin): Handle
13351 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13354 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13355 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13357 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13360 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13361 (check_arch): Likewise.
13362 (check_fpu): Return the result rather than printing it.
13363 (end arch): Fix operator precedence.
13364 (end cpu): Likewise.
13365 (END): Print the result from check_fpu.
13367 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13368 Alan Hayward <alan.hayward@arm.com>
13369 David Sherwood <david.sherwood@arm.com>
13371 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13372 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13373 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13374 (*fcmuo<mode>_and): New patterns.
13376 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13378 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13379 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13380 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13381 (cmp_op, sve_imm_con): New code attributes.
13382 (SVE_COND_INT_CMP, imm_con): Delete.
13383 (cmp_op): Remove above unspecs from int attribute.
13384 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13386 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13387 comparison-specific unspecs.
13388 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13389 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13390 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13391 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13392 (*vec_fcm<cmp_op><mode>): Rename to...
13393 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13394 (*vec_fcmuo<mode>): Rename to...
13395 (*fcmuo<mode>): ...this and adjust likewise.
13396 (*pred_fcm<cmp_op><mode>): New pattern.
13397 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13398 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13400 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13402 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13403 (aarch64_emit_sve_predicated_cond): New function.
13404 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13405 (aarch64_emit_unspec_cond_or): Replace with...
13406 (aarch64_emit_sve_or_conds): ...this new function. Use
13407 aarch64_emit_sve_ptrue_op for the individual comparisons and
13408 aarch64_emit_binop to OR them together.
13409 (aarch64_emit_inverted_unspec_cond): Replace with...
13410 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13411 aarch64_emit_sve_ptrue_op for the comparison and
13412 aarch64_emit_unop to invert the result.
13413 (aarch64_expand_sve_vec_cmp_float): Update after the above
13414 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13416 2018-05-07 Nathan Sidwell <nathan@acm.org>
13418 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13419 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13420 (Backwards Compatibility): Likewise.
13422 2018-05-07 Luis Machado <luis.machado@linaro.org>
13426 2018-05-07 Luis Machado <luis.machado@linaro.org>
13428 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13429 <prefetch_dynamic_strides>: New const bool field.
13430 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13431 prefetch_dynamic_strides.
13432 (exynosm1_prefetch_tune): Likewise.
13433 (thunderxt88_prefetch_tune): Likewise.
13434 (thunderx_prefetch_tune): Likewise.
13435 (thunderx2t99_prefetch_tune): Likewise.
13436 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13438 (aarch64_override_options_internal): Update to set
13439 PARAM_PREFETCH_DYNAMIC_STRIDES.
13440 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13441 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13442 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13443 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13444 prefetch-dynamic-strides setting.
13446 2018-05-07 Luis Machado <luis.machado@linaro.org>
13448 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13449 <minimum_stride>: New const int field.
13450 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13451 minimum_stride field.
13452 (exynosm1_prefetch_tune): Likewise.
13453 (thunderxt88_prefetch_tune): Likewise.
13454 (thunderx_prefetch_tune): Likewise.
13455 (thunderx2t99_prefetch_tune): Likewise.
13456 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13457 (aarch64_override_options_internal): Update to set
13458 PARAM_PREFETCH_MINIMUM_STRIDE.
13459 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13460 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13461 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13462 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13463 stride is constant and is below the minimum stride threshold.
13465 2018-05-07 Luis Machado <luis.machado@linaro.org>
13467 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13470 2018-05-07 Luis Machado <luis.machado@linaro.org>
13472 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13473 <prefetch_dynamic_strides>: New const bool field.
13474 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13475 prefetch_dynamic_strides.
13476 (exynosm1_prefetch_tune): Likewise.
13477 (thunderxt88_prefetch_tune): Likewise.
13478 (thunderx_prefetch_tune): Likewise.
13479 (thunderx2t99_prefetch_tune): Likewise.
13480 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13482 (aarch64_override_options_internal): Update to set
13483 PARAM_PREFETCH_DYNAMIC_STRIDES.
13484 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13485 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13486 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13487 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13488 prefetch-dynamic-strides setting.
13490 2018-05-07 Luis Machado <luis.machado@linaro.org>
13492 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13493 <minimum_stride>: New const int field.
13494 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13495 minimum_stride field.
13496 (exynosm1_prefetch_tune): Likewise.
13497 (thunderxt88_prefetch_tune): Likewise.
13498 (thunderx_prefetch_tune): Likewise.
13499 (thunderx2t99_prefetch_tune): Likewise.
13500 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13501 (aarch64_override_options_internal): Update to set
13502 PARAM_PREFETCH_MINIMUM_STRIDE.
13503 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13504 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13505 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13506 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13507 stride is constant and is below the minimum stride threshold.
13509 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13512 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13513 the type is addressable. Don't force op into register if it has
13516 2018-05-05 Roland McGrath <mcgrathr@google.com>
13519 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13520 any section for which we don't know a specific type it should have,
13521 regardless of name. Previously this was done only for the exact
13522 names ".init_array", ".fini_array", and ".preinit_array".
13523 (default_elf_asm_named_section): Add comment about
13524 relationship with default_section_type_flags and SECTION_NOTYPE.
13525 (get_section): Don't consider it a type conflict if one side has
13526 SECTION_NOTYPE and the other doesn't, as long as neither has the
13527 SECTION_BSS et al used in the default_section_type_flags logic.
13529 2018-05-05 Tom de Vries <tom@codesourcery.com>
13532 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13533 (workaround_barsyncs): New function.
13534 (nvptx_reorg): Use workaround_barsyncs.
13535 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13536 (define_expand "nvptx_membar_cta"): New define_expand.
13537 (define_insn "*nvptx_membar_cta"): New insn.
13539 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13541 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13542 To improve optimization opportunities.
13543 * builtin-types.def: The new needed builtin types for the above.
13545 2018-05-04 Richard Biener <rguenther@suse.de>
13547 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13548 * gimple-ssa-store-merging.c
13549 (imm_store_chain_info::output_merged_store): Remove redundant create,
13550 release split_store vector contents on failure.
13551 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13552 scalar stmt vector on cache hit.
13554 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13556 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13558 * config.gcc (powerpc-xilinx-eabi*): Remove.
13559 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13561 (fusion_addis_mem_combo_load): Ditto.
13562 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13564 (rs6000_cpu_cpp_builtins): Ditto.
13565 * config/rs6000/rs6000-linux.c
13566 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13567 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13568 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13570 (rs6000_setup_reg_addr_masks): Ditto.
13571 (rs6000_init_hard_regno_mode_ok): Ditto.
13572 (rs6000_option_override_internal): Ditto.
13573 (legitimate_lo_sum_address_p): Ditto.
13574 (rs6000_legitimize_address): Ditto.
13575 (rs6000_legitimize_reload_address): Ditto.
13576 (rs6000_legitimate_address_p): Ditto.
13577 (abi_v4_pass_in_fpr): Ditto.
13578 (setup_incoming_varargs): Ditto.
13579 (rs6000_gimplify_va_arg): Ditto.
13580 (rs6000_split_multireg_move): Ditto.
13581 (rs6000_savres_strategy): Ditto.
13582 (rs6000_emit_prologue_components): Ditto.
13583 (rs6000_emit_epilogue_components): Ditto.
13584 (rs6000_emit_prologue): Ditto.
13585 (rs6000_emit_epilogue): Ditto.
13586 (rs6000_elf_file_end): Ditto.
13587 (rs6000_function_value): Ditto.
13588 (rs6000_libcall_value): Ditto.
13589 * config/rs6000/rs6000.h: Ditto.
13590 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13591 (TARGET_MINMAX): ... this. New.
13592 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13593 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13594 (*movsi_internal1_single): Delete.
13595 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13596 mfpu=, mxilinx-fpu): Delete.
13597 * config/rs6000/singlefp.h: Delete.
13598 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13599 * config/rs6000/t-rs6000: Ditto.
13600 * config/rs6000/t-xilinx: Delete.
13601 * config/rs6000/titan.md: Adjust for fp_type removal.
13602 * config/rs6000/vsx.md: Remove Xilinx FP support.
13603 (VStype_simple): Delete.
13604 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13605 * config/rs6000/xfpu.h: Delete.
13606 * config/rs6000/xfpu.md: Delete.
13607 * config/rs6000/xilinx.h: Delete.
13608 * config/rs6000/xilinx.opt: Delete.
13609 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13610 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13612 2018-05-04 Tom de Vries <tom@codesourcery.com>
13615 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13618 2018-05-04 Richard Biener <rguenther@suse.de>
13620 PR middle-end/85627
13621 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13622 (expand_complex_div_wide): Likewise.
13623 (expand_complex_operations_1): Likewise.
13624 (expand_complex_libcall): Preserve EH info of the original stmt.
13625 (tree_lower_complex): Handle removed blocks.
13626 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13627 on complex multiplication and division libcall builtins.
13629 2018-05-04 Richard Biener <rguenther@suse.de>
13631 PR middle-end/85574
13632 * fold-const.c (negate_expr_p): Restrict negation of operand
13633 zero of a division to when we know that can happen without
13635 (fold_negate_expr_1): Likewise.
13637 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13640 * real.h (real_nextafter): Declare.
13641 * real.c (real_nextafter): New function.
13642 * fold-const-call.c (fold_const_nextafter): New function.
13643 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13644 CASE_CFN_NEXTTOWARD.
13645 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13646 even when arg1_mode is different from arg0_mode.
13648 2018-05-03 Nathan Sidwell <nathan@acm.org>
13650 * doc/extend.texi (Deprecated Features): Remove
13651 -ffriend-injection.
13652 (Backwards Compatibility): Likewise.
13653 * doc/invoke.texi (C++ Language Options): Likewise.
13654 (C++ Dialect Options): Likewise.
13656 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13659 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13660 _mm512_mask_mullox_epi64): New intrinsics.
13662 2018-05-03 Tom de Vries <tom@codesourcery.com>
13665 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13666 dump files): Add offload-tree.
13668 2018-05-03 Richard Biener <rguenther@suse.de>
13670 PR tree-optimization/85615
13671 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13672 to loops not nested in BBs loop father to avoid creating multi-entry
13675 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13677 PR tree-optimization/70291
13678 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13679 arguments. Change return type to tree. Emit libcall as a new
13680 statement rather than replacing existing one when inplace_p is true.
13681 (expand_complex_multiplication_components): New function.
13682 (expand_complex_multiplication): Expand floating-point complex
13683 multiplication using the above.
13684 (expand_complex_division): Rename inner_type parameter to type.
13685 Update expand_complex_libcall call-site.
13686 (expand_complex_operations_1): Update expand_complex_multiplication
13687 and expand_complex_division call-sites.
13689 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13692 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13693 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13694 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13695 the highest significant bit of the shift count mask is clear. In
13696 check whether and[sq]i3 is needed verify that all significant bits
13697 of the shift count other than the highest are set.
13699 2018-05-02 Tom de Vries <tom@codesourcery.com>
13702 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13703 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13704 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13705 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13706 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13707 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13708 __builtin_goacc_parlevel_size.
13710 2018-05-02 Richard Biener <rguenther@suse.de>
13712 PR tree-optimization/85597
13713 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13714 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13717 2018-05-02 Tom de Vries <tom@codesourcery.com>
13720 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13721 dump files): Add ltrans-tree.
13723 2018-05-02 Tom de Vries <tom@codesourcery.com>
13726 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13727 dump files): Add wpa-ipa.
13729 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13731 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13732 powerpc*-*-linux*paired* target.
13733 * config/rs6000/750cl.h: Delete.
13734 * config/rs6000/paired.h: Delete.
13735 * config/rs6000/paired.md: Delete.
13736 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13738 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13739 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13740 comment. Remove paired float support.
13741 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13742 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13744 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13745 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13747 * config/rs6000/rs6000.c: Remove paired float support.
13748 (paired_expand_vector_init, paired_expand_vector_move,
13749 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13750 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13751 paired_expand_builtin, paired_expand_predicate_builtin,
13752 paired_init_builtins): Delete.
13753 * config/rs6000/rs6000.h: Remove paired float support.
13754 * config/rs6000/rs6000.md: Remove paired float support.
13755 (move_from_CR_ov_bit): Delete.
13756 * config/rs6000/rs6000.opt (mpaired): Delete.
13757 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13758 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13760 2018-05-02 Richard Biener <rguenther@suse.de>
13762 PR middle-end/85567
13763 * gimplify.c (gimplify_save_expr): When in SSA form allow
13764 SAVE_EXPRs to compute to SSA vars.
13766 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13769 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13770 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13771 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13772 clobber operands[2], instead use a new pseudo. Formatting fixes.
13774 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13776 PR tree-optimization/85586
13777 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13778 exit early for statements in the same group if the accesses are
13781 2018-05-02 Tom de Vries <tom@codesourcery.com>
13784 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13787 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13789 PR tree-optimization/85143
13790 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13792 2018-05-01 Tom de Vries <tom@codesourcery.com>
13795 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13796 not found" error message.
13798 2018-05-01 Tom de Vries <tom@codesourcery.com>
13801 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13802 * vec.c (test_ordered_remove_if): New function.
13803 (vec_c_tests): Call test_ordered_remove_if.
13804 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13805 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13806 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13807 VEC_ORDERED_REMOVE_IF.
13809 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13811 PR tree-optimization/82665
13812 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13813 pointer subtraction where arguments come from a memchr call.
13815 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13817 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13818 --push-state --as-needed and --pop-state instead of --as-needed and
13819 --no-as-needed if ld supports it.
13820 * configure: Regenerated.
13823 * doc/install.texi2html: Replace _002d with - and _002a with * in
13824 generated html files using sed.
13826 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13829 * gcc-rich-location.c (blank_line_before_p): New function.
13830 (use_new_line): New function.
13831 (gcc_rich_location::add_fixit_insert_formatted): New function.
13832 * gcc-rich-location.h
13833 (gcc_rich_location::add_fixit_insert_formatted): New function.
13835 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13837 * selftest.c (assert_streq): Rename "expected" and "actual" to
13838 "val1" and "val2". Extend NULL-handling to cover both inputs
13839 symmetrically, while still requiring both to be non-NULL for a pass.
13840 * selftest.h (assert_streq): Rename "expected" and "actual" to
13842 (ASSERT_EQ): Likewise.
13843 (ASSERT_EQ_AT): Likewise.
13844 (ASSERT_KNOWN_EQ): Likewise.
13845 (ASSERT_KNOWN_EQ_AT): Likewise.
13846 (ASSERT_NE): Likewise.
13847 (ASSERT_MAYBE_NE): Likewise.
13848 (ASSERT_MAYBE_NE_AT): Likewise.
13849 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13850 the assertion to pass.
13851 (ASSERT_STREQ_AT): Likewise.
13853 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13855 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13856 interaction with -pie.
13858 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13860 * selftest.h: Fix alphabetization of per-source-file selftest
13863 2018-04-30 Jason Merrill <jason@redhat.com>
13865 PR c++/61982 - dead stores to destroyed objects.
13866 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13869 2018-04-30 Jason Merrill <jason@redhat.com>
13871 * tree.c (build_clobber): New.
13872 * tree.h: Declare it.
13873 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13875 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13877 * diagnostic-show-locus.c (layout::layout): Update for
13878 location_get_source_line returning a char_span.
13879 (struct char_span): Move to input.h.
13880 (struct correction): Update for fields in char_span becoming
13882 (struct source_line): Update for location_get_source_line
13883 returning a char_span.
13884 (layout::print_line): Likewise.
13885 * edit-context.c (edited_file::print_content): Likewise.
13886 (edited_file::print_diff_hunk): Likewise.
13887 (edited_file::print_run_of_changed_lines): Likewise.
13888 (edited_file::get_num_lines): Likewise.
13889 (edited_line::edited_line): Likewise.
13890 * final.c (asm_show_source): Likewise.
13891 * input.c (location_get_source_line): Convert return type
13892 from const char * to char_span, losing the final "line_len"
13894 (dump_location_info): Update for the above.
13895 (get_substring_ranges_for_loc): Likewise. Use a char_span
13896 when handling the literal within the line.
13897 (test_reading_source_line): Update for location_get_source_line
13898 returning a char_span.
13899 * input.h (class char_span): Move here from
13900 diagnostic-show-locus.c, converting from a struct to a class.
13901 Make data members private.
13902 (char_span::operator bool): New.
13903 (char_span::length): New.
13904 (char_span::get_buffer): New.
13905 (char_span::operator[]): New.
13906 (char_span::subspan): Make const.
13907 (char_span::xstrdup): New.
13908 (location_get_source_line): Convert return type from const char *
13909 to char_span, losing the final "line_size" param.
13911 2018-04-30 Jan Hubicka <jh@suse.cz>
13913 * lto-wrapper.c (ltrans_priorities): New static var.
13914 (cmp_priority): New.
13915 (run_gcc): Read priorities and if doing parallel build order
13916 the Makefile by them.
13918 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13920 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13922 2018-04-30 Richard Biener <rguenther@suse.de>
13924 * tree-cfg.c (verify_address): Remove base argument, add
13925 flag whether to check TREE_ADDRESSABLE and do that.
13926 (verify_expr): Remove.
13927 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13928 (verify_gimple_assign_single): Likewise.
13929 (verify_gimple_switch): Likewise.
13930 (verify_expr_location_1): Dereference tp once. Add (disabled)
13931 piece from verify_expr.
13932 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13934 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13936 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13938 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13940 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13941 (small_data_pattern): Likewise.
13942 (arc_rewrite_small_data): Likewise.
13943 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13944 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13945 (get_symbol_alignment): New function.
13946 (legitimate_small_data_address_p): Likewise.
13947 (legitimate_scaled_address): Update, call
13948 legitimate_small_data_address_p.
13949 (output_sdata): New static variable.
13950 (arc_print_operand): Update how we handle small data operands.
13951 (arc_print_operand_address): Likewise.
13952 (arc_legitimate_address_p): Update, use
13953 legitimate_small_data_address_p.
13954 (arc_rewrite_small_data_p): Remove.
13955 (arc_rewrite_small_data_1): Likewise.
13956 (arc_rewrite_small_data): Likewise.
13957 (small_data_pattern): Likewise.
13958 (compact_sda_memory_operand): Update to use
13959 legitimate_small_data_address_p and get_symbol_alignment.
13960 (prepare_move_operands): Don't rewite sdata pattern.
13961 (prepare_extend_operands): Remove.
13962 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13964 (zero_extendqisi2): Likewise.
13965 (zero_extendhisi2): Likewise.
13966 (extendqihi2): Likewise.
13967 (extendqisi2): Likewise.
13968 (extendhisi2): Likewise.
13969 (addsi3): Likewise.
13970 (subsi3): Likewise.
13971 (andsi3): Likewise.
13972 * config/arc/constraints.md (Usd): Change it to memory constraint.
13974 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13976 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13977 as source of std instructions.
13978 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13979 allow 6-bit constants as source for store instructions.
13980 (movdi_insn): Update instruction pattern to allow 6-bit constants
13981 as source for store instructions.
13983 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13985 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13987 2018-04-30 Nathan Sidwell <nathan@acm.org>
13988 Sandra Loosemore <sandra@codesourcery.com>
13990 * dumpfile.c (dump_open): Allow '-' for stdout.
13991 * doc/invoke.texi (Developer Options): Document dump filename
13992 determination early. Document stdin/stdout selection.
13994 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13996 Microblaze Target: PIC data text relative
13998 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13999 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14001 * config/microblaze/microblaze.h (microblaze_constant_address_p):
14002 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14003 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14004 New addressing mode for data-text relative position indepenedent code.
14005 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14006 'ADDRESS_SYMBOLIC_TXT_REL'.
14007 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14008 (microblaze_legitimate_pic_operand): Exclude function calls from
14009 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14010 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14012 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14013 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14014 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14015 for 'address + offset'.
14016 (microblaze_expand_prologue): Add new function prologue call for
14018 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14019 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14020 table in case of TARGET_PIC_DATA_TEXT_REL.
14021 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14022 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14023 Add new macros 'UNSPEC_TEXT',
14024 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14025 + exclude function calls from 'UNSPEC_PLT' in case of data text
14027 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14028 new target hook for generating address diff vector tables in case of
14030 * doc/tm.texi : Regenerate.
14031 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14032 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14033 of addr diff vector generation.
14034 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14035 target hook definition.
14036 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14037 Add default function for generate_pic_addr_diff_vec -> flag_pic.
14038 * doc/invoke.texi (Add new pic option): Add new microblaze pic
14039 option for data text relative.
14041 2018-04-30 Richard Biener <rguenther@suse.de>
14043 * tree-chrec.h (evolution_function_is_constant_p): Remove
14045 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14047 2018-04-30 Richard Biener <rguenther@suse.de>
14050 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14052 2018-04-30 Richard Biener <rguenther@suse.de>
14054 PR tree-optimization/28364
14055 PR tree-optimization/85275
14056 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14057 copying first exit test.
14059 2018-04-28 Mark Wielaard <mark@klomp.org>
14061 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14062 dwarf_version >= 5.
14063 (dwarf_AT): Handle DW_AT_addr_base.
14064 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14066 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
14069 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14070 (*ashl<dwi>3_doubleword_mask_1): Ditto.
14071 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14072 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14074 2018-04-28 Richard Biener <rguenther@suse.de>
14076 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14077 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14078 to reflect use. Only add interesting stmts.
14080 2018-04-27 Martin Jambor <mjambor@suse.cz>
14083 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14084 the jump function allows for passing through aggregate values.
14086 2018-04-27 David Malcolm <dmalcolm@redhat.com>
14088 * input.h (in_system_header_at): Convert from macro to inline
14090 (from_macro_expansion_at): Likewise.
14091 (from_macro_definition_at): Likewise.
14093 2018-04-27 Jeff Law <law@redhat.com>
14095 * config.gcc: Mark tile* targets as deprecated/obsolete.
14097 2018-04-27 Richard Biener <rguenther@suse.de>
14099 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14102 2018-04-27 Richard Biener <rguenther@suse.de>
14104 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14106 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
14108 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14109 with Yd constraint. Set "preferred_for_speed" attribute from
14110 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14111 with Yd constraint.
14112 (*movdi_internal): Ditto.
14113 (movti_interunit splitters): Remove
14114 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14115 (movdi_interunit splitters): Ditto.
14116 * config/i386/constraints.md (Ye): Remove.
14117 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14119 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14122 * config/aarch64/constraints.md (Usg): Limit to 31.
14123 (Usj): Limit to 63.
14125 2018-04-27 Jakub Jelinek <jakub@redhat.com>
14127 PR tree-optimization/85529
14128 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14129 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14130 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14131 zero extension or masking of the MSB bit.
14132 (optimize_range_tests): Add FIRST_BB argument, pass it through
14133 to optimize_range_tests_var_bound.
14134 (maybe_optimize_range_tests, reassociate_bb): Adjust
14135 optimize_range_tests callers.
14137 2018-04-26 Richard Biener <rguenther@suse.de>
14138 Jakub Jelinek <jakub@redhat.com>
14140 * cgraph.h (symbol_table): Just declare debug method here.
14141 * symtab.c (symbol_table::debug): Define.
14143 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
14145 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14147 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
14149 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14150 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14151 (*movdi_internal): Substitute Yi and Yj constraint with x
14152 and Ym and Yn constraint with y constraint. Update "isa"
14153 attribute and set "preferred_for_speed" attribute from
14154 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14155 (*movsi_internal): Ditto.
14156 (*movdf_internal): Ditto.
14157 (*movsf_internal): Ditto.
14158 (*zero_extendsidi2): Ditto.
14159 * config/i386/sse.md (vec_set<mode>_0): Ditto.
14160 (sse2_loadld): Ditto.
14161 (*vec_extract<ssevecmodelower>_0): Ditto.
14162 (*vec_extractv4si_0_zext_sse4): Ditto.
14163 (vec_concatv2di): Ditto.
14164 (*vec_dup<mode>): Ditto.
14165 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14166 * config/i386/constraints.md (Yi): Remove.
14171 2018-04-26 Nathan Sidwell <nathan@acm.org>
14173 * dumpfile.c (dump_open): New.
14174 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14175 (dump_finish): Detect stdio/stderr by value not name.
14177 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14179 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14181 2018-04-26 Tom de Vries <tom@codesourcery.com>
14184 * config/nvptx/nvptx.c (verify_neutering_jumps)
14185 (verify_neutering_labels): New function
14186 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14188 2018-04-26 Tom de Vries <tom@codesourcery.com>
14191 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14192 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14195 2018-04-26 Richard Biener <rguenther@suse.de>
14196 Tom de Vries <tom@codesourcery.com>
14199 * lto-streamer-out.c (output_function): Fixup loops if required to match
14200 discovery done in the reader.
14202 2018-04-26 Richard Biener <rguenther@suse.de>
14204 PR tree-optimization/85116
14205 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14206 have a loop exit from the single latch predecessor. Remove
14207 case of header with just condition.
14208 (ch_base::copy_headers): Exclude infinite loops from any
14210 (pass_ch::execute): Record exits.
14212 2018-04-26 Richard Biener <rguenther@suse.de>
14214 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14215 prologue cost vector and pass it to vect_get_load_cost.
14216 (vect_get_peeling_costs_all_drs): Likewise.
14217 (vect_peeling_hash_get_lowest_cost): Likewise.
14218 (vect_enhance_data_refs_alignment): Likewise.
14220 2018-04-26 Richard Biener <rguenther@suse.de>
14222 PR middle-end/85450
14223 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14224 checking of integer<->pointer conversions.
14225 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14226 sign-/zero-extending pointer types.
14227 (expand_omp_for_static_chunk): Likewise.
14229 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14230 Jean Lee <xiaoyur347@gmail.com>
14232 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14233 (TARGET_ASAN_SHADOW_OFFSET): Define.
14234 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14235 true for -fsanitize=address.
14237 2018-04-25 Mark Wielaard <mark@klomp.org>
14239 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14242 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14244 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14245 than "alu", remove explicit "memory" and "imm_disp" attributes.
14246 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14248 PR middle-end/85414
14249 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14250 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14251 gen_lowpart_no_emit.
14253 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14256 * config/i386/i386.c (ix86_expand_builtin): Change memory
14257 operand to XI, extend p0 to Pmode.
14258 * config/i386/i386.md: Change unspec volatile and operand
14259 1 mode to XI, change operand 0 mode to P.
14261 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14263 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14264 GET_MODE_MASK before any checking.
14265 (nds32_can_use_bset_p): Likewise.
14266 (nds32_can_use_btgl_p): Likewise.
14268 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14270 * config/nds32/nds32-doubleword.md: New define_split pattern for
14271 illegal register number.
14273 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14275 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14277 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14279 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14281 2018-04-25 Richard Biener <rguenther@suse.de>
14283 * lto-streamer.h (LTO_major_version): Bump to 8.
14285 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14287 * BASE-VER: Set to 9.0.0.
14289 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14291 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14292 in __abskf2 and __powikf2.
14294 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14297 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14298 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14299 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14300 Use the above on operand 2. Reindent.
14301 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14303 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14306 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14308 * config/i386/i386.opt (mcet): Removed.
14309 * doc/install.texi: Remove -mcet documentation.
14310 * doc/invoke.texi: Likewise.
14312 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14315 * doc/install.texi: Remove -mcet from bootstrap-cet.
14317 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14320 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14321 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14325 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14326 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14327 containing a CONST_VECTOR.
14329 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14331 * doc/install.texi: Update newlib dependency for nvptx.
14333 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14336 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14337 instead of INTVAL when shifting x left.
14339 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14341 PR tree-optimization/85478
14342 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14343 vect_grouped_store_supported for single element vectors.
14345 2018-04-24 Richard Biener <rguenther@suse.de>
14348 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14349 load cost increase to the case of non-constant step.
14351 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14354 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14355 destination if any_malformed_asm.
14357 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14359 PR middle-end/85496
14360 * expr.c (store_field): In the bitfield case, if the value comes from
14361 a function call and is returned in registers by means of a PARALLEL,
14362 do not change the mode of the temporary unless BLKmode and VOIDmode.
14364 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14366 PR rtl-optimization/85423
14367 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14368 dependencies to debug insns when the previous insn is non-debug.
14370 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14372 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14373 enums into a single definition.
14374 (fls): Fix predicates and printing.
14377 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14379 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14380 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14381 and short u6 immediate.
14382 (check_if_valid_sleep_operand): Remove.
14383 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14385 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14387 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14388 flag_always_save_lp condition.
14389 * config/nds32/nds32.opt (malways-save-lp): New option.
14391 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14393 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14394 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14395 * config/nds32/nds32.h
14396 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14397 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14399 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14401 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14402 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14404 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14405 Chung-Ju Wu <jasonwucj@gmail.com>
14407 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14409 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14410 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14412 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14414 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14416 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14418 * config/nds32/nds32-protos.h (nds32_data_alignment,
14419 nds32_local_alignment): Declare.
14420 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14421 nds32_local_alignment): New functions.
14422 (TARGET_CONSTANT_ALIGNMENT): Define.
14423 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14425 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14427 * config/nds32/nds32.c
14428 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14429 (TARGET_MODES_TIEABLE_P): Likewise.
14431 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14433 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14434 level Ofast and Og.
14436 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14437 Chung-Ju Wu <jasonwucj@gmail.com>
14439 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14440 for unaligned access.
14441 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14443 * config/nds32/nds32-intrinsic.md: Likewise.
14444 * config/nds32/nds32_intrinsic.h: Likewise.
14445 * config/nds32/nds32.h (nds32_builtins): Likewise.
14446 * config/nds32/nds32.opt (munaligned-access): New option.
14447 * config/nds32/nds32.c (nds32_asm_file_start): Display
14448 flag_unaligned_access status.
14450 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14452 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14453 -mno-relax is present.
14454 * config/riscv/linux.h (LINK_SPEC): Ditto.
14456 2018-04-20 Martin Sebor <msebor@redhat.com>
14459 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14461 (gimple_fold_builtin_stxcpy_chk): Same.
14462 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14464 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14467 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14468 __powikf2 when long double is IEEE 128-bit.
14470 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14472 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14473 step to make sure stack always aligned.
14475 2018-04-20 Carl Love <cel@us.ibm.com>
14478 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14479 size check for arg0.
14481 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14482 Tom de Vries <tom@codesourcery.com>
14485 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14486 Emit insns for calls too.
14487 (nvptx_find_par): Always look for worker-level predecessor insn.
14488 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14490 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14491 (nvptx_process_pars): Propagate frames for calls.
14493 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14496 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14498 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14499 (ix86_handle_option): Don't handle OPT_mibt.
14500 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14502 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14504 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14505 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14506 (ix86_target_macros): Define __CET__ with flag_cf_protection
14507 for -fcf-protection.
14508 * config/i386/i386.c (isa2_opts): Remove -mibt.
14509 * config/i386/i386.h (TARGET_IBT): Removed.
14510 (TARGET_IBT_P): Likewise.
14511 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14512 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14513 * config/i386/i386.opt (mcet): Update help message.
14514 (mshstk): Likewise.
14516 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14517 -mcet as an alias for -mshstk.
14519 2018-04-20 Richard Biener <rguenther@suse.de>
14521 PR middle-end/85475
14522 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14523 complexity by forcing a single use of the multiply operand.
14525 2018-04-20 Martin Jambor <mjambor@suse.cz>
14528 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14529 recursion dependency to only apply to non-clones.
14531 2018-04-20 Martin Jambor <mjambor@suse.cz>
14534 * ipa-cp.c (create_specialized_node): Check that clones of
14535 self-recursive edges exist during IPA-CP.
14537 2018-04-19 Toon Moene <toon@moene.org>
14539 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14542 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14544 PR tree-optimization/85467
14545 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14546 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14547 VECTOR_CST element to type.
14549 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14552 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14553 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14554 (builtin_longjmp): Likewise.
14555 (save_stack_nonlocal): New pattern.
14556 (restore_stack_nonlocal): Likewise.
14558 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14561 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14562 Replace ASM_OUTPUT_LABEL with fprintf.
14564 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14567 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14568 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14569 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14570 define __IBT__ and __SHSTK__ for -fcf-protection.
14571 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14573 (ix86_trampoline_init): Likewise.
14574 (x86_output_mi_thunk): Likewise.
14575 (ix86_notrack_prefixed_insn_p): Likewise.
14576 (ix86_option_override_internal): Don't disallow -fcf-protection.
14577 * config/i386/i386.md (rdssp<mode>): Also enable for
14579 (incssp<mode>): Likewise.
14580 (nop_endbr): Likewise.
14581 * config/i386/i386.opt (mcet): Change help message to built-in
14584 (mshstk): Likewise.
14585 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14586 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14587 enable CET built-in functions.
14589 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14591 * common/config/i386/i386-common.c
14592 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14593 OPTION_MASK_ISA_MOVDIRI_UNSET,
14594 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14595 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14596 * config.gcc (movdirintrin.h): New header.
14597 * config/i386/cpuid.h (bit_MOVDIRI,
14598 bit_MOVDIR64B): New bits.
14599 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14601 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14602 (VOID, PVOID, PCVOID)): New function types.
14603 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14604 __builtin_ia32_directstoreu_u64,
14605 __builtin_ia32_movdir64b): New builtins.
14606 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14607 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14609 (ix86_valid_target_attribute_inner_p): Ditto.
14610 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14611 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14612 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14613 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14614 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14615 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14616 (movdiri<mode>, movdir64b_<mode>): New.
14617 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14618 * config/i386/immintrin.h: Include movdirintrin.h.
14619 * config/i386/movdirintrin.h: New file.
14620 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14622 2018-04-19 Richard Biener <rguenther@suse.de>
14624 PR middle-end/85455
14625 * cfg.c (clear_bb_flags): When loop state says we have
14626 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14628 2018-04-19 Richard Biener <rguenther@suse.de>
14630 PR tree-optimization/84737
14631 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14632 copying restrict info.
14633 (vect_setup_realignment): Use it.
14634 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14635 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14636 the first DR to all generated stores.
14637 (vectorizable_load): Likewise for loads.
14639 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14641 PR tree-optimization/85446
14642 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14643 the integral and pointer types to have the same precision.
14645 * doc/install.texi: Document --disable-cet being the default and
14648 2018-04-18 Martin Liska <mliska@suse.cz>
14650 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14653 2018-04-18 Martin Liska <mliska@suse.cz>
14656 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14659 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14660 arguments if they are comparable.
14662 2018-04-18 Martin Liska <mliska@suse.cz>
14665 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14668 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14671 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14674 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14675 ENDBR after calling __morestack.
14677 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14680 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14681 by using gcc_base_ver to generate a gcc_driver_version, and use
14682 it when generating GCC_DRIVER_NAME.
14683 * configure: Regenerate.
14685 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14688 * config.gcc: Obsolete powerpc*-*-*spe*.
14690 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14693 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14694 (stabstr_D): Change type of unum from unsigned int to
14695 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14698 2018-04-17 Jim Wilson <jimw@sifive.com>
14701 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14702 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14703 Set arg_pointer_offset after using pretend_args_size.
14705 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14707 PR rtl-optimization/85431
14708 * dse.c (record_store): Ignore zero width stores.
14711 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14712 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14713 __builtin_stack_restore rather than after it.
14714 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14715 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14716 argument instead of virtual_dynamic_stack_rtx.
14718 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14720 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14722 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14723 Add note to error message to explain internal mapping of overloaded
14724 built-in function name to non-overloaded built-in function name.
14725 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14728 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14731 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14732 where the inputs overlap with the output.
14734 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14736 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14737 (=v, v) alternative and explicit "memory" attribute.
14738 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14739 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14741 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14742 "sselog1" type instead of "sselog".
14743 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14744 "sselog". Remove explicit "memory" attribute.
14745 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14746 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14748 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14749 "sselog1" type instead of "sselog". Remove explicit "memory"
14751 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14752 use "sselog1" type instead of "sselog". Remove explicit "memory"
14754 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14755 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14757 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14758 "sselog1" type instead of "sselog". Remove explicit "memory"
14760 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14761 use "sselog1" type instead of "sselog". Remove explicit "memory"
14765 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14767 PR middle-end/85414
14768 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14771 2018-04-17 Martin Jambor <mjambor@suse.cz>
14774 * ipa-cp.c (create_specialized_node): Call
14775 expand_all_artificial_thunks if necessary.
14777 2018-04-17 Martin Liska <mliska@suse.cz>
14780 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14781 in message, remote space in between '_G' and '('.
14783 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14786 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14787 avx512f_vmcmp<mode>3<round_saeonly_name>,
14788 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14789 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14790 avx512f_rndscale<mode><round_saeonly_name>,
14791 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14792 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14793 Use %<iptr>2 instead of %2 for -masm=intel.
14794 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14795 avx512f_vcvttss2usi<round_saeonly_name>,
14796 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14798 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14799 avx512f_vcvttsd2usi<round_saeonly_name>,
14800 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14801 Use %q1 instead of %1 for -masm=intel.
14802 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14803 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14804 of %3 for -masm=intel.
14805 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14807 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14809 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14811 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14812 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14814 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14816 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14817 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14818 %g1 and one with %0 and %1.
14819 (avx512er_vmrcp28<mode><round_saeonly_name>,
14820 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14821 %1 for -masm=intel.
14822 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14823 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14824 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14825 of %0 and %{%4%} for -masm=intel.
14826 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14827 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14828 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14829 order of %0 and %{%5%}%{z%} for -masm=intel.
14831 2018-04-17 Jan Hubicka <jh@suse.cz>
14834 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14836 2018-04-17 Martin Liska <mliska@suse.cz>
14839 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14840 for target_clone error message. Make default implementation
14841 clone to be a local declaration.
14842 (separate_attrs): Add new argument and check for an empty
14844 (expand_target_clones): Handle it.
14845 (ipa_target_clone): Make redirection just for target_clones
14848 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14849 Tom de Vries <tom@codesourcery.com>
14851 PR middle-end/84955
14852 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14853 tiled basic blocks without omp continue statements.
14855 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14858 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14859 vec_extract expression as having side effects to make sure it gets
14862 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14865 * config/i386/i386.c (get_builtin_code_for_version): Check
14868 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14871 * config.gcc: Support "skylake".
14872 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14874 * config/i386/i386.c (m_SKYLAKE): Define.
14875 (processor_target_table): Add "skylake".
14876 (ix86_option_override_internal): Add "skylake".
14877 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14878 PROCESSOR_CANNONLAKE.
14879 (get_builtin_code_for_version): Fix priority for
14880 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14881 PROCESSOR_SKYLAKE-AVX512.
14882 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14883 (processor_type): Add PROCESSOR_SKYLAKE.
14885 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14886 Jason Merrill <jason@redhat.com>
14889 * convert.c (convert_to_integer_1): Use direct recursion for
14890 enumeral types and types with a precision less than the number
14891 of bits in their mode.
14893 2018-04-16 Julia Koval <julia.koval@intel.com>
14896 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14897 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14899 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14902 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14903 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14904 and -mno-direct-move.
14906 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14909 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14910 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14911 Ensure negative shifts result in {0}.
14913 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14915 PR rtl-optimization/79916
14916 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14917 regs (if any) to define how to gnerate SD moves when LRA is in
14920 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14922 PR rtl-optimization/85393
14923 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14924 * except.c (expand_dw2_landing_pad_for_region): Make static.
14925 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14926 a label and unconditional jump to old_bb, rather than
14927 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14930 PR rtl-optimization/85376
14931 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14932 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14933 instead of a specific value.
14935 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14936 Bin Cheng <bin.cheng@arm.com>
14938 PR tree-optimization/82965
14939 PR tree-optimization/83991
14940 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14941 by_profile_only parameter.
14942 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14943 information if the loop was predicted to iterate too many times.
14944 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14946 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14949 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14952 2018-04-13 Martin Liska <mliska@suse.cz>
14953 Jakub Jelinek <jakub@redhat.com>
14955 PR middle-end/81657
14956 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14957 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14958 * builtins.c (expand_builtin_memory_copy_args): Use
14959 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14960 handle dest_addr == pc_rtx.
14962 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14965 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14966 asked to not generate direct moves.
14967 (fix_trunc<mode>si2_stfiwx): Similar.
14968 (fix_trunc<mode>si2_internal): Similar.
14970 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14973 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14974 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14975 lookup if dest in some wider mode is known to be const0_rtx and
14976 if so, record permanent equivalence for it to be ZERO_EXTEND of
14977 the narrower mode destination.
14979 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14981 * lto-streamer-out.c (output_function): Revert 259346.
14982 * omp-expand.c (expand_oacc_for): Likewise.
14984 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14986 PR rtl-optimization/85354
14987 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14988 * sel-sched.c (sel_global_init): ... here.
14990 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14993 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14994 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14995 mode for PE-COFF targets.
14996 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14997 (i386_pe_asm_lto_end): Likewise.
14998 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14999 (TARGET_ASM_LTO_END): Likewise.
15000 * config/i386/winnt.c (saved_debug_info_level): New static variable.
15001 (i386_pe_asm_lto_start): New function.
15002 (i386_pe_asm_lto_end): Likewise.
15004 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15005 Richard Biener <rguenther@suse.de>
15007 PR middle-end/84955
15008 * lto-streamer-out.c (output_function): Fix CFG loop state before
15010 * omp-expand.c (expand_oacc_for): Handle calls to internal
15011 functions like regular functions.
15013 2018-04-12 Richard Biener <rguenther@suse.de>
15016 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15017 for the early LTO debug to properly generate references to it
15018 during DIE emission. Do not re-use that for the skeleton for
15020 (dwarf2out_early_finish): Likewise.
15022 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15025 * config/i386/sse.md
15026 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15027 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15028 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15029 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15030 and output is a reg, avoid creating invalid lowpart subreg, but
15031 instead split into a 512-bit move. Don't split if not AVX512VL,
15032 input is xmm16+ reg and output is a mem.
15033 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15034 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15035 xmm16+ reg and output is a mem.
15037 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15039 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15040 also for flag_dwarf2_cfi_asm.
15042 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15044 PR rtl-optimization/85342
15045 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15046 a bool scalar var inside of the loop instead. Don't try to update
15047 recog_data.operand after failed apply_change_group.
15049 2018-04-12 Tom de Vries <tom@codesourcery.com>
15052 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15053 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
15054 array with flexible array member as array without given dimension.
15055 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15056 argument for undefined param to true.
15058 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
15061 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15062 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15063 from PowerPC section.
15064 * config/rs6000/sysv4.opt (mcall-): Improve help text.
15065 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15066 help text that is too long.
15067 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15068 help text that is too long.
15069 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15070 help text that is too long.
15072 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
15074 * config/alpha/alpha.md (stack_probe_internal): Rename
15075 from "probe_stack". Update all callers.
15077 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15079 PR rtl-optimization/84566
15080 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15081 sched_macro_fuse_insns.
15083 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15086 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15087 (compute_block_dependences): ... from here.
15089 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15091 PR tree-optimization/85331
15092 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15093 from int to HOST_WIDE_INT.
15095 2018-04-11 Martin Jambor <mjambor@suse.cz>
15098 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15099 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15100 not the same as the source val.
15101 (cgraph_edge_brings_value_p): New parameter.
15102 (gather_edges_for_value): Pass destination value to
15103 cgraph_edge_brings_value_p.
15104 (perhaps_add_new_callers): Likewise.
15105 (get_info_about_necessary_edges): Likewise and exclude values brought
15106 only by self-recursive edges.
15107 (create_specialized_node): Redirect only clones of self-calling edges.
15108 (+self_recursive_pass_through_p): New function.
15109 (find_more_scalar_values_for_callers_subset): Use it.
15110 (find_aggregate_values_for_callers_subset): Likewise.
15111 (known_aggs_to_agg_replacement_list): Removed.
15112 (decide_whether_version_node): Re-calculate known constants for all
15113 remaining context clones.
15115 2018-04-11 Richard Biener <rguenther@suse.de>
15118 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15119 from early DWARF output.
15120 (dwarf2out_early_finish): Output line info unconditionally into
15121 early DWARF and add reference to it.
15123 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15126 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15127 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15128 other than V2DFmode using iptr mode attribute.
15129 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15131 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15133 PR rtl-optimization/84659
15134 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15136 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15139 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15141 (output_loc_list): Pass address of a dummy size variable even in the
15142 locview handling loop.
15143 (index_location_lists): Add comment on why skip_loc_list_entry can't
15146 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
15149 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15152 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
15155 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15156 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15157 and -mstring-compare-inline-limit.
15159 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15162 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15163 for stack clash protection in a register whenever we need it to be in
15166 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15168 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15169 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15171 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15174 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15176 (mlong-double-): Ditto.
15177 * config/rs6000/sysv4.opt (msdata=): Ditto.
15178 (mtls-size=): Ditto.
15180 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15182 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15183 erroneous entries for
15184 "vector int vec_ldl (int, long int *)", and
15185 "vector unsigned int vec_ldl (int, unsigned long int *)".
15186 Add comments and entries for
15187 "vector bool char vec_ldl (int, bool char *)",
15188 "vector bool short vec_ldl (int, bool short *)",
15189 "vector bool int vec_ldl (int, bool int *)",
15190 "vector bool long long vec_ldl (int, bool long long *)",
15191 "vector pixel vec_ldl (int, pixel *)",
15192 "vector long long vec_ldl (int, long long *)",
15193 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15194 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15195 type tree bool_long_long_type_node and correct definition of
15196 bool_V2DI_type_node to make reference to this new type tree.
15197 (rs6000_mangle_type): Replace erroneous reference to
15198 bool_long_type_node with bool_long_long_type_node.
15199 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15200 comments to emphasize sign distinctions for char and int types and
15201 replace RS6000_BTI_bool_long constant with
15202 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15203 use of RS6000_BTI_pixel.
15204 (bool_long_type_node): Remove this macro definition.
15205 (bool_long_long_type_node): New macro definition
15207 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15209 PR rtl-optimization/85300
15210 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15211 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15212 simplify_unary_operation fails.
15214 2018-04-10 Martin Liska <mliska@suse.cz>
15216 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15217 cgraph_edge and ipa_ref.
15219 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15223 * config/i386/sse.md
15224 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15225 computation of the VEC_MERGE selector from mask.
15226 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15227 Fix decoding of the VEC_MERGE selector into mask.
15229 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15231 PR tree-optimization/85286
15232 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15234 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15236 * final.c (final_1): Set insn_last_address as well as
15237 insn_current_address.
15239 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15242 * explow.c (emit_stack_probe): Call validize_mem on memory location
15243 before passing it to gen_probe_stack. Create address operand and
15244 legitimize it for the probe_stack_address case.
15246 2018-04-09 Jan Hubicka <jh@suse.cz>
15249 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15250 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15251 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15253 (free_lang_data): Rebuild type inheritance graph.
15255 2018-04-09 Martin Sebor <msebor@redhat.com>
15257 * invoke.texi (-finline-small-functions): Mention other optimization
15259 (-findirect-inlining, -fpartial-inlining): Same.
15260 (-finline-functions-called-once): Same.
15261 (-freorder-blocks-and-partition): Same.
15263 2018-04-09 Jan Hubicka <jh@suse.cz>
15266 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15267 jumps; choose last target that matches the criteria (i.e.
15268 no partition changes for non-crossing jumps).
15269 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15270 support for redirecting crossing jumps to non-crossing.
15272 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15274 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15275 also for naked functions.
15277 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15279 * config/arc/arc.md (add_shift): New pattern.
15280 (add_shift2): Likewise.
15281 (sub_shift): Likewise.
15282 (sub_shift_cmp0_noout): Likewise.
15283 (compare_si_ashiftsi): Likewise.
15284 (xbfu_cmp0_noout): New combine pattern.
15285 (xbfu_cmp0"): Likewise.
15286 (movsi_set_cc_insn): Place the predicable variant first.
15287 (commutative_binary_cmp0_noout): Remove clobber.
15288 (commutative_binary_cmp0): New pattern.
15289 (noncommutative_binary_cmp0): Likewise.
15290 (noncommutative_binary_cmp0_noout): Likewise.
15291 (noncommutative_binary_comparison_result_used): Removed.
15292 (rsub_cmp0): New pattern.
15293 (rsub_cmp0_noout): Likewise.
15294 (extzvsi): Changed, keep only meaningful variants.
15295 (SQH, SEZ): New iterators.
15296 (SQH_postfix): New mode attribute.
15297 (SEZ_prefix): New code attribute.
15298 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15299 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15300 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15301 of numerical value.
15302 (noncommutative_operator): Check the availability of barrel
15305 2018-04-09 Richard Biener <rguenther@suse.de>
15307 PR tree-optimization/85284
15308 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15309 Only use the niter constraining form of simple_iv when the exit
15310 is always executed.
15312 2018-04-09 Tom de Vries <tom@codesourcery.com>
15315 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15316 (define_expand "*memory_barrier"): New define_expand.
15317 (define_insn "memory_barrier"): New insn.
15319 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15321 PR rtl-optimization/80463
15322 PR rtl-optimization/83972
15323 PR rtl-optimization/83480
15325 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15326 correct producer for the insn.
15327 (tidy_control_flow): Fixup seqnos in case of debug insns.
15329 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15331 PR rtl-optimization/83913
15333 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15334 different sched-times when merging exprs.
15336 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15338 PR rtl-optimization/83962
15340 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15341 tidy_fallthru_edge and tidy_control_flow.
15343 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15345 PR rtl-optimization/83530
15347 * sel-sched.c (force_next_insn): New global variable.
15348 (remove_insn_for_debug): When force_next_insn is true, also leave only
15349 next insn in the ready list.
15350 (sel_sched_region): When the region wasn't scheduled, make another pass
15351 over it with force_next_insn set to 1.
15353 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15355 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15357 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15358 for interrupt control.
15359 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15360 functions for interrupt control.
15361 * config/nds32/nds32-intrinsic.md: Likewise.
15362 * config/nds32/nds32_intrinsic.h: Likewise.
15363 * config/nds32/nds32.h (nds32_builtins): Likewise.
15365 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15367 * config/nds32/nds32.c (nds32_init_machine_status,
15368 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15369 strict_aligned_p field.
15370 (nds32_expand_to_rtl_hook): New function.
15371 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15372 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15374 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15375 Chung-Ju Wu <jasonwucj@gmail.com>
15377 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15378 * config/nds32/nds32-n7.md: New file.
15379 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15380 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15382 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15383 * config/nds32/nds32.md (pipeline_model): Add n7.
15384 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15385 * config/nds32/pipelines.md: Include n7 settings.
15387 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15388 Chung-Ju Wu <jasonwucj@gmail.com>
15390 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15391 * config/nds32/nds32-e8.md: New file.
15392 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15393 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15395 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15396 * config/nds32/nds32.md (pipeline_model): Add e8.
15397 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15398 * config/nds32/pipelines.md: Include e8 settings.
15400 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15401 Chung-Ju Wu <jasonwucj@gmail.com>
15403 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15404 * config/nds32/nds32-n8.md: New file.
15405 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15406 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15408 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15409 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15410 * config/nds32/nds32.md (pipeline_model): Add n8.
15411 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15412 * config/nds32/pipelines.md: Include n8 settings.
15414 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15415 Chung-Ju Wu <jasonwucj@gmail.com>
15417 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15418 * config/nds32/nds32-n9-2r1w.md: New file.
15419 * config/nds32/nds32-n9-3r2w.md: New file.
15420 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15421 nds32_register_ports): New or modify for cpu n9.
15422 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15424 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15425 * config/nds32/nds32-utils.c: New file.
15426 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15427 TARGET_MUL_SLOW): Define.
15428 * config/nds32/nds32.md (pipeline_model): New attribute.
15429 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15430 New options that support cpu n9.
15431 * config/nds32/pipelines.md: Include n9 settings.
15432 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15434 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15436 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15437 information if necessary.
15438 (output_cond_branch_compare_zero): Likewise.
15439 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15440 (nds32_target_alignment): Refine for alignment.
15441 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15442 (FUNCTION_BOUNDARY): Modify.
15443 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15445 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15447 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15449 * config/nds32/constants.md (unspec_volatile_element): Add values for
15450 TLB operation and data prefetch.
15451 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15452 functions for TLB operation and data prefetch.
15453 * config/nds32/nds32-intrinsic.md: Likewise.
15454 * config/nds32/nds32_intrinsic.h: Likewise.
15455 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15456 (nds32_print_operand): Likewise.
15457 * config/nds32/nds32.h (nds32_builtins): Likewise.
15459 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15460 Andrew Pinski <pinsika@gcc.gnu.org>
15462 PR middle-end/82976
15463 * match.pd: Use constant_boolean_node of correct type instead of
15464 boolean_true_node or boolean_false_node for simplifying
15465 pointer comparisons to zero.
15467 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15469 PR tree-optimization/80021
15470 * tree.c (verify_type_variant): Make error call in verify_variant_match
15471 translatable and remove final full stop.
15473 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15475 * config/nds32/constants.md (unspec_volatile_element): Add
15476 UNSPEC_VOLATILE_EH_RETURN.
15477 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15478 nds32_output_stack_pop): Support dwarf exception handling process.
15479 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15480 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15481 exception handling process.
15482 (nds32_compute_stack_frame): Likewise.
15483 (nds32_return_addr_rtx): Likewise.
15484 (nds32_initial_elimination_offset): Likewise.
15485 (nds32_expand_prologue): Likewise.
15486 (nds32_expand_epilogue): Likewise.
15487 (nds32_dynamic_chain_address): New function.
15488 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15489 exception handling.
15490 (DYNAMIC_CHAIN_ADDRESS): Define.
15491 (EH_RETURN_DATA_REGNO): Define.
15492 (EH_RETURN_STACKADJ_RTX): Define.
15493 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15494 patterns for dwarf exception handling.
15496 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15498 * config/nds32/nds32.h: Clean up obsolete macros.
15500 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15502 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15503 Add enum values for particular instructions.
15504 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15505 particular intrinsic functions.
15506 * config/nds32/nds32-intrinsic.md: Likewise.
15507 * config/nds32/nds32_intrinsic.h: Likewise.
15508 * config/nds32/nds32.h (nds32_builtins): Likewise.
15509 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15510 (btst, ave): New patterns for particular instructions.
15512 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15514 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15515 Add enum values for atomic load/store and memory sync.
15516 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15518 * config/nds32/nds32-intrinsic.md: Likewise.
15519 * config/nds32/nds32_intrinsic.h: Likewise.
15520 * config/nds32/nds32.h (nds32_builtins): Likewise.
15522 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15524 PR tree-optimization/85257
15525 * fold-const.c (native_encode_vector): If not all elts could fit
15526 and off is -1, return 0 rather than offset.
15527 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15528 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15529 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15530 adjust buffer in native_interpret_expr call.
15532 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15534 * config/nds32/constants.md (unspec_volatile_element): Add cache
15535 control enum values.
15536 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15537 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15538 * config/nds32/nds32.c (nds32_cctl_names): New.
15539 (nds32_print_operand): Handle cache control register names.
15540 * config/nds32/nds32.h (nds32_builtins): New enum values.
15541 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15543 * config/nds32/nds32.md (type): Add mmu.
15544 * config/nds32/pipelines.md (simple_insn): Add mmu.
15546 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15548 * config/nds32/nds32.md (type): Remove call.
15549 * config/nds32/pipelines.md (simple_insn): Likewise.
15551 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15553 * config/nds32/constants.md (unspec_volatile_element): Add
15554 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15555 UNSPEC_VOLATILE_FMFCFG.
15556 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15557 description for fmfcfg and fmfcsr.
15558 (bdesc_1arg): Add fmtcsr.
15559 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15560 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15561 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15562 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15563 unspec_fmfcfg): New patterns.
15564 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15565 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15566 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15567 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15568 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15569 __nds32__fmfcfg): Define.
15571 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15573 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15574 intrinsic register names.
15575 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15576 intrinsic register enum values and macros.
15578 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15580 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15581 for load/store addressing form.
15582 (nds32_print_operand_address): Likewise.
15584 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15587 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15588 based on LABEL_REF. Remove useless assertion.
15589 (pic_address_needs_scratch): Fix formatting.
15590 (sparc_legitimize_pic_address): Minor tweaks.
15591 (sparc_delegitimize_address): Adjust assertion accordingly.
15592 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15593 into symbolic_operand.
15594 (movsi_high_pic_label_ref): Likewise.
15595 (movsi_lo_sum_pic_label_ref): Likewise.
15596 (movdi_pic_label_ref): Likewise.
15597 (movdi_high_pic_label_ref): Likewise.
15598 (movdi_lo_sum_pic_label_ref): Likewise.
15600 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15602 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15603 custom LIB_SPEC setup.
15605 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15606 Kito Cheng <kito.cheng@gmail.com>
15608 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15609 * config/riscv/freebsd.h: New.
15611 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15613 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15614 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15617 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15618 Kito Cheng <kito.cheng@gmail.com>
15620 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15621 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15622 * config/nds32/nds32-protos.h (nds32_output_call,
15623 nds32_output_return): Declare.
15624 * config/nds32/nds32.md: Refine all the call and return patterns.
15626 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15629 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15630 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15632 PR rtl-optimization/84872
15633 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15634 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15635 EDGE_CROSSING edge.
15637 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15639 * expr.c (copy_blkmode_to_reg): Revert 254862.
15640 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15642 2018-04-06 Richard Biener <rguenther@suse.de>
15644 PR middle-end/85244
15645 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15646 after seeing a component reference with an adjacent field. Treat
15647 refs to arrays at struct end of external decls similar to
15648 refs to unconstrained commons.
15650 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15653 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15654 look through SAVE_EXPRs with non-side-effects argument. Adjust
15656 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15659 2018-04-06 Richard Biener <rguenther@suse.de>
15661 PR middle-end/85180
15662 * alias.c (find_base_term): New wrapper around find_base_term
15663 unwinding CSELIB_VAL_PTR changes.
15664 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15667 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15669 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15671 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15672 constant definitions.
15673 ("nop"): lr 0,0 -> nopr r0
15674 ("nop_lr0", "nop_lr1"): New insn definitions.
15676 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15678 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15679 NDS32_V3PUSH_AVAILABLE_P macro.
15681 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15682 Chung-Ju Wu <jasonwucj@gmail.com>
15684 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15685 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15686 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15687 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15688 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15689 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15690 * config/nds32/constraints.md: New constraints and checking for hard
15691 float configuration.
15692 * config/nds32/iterators.md: New mode iterator and attribute for hard
15693 float configuration.
15694 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15696 * config/nds32/nds32-fpu.md: New file.
15697 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15698 deal with hard float code generation.
15699 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15701 (abi_type, float_reg_number): New enum type.
15702 * config/nds32/nds32-predicates.c: New predicates for hard float.
15703 * config/nds32/nds32-protos.h: Declare functions for hard float.
15704 * config/nds32/nds32.c: Implementation for hard float configuration.
15705 * config/nds32/nds32.h: Definitions for hard float configuration.
15706 * config/nds32/nds32.md: Include hard float machine description and
15707 modify patterns for hard float configuration.
15708 * config/nds32/nds32.opt: New options for hard float configuration.
15709 * config/nds32/predicates.md: New predicates for hard float
15712 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15714 * common/config/nds32/nds32-common.c
15715 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15717 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15719 PR middle-end/85195
15720 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15721 CONSTRUCTOR_ELT (ctor, ...)->value.
15723 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15726 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15728 2018-04-05 Tom de Vries <tom@codesourcery.com>
15731 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15734 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15735 Kito Cheng <kito.cheng@gmail.com>
15737 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15738 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15739 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15740 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15742 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15743 Kito Cheng <kito.cheng@gmail.com>
15745 * config/nds32/constraints.md (Ufe): New memory constraint.
15746 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15747 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15748 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15750 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15751 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15753 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15755 * config/nds32/nds32.md: Use optimize_size in the condition for
15756 alu-shift instructions.
15758 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15760 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15762 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15764 * config/nds32/nds32.md (negsi2): Refine pattern.
15766 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15767 Chung-Ju Wu <jasonwucj@gmail.com>
15769 * config/nds32/iterators.md (shift_rotate): New code iterator.
15770 (shift): New code attribute.
15771 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15772 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15773 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15774 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15775 bit-wise operations.
15776 (andsi3, *andsi3): Ditto.
15777 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15778 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15779 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15780 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15781 nds32_ior_operand, nds32_xor_operand): New predicates.
15783 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15785 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15786 (addsi3, subsi3): ... this.
15788 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15790 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15792 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15794 * config/nds32/nds32.md: Adjust indention.
15796 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15798 * config/nds32/nds32.md (feature): New attribute.
15800 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15802 * config/nds32/nds32.md (subtype): New attribute.
15804 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15807 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15808 expansion to perform a bitwise AND of the argument followed by a
15809 boolean negation of the result.
15811 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15813 PR rtl-optimization/84878
15814 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15815 the basic block. Assert the use reference is not artificial and that
15816 it has an associated insn.
15818 2018-04-04 Michael Matz <matz@suse.de>
15820 * builtins.c (compute_objsize): Pass correct operand
15821 to array_at_struct_end_p.
15823 2018-04-04 Richard Biener <rguenther@suse.de>
15826 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15827 from contexts for DINFO_LEVEL_TERSE and below.
15829 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15831 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15832 resiter_operand condition.
15833 * config/nds32/nds32.md (*move<mode>): Ditto.
15835 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15836 Monk Chiang <sh.chiang04@gmail.com>
15838 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15840 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15842 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15844 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15845 Kito Cheng <kito.cheng@gmail.com>
15847 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15848 nds32_cond_code_str, output_cond_branch,
15849 output_cond_branch_compare_zero, nds32_expand_cbranch,
15850 nds32_expand_cstore, nds32_expand_movcc,
15851 nds32_output_cbranchsi4_equality_zero,
15852 nds32_output_cbranchsi4_equality_reg,
15853 nds32_output_cbranchsi4_equality_reg_or_const_int,
15854 nds32_output_cbranchsi4_greater_less_zero: New functions.
15855 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15856 nds32_expand_cstore, nds32_expand_movcc,
15857 nds32_output_cbranchsi4_equality_zero,
15858 nds32_output_cbranchsi4_equality_reg,
15859 nds32_output_cbranchsi4_equality_reg_or_const_int,
15860 nds32_output_cbranchsi4_greater_less_zero): Declare.
15861 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15862 nds32_rimm11s_operand): New predicates.
15863 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15864 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15867 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15869 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15870 * config/nds32/nds32.md: Ditto.
15871 * config/nds32/pipelines.md: Ditto.
15873 2018-04-04 Richard Biener <rguenther@suse.de>
15875 PR tree-optimization/85168
15876 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15877 propagating abnormals.
15879 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15881 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15883 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15884 Kito Cheng <kito.cheng@gmail.com>
15886 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15887 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15888 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15889 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15890 * config/nds32/nds32.md (sibcall_internal): New.
15891 (sibcall_register): Remove.
15892 (sibcall_immediate): Remove.
15893 (sibcall_value_internal): New.
15894 (sibcall_value_register): Remove.
15895 (sibcall_value_immediate): Remove.
15896 * config/nds32/predicates.md (nds32_general_register_operand): New.
15897 (nds32_call_address_operand): New.
15899 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15901 PR rtl-optimization/85167
15902 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15903 bb_defs if *split_p, instead preinitialize it to NULL.
15905 PR tree-optimization/85156
15906 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15907 evaluating the argument multiple times.
15909 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15911 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15913 (_mm_cvtpd_ps): Likewise.
15914 (_mm_cvttpd_epi32): Likewise.
15915 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15916 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15917 vector, pixel, and bool following altivec.h include.
15919 2018-04-03 Martin Sebor <msebor@redhat.com>
15921 * doc/extend.texi (Common Function Attributes): Clarify.
15922 (const attribute): Likewise.
15923 (pure attribute): Likewise.
15925 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15928 * config/i386/i386.c (ix86_expand_vector_set): Use
15929 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15931 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15933 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15934 instructions when changing rounding bits to preserve precision bits
15935 in the x87 control word.
15937 2018-04-03 Martin Liska <mliska@suse.cz>
15939 PR tree-optimization/82491
15940 * rtl.h (strip_offset_and_add): Replace += suboffset with
15941 poly_uint64 () + suboffset.
15943 2018-03-29 Martin Liska <mliska@suse.cz>
15944 Martin Jambor <mjambor@suse.cz>
15947 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15948 param_type is not an integral or pointer type.
15950 2018-04-03 Richard Biener <rguenther@suse.de>
15952 * sese.h (recompute_all_dominators): Remove.
15954 2018-04-02 Martin Sebor <msebor@redhat.com>
15956 * doc/invoke.texi (-Wrestrict): Fix typos.
15958 2018-04-02 Jim Wilson <jimw@sifive.com>
15960 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15961 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15962 (<optab>di3, <optab>si3_extend): Likewise.
15963 (<optab>si3_mask, <optab>si3_mask_1): New.
15964 (<optab>di3_mask, <optab>di3_mask_1): New.
15965 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15966 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15967 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15969 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15971 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15974 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15976 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15977 (nds32_canonicalize_comparison): New function.
15979 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15980 Kito Cheng <kito.cheng@gmail.com>
15981 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15983 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15984 * config/nds32/constants.md (unspec_volatile_element): Add
15985 UNSPEC_VOLATILE_RELAX_GROUP.
15986 * config/nds32/nds32-relax-opt.c: New file.
15987 * config/nds32/nds32-predicates.c
15988 (nds32_symbol_load_store_p): New function.
15989 * config/nds32/nds32-protos.h
15990 (nds32_symbol_load_store_p): Declare function.
15991 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15992 * config/nds32/nds32.c
15993 (nds32_register_pass): New function to register pass.
15994 (nds32_register_passes): New function to register passes.
15995 * config/nds32/nds32.md (relax_group): New pattern.
15996 * config/nds32/nds32.opt (mrelax-hint): New option.
15997 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15999 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
16001 * config/nds32/t-nds32: Modify files dependency.
16003 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16005 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16006 (PROFILE_HOOK): Define its implementation.
16008 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16010 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16011 type and 32-bit size.
16013 2018-04-01 Jakub Jelinek <jakub@redhat.com>
16015 PR middle-end/85090
16016 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16017 (V_128_256): New mode iterator.
16018 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16019 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16020 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16022 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16023 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16025 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
16028 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16029 NaN inputs correctly.
16031 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
16034 * config/rs6000/vsx.md (??r): New mode attribute.
16035 (*vsx_mov<mode>_64bit): Use it.
16036 (*vsx_mov<mode>_32bit): Likewise.
16038 2018-03-30 Martin Sebor <msebor@redhat.com>
16040 PR tree-optimization/84818
16041 * builtins.c (check_access): Use warning_n.
16043 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16046 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16048 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16051 2018-03-30 Julia Koval <julia.koval@intel.com>
16054 * x86-tune.def (movx, partial_reg_dependency): Enable for
16057 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
16059 PR inline-asm/84985
16060 * lra-constraints.c (process_alt_operands): Move setting
16061 this_alternative_matches below.
16063 2018-03-29 Martin Liska <mliska@suse.cz>
16066 * doc/invoke.texi: Document how LTO works with debug info.
16067 Describe auto-load support of binutils. Mention 'x86-64'
16068 as valid option value of -march option.
16070 2018-03-29 Jakub Jelinek <jakub@redhat.com>
16072 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16075 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16076 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16077 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16080 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16083 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16084 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16085 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16086 for RS6000_BTM_POWERPC64.
16087 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16088 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16089 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16092 (DIVDEU): Likewise.
16094 2018-03-28 Carl Love <cel@us.ibm.com>
16097 2017-09-27 Carl Love <cel@us.ibm.com>
16099 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16100 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16101 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16104 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16106 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16107 instead of __vector bool.
16108 (_mm_max_pu8): Likewise.
16109 (_mm_min_pi16): Likewise.
16111 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16114 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16115 (DIVWEUO): Likewise.
16116 (DIVDEO): Likewise.
16117 (DIVDEUO): Likewise.
16118 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16119 DIVWEUO and DIVDEUO.
16120 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16121 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16122 (div_extend): Likewise.
16123 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16125 (__builtin_divweuo): Likewise.
16126 (__builtin_divdeo): Likewise.
16127 (__builtin_divdeuo): Likewise.
16129 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16132 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16133 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16135 PR tree-optimization/82004
16136 * gimple-match-head.c (optimize_pow_to_exp): New function.
16137 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16138 Don't fold to exp if optimize_pow_to_exp is false.
16140 2018-03-28 Martin Liska <mliska@suse.cz>
16143 * calls.c (initialize_argument_information): Fix trailing space.
16144 * common.opt: Fix typo and provide better explanation for
16145 -fsanitize-coverage option.
16146 * config/i386/i386.opt: Fix typo.
16148 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16149 Martin Liska <mliska@suse.cz>
16152 * gimplify.c (asan_poison_variable): Don't do the check for
16153 gimplify_omp_ctxp here.
16154 (gimplify_decl_expr): Do it here.
16155 (gimplify_target_expr): Likewise.
16157 2018-03-28 Martin Liska <mliska@suse.cz>
16160 * config/i386/i386.c (ix86_function_arg_advance): Do not call
16161 chkp_type_bounds_count if MPX is not enabled.
16163 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
16165 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16167 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
16170 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16171 function to create the function decl for complex long double
16172 multiply and divide for -mabi=ieeelongdouble.
16173 (init_float128_ieee): Call it.
16175 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16178 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16179 -fcf-protection=branch -mibt.
16180 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16182 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16185 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16186 arm_word_relocations.
16188 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16191 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16192 extern array declarations.
16194 2018-03-27 Richard Biener <rguenther@suse.de>
16196 PR middle-end/84067
16197 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16198 explicit single_use checks.
16200 2018-03-27 Richard Biener <rguenther@suse.de>
16202 PR tree-optimization/85082
16203 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16206 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16208 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16209 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16210 Turn on fasynchronous-unwind-tables and funwind-tables.
16212 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16215 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16216 (*bmi_blsr_<mode>_ccz): Ditto.
16218 2018-03-26 Tom de Vries <tom@codesourcery.com>
16220 PR tree-optimization/85063
16221 * omp-general.c (offloading_function_p): New function. Factor out
16223 * omp-offload.c (pass_omp_target_link::gate): ... here.
16224 * omp-general.h (offloading_function_p): Declare.
16225 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16226 with attribute omp declare target for offloading functions.
16228 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16230 PR tree-optimization/84005
16231 * tree-data-ref.h (get_base_for_alignment): Declare.
16232 * tree-data-ref.c (get_base_for_alignment_1): New function.
16233 (get_base_for_alignment): Likewise.
16234 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16235 get_base_for_alignment to find a suitable base object, instead
16236 of always using drb->base_address.
16238 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16240 PR inline-asm/85022
16241 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16242 known size by default.
16244 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16246 PR inline-asm/85030
16247 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16248 and non BLKmode operands.
16250 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16253 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16254 Clean up attributes.
16256 2018-03-23 Richard Biener <rguenther@suse.de>
16259 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16260 we are going to emit early debug for LTO.
16262 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16264 PR inline-asm/85034
16265 * function.c (match_asm_constraints_1): Don't optimize if input
16266 doesn't satisfy general_operand predicate for output's mode.
16268 PR inline-asm/85022
16269 * alias.c (write_dependence_p): Don't require for x_canonicalized
16270 non-VOIDmode if x has VOIDmode.
16273 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16274 just don't try to optimize it rather than assert it never happens.
16276 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16278 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16279 macro expansions for definition of ST_INTERNAL_<mode> and
16280 LD_INTERNAL_<mode> builtins.
16281 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16283 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16285 (altivec_expand_st_builtin): Likewise.
16286 (altivec_expand_builtin): Remove calls to deleted functions.
16287 (rs6000_address_for_altivec): Delete this function.
16288 * config/rs6000/vector.md: Remove expands for
16289 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16291 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16294 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16295 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16296 re-computing once computed.
16297 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16298 (arm_init_machine_status): Initialize
16299 machine->static_chain_stack_bytes.
16301 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16304 * doc/extend.texi: Add four new prototypes for vec_ld.
16305 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16306 definitions for more logical presentation.
16307 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16308 entries for V1TI variants of __builtin_altivec_ld builtin.
16309 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16310 handling of V1TI variant of LVX icode pattern.
16311 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16312 (rs6000_gimple_fold_builtin): Likewise.
16313 (altivec_init_builtins): Add code to define
16314 __builtin_altivec_lvx_v1ti function.
16316 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16318 PR inline-asm/84941
16319 * function.c (match_asm_constraints_1): Don't do the optimization
16320 if input isn't a REG, SUBREG, MEM or constant.
16322 2018-03-22 Tom de Vries <tom@codesourcery.com>
16324 PR tree-optimization/84956
16325 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16326 bb_has_abnormal_pred.
16328 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16331 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16332 DECL_INITIAL (decl) to decl at the end.
16333 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16334 adjust the comment.
16336 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16338 * doc/extend.texi (__builtin_tgmath): Document when complex
16339 integer types are treated as _Complex _Float64.
16341 2018-03-21 Tom de Vries <tom@codesourcery.com>
16343 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16345 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16347 PR tree-optimization/84960
16348 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16349 if it is ENTRY block, move them into single succ of ENTRY in that case.
16351 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16353 PR tree-optimization/84811
16354 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16355 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16356 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16357 (known_subrange_p): Update accordingly. Cast each value involved
16358 in the size comparison, rather than casting the result of the
16361 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16363 PR tree-optimization/84982
16364 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16365 by flipping the least significant bit rather than all bits from
16366 bitpos to bitpos + bitsize - 1.
16368 2018-03-21 Nathan Sidwell <nathan@acm.org>
16370 * doc/extend.texi (Deprecated Features): Remove mention of
16371 long-deleted deprecations.
16373 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16376 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16377 * configure: Regenerate.
16379 2018-03-21 Tom de Vries <tom@codesourcery.com>
16381 PR tree-optimization/83126
16382 * tree-parloops.c (num_phis): New function.
16383 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16385 2018-03-21 Nathan Sidwell <nathan@acm.org>
16387 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16388 mention anon-struct/union members and trailing attributes.
16390 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16392 PR tree-optimization/84969
16393 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16394 builtin memset partitions if they set different rhs values.
16396 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16398 PR rtl-optimization/84989
16399 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16400 VEC_DUPLICATE with scalar result mode.
16402 2018-03-21 Martin Liska <mliska@suse.cz>
16405 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16406 not intended return statement.
16408 2018-03-21 Martin Liska <mliska@suse.cz>
16411 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16412 (chkp_find_bound_slots_1): Limit number of iterations.
16414 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16417 * Minor grammar fixes for x86 options.
16419 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16422 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16423 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16425 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16428 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16429 (altivec_lvx_<mode>_1op): Likewise.
16430 (altivec_stvx_<mode>_2op): Likewise.
16431 (altivec_stvx_<mode>_1op): Likewise.
16432 (altivec_lvx_<VM2:mode>): New define_expand.
16433 (altivec_stvx_<VM2:mode>): Likewise.
16434 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16435 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16436 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16437 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16438 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16439 (rs6000_gen_lvx): Likewise.
16440 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16441 (altivec_expand_stv_builtin): Likewise.
16442 (altivec_expand_builtin): Likewise.
16443 * config/rs6000/vector.md: Likewise.
16445 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16448 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16451 2018-03-20 Richard Biener <rguenther@suse.de>
16454 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16455 sign-conversions as zero, fall back to standard scalar_stmt
16458 2018-03-20 Martin Liska <mliska@suse.cz>
16461 * predict.c (rebuild_frequencies): Handle case when we have
16462 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16464 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16467 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16468 flag_section_anchors.
16469 * varasm.c (use_blocks_for_decl_p): Remove hack for
16470 dw2_force_const_mem.
16473 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16475 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16476 be created, use lowpart_subreg of operands[0] rather than operands[0]
16478 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16479 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16480 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16481 and n constraint instead of aarch64_shift_imm_di and Usd.
16482 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16483 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16485 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16488 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16489 to favor GPR over NEON registers.
16490 (<shift>di3_neon): Likewise.
16492 2018-03-20 Tom de Vries <tom@codesourcery.com>
16495 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16496 (nvptx_process_pars): Emit bar.sync asap and alap.
16498 2018-03-20 Tom de Vries <tom@codesourcery.com>
16501 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16502 seen_label if seen_label is already set.
16504 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16507 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16508 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16509 Use 1U instead of 1. Formatting fixes.
16512 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16513 instead of TREE_TYPE (s1) for the return value.
16515 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16517 PR tree-optimization/84946
16518 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16519 bitsize + bitsize in poly_uint64 rather than poly_int64.
16522 * dwarf2asm.c: Include fold-const.c.
16523 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16524 of decl rather than decl itself.
16526 PR rtl-optimization/84643
16527 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16529 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16532 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16533 calling assemble_variable.
16535 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16538 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16539 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16541 2018-03-19 Jim Wilson <jimw@sifive.com>
16544 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16545 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16546 (riscv_first_stack_step): Likewise.
16547 (riscv_option_override): Use STACK_BOUNDARY instead of
16548 MIN_STACK_BOUNDARY.
16549 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16550 MIN_STACK_BOUNDARY.
16551 (BIGGEST_ALIGNMENT): Set to 128.
16552 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16553 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16556 2018-03-19 Richard Biener <rguenther@suse.de>
16558 PR tree-optimization/84933
16559 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16560 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16562 2018-03-19 Richard Biener <rguenther@suse.de>
16564 PR tree-optimization/84859
16565 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16566 (cond_if_else_store_replacement): Perform sinking operation on
16567 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16568 Generalize what a BB with a single eligible store is.
16570 2018-03-19 Richard Biener <rguenther@suse.de>
16572 PR tree-optimization/84929
16573 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16574 chrec_is_positive against non-chrec arg.
16576 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16579 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16581 2018-03-18 Martin Liska <mliska@suse.cz>
16583 PR rtl-optimization/84635
16584 * regrename.c (build_def_use): Use matches_mode only when
16587 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16589 PR tree-optimization/84913
16590 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16591 vectorize chains of COND_EXPRs.
16593 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16595 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16597 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16599 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16601 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16603 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16605 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16606 Kito Cheng <kito.cheng@gmail.com>
16608 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16609 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16610 (nds32_adjust_reg_alloc_order): New function.
16611 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16613 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16615 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16616 nds32_print_operand, nds32_print_operand_address): Use
16617 HOST_WIDE_INT_PRINT_DEC instead.
16619 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16621 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16623 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16626 * config/i386/i386.c (initial_ix86_tune_features,
16627 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16628 unsigned long long.
16629 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16630 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16631 rather than 1u << ix86_tune. Formatting fix.
16632 (ix86_option_override_internal): Change ix86_arch_mask from
16633 unsigned int to unsigned HOST_WIDE_INT, initialize to
16634 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16635 (ix86_function_specific_restore): Likewise.
16637 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16640 * postreload.c (reload_combine_recognize_pattern): Perform
16641 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16642 truncate_int_for_mode the result for the destination's mode.
16645 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16646 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16648 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16651 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16654 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16655 regno_allocno_class_array and sorted_pseudos.
16656 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16657 insns where regno is used.
16659 2018-03-16 Martin Liska <mliska@suse.cz>
16662 * multiple_target.c (create_dispatcher_calls): Redirect
16663 reference in the symbol table.
16665 2018-03-16 Martin Liska <mliska@suse.cz>
16668 * multiple_target.c (create_dispatcher_calls): Redirect also
16671 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16675 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16676 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16677 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16679 2018-03-16 Julia Koval <julia.koval@intel.com>
16681 * doc/invoke.texi (Skylake Server): Add CLWB.
16682 Cannonlake): Remove CLWB.
16684 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16686 PR tree-optimization/84841
16687 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16689 (FLOAT_ONE_CONST_TYPE): Define.
16690 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16691 (sort_by_operand_rank): Put entries with higher constant_type last
16692 rather than first to match comments.
16694 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16696 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16699 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16702 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16703 check and use address of target always.
16705 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16708 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16709 (indirect_thunk_bnd_needed): Likewise.
16710 (indirect_thunks_used): Likewise.
16711 (indirect_thunks_bnd_used): Likewise.
16712 (indirect_return_needed): New.
16713 (indirect_return_bnd_needed): Likewise.
16714 (output_indirect_thunk_function): Add a bool argument for
16716 (output_indirect_thunk_function): Don't generate alias for
16717 function return thunk.
16718 (ix86_code_end): Call output_indirect_thunk_function to generate
16719 function return thunks.
16720 (ix86_output_function_return): Set indirect_return_bnd_needed
16721 and indirect_return_needed instead of indirect_thunk_bnd_needed
16722 and indirect_thunk_needed.
16724 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16726 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16727 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16728 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16730 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16731 Paul Hua <paul.hua.gm@gmail.com>
16734 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16736 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16738 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16739 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16740 resp. SFmode cases.
16742 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16745 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16746 instead of GET_MODE_SIZE when comparing Units.
16748 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16751 * varasm.c (hash_section): Return an unchangeble hash value
16752 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16753 Return !aarch64_can_use_per_function_literal_pools_p ().
16755 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16758 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16759 rather than address of cmode as last argument to prepare_cmp_insn.
16761 2018-03-15 Julia Koval <julia.koval@intel.com>
16763 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16764 F_AVX512VNNI, F_AVX512BITALG): New.
16766 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16769 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16770 insn for floating-point loads and stores.
16772 2018-03-14 Carl Love <cel@us.ibm.com>
16774 * config/rs6000/rs6000-c.c: Add macro definitions for
16775 ALTIVEC_BUILTIN_VEC_PERMXOR.
16776 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16777 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16778 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16779 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16781 * config/doc/extend.texi: Add prototypes for vec_permxor.
16783 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16786 * diagnostic-show-locus.c (class layout_point): Convert m_line
16787 from int to linenum_type.
16788 (line_span::comparator): Use linenum "compare" function when
16789 comparing line numbers.
16790 (test_line_span): New function.
16791 (layout_range::contains_point): Convert param "row" from int to
16793 (layout_range::intersects_line_p): Likewise.
16794 (layout::will_show_line_p): Likewise.
16795 (layout::print_source_line): Likewise.
16796 (layout::should_print_annotation_line_p): Likewise.
16797 (layout::print_annotation_line): Likewise.
16798 (layout::print_leading_fixits): Likewise.
16799 (layout::annotation_line_showed_range_p): Likewise.
16800 (struct line_corrections): Likewise for field m_row.
16801 (line_corrections::line_corrections): Likewise for param "row".
16802 (layout::print_trailing_fixits): Likewise.
16803 (layout::get_state_at_point): Likewise.
16804 (layout::get_x_bound_for_row): Likewise.
16805 (layout::print_line): Likewise.
16806 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16807 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16808 * input.c (selftest::test_linenum_comparisons): New function.
16809 (selftest::input_c_tests): Call it.
16810 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16811 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16812 * selftest.h (ASSERT_GT): New macro.
16813 (ASSERT_GT_AT): New macro.
16814 (ASSERT_LT): New macro.
16815 (ASSERT_LT_AT): New macro.
16817 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16819 PR rtl-optimization/84780
16820 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16822 2018-03-14 Martin Liska <mliska@suse.cz>
16824 * tree.c (record_node_allocation_statistics): Use
16825 get_stats_node_kind.
16826 (get_stats_node_kind): New function extracted from
16827 record_node_allocation_statistics.
16828 (free_node): Use get_stats_node_kind.
16830 2018-03-14 Richard Biener <rguenther@suse.de>
16832 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16833 that the value-set of ANTIC_IN doesn't grow.
16836 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16838 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16839 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16841 2018-03-14 Julia Koval <julia.koval@intel.com>
16843 * config.gcc (icelake-client, icelake-server): New.
16845 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16846 (initial_ix86_arch_features): Ditto.
16847 (PTA_SKYLAKE): Add SGX.
16848 (PTA_ICELAKE): Remove.
16849 (PTA_ICELAKE_CLIENT): New.
16850 (PTA_ICELAKE_SERVER): New.
16851 (ix86_option_override_internal): Split up icelake on icelake client and
16853 (get_builtin_code_for_version): Ditto.
16854 (fold_builtin_cpu): Ditto.
16855 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16856 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16857 * config/i386/i386.h (processor_type): Ditto.
16858 * doc/invoke.texi: Ditto.
16860 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16863 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16864 INTEGER_CST offset, add it together with bitpos / 8 and
16865 sign extend based on POINTER_SIZE.
16869 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16872 * config/i386/constraints.md (Yc): New register constraint.
16873 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16874 Use Yc constraint for alternative 2 of operand 0. Remove
16875 preferred_for_speed attribute.
16877 2018-03-14 Richard Biener <rguenther@suse.de>
16879 PR tree-optimization/84830
16880 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16881 with the old one to avoid oscillations.
16883 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16886 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16888 (assign_by_spills): Return a flag of reload assignment failure.
16889 Do not process the reload assignment failures. Do not spill other
16890 reload pseudos if they has the same reg class. Update n if
16892 (lra_assign): Add a return arg. Set up from the result of
16893 assign_by_spills call.
16894 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16895 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16896 usage_insns if it is not NULL.
16897 (spill_hard_reg_in_range): New function.
16898 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16899 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16900 function prototypes.
16901 (lra_assign): Change prototype.
16902 * lra.c (lra): Add code to deal with fails by splitting hard reg
16905 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16907 * config/riscv/riscv.opt (mrelax): New option.
16908 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16909 "norelax" when riscv_mrelax is disabled.
16910 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16912 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16915 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16916 reassociation for int modes.
16918 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16920 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16921 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16923 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16924 * config/aarch64/aarch64-sve.md
16925 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16926 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16927 (*extend<mode><Vwide>2): Rename to...
16928 (aarch64_sve_extend<mode><Vwide>2): ...this.
16929 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16930 renaming the old pattern to...
16931 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16933 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16934 define_expand, renaming the old pattern to...
16935 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16936 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16937 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16938 account when deciding which SVE instruction the optab should use.
16939 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16941 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16943 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16944 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16945 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16946 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16947 (tlsdesc_small_<mode>): Turn a define_expand and use
16948 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16949 (tlsdesc_small_advsimd_<mode>): ...this.
16950 (tlsdesc_small_sve_<mode>): New pattern.
16952 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16954 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16955 (UNSPEC_UMUL_HIGHPART): New constants.
16956 (MUL_HIGHPART): New int iteraor.
16957 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16958 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16960 (*<su>mul<mode>3_highpart): New define_insn.
16962 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16965 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16968 2018-03-13 Martin Liska <mliska@suse.cz>
16971 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16973 (sem_item_optimizer::~sem_item_optimizer): Release it.
16974 (sem_item_optimizer::merge_classes): Register variable aliases.
16975 (sem_item_optimizer::fixup_pt_set): New function.
16976 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16977 * ipa-icf.h: Declare new variables and functions.
16979 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16981 PR middle-end/84834
16982 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16983 integer_pow2p@2 and test integer_pow2p in condition.
16984 (A < 0 ? C : 0): Similarly for @1.
16986 PR middle-end/84831
16987 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16988 characters starting at p contain '\0' character, don't look beyond
16992 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16993 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16996 * reg-stack.c (change_stack): Change update_end var from int to
16997 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16998 also call set_block_for_insn on the newly added insns and rescan.
17001 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17002 on the last operand.
17005 * tree.c (stabilize_reference_1): Return save_expr (e) for
17006 STATEMENT_LIST even if it doesn't have side-effects.
17008 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
17010 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17012 2018-03-12 Renlin Li <renlin.li@arm.com>
17014 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17015 aarch64_output_scalar_simd_mov_immediate.
17017 2018-03-12 Martin Sebor <msebor@redhat.com>
17019 PR tree-optimization/83456
17020 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17021 for perfectly overlapping calls to memcpy.
17022 (gimple_fold_builtin_memory_chk): Same.
17023 (gimple_fold_builtin_strcpy): Handle no-warning.
17024 (gimple_fold_builtin_stxcpy_chk): Same.
17025 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17027 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17029 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17030 parameter. Use it for SFmode.
17031 (rs6000_function_arg_advance_1): Adjust.
17032 (rs6000_function_arg): Adjust.
17033 (rs6000_gimplify_va_arg): Pass false for that new parameter.
17035 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17037 PR rtl-optimization/84169
17038 PR rtl-optimization/84780
17039 * combine.c (can_combine_p): Check for a 2-insn combination whether
17040 the destination register is used between the two insns, too.
17042 2018-03-12 Richard Biener <rguenther@suse.de>
17044 PR tree-optimization/84803
17045 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17046 for refs DR analysis didn't process.
17048 2018-03-12 Richard Biener <rguenther@suse.de>
17050 PR tree-optimization/84777
17051 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17052 force-vectorize loops ignore whether we are optimizing for size.
17054 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
17056 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17057 (TARGET_MD_ASM_ADJUST): Define.
17059 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
17060 Kito Cheng <kito.cheng@gmail.com>
17061 Chung-Ju Wu <jasonwucj@gmail.com>
17063 * config/nds32/nds32.c (nds32_compute_stack_frame,
17064 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17065 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17066 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17067 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17068 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17069 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17070 * config/nds32/nds32.md (prologue, epilogue): Use macro
17071 NDS32_V3PUSH_AVAILABLE_P to do checking.
17073 2018-03-11 Jakub Jelinek <jakub@redhat.com>
17076 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17077 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17078 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
17079 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
17080 addition of most attributes on !orig_type_die or the attribute not
17081 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17083 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17084 Chung-Ju Wu <jasonwucj@gmail.com>
17086 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17087 __NDS32_VH__ macro.
17088 * config/nds32/nds32.opt (mvh): New option.
17090 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17091 Chung-Ju Wu <jasonwucj@gmail.com>
17093 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17095 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17096 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17099 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17100 Chung-Ju Wu <jasonwucj@gmail.com>
17102 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17104 * config/nds32/nds32-multiple.md (strlensi): New pattern.
17105 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17107 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
17108 Kito Cheng <kito.cheng@gmail.com>
17109 Chung-Ju Wu <jasonwucj@gmail.com>
17111 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17112 UNSPEC_FFMISM and UNSPEC_FLMISM.
17113 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17114 for ffb, ffmism and flmism.
17115 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17116 (unspec_ffmism): Ditto.
17117 (unspec_flmism): Ditto.
17118 (nds32_expand_builtin_impl): Check if string extension is available.
17119 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17120 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17122 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
17125 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17128 * lra-assigns.c (assign_by_spills): Return a flag of reload
17129 assignment failure. Do not process the reload assignment
17130 failures. Do not spill other reload pseudos if they has the same
17132 (lra_assign): Add a return arg. Set up from the result of
17133 assign_by_spills call.
17134 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17135 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17136 usage_insns if it is not NULL.
17137 (spill_hard_reg_in_range): New function.
17138 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17139 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17140 function prototypes.
17141 (lra_assign): Change prototype.
17142 * lra.c (lra): Add code to deal with fails by splitting hard reg
17145 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
17148 * config/i386/i386.opt: Replace Enforcment with Enforcement.
17150 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
17153 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17154 (dw_val_node): Add val_symbolic_view.
17155 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17156 (symview_upper_bound): New.
17157 (new_line_info_table): Initialize symviews_since_reset.
17158 (dwarf2out_source_line): Count symviews_since_reset and set
17159 symview_upper_bound.
17160 (dw_val_equal_p): Handle symview.
17161 (add_AT_symview): New.
17162 (print_dw_val): Handle symview.
17163 (attr_checksum, attr_checksum_ordered): Likewise.
17164 (same_dw_val_p, size_of_die): Likewise.
17165 (value_format, output_die): Likewise.
17166 (add_high_low_attributes): Use add_AT_symview for entry_view.
17167 (dwarf2out_finish): Reset symview_upper_bound, clear
17170 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
17173 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17174 Add strict argument and use it.
17175 (rs6000_split_multireg_move): Update for new strict argument.
17176 (mem_operand_gpr): Disallow all non-offsettable addresses.
17177 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17179 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17182 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17183 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17184 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17187 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17188 decl, use remap_type if we want to use the type.
17190 2018-03-09 Martin Sebor <msebor@redhat.com>
17192 PR tree-optimization/84526
17193 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17195 (builtin_access::generic_overlap): Be prepared to handle non-array
17198 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17200 PR rtl-optimization/84682
17201 * lra-constraints.c (process_address_1): Check is_address flag
17202 for address constraints.
17203 (process_alt_operands): Likewise.
17204 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17205 preprocess_constraints.
17206 * recog.h (preprocess_constraints): Add oploc parameter.
17208 * recog.c (preprocess_constraints): Test address_operand for
17209 CT_ADDRESS constraints.
17211 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17214 * lra-assigns.c (assign_by_spills): Return a flag of reload
17215 assignment failure. Do not process the reload assignment
17216 failures. Do not spill other reload pseudos if they has the same
17218 (lra_assign): Add a return arg. Set up from the result of
17219 assign_by_spills call.
17220 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17221 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17222 usage_insns if it is not NULL.
17223 (spill_hard_reg_in_range): New function.
17224 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17225 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17226 function prototypes.
17227 (lra_assign): Change prototype.
17228 * lra.c (lra): Add code to deal with fails by splitting hard reg
17231 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17234 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17235 Accept complain bool parameter. Only emit errors if it is true.
17236 (arm_parse_cpu_option_name): Likewise.
17237 (arm_target_thumb_only): Adjust callers of the above.
17238 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17239 prototype to take a default true bool parameter.
17240 (arm_parse_arch_option_name): Likewise.
17242 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17243 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17247 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17248 * configure: Regenerate.
17249 * configure.ac ("linker --version-script option"): New.
17250 ("linker soname option"): New.
17252 2018-03-09 Richard Biener <rguenther@suse.de>
17254 PR tree-optimization/84775
17255 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17256 immediate uses of predicate stmts and mark them modified.
17259 PR tree-optimization/84178
17260 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17262 (version_loop_for_if_conversion): Delay update_ssa call.
17263 (tree_if_conversion): Delay update_ssa until after predicate
17266 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17269 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17270 when the function accesses prior frames.
17272 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17275 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17276 gen_llsym, otherwise call maybe_gen_llsym.
17278 PR inline-asm/84742
17279 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17280 has ',' character inside of it.
17282 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17285 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17286 as clobbering CC_REGNUM.
17288 2018-03-08 Richard Biener <rguenther@suse.de>
17290 PR middle-end/84552
17291 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17292 (follow_copies_to_constant): Do not follow SSA names registered
17295 2018-03-08 Richard Biener <rguenther@suse.de>
17297 PR tree-optimization/84178
17298 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17300 (version_loop_for_if_conversion): Delay update_ssa call.
17301 (tree_if_conversion): Delay update_ssa until after predicate
17304 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17306 PR tree-optimization/84178
17307 * tree-if-conv.c (release_bb_predicate): Remove the
17308 the assertion that the stmts have NULL use_ops.
17309 Discard the statements, asserting that they haven't
17310 yet been added to a BB.
17312 2018-03-08 Richard Biener <rguenther@suse.de>
17314 PR tree-optimization/84746
17315 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17316 (phi_translate): Pass in destination ANTIC_OUT set.
17317 (phi_translate_1): Likewise. For a simplified result lookup
17318 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17319 (phi_translate_set): Adjust.
17320 (do_pre_regular_insertion): Likewise.
17321 (do_pre_partial_partial_insertion): Likewise.
17323 2018-03-08 Martin Liska <mliska@suse.cz>
17325 PR gcov-profile/84735
17326 * doc/gcov.texi: Document usage of profile files.
17327 * gcov-io.h: Document changes in the format.
17329 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17333 * dwarf2out.c (struct dw_line_info_table): Update comments for
17335 (FORCE_RESET_NEXT_VIEW): New.
17336 (FORCE_RESETTING_VIEW_P): New.
17337 (RESETTING_VIEW_P): Check for -1 too.
17338 (ZERO_VIEW_P): Likewise.
17339 (new_line_info_table): Force-reset next view.
17340 (dwarf2out_begin_function): Likewise.
17341 (dwarf2out_source_line): Simplify zero_view_p initialization.
17342 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17343 view directly. Omit view when omitting .loc at line 0.
17345 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17347 PR tree-optimization/84740
17348 * tree-switch-conversion.c (process_switch): Call build_constructors
17349 only if info.phi_count is non-zero.
17351 PR tree-optimization/84739
17352 * tree-tailcall.c (find_tail_calls): Check call arguments against
17353 DECL_ARGUMENTS (current_function_decl) rather than
17354 DECL_ARGUMENTS (func) when checking for tail recursion.
17356 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17358 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17359 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17360 Volker Reichelt's entry and add entries for people that perform
17361 GCC fuzzy testing and report numerous bugs.
17363 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17366 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17367 readonly data in sdata, if that is disabled.
17368 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17369 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17370 -mreadonly-in-sdata option.
17372 2018-03-07 Martin Sebor <msebor@redhat.com>
17374 PR tree-optimization/84468
17375 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17376 basic block when looking for nul assignment.
17378 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17381 * except.h (output_function_exception_table): Adjust prototype.
17382 * except.c (output_function_exception_table): Remove FNNAME parameter
17383 and add SECTION parameter. Ouput one part of the table at a time.
17384 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17385 the first part of the exception table and emit unwind directives.
17386 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17387 (i386_pe_seh_cold_init): Likewise.
17388 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17389 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17390 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17391 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17392 * config/i386/winnt.c: Include except.h.
17393 (struct seh_frame_state): Add reg_offset, after_prologue and
17394 in_cold_section fields.
17395 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17396 (i386_pe_seh_cold_init): New function.
17397 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17398 to seh->in_cold_section.
17399 (seh_emit_push): Record the offset of the push.
17400 (seh_emit_save): Record the offet of the save.
17401 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17402 Test seh->after_prologue to disregard the epilogue.
17403 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17404 (i386_pe_end_cold_function): New function.
17406 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17409 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17410 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17413 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17415 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17416 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17418 PR middle-end/84723
17419 * multiple_target.c: Include tree-inline.h and intl.h.
17420 (expand_target_clones): Diagnose and fail if node->definition and
17421 !tree_versionable_function_p (node->decl).
17423 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17425 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17427 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17428 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17429 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17431 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17434 * combine.c (try_combine): Use reg_or_subregno instead of handling
17435 just paradoxical SUBREGs and REGs.
17437 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17439 * config/arc/arc.c (arc_finalize_pic): Remove function.
17440 (arc_must_save_register): We use single base PIC register, remove
17441 checks to save/restore the PIC register.
17442 (arc_expand_prologue): Likewise.
17443 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17445 (arc_verify_short): Likewise.
17446 (arc_attr_type): Likewise.
17447 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17448 (walk_stores): Likewise.
17449 (arc_address_cost): Make it static.
17450 (arc_verify_short): Likewise.
17451 (branch_dest): Likewise.
17452 (arc_attr_type): Likewise.
17453 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17454 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17455 (arc_final_prescan_insn): Remove inserting the nops due to
17456 hardware hazards. It is done in reorg step.
17457 (insn_length_variant_t): Remove.
17458 (insn_length_parameters_t): Likewise.
17459 (arc_insn_length_parameters): Likewise.
17460 (arc_get_insn_variants): Likewise.
17461 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17463 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17465 PR inline-asm/84683
17466 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17469 PR tree-optimization/84687
17470 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17472 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17474 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17476 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17477 Rename to ppc_speculation_barrier.
17478 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17479 __builtin_ppc_speculation_barrier.
17481 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17484 * combine.c (combine_simplify_rtx): Don't try to simplify if
17485 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17488 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17490 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17491 to 32 bytes when compiling for POWER9.
17493 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17496 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17497 regparm >= 3 with no arg reg available also for calls with
17498 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17501 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17503 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17505 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17508 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17510 2018-03-05 Richard Biener <rguenther@suse.de>
17512 PR tree-optimization/84486
17513 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17514 When inserting a __builtin_assume_aligned call set the LHS
17515 SSA name alignment info accordingly.
17517 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17519 PR tree-optimization/84114
17520 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17521 Avoid reassociation of FLOAT_MODE addition.
17523 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17525 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17526 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17527 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17528 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17529 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17530 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17531 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17533 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17534 __builtin_ia32_wbinvd): New builtins.
17535 (SPECIAL_ARGS2): New.
17536 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17537 (SPECIAL_ARGS2): New.
17538 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17539 (ix86_valid_target_attribute_inner_p): Ditto.
17540 (ix86_init_mmx_sse_builtins): Add special_args2.
17541 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17542 TARGET_WBNOINVD_P): New.
17543 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17544 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17545 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17546 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17547 * config/i386/pconfigintrin.h: New file.
17548 * config/i386/wbnoinvdintrin.h: Ditto.
17549 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17551 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17553 2018-03-05 Richard Biener <rguenther@suse.de>
17555 PR tree-optimization/84670
17556 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17558 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17559 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17560 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17561 doesn't grow if all successors (recursively) were visited at least
17564 2018-03-05 Richard Biener <rguenther@suse.de>
17566 PR tree-optimization/84650
17567 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17568 if executed in the loop pipeline.
17570 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17572 * doc/configfiles.texi (Configuration Files): Move info about
17573 conditionalizing $target-protos.h to...
17574 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17575 differs from $target-protos.h.
17577 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17578 Chung-Ju Wu <jasonwucj@gmail.com>
17580 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17581 * config/nds32/nds32-multiple.md (setmemsi): Define.
17582 * config/nds32/nds32-memory-manipulation.c
17583 (nds32_gen_dup_4_byte_to_word_value): New.
17584 (emit_setmem_word_loop): New.
17585 (emit_setmem_byte_loop): New.
17586 (nds32_expand_setmem_loop): New.
17587 (nds32_expand_setmem_loop_v3m): New.
17588 (nds32_expand_setmem_unroll): New.
17589 (nds32_expand_setmem): New.
17591 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17592 Chung-Ju Wu <jasonwucj@gmail.com>
17594 * config/nds32/nds32-memory-manipulation.c
17595 (nds32_emit_load_store): New.
17596 (nds32_emit_post_inc_load_store): New.
17597 (nds32_emit_mem_move): New.
17598 (nds32_emit_mem_move_block): New.
17599 (nds32_expand_movmemsi_loop_unknown_size): New.
17600 (nds32_expand_movmemsi_loop_known_size): New.
17601 (nds32_expand_movmemsi_loop): New.
17602 (nds32_expand_movmemsi_unroll): New.
17603 (nds32_expand_movmemqi): Rename ...
17604 (nds32_expand_movmemsi): ... to this.
17605 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17606 (movmemsi): ... to this.
17607 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17608 (nds32_expand_movmemsi): ... to this.
17610 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17611 Monk Chiang <sh.chiang04@gmail.com>
17612 Chung-Ju Wu <jasonwucj@gmail.com>
17614 * config/nds32/nds32-protos.h
17615 (nds32_expand_load_multiple): New arguments.
17616 (nds32_expand_store_multiple): Ditto.
17617 (nds32_valid_multiple_load_store): Rename ...
17618 (nds32_valid_multiple_load_store_p): ... to this.
17619 * config/nds32/nds32-memory-manipulation.c
17620 (nds32_expand_load_multiple): Refine implementation.
17621 (nds32_expand_store_multiple): Ditto.
17622 * config/nds32/nds32-multiple.md
17623 (load_multiple): Update nds32_expand_load_multiple interface.
17624 (store_multiple): Update nds32_expand_store_multiple interface.
17625 * config/nds32/nds32-predicates.c
17626 (nds32_valid_multiple_load_store): Rename ...
17627 (nds32_valid_multiple_load_store_p): ... to this and refine
17629 * config/nds32/predicates.md
17630 (nds32_load_multiple_and_update_address_operation): New predicate.
17631 (nds32_store_multiple_and_update_address_operation): New predicate.
17633 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17634 Chung-Ju Wu <jasonwucj@gmail.com>
17636 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17637 (combo): New attribute.
17638 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17640 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17642 * config/nds32/nds32.opt: Change -mcmodel= default value.
17644 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17645 Monk Chiang <sh.chiang04@gmail.com>
17646 Chung-Ju Wu <jasonwucj@gmail.com>
17648 * config/nds32/constants.md (unspec_element): New enum.
17649 * config/nds32/constraints.md (Umw): New constraint.
17650 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17651 * config/nds32/nds32-intrinsic.md: Likewise.
17652 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17653 (nds32_valid_smw_lwm_base_p): New.
17654 (nds32_output_smw_single_word): New.
17655 (nds32_output_lmw_single_word): New.
17656 (nds32_expand_unaligned_load): New.
17657 (nds32_expand_unaligned_store): New.
17658 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17659 (nds32_output_smw_single_word): Declare.
17660 (nds32_output_lmw_single_word): Declare.
17661 (nds32_expand_unaligned_load): Declare.
17662 (nds32_expand_unaligned_store): Declare.
17663 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17664 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17665 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17666 NDS32_BUILTIN_UASTORE_DW.
17667 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17670 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17671 Kito Cheng <kito.cheng@gmail.com>
17672 Chung-Ju Wu <jasonwucj@gmail.com>
17674 * config/nds32/nds32-intrinsic.c
17675 (nds32_expand_builtin_null_ftype_reg): Delete.
17676 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17677 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17678 (nds32_read_argument): New.
17679 (nds32_legitimize_target): Ditto.
17680 (nds32_legitimize_argument): Ditto.
17681 (nds32_check_constant_argument): Ditto.
17682 (nds32_expand_unop_builtin): Ditto.
17683 (nds32_expand_unopimm_builtin): Ditto.
17684 (nds32_expand_binop_builtin): Ditto.
17685 (nds32_builtin_decl_impl): Ditto.
17686 (builtin_description): Ditto.
17687 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17688 (nds32_init_builtins_impl): Ditto.
17689 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17690 (nds32_builtin_decl): New.
17691 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17692 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17694 2018-03-02 Jeff Law <law@redhat.com>
17696 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17697 (redundant_insn, fill_simple_delay_slots): Likewise.
17698 (fill_slots_from_thread): Likewise.
17699 * resource.c (mark_referenced_resources): Likewise.
17700 (mark_set_resources, find_dead_or_set_registers): Likewise.
17702 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17704 * substring-locations.h (format_warning_va): Formatting fix for
17705 ATTRIBUTE_GCC_DIAG.
17706 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17708 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17709 * substring-locations.c: Include intl.h.
17710 (format_warning_va): Turned into small wrapper around
17711 format_warning_n_va, renamed to ...
17712 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17713 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17715 (format_warning_at_substring_n): New function.
17716 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17717 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17718 format_warning_at_substring with just a shorter name instead of
17719 const function pointer.
17720 (fmtwarn_n): New function.
17721 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17722 appropriate, get rid of all the fmtstr temporaries, move conditionals
17723 with G_() wrapped string literals directly into fmtwarn arguments,
17724 cast dir.len to (int), formatting fixes.
17726 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17728 * doc/invoke.texi: Remove "Cilk Plus" references.
17730 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17731 Richard Biener <rguenther@suse.de>
17734 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17735 for error or warning attributes if CALL_FROM_THUNK_P is set.
17738 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17741 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17742 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17745 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17746 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17748 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17749 instead of -1U in last predictors element's probability member.
17751 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17754 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17755 arguments if they are comparable.
17757 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17759 PR tree-optimization/84634
17760 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17761 masks and masked_loop_p with a single loop_masks, making sure it's
17762 null for bb vectorization.
17764 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17766 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17767 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17768 loop->force_vectorize to check whether there is no alias.
17770 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17773 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17775 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17777 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17778 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17779 instead of a loop around prev_real_insn.
17780 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17783 PR inline-asm/84625
17784 * config/i386/i386.c (ix86_print_operand): Use conditional
17785 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17788 2018-03-02 Richard Biener <rguenther@suse.de>
17790 PR tree-optimization/84427
17791 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17792 (bitmap_set_subtract_values): Rewrite to handle multiple
17795 (prune_clobbered_mems): Likewise.
17796 (phi_translate): Take edge instead of pred/phiblock.
17797 (phi_translate_1): Likewise.
17798 (phi_translate_set): Likewise. Insert all translated
17799 exprs for a value into the set, keeping possibly multiple
17800 expressions per value.
17801 (compute_antic_aux): Adjust for phi_translate changes.
17802 When intersecting union the expressions and prune those
17803 not in the final value set, keeping possibly multiple
17804 expressions per value. Do not use value-insertion
17805 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17806 all expressions. Add verification that the value-sets
17807 only shrink during iteration.
17808 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17809 (do_pre_regular_insertion): Likewise.
17810 (do_pre_partial_partial_insertion): Likewise.
17812 2018-03-02 Richard Biener <rguenther@suse.de>
17815 * config/darwin.c (saved_debug_info_level): New static global.
17816 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17817 (darwin_asm_lto_end): Restore debug info generation settings.
17819 2018-03-01 Martin Liska <mliska@suse.cz>
17822 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17823 volatile arguments.
17825 2018-03-01 Richard Biener <rguenther@suse.de>
17828 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17829 type annotation with LTO when debug was disabled at compile-time.
17831 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17833 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17835 (mips_final_postscan_insn): Likewise.
17837 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17839 PR rtl-optimization/84528
17840 * alias.c (init_alias_target): Add commentary.
17841 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17842 a unique base value if the frame pointer is not eliminated
17843 to the stack pointer.
17845 2018-03-01 Tom de Vries <tom@codesourcery.com>
17847 PR rtl-optimization/83327
17848 * lra-int.h (hard_regs_spilled_into): Declare.
17849 * lra.c (hard_regs_spilled_into): Define.
17850 (init_reg_info): Init hard_regs_spilled_into.
17851 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17852 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17853 (process_bb_lives): Handle hard_regs_spilled_into.
17854 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17855 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17857 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17859 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17860 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17861 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17862 * config/rs6000/aix72.h: New file.
17864 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17866 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17867 instead of warning_at with conditional singular and plural messages
17871 * stor-layout.c (update_alignment_for_field): For
17872 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17873 && !DECL_PACKED (field), do the alignment update, just use
17874 only desired_align instead of MAX (type_align, desired_align)
17876 (place_field): Don't do known_align < desired_align handling
17877 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17878 is non-NULL, instead do it after rli->prev_field handling and
17879 only if not within a bitfield word. For DECL_PACKED (field)
17880 use type_align of BITS_PER_UNIT.
17882 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17884 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17885 superfluous parentheses and trailing spaces.
17887 2018-02-28 Richard Biener <rguenther@suse.de>
17889 PR tree-optimization/84584
17890 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17891 SCoPs with fake exit edge.
17893 2018-02-28 Martin Liska <mliska@suse.cz>
17896 * timevar.c (timer::print): Fix format to properly print 100%
17899 2018-02-28 Richard Biener <rguenther@suse.de>
17901 PR middle-end/84607
17902 * genmatch.c (capture_info::walk_match): Do not mark
17903 captured expressions without operands as expr_p given
17904 they act more like predicates and should be subject to
17905 "lost tail" side-effect preserving.
17907 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17909 PR rtl-optimization/81611
17910 * auto-inc-dec.c (attempt_change): Move dead note from
17911 mem_insn if it's the next use of regno
17912 (find_address): Take address use of reg holding
17913 non-incremented value. Add parm to limit search to the named
17915 (merge_in_block): Attempt to use a mem insn that is the next
17916 use of the original regno.
17918 2018-02-27 Martin Sebor <msebor@redhat.com>
17921 * doc/invoke.texi (-Wmissing-attributes): New option.
17922 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17924 2018-02-27 Martin Sebor <msebor@redhat.com>
17926 PR translation/84207
17927 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17928 n argument to unsigned HOST_WIDE_INT.
17929 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17930 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17931 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17932 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17934 2018-02-27 Richard Biener <rguenther@suse.de>
17936 PR tree-optimization/84512
17937 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17938 Do not use the estimate returned from record_stmt_cost for
17939 the scalar iteration cost but sum properly using add_stmt_cost.
17941 2018-02-27 Richard Biener <rguenther@suse.de>
17943 PR tree-optimization/84466
17944 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17945 Adjust last change to less strictly validate use operands.
17947 2018-02-27 Martin Liska <mliska@suse.cz>
17949 PR gcov-profile/84548
17950 * gcov.c (process_file): Allow partial overlap and consider it
17951 also as group functions.
17952 (output_lines): Properly calculate range of lines for a group.
17954 2018-02-27 Martin Liska <mliska@suse.cz>
17956 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17957 'ggc' suffixes. Change first column width.
17958 (timer::print): Fix formatting of the column.
17960 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17962 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17963 preserve inline entry blocks for the sake of debug inline
17964 entry point markers alone.
17965 (remove_unused_locals): Suggest in comments a better place to
17966 force the preservation of inline entry blocks that are
17967 otherwise unused, but do not preserve them.
17969 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17971 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17973 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17976 * config/i386/constraints.md (Bs): Replace
17977 ix86_indirect_branch_register with
17978 TARGET_INDIRECT_BRANCH_REGISTER.
17980 * config/i386/i386.md (indirect_jump): Likewise.
17981 (tablejump): Likewise.
17982 (*sibcall_memory): Likewise.
17983 (*sibcall_value_memory): Likewise.
17984 Peepholes of indirect call and jump via memory: Likewise.
17985 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17986 (*sibcall_value_GOT_32): Likewise.
17987 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17988 (GOT_memory_operand): Likewise.
17989 (call_insn_operand): Likewise.
17990 (sibcall_insn_operand): Likewise.
17991 (GOT32_symbol_operand): Likewise.
17992 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17994 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17996 PR rtl-optimization/83496
17997 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17998 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17999 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18000 redundant insn, if any.
18001 (relax_delay_slots): Likewise.
18002 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18004 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
18006 PR tree-optimization/83965
18007 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18008 that grouped statements are part of a reduction chain. Return
18009 true if the statement is not marked as a reduction itself but
18010 is part of a group.
18011 (vect_recog_dot_prod_pattern): Don't check whether the statement
18012 is part of a group here.
18013 (vect_recog_sad_pattern): Likewise.
18014 (vect_recog_widen_sum_pattern): Likewise.
18016 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18019 * final.c (rest_of_clean_state): Also look for calls inside sequences.
18021 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18024 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18026 (ix86_output_indirect_function_return): New prototype.
18027 (ix86_split_simple_return_pop_internal): Likewise.
18028 * config/i386/i386.c (indirect_return_via_cx): New.
18029 (indirect_return_via_cx_bnd): Likewise.
18030 (indirect_thunk_name): Handle return va CX_REG.
18031 (output_indirect_thunk_function): Create alias for
18032 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18033 (ix86_output_indirect_jmp): Remove the bool argument.
18034 (ix86_output_indirect_function_return): New function.
18035 (ix86_split_simple_return_pop_internal): Likewise.
18036 * config/i386/i386.md (*indirect_jump): Don't pass false
18037 to ix86_output_indirect_jmp.
18038 (*tablejump_1): Likewise.
18039 (simple_return_pop_internal): Change it to define_insn_and_split.
18040 Call ix86_split_simple_return_pop_internal to split it for
18041 -mfunction-return=.
18042 (simple_return_indirect_internal): Call
18043 ix86_output_indirect_function_return instead of
18044 ix86_output_indirect_jmp.
18046 2018-02-26 Jakub Jelinek <jakub@redhat.com>
18049 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18050 memset and value initialization afterwards.
18052 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
18054 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18056 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18059 * common/config/aarch64/aarch64-common.c
18060 (aarch_option_optimization_table[]): Switch
18061 off fomit-frame-pointer
18063 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18064 Chung-Ju Wu <jasonwucj@gmail.com>
18066 * config/nds32/nds32-multiple.md (load_multiple): Disallow
18068 (store_multiple): Ditto.
18070 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18072 * config.gcc: Add --with-cpu support for nds32 target.
18073 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18074 * config/nds32/nds32.opt: Add -mcpu= option.
18076 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
18078 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18079 isel=yes): Warn for these deprecated options.
18081 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
18083 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18084 ISA_2_5_MASKS_EMBEDDED.
18086 2018-02-23 Jakub Jelinek <jakub@redhat.com>
18088 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18089 p->max as pointers rather than using iterative_hash_expr.
18091 2018-02-23 Carl Love <cel@us.ibm.com>
18093 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18094 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18096 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18097 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18098 P8V_BUILTIN_VEC_VUNSIGNED2.
18100 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
18103 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18104 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18106 * lra-constraints.c (curr_insn_transform): Set up
18107 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
18109 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18110 * lra-eliminations.c (spill_pseudos): Ditto.
18111 (process_insn_for_elimination): Ditto.
18112 * lra-lives.c (reg_early_clobber_p): Use the new macros.
18113 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18114 LRA_NON_CLOBBERED_ALT.
18116 2018-02-22 Martin Sebor <msebor@redhat.com>
18118 PR tree-optimization/84480
18119 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18120 to maybe_diag_stxncpy_trunc. Call it.
18121 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18122 from gimple_fold_builtin_strcpy. Print inlining stack.
18123 (handle_builtin_stxncpy): Print inlining stack.
18124 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18126 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
18129 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18130 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18131 and -fcheck-pointer-bounds are used together.
18132 (indirect_thunk_prefix): New enum.
18133 (indirect_thunk_need_prefix): New function.
18134 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
18135 "_nt" instead of "_bnd" for NOTRACK prefix.
18136 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18137 (output_indirect_thunk_function): Likewise.
18139 (ix86_code_end): Update output_indirect_thunk_function calls.
18140 (ix86_output_indirect_branch_via_reg): Replace
18141 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18142 (ix86_output_indirect_branch_via_push): Likewise.
18143 (ix86_output_function_return): Likewise.
18144 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18145 incompatible with -fcf-protection=branch and
18146 -fcheck-pointer-bounds.
18148 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18151 * config/aarch64/aarch64.c (aarch64_print_address_internal):
18152 Change gcc_assert call to output_operand_lossage.
18154 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18156 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18158 2018-02-22 DJ Delorie <dj@redhat.com>
18159 Sebastian Perta <sebastian.perta@renesas.com>
18160 Oleg Endo <olegendo@gcc.gnu.org>
18162 * config/rx/rx.c (rx_rtx_costs): New function.
18163 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18165 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
18167 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18169 2018-02-22 Martin Liska <mliska@suse.cz>
18172 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18173 Add "native" as a possible value.
18175 2018-02-22 Martin Liska <mliska@suse.cz>
18178 * config/i386/i386.c (ix86_option_override_internal):
18179 Add "native" as a possible value for -march and -mtune.
18181 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18184 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18185 to all type variants.
18187 PR tree-optimization/84503
18188 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18189 width as info->bitpos + info->bitsize - start.
18190 (merged_store_group::merge_overlapping): Simplify width computation.
18191 (check_no_overlap): New function.
18192 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18193 start + width and last_order of the group, fail if check_no_overlap
18195 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18196 to group if check_no_overlap fails.
18198 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18200 * config/rs6000/altivec.md: Delete contraint arguments to
18201 define_expand, define_split, and define_peephole2, and in
18202 define_insn_and_split if always unused.
18203 * config/rs6000/darwin.md: Ditto.
18204 * config/rs6000/dfp.md: Ditto.
18205 * config/rs6000/rs6000.md: Ditto.
18206 * config/rs6000/sync.md: Ditto.
18207 * config/rs6000/vector.md: Ditto.
18208 * config/rs6000/vsx.md: Ditto.
18210 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18212 * config/rs6000/altivec.md: Write output control strings as braced
18213 blocks instead of double-quoted strings.
18214 * config/rs6000/darwin.md: Ditto.
18215 * config/rs6000/rs6000.md: Ditto.
18216 * config/rs6000/vector.md: Ditto.
18217 * config/rs6000/vsx.md: Ditto.
18219 2018-02-21 Jason Merrill <jason@redhat.com>
18221 PR c++/84314 - ICE with templates and fastcall attribute.
18222 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18224 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18226 * ipa-cp.c (determine_versionability): Fix comment typos.
18228 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18231 * ipa-cp.c (determine_versionability): Do not version functions caling
18234 2018-02-21 Martin Liska <mliska@suse.cz>
18237 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18238 Add "native" as a possible value.
18239 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18240 the macro when native cpu detection is available.
18242 2018-02-21 Martin Liska <mliska@suse.cz>
18245 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18246 Add "native" as a possible value.
18247 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18248 when native cpu detection is available.
18250 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18251 Martin Sebor <msebor@redhat.com>
18253 PR tree-optimization/84478
18254 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18256 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18257 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18258 support which is conservatively correct, for 2 only stay conservative
18259 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18260 argument to the 2 argument get_range_strlen, adjust 6 arg
18261 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18263 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18264 (gimple_fold_builtin_strlen): Pass true as last argument to
18267 2018-02-20 Martin Sebor <msebor@redhat.com>
18269 PR middle-end/84095
18270 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18271 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18272 (builtin_memref::builtin_memref): Factor out parts into
18273 set_base_and_offset and call it.
18275 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18277 PR middle-end/84406
18278 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18279 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18280 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18281 search at the associated MODE_INT.
18283 2018-02-20 Jeff Law <law@redhat.com>
18285 PR middle-end/82123
18286 PR tree-optimization/81592
18287 PR middle-end/79257
18288 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18289 for range data rather than using global data.
18290 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18291 range data rather than using global data.
18292 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18293 pass it to children as needed.
18294 (struct directive::fmtresult): Similarly.
18295 (struct directive::set_width): Similarly.
18296 (struct directive::set_precision): Similarly.
18297 (format_integer, format_directive, parse_directive): Similarly.
18298 (format_none): Accept unnamed vr_values parameter.
18299 (format_percent, format_floating, format_character): Similarly.
18300 (format_string, format_plain): Similarly.
18301 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18302 the EVRP range analyzer for range data rather than using global data.
18303 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18304 gimple-ssa-evrp-analyze.h
18305 (class sprintf_dom_walker): Add after_dom_children member function.
18306 Add evrp_range_analyzer member.
18307 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18308 range analyzer as needed.
18309 (sprintf_dom_walker::after_dom_children): New member function.
18310 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18312 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18313 (evrp_range_analyzer::pop_to_marker): Likewise.
18315 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18317 PR tree-optimization/84419
18318 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18319 with the required type if its current type is compatible but
18322 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18324 PR middle-end/82004
18325 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18326 after vectorization.
18328 2018-02-20 Martin Liska <mliska@suse.cz>
18331 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18332 possible values if we don't have a hint.
18334 2018-02-20 Martin Liska <mliska@suse.cz>
18338 * final.c (shorten_branches): Build align_tab array with one
18340 * opts.c (finish_options): Add alignment option limit check.
18341 (MAX_CODE_ALIGN): Likewise.
18342 (MAX_CODE_ALIGN_VALUE): Likewise.
18343 * doc/invoke.texi: Document maximum allowed option value for
18344 all -falign-* options.
18346 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18349 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18350 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18351 * var-tracking.c (emit_note_insn_var_location): Remove all references
18352 to NOTE_INSN_CALL_ARG_LOCATION.
18353 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18354 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18355 Use copy_rtx_if_shared.
18356 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18357 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18358 (dwarf2out_var_location): Remove handling of
18359 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18361 * final.c (final_scan_insn): Remove all references to
18362 NOTE_INSN_CALL_ARG_LOCATION.
18363 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18364 before dumping final insns.
18365 * except.c (emit_note_eh_region_end): Remove all references to
18366 NOTE_INSN_CALL_ARG_LOCATION.
18367 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18368 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18369 * config/arc/arc.c (hwloop_optimize): Likewise.
18370 * config/arm/arm.c (create_fix_barrier): Likewise.
18371 * config/s390/s390.c (s390_chunkify_start): Likewise.
18372 * config/sh/sh.c (find_barrier): Likewise.
18373 * config/i386/i386.c (rest_of_insert_endbranch,
18374 ix86_seh_fixup_eh_fallthru): Likewise.
18375 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18376 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18377 * config/frv/frv.c (frv_function_prologue): Likewise.
18378 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18380 (note_outside_basic_block_p): Remove all references to
18381 NOTE_INSN_CALL_ARG_LOCATION.
18382 * gengtype.c (adjust_field_rtx_def): Likewise.
18383 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18385 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18386 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18389 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18392 PR tree-optimization/84452
18393 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18394 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18397 2018-02-19 Martin Liska <mliska@suse.cz>
18400 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18402 2018-02-19 Martin Liska <mliska@suse.cz>
18403 Richard Sandiford <richard.sandiford@linaro.org>
18405 PR tree-optimization/82491
18406 * gimple-fold.c (get_base_constructor): Make earlier bail out
18409 2018-02-19 Carl Love <cel@us.ibm.com>
18411 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18412 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18414 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18415 P8V_BUILTIN_VEC_NEG.
18417 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18419 * config/rl78/rl78.md (movdf): New define expand.
18421 2018-02-19 Martin Liska <mliska@suse.cz>
18424 * doc/invoke.texi: Fix typo.
18425 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18427 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18429 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18430 handle rs6000_single_float and rs6000_double_float specially for
18433 2018-02-16 Jeff Law <law@redhat.com>
18435 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18436 (pop_regs): Use it.
18438 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18441 * ipa-inline.c (inline_small_functions): Fix a typo.
18443 2018-02-16 Nathan Sidwell <nathan@acm.org>
18445 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18447 2018-02-16 Carl Love <cel@us.ibm.com>
18449 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18450 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18451 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18452 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18453 expansion to P8V_BUILTIN_VEC_FLOAT2.
18455 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18457 PR rtl-optimization/70023
18458 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18459 src_regno into account.
18461 2018-02-16 Carl Love <cel@us.ibm.com>
18463 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18464 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18465 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18466 * config/rs6000/rs6000.c: Remove case statements for
18467 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18468 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18469 and P9V_BUILTIN_VEC_VINSERT4B.
18470 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18471 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18472 * config/rs6000/vsx.md:
18473 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18476 2018-02-16 Carl Love <cel@us.ibm.com>
18478 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18480 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18482 * config/rs6000/rs6000-c.c: Add the definitions for
18483 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18484 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18485 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18486 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18487 definition for insert4b and define insn *insert3b_internal.
18488 * doc/extend.texi: Add documentation for vec_extract4b.
18490 2018-02-16 Nathan Sidwell <nathan@acm.org>
18492 * doc/extend.texi (Backwards Compatibility): Mention friend
18493 injection. Note for-scope is deprecated.
18494 * doc/invoke.texi (-ffriend-injection): Deprecate.
18496 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18498 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18499 that moved to I2, also allow destinations that are a paradoxical
18500 subreg (instead of a normal reg).
18502 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18505 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18508 2018-02-16 Richard Biener <rguenther@suse.de>
18510 PR tree-optimization/84037
18511 PR tree-optimization/84016
18513 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18514 Adjust vec_construct for the fact we need additional higher latency
18515 128bit inserts for AVX256 and AVX512 vector builds.
18516 (ix86_add_stmt_cost): Scale vector construction cost for
18519 2018-02-16 Richard Biener <rguenther@suse.de>
18521 PR tree-optimization/84417
18522 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18523 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18524 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18526 2018-02-16 Martin Liska <mliska@suse.cz>
18529 * internal-fn.def (ASAN_CHECK): Set proper flags.
18530 (ASAN_MARK): Likewise.
18532 2018-02-16 Julia Koval <julia.koval@intel.com>
18534 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18535 from PTA_CANNONLAKE.
18537 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18540 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18541 Use ++iter rather than iter++ for std::list iterators.
18542 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18543 defer deleting them until all nodes in the forest are processed. Do
18544 free even leaf nodes. Change to_process into auto_vec.
18547 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18548 * vec.h (vec_default_construct): Use memset instead of placement new
18549 if BROKEN_VALUE_INITIALIZATION is defined.
18550 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18551 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18554 PR rtl-optimization/83723
18555 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18556 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18557 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18559 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18561 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18563 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18565 PR rtl-optimization/81443
18566 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18567 from inner REGs to paradoxical SUBREGs.
18569 2018-02-16 Richard Biener <rguenther@suse.de>
18571 PR tree-optimization/84399
18572 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18573 For operands we can analyze at their definition make sure we can
18574 analyze them at each use as well.
18576 2018-02-16 Richard Biener <rguenther@suse.de>
18578 PR tree-optimization/84190
18579 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18580 volatile accesses if the decl isn't volatile.
18582 2018-02-15 Jason Merrill <jason@redhat.com>
18584 PR c++/84314 - ICE with templates and fastcall attribute.
18585 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18586 TYPE_CANONICAL on an existing type.
18588 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18590 PR tree-optimization/84383
18591 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18592 dstoff nor call operand_equal_p if dstbase is NULL.
18594 PR tree-optimization/84334
18595 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18596 also a CONSTANT_CLASS_P, punt.
18598 2018-02-14 Jim Wilson <jimw@sifive.com>
18600 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18601 first SMALL_OPERAND check. New local min_second_step. Move assert
18602 to where locals are set. Add TARGET_RVC support.
18603 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18605 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18607 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18609 2018-02-14 Martin Sebor <msebor@redhat.com>
18611 PR tree-optimization/83698
18612 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18613 arrays constrain the offset range to their bounds.
18614 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18615 (builtin_access::overlap): Avoid setting the size of overlap if it's
18617 (maybe_diag_overlap): Also consider arrays when deciding what values
18618 of offsets to include in diagnostics.
18620 2018-02-14 Martin Sebor <msebor@redhat.com>
18623 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18624 that correspond to the kind of a declaration.
18626 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18629 * config/pa/pa.md: Load address of PIC label using the linkage table
18630 if the label is nonlocal.
18632 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18634 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18635 warning message if user requests -maltivec=be.
18636 * doc/invoke.texi: Document deprecation of -maltivec=be.
18638 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18641 * config/rs6000/rs6000-c.c: Update definitions for
18642 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18643 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18645 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18648 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18649 add _get_ssp intrinsics. Remove argument from
18650 __builtin_ia32_rdssp[d|q].
18651 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18652 * config/i386/i386-builtin.def: Remove argument from
18653 __builtin_ia32_rdssp[d|q].
18654 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18655 ix86_expand_special_args_builtin for _rdssp[d|q].
18656 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18657 Clear register before usage.
18658 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18659 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18661 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18663 PR tree-optimization/84357
18664 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18665 operand 1 of an ARRAY_REF too.
18667 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18670 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18671 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18673 (set_of_reg): New struct.
18674 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18675 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18676 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18678 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18679 Split into bitclr, bitset, bitinvert patterns if appropriate.
18680 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18681 use rx_fuse_in_memory_bitop.
18682 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18683 to named insn, correct maximum insn length.
18685 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18688 * machmode.def: Define a complex mode for PARTIAL_INT.
18689 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18691 * doc/rtl.texi: Document CSPImode.
18692 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18694 (msp430_hard_regno_nregs_with_padding): Likewise.
18696 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18699 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18701 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18703 PR rtl-optimization/84169
18704 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18705 we generated a parallel as new i3 and we split that to new i2 and i3
18706 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18707 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18708 those to i2, not i1. Partially rewrite this scan code.
18710 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18713 * stor-layout.c (place_field): For variable length fields, adjust
18714 offset_align afterwards not just based on the field's alignment,
18715 but also on the size.
18717 PR middle-end/84309
18718 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18719 of exps and logs in the use_exp2 case.
18721 2018-02-13 Jeff Law <law@redhat.com>
18723 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18724 entry for "vector".
18726 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18729 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18733 * common.opt (gas-loc-support, gas-locview-support): New.
18734 (ginline-points, ginternal-reset-location-views): New.
18735 * doc/invoke.texi: Document them. Use @itemx where intended.
18736 (gvariable-location-views): Adjust.
18737 * target.def (reset_location_view): New.
18738 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18739 (TARGET_RESET_LOCATION_VIEW): New.
18740 * doc/tm.texi: Rebuilt.
18741 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18742 (dwarf2out_default_as_locview_support): New.
18743 (output_asm_line_debug_info): Use option variables.
18744 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18745 (output_loc_list): Likewise.
18746 (add_high_low_attributes): Check option variables.
18747 Don't output entry view attribute in strict mode.
18748 (gen_inlined_subroutine_die): Check option variables.
18749 (dwarf2out_inline_entry): Likewise.
18750 (init_sections_and_labels): Likewise.
18751 (dwarf2out_early_finish): Likewise.
18752 (maybe_reset_location_view): New, from...
18753 (dwarf2out_var_location): ... here. Call it.
18754 * debug.h (dwarf2out_default_as_loc_support): Declare.
18755 (dwarf2out_default_as_locview_support): Declare.
18756 * hooks.c (hook_int_rtx_insn_0): New.
18757 * hooks.h (hook_int_rtx_insn_0): Declare.
18758 * toplev.c (process_options): Take -gas-loc-support and
18759 -gas-locview-support from dwarf2out. Enable
18760 -gvariable-location-views by default only with locview
18761 assembler support. Enable -ginternal-reset-location-views by
18762 default only if the target defines the corresponding hook.
18763 Enable -ginline-points by default if location views are
18764 enabled; force it disabled if statement frontiers are
18766 * tree-inline.c (expand_call_inline): Check option variables.
18767 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18769 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18771 PR tree-optimization/84321
18772 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18773 handling. Also check whether the anti-range contains any values
18774 that satisfy the mask; switch to a VR_RANGE if not.
18776 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18779 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18781 2018-02-13 Martin Jambor <mjambor@suse.cz>
18784 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18785 of call statements, also set location of a load to a temporary.
18787 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18789 * config/rl78/rl78.c (add_vector_labels): New function.
18790 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18791 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18792 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18793 which checks that no arguments are passed.
18794 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18795 * doc/extend.texi: Documentation for the new attribute.
18797 2018-02-13 Andreas Schwab <schwab@suse.de>
18799 * config/riscv/linux.h (CPP_SPEC): Define.
18801 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18804 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18805 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18806 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18807 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18808 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18809 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18810 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18811 temporarily for AES and PCLMUL builtins.
18813 PR tree-optimization/84339
18814 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18815 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18818 PR middle-end/84309
18819 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18820 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18821 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18823 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18825 * omp-simd-clone.h: New file.
18826 * omp-simd-clone.c: Include omp-simd-clone.h.
18827 (expand_simd_clones): No longer static.
18828 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18829 cgraph.h and omp-simd-clone.h.
18830 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18831 (vect_recog_widen_shift_pattern): Formatting fix.
18832 (vect_pattern_recog_1): Don't check optab for calls.
18835 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18836 operands[2] into a REG before using gen_lowpart on it.
18838 2018-02-12 Jeff Law <law@redhat.com>
18841 * config/sh/sh.c (find_barrier): Consider a sibling call
18844 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18845 successfully back substituting a reg.
18847 2018-02-12 Richard Biener <rguenther@suse.de>
18849 PR tree-optimization/84037
18850 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18851 parameter, move visited init to caller.
18852 (vect_slp_analyze_operations): Separate cost from validity
18853 check, initialize visited once for all instances.
18854 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18856 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18858 (vect_model_promotion_demotion_cost): Likewise.
18859 (vectorizable_bswap): Guard cost modeling with !slp_node
18860 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18862 (vectorizable_call): Likewise.
18863 (vectorizable_conversion): Likewise.
18864 (vectorizable_assignment): Likewise.
18865 (vectorizable_shift): Likewise.
18866 (vectorizable_operation): Likewise.
18867 (vectorizable_store): Likewise.
18868 (vectorizable_load): Likewise.
18869 (vectorizable_condition): Likewise.
18870 (vectorizable_comparison): Likewise.
18872 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18875 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18876 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18877 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18879 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18881 PR middle-end/83665
18882 * params.def (inline-min-speedup): Increase from 8 to 15.
18883 (max-inline-insns-auto): Decrease from 40 to 30.
18884 * ipa-split.c (consider_split): Add some buffer for function to
18885 be considered inlining candidate.
18886 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18889 2018-02-12 Richard Biener <rguenther@suse.de>
18891 PR tree-optimization/84037
18892 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18893 matched stmts if we cannot swap the non-matched ones.
18895 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18897 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18898 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18899 _mm_maskz_scalef_round_ss): New intrinsics.
18900 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18901 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18902 __builtin_ia32_scalefss_round): Remove.
18903 (__builtin_ia32_scalefsd_mask_round,
18904 __builtin_ia32_scalefss_mask_round): New intrinsics.
18905 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18906 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18907 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18908 "<round_constraint>")): Changed to ...
18909 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18910 "<round_scalar_constraint>")): ... this.
18911 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18912 %0, %1, %2<round_op3>}"): Changed to ...
18913 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18914 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18915 %2<round_scalar_mask_op3>}"): ... this.
18916 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18918 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18920 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18921 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18922 (_mm_maskz_sqrt_round_ss): New intrinsics.
18923 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18924 (__builtin_ia32_sqrtsd_mask_round)
18925 (__builtin_ia32_sqrtss_mask_round): New builtins.
18926 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18927 (__builtin_ia32_sqrtss_round): Remove.
18928 (__builtin_ia32_sqrtsd_mask_round)
18929 (__builtin_ia32_sqrtss_mask_round): New builtins.
18930 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18931 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18932 ((match_operand:VF_128 1 "vector_operand"
18933 "xBm,<round_constraint>")): Changed to ...
18934 ((match_operand:VF_128 1 "vector_operand"
18935 "xBm,<round_scalar_constraint>")): ... this.
18936 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18937 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18938 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18939 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18940 %<iptr>1<round_scalar_mask_op3>}): ... this.
18941 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18942 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18944 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18947 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18948 Cast vec_cmpeq result to correct type.
18949 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18950 Cast vec_cmpgt result to correct type.
18952 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18954 * final.c (final_scan_insn_1): Renamed from...
18955 (final_scan_insn): ... this. New wrapper, to recover
18956 seen from the outermost call in recursive ones.
18957 * config/sparc/sparc.c (output_return): Drop seen from call.
18958 (output_sibcall): Likewise.
18959 * config/visium/visium.c (output_branch): Likewise.
18961 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18963 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18966 2018-02-10 Alan Modra <amodra@gmail.com>
18969 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18970 Specify LR as an input.
18972 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18975 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18976 remove_member_access_dummy_vars): New functions.
18977 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18978 lower_omp_1, execute_lower_omp): Use them.
18980 PR rtl-optimization/84308
18981 * shrink-wrap.c (spread_components): Release todo vector.
18983 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18985 PR rtl-optimization/57193
18986 * ira-color.c (struct allocno_color_data): Add member
18987 conflict_allocno_hard_prefs.
18988 (update_conflict_allocno_hard_prefs): New.
18989 (bucket_allocno_compare_func): Add a preference based on
18990 conflict_allocno_hard_prefs.
18991 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18992 (color_allocnos): Remove a dead code. Initiate
18993 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18995 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18998 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18999 constraint from =wa to wa. Avoid a subreg on the output operand,
19000 instead use a pseudo and subreg it in a move.
19001 (p9_xxbrd_<mode>): Changed to ...
19002 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19003 (p9_xxbrd_v2df): New expander.
19004 (p9_xxbrw_<mode>): Changed to ...
19005 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19006 (p9_xxbrw_v4sf): New expander.
19008 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19010 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19012 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
19015 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19016 multiply in 32-bit mode.
19017 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19018 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19021 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19023 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19024 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19025 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19026 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19028 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
19031 * dwarf2out.c (is_trivial_indirect_ref): New function.
19032 (dwarf2out_late_global_decl): Do not generate a location
19033 attribute for variables that have a non-trivial DECL_VALUE_EXPR
19034 and that are not defined in the current unit.
19036 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19038 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19039 instead of a libcall for UNORDERED.
19041 2018-02-09 Tamar Christina <tamar.christina@arm.com>
19044 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19045 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19047 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19050 * config/s390/s390.c (s390_set_current_function): Invoke
19051 s390_indirect_branch_settings also if fndecl didn't change.
19053 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19055 * config/rs6000/rs6000.md (blockage): Set length to zero.
19057 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19059 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19061 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19064 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19065 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19069 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19070 PARALLEL incoming that failed vt_get_decl_and_offset check.
19072 PR middle-end/84237
19073 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19074 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19076 (get_variable_section): For decls in named .bss* sections pass true as
19077 second argument to bss_initializer_p.
19079 2018-02-09 Marek Polacek <polacek@redhat.com>
19080 Jakub Jelinek <jakub@redhat.com>
19083 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19084 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
19085 Sync some changes from cxx_fold_indirect_ref.
19087 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19089 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19091 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19092 (BLOCK_INLINE_ENTRY_LABEL): New.
19093 (dwarf2out_var_location): Disregard inline entry markers.
19094 (inline_entry_data): New struct.
19095 (inline_entry_data_hasher): New hashtable type.
19096 (inline_entry_data_hasher::hash): New.
19097 (inline_entry_data_hasher::equal): New.
19098 (inline_entry_data_table): New variable.
19099 (add_high_low_attributes): Add DW_AT_entry_pc and
19100 DW_AT_GNU_entry_view attributes if a pending entry is found
19101 in inline_entry_data_table. Add old entry_pc attribute only
19102 if debug nonbinding markers are disabled.
19103 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19104 markers are enabled.
19105 (block_within_block_p, dwarf2out_inline_entry): New.
19106 (dwarf2out_finish): Check that no entries remained in
19107 inline_entry_data_table.
19108 * final.c (reemit_insn_block_notes): Handle inline entry notes.
19109 (final_scan_insn, notice_source_line): Likewise.
19110 (rest_of_clean_state): Skip inline entry markers.
19111 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19113 * gimple.c (gimple_build_debug_inline_entry): New.
19114 * gimple.h (enum gimple_debug_subcode): Add
19115 GIMPLE_DEBUG_INLINE_ENTRY.
19116 (gimple_build_debug_inline_entry): Declare.
19117 (gimple_debug_inline_entry_p): New.
19118 (gimple_debug_nonbind_marker_p): Adjust.
19119 * insn-notes.def (INLINE_ENTRY): New.
19120 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19121 inline entry marker notes.
19122 (print_insn): Likewise.
19123 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19124 (INSN_DEBUG_MARKER_KIND): Likewise.
19125 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19126 * tree-inline.c (expand_call_inline): Build and insert
19127 debug_inline_entry stmt.
19128 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19129 inline entry blocks early, if nonbind markers are enabled.
19130 (dump_scope_block): Dump fragment info.
19131 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19132 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19133 (gimple_build_debug_inline_entry): New.
19134 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19135 Enable/disable inline entry points too.
19136 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19137 (DEBUG_INSN): Describe inline entry markers.
19139 * common.opt (gvariable-location-views): New.
19140 (gvariable-location-views=incompat5): New.
19141 * config.in: Rebuilt.
19142 * configure: Rebuilt.
19143 * configure.ac: Test assembler for view support.
19144 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19145 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19146 * dwarf2out.c (var_loc_view): New typedef.
19147 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19148 (dwarf2out_locviews_in_attribute): New.
19149 (dwarf2out_locviews_in_loclist): New.
19150 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19151 (enum dw_line_info_opcode): Add LI_adv_address.
19152 (struct dw_line_info_table): Add view.
19153 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19154 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19155 (zero_view_p): New variable.
19156 (ZERO_VIEW_P): New macro.
19157 (output_asm_line_debug_info): New.
19158 (struct var_loc_node): Add view.
19159 (add_AT_view_list, AT_loc_list): New.
19160 (add_var_loc_to_decl): Add view param. Test it against last.
19161 (new_loc_list): Add view params. Record them.
19162 (AT_loc_list_ptr): Handle loc and view lists.
19163 (view_list_to_loc_list_val_node): New.
19164 (print_dw_val): Handle dw_val_class_view_list.
19165 (size_of_die): Likewise.
19166 (value_format): Likewise.
19167 (loc_list_has_views): New.
19168 (gen_llsym): Set vl_symbol too.
19169 (maybe_gen_llsym, skip_loc_list_entry): New.
19170 (dwarf2out_maybe_output_loclist_view_pair): New.
19171 (output_loc_list): Output view list or entries too.
19172 (output_view_list_offset): New.
19173 (output_die): Handle dw_val_class_view_list.
19174 (output_dwarf_version): New.
19175 (output_compilation_unit_header): Use it.
19176 (output_skeleton_debug_sections): Likewise.
19177 (output_rnglists, output_line_info): Likewise.
19178 (output_pubnames, output_aranges): Update version comments.
19179 (output_one_line_info_table): Output view numbers in asm comments.
19180 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19181 Call maybe_gen_llsym.
19182 (loc_list_from_tree_1): Adjust.
19183 (add_AT_location_description): Create view list attribute if
19184 needed, check it's absent otherwise.
19185 (convert_cfa_to_fb_loc_list): Adjust.
19186 (maybe_emit_file): Call output_asm_line_debug_info for test.
19187 (dwarf2out_var_location): Reset views as needed. Precompute
19188 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19189 attribute. Set view.
19190 (new_line_info_table): Reset next view.
19191 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19192 (dwarf2out_source_line): Likewise. Output view resets and labels to
19193 the assembler, or select appropriate line info opcodes.
19194 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19195 (optimize_string_length): Catch it. Adjust.
19196 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19197 dw_val_class_view_list, and remove it if no longer needed.
19198 (hash_loc_list): Hash view numbers.
19199 (loc_list_hasher::equal): Compare them.
19200 (optimize_location_lists): Check whether a view list symbol is
19201 needed, and whether the locview attribute is present, and
19202 whether they match. Remove the locview attribute if no longer
19204 (index_location_lists): Call skip_loc_list_entry for test.
19205 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19206 Use output_dwarf_version.
19207 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19208 (struct dw_val_node): Add val_view_list.
19209 * final.c (SEEN_NEXT_VIEW): New.
19210 (set_next_view_needed): New.
19211 (clear_next_view_needed): New.
19212 (maybe_output_next_view): New.
19213 (final_start_function): Rename to...
19214 (final_start_function_1): ... this. Take pointer to FIRST,
19215 add SEEN parameter. Emit param bindings in the initial view.
19216 (final_start_function): Reintroduce SEEN-less interface.
19217 (final): Rename to...
19218 (final_1): ... this. Take SEEN parameter. Output final pending
19219 next view at the end.
19220 (final): Reintroduce seen-less interface.
19221 (final_scan_insn): Output pending next view before switching
19222 sections or ending a block. Mark the next view as needed when
19223 outputting variable locations. Notify debug backend of section
19224 changes, and of location view changes.
19225 (rest_of_handle_final): Adjust.
19226 * toplev.c (process_options): Autodetect value for debug variable
19227 location views option. Warn on incompat5 without -gdwarf-5.
19228 * doc/invoke.texi (gvariable-location-views): New.
19229 (gvariable-location-views=incompat5): New.
19230 (gno-variable-location-views): New.
19232 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19234 PR tree-optimization/84136
19235 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19236 that the result of find_edge is non-NULL.
19238 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19241 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19242 storing integer register in SImode. Fix cost of 256 and 512
19243 byte aligned SSE register store.
19245 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19247 * config/i386/i386.c (ix86_multiplication_cost): Fix
19248 multiplication cost for TARGET_AVX512DQ.
19250 2018-02-08 Marek Polacek <polacek@redhat.com>
19252 PR tree-optimization/84238
19253 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19256 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19258 PR tree-optimization/84265
19259 * tree-vect-stmts.c (vectorizable_store): Don't treat
19260 VMAT_CONTIGUOUS accesses as grouped.
19261 (vectorizable_load): Likewise.
19263 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19265 PR tree-optimization/81635
19266 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19267 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19268 (test_round_for_mask): New functions.
19269 (wide_int_cc_tests): Call test_round_for_mask.
19270 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19271 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19272 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19273 range returned by get_range_info.
19275 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19278 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19279 * symtab.c: Include builtins.h
19280 (symtab_node::output_to_lto_symbol_table_p): Move here
19281 from lto-streamer-out.c:output_symbol_p.
19282 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19283 (output_symbol_p): Move all logic to symtab.c
19284 (produce_symtab): Update.
19286 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19288 * config/s390/s390-opts.h (enum indirect_branch): Define.
19289 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19290 (s390_indirect_branch_via_thunk)
19291 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19292 (enum s390_indirect_branch_type): Define.
19293 * config/s390/s390.c (struct s390_frame_layout, struct
19294 machine_function): Remove.
19295 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19296 (indirect_branch_table_label_no, indirect_branch_table_name):
19298 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19299 (enum s390_indirect_branch_option): Define.
19300 (s390_return_addr_from_memory): New function.
19301 (s390_handle_string_attribute): New function.
19302 (s390_attribute_table): Add new attribute handler.
19303 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19304 (s390_indirect_branch_via_thunk): New function.
19305 (s390_indirect_branch_via_inline_thunk): New function.
19306 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19307 sibling call optimization for non z10 compiles.
19308 (s390_emit_call): Force indirect branch target to be a single
19309 register. Add r1 clobber for non-z10 compiles.
19310 (s390_emit_epilogue): Emit return jump via return_use expander.
19311 (s390_reorg): Handle JUMP_INSNs as execute targets.
19312 (s390_option_override_internal): Perform validity checks for the
19313 new command line options.
19314 (s390_indirect_branch_attrvalue): New function.
19315 (s390_indirect_branch_settings): New function.
19316 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19317 (s390_output_indirect_thunk_function): New function.
19318 (s390_code_end): Implement target hook.
19319 (s390_case_values_threshold): Implement target hook.
19320 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19322 * config/s390/s390.h (struct s390_frame_layout)
19323 (struct machine_function): Move here from s390.c.
19324 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19325 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19326 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19327 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19328 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19329 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19330 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19331 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19332 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19333 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19334 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19335 (mnemonic attribute): Add values which aren't recognized
19337 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19338 pattern for branch conversion. Fix mnemonic attribute.
19339 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19340 indirect branch via thunk if requested.
19341 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19342 ("*indirect_jump"): Disable for branch conversion using out of
19344 ("indirect_jump_via_thunk<mode>_z10")
19345 ("indirect_jump_via_thunk<mode>")
19346 ("indirect_jump_via_inlinethunk<mode>_z10")
19347 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19348 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19349 ("casesi_jump_via_inlinethunk<mode>_z10")
19350 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19351 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19352 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19353 ("*indirect2_jump"): Disable for branch conversion.
19354 ("casesi_jump"): Turn into expander and expand patterns for branch
19356 ("return_use"): New expander.
19357 ("*return"): Emit return via thunk and rename it to ...
19358 ("*return<mode>"): ... this one.
19359 * config/s390/s390.opt: Add new options and and enum for the
19362 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19364 * lra-constraints.c (match_reload): Unconditionally use
19365 gen_lowpart_SUBREG, rather than selecting between that
19366 and equivalent gen_rtx_SUBREG code.
19368 2018-02-08 Richard Biener <rguenther@suse.de>
19370 PR tree-optimization/84233
19371 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19372 changed flag instead of boguously re-using phi_inserted.
19374 2018-02-08 Martin Jambor <mjambor@suse.cz>
19376 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19377 static local variables.
19379 2018-02-08 Richard Biener <rguenther@suse.de>
19381 PR tree-optimization/84278
19382 * tree-vect-stmts.c (vectorizable_store): When looking for
19383 smaller vector types to perform grouped strided loads/stores
19384 make sure the mode is supported by the target.
19385 (vectorizable_load): Likewise.
19387 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19389 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19390 Increase LDP/STP opportunities by adding adjacent callee-saves.
19392 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19394 PR rtl-optimization/84068
19395 PR rtl-optimization/83459
19396 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19398 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19400 PR tree-optimization/84224
19401 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19402 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19403 non-zero arguments.
19405 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19408 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19409 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19410 count, remove one USE.
19412 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19414 * doc/install.texi (Configuration): Document the
19415 --with-long-double-format={ibm,ieee} PowerPC configuration
19419 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19420 Convert from define_expand to be define_insn_and_split. Rework
19421 float/double/_Float128 conversions to QI/HI/SImode to work with
19422 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19423 conversions to QI/HImode types did a store and then a load to
19424 truncate the value. For conversions to VSX registers, don't split
19425 the insn, instead emit the code directly. Use the code iterator
19426 any_fix to combine signed and unsigned conversions.
19427 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19428 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19429 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19430 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19431 (fix_<mode>di2_hw): Likewise.
19432 (fixuns_<mode>di2_hw): Likewise.
19433 (fix_<mode>si2_hw): Likewise.
19434 (fixuns_<mode>si2_hw): Likewise.
19435 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19436 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19437 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19438 fix<uns>_trunc<SFDF:mode>si2_p8.
19439 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19440 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19441 (fix<uns>_<mode>_mem): Likewise.
19442 (fctiw<u>z_<mode>_mem): Likewise.
19443 (fix<uns>_<mode>_mem): Likewise.
19444 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19445 the register allocator from doing a direct move to the GPRs to do
19446 a store, and instead use the ISA 3.0 store byte/half-word from
19447 vector register instruction. For IEEE 128-bit floating point,
19448 also optimize stores of 32-bit ints.
19449 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19451 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19453 * genextract.c (push_pathstr_operand): New function to support
19455 (walk_rtx): Call push_pathstr_operand.
19456 (print_path): Support [a-zA-Z].
19458 2018-02-07 Richard Biener <rguenther@suse.de>
19460 PR tree-optimization/84037
19461 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19462 (cse_and_gimplify_to_preheader): Declare.
19463 (vect_get_place_in_interleaving_chain): Likewise.
19464 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19466 (_loop_vec_info::~_loop_vec_info): Delete it.
19467 (cse_and_gimplify_to_preheader): New function.
19468 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19469 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19470 (vectorizable_load): Likewise. For grouped stores always base
19471 the IV on the first element.
19472 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19473 condition before gimplifying.
19475 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19477 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19478 *DIV_EXPR and *MOD_EXPR.
19480 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19483 * config/i386/i386.c (ix86_option_override_internal): Mask out
19484 the CF_SET bit when checking -fcf-protection.
19486 2018-02-07 Tom de Vries <tom@codesourcery.com>
19489 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19492 2018-02-07 Richard Biener <rguenther@suse.de>
19494 PR tree-optimization/84204
19495 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19498 PR tree-optimization/84205
19499 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19500 special-case isl_ast_op_zdiv_r.
19502 PR tree-optimization/84223
19503 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19504 Only add conditions from within the region.
19505 (gather_bbs::after_dom_children): Adjust.
19507 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19510 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19511 * config/avr/avr.md: Only post-reload split REG-REG moves if
19512 either register is GENERAL_REG_P.
19514 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19516 PR tree-optimization/84235
19517 * tree-ssa-scopedtables.c
19518 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19519 if the subtraction is performed in floating point type where NaNs are
19520 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19521 build 1. Formatting fix.
19523 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19526 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19527 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19528 and skip it regardless of bb boundaries. Use CALL_P macro,
19529 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19530 unnecessarily, formatting fix.
19532 2018-02-06 Michael Collison <michael.collison@arm.com>
19534 * config/arm/thumb2.md:
19535 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19536 (*thumb_mov_notscc): Ditto.
19538 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19541 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19542 unsigned_fix, not "s".
19544 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19546 * configure.ac (gcc_fn_eh_frame_ro): New function.
19547 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19548 correct .eh_frame permissions.
19549 * configure: Regenerate.
19551 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19553 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19554 irrelevant options.
19556 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19558 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19559 Display warning message for -mno-speculate-indirect-jumps.
19561 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19563 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19565 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19567 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19569 PR tree-optimization/84225
19570 * tree-eh.c (find_trapping_overflow): Only call
19571 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19573 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19576 * config/i386/i386.c: Reimplement the check of possible options
19577 -mibt/-mshstk conbination. Change error messages.
19578 * doc/invoke.texi: Fix a typo: remove extra '='.
19580 2018-02-06 Marek Polacek <polacek@redhat.com>
19582 PR tree-optimization/84228
19583 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19585 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19588 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19589 emitted arch directives.
19590 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19591 __ARM_FEATURE_COPROC before changing architectures.
19593 2018-02-06 Richard Biener <rguenther@suse.de>
19595 * config/i386/i386.c (print_reg): Fix typo.
19596 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19598 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19600 * configure: Regenerate.
19602 2018-02-05 Martin Sebor <msebor@redhat.com>
19604 PR tree-optimization/83369
19605 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19608 2018-02-05 Martin Liska <mliska@suse.cz>
19610 * doc/invoke.texi: Cherry-pick upstream r323995.
19612 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19614 * ira.c (ira_init_register_move_cost): Adjust comment.
19616 2018-02-05 Martin Liska <mliska@suse.cz>
19618 PR gcov-profile/84137
19619 * doc/gcov.texi: Fix typo in documentation.
19621 2018-02-05 Martin Liska <mliska@suse.cz>
19623 PR gcov-profile/83879
19624 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19625 using dlopen functionality.
19627 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19629 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19630 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19631 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19632 _mm_maskz_range_round_ss): New intrinsics.
19633 (__builtin_ia32_rangesd128_round)
19634 (__builtin_ia32_rangess128_round): Remove.
19635 (__builtin_ia32_rangesd128_mask_round,
19636 __builtin_ia32_rangess128_mask_round): New builtins.
19637 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19638 __builtin_ia32_rangess128_round): Remove.
19639 (__builtin_ia32_rangesd128_mask_round,
19640 __builtin_ia32_rangess128_mask_round): New builtins.
19641 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19642 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19643 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19644 "<round_saeonly_constraint>")): Changed to ...
19645 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19646 "<round_saeonly_scalar_constraint>")): ... this.
19647 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19648 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19649 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19650 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19651 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19653 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19655 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19657 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19658 Remove all values except native, 8540 and 8548.
19660 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19662 * config/i386/i386.c (ix86_output_function_return): Pass
19663 INVALID_REGNUM, instead of -1, as invalid register number to
19664 indirect_thunk_name and output_indirect_thunk.
19666 2018-02-02 Julia Koval <julia.koval@intel.com>
19668 * config.gcc: Add -march=icelake.
19669 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19670 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19671 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19672 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19673 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19674 (processor_target_table): Add icelake.
19675 (ix86_option_override_internal): Handle new PTAs.
19676 (get_builtin_code_for_version): Handle icelake.
19677 (M_INTEL_COREI7_ICELAKE): New.
19678 (fold_builtin_cpu): Handle icelake.
19679 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19680 * doc/invoke.texi: Add -march=icelake.
19682 2018-02-02 Julia Koval <julia.koval@intel.com>
19684 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19685 to wide_int_bitmask.
19686 * wide-int-bitmask.h: New.
19688 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19691 * config/i386/i386.md: Replace Pmode with word_mode in
19692 builtin_setjmp_setup and builtin_longjmp to support x32.
19694 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19698 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19700 (rs6000_supported_cpu_names): New static variable.
19701 (linux_cpu_translation_table): Likewise.
19702 (elf_platform) <cpu>: Define new static variable and use it.
19703 Translate kernel AT_PLATFORM name to canonical name if needed.
19704 Error if platform name is unknown.
19706 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19709 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19711 2018-02-01 Jeff Law <law@redhat.com>
19714 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19715 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19716 the scratch if RELEASE_VIA_POP is false.
19717 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19718 If we have to save a temporary register, decrement SIZE appropriately.
19719 Pass new arguments to release_scratch_register_on_entry.
19720 (ix86_adjust_stack_and_probe): Likewise.
19721 (ix86_emit_probe_stack_range): Pass new arguments to
19722 release_scratch_register_on_entry.
19724 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19726 PR rtl-optimization/84157
19727 * combine.c (change_zero_ext): Use REG_P predicate in
19728 front of HARD_REGISTER_P predicate.
19730 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19732 * config/avr/avr.c (avr_option_override): Move disabling of
19733 -fdelete-null-pointer-checks to...
19734 * common/config/avr/avr-common.c (avr_option_optimization_table):
19737 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19739 PR tree-optimization/81635
19740 * tree-data-ref.c (split_constant_offset_1): For types that
19741 wrap on overflow, try to use range info to prove that wrapping
19744 2018-02-01 Renlin Li <renlin.li@arm.com>
19747 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19748 TAILCALL_ADDR_REGS.
19749 (aarch64_register_move_cost): Likewise.
19750 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19751 TAILCALL_ADDR_REGS.
19752 (REG_CLASS_NAMES): Likewise.
19753 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19754 TAILCALL_ADDR_REGS. Remove IP registers.
19755 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19757 2018-02-01 Richard Biener <rguenther@suse.de>
19759 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19760 for specifying RPO order and allow NULL for that.
19761 * domwalk.c (dom_walker::dom_walker): Likewise.
19762 (dom_walker::walk): Handle NULL RPO order.
19763 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19765 (rewrite_update_dom_walker): Likewise.
19766 (mark_def_dom_walker): Likewise.
19768 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19770 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19771 (aarch64_maybe_expand_sve_subreg_move): Declare.
19772 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19773 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19775 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19776 that are semantically a reverse operation.
19777 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19778 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19779 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19781 (aarch64_can_change_mode_class): For big-endian, forbid changes
19782 between two SVE modes if they have different element sizes.
19784 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19786 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19787 the TImode handling for big-endian targets.
19789 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19791 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19792 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19794 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19795 Remove BSWAP handing for big-endian targets and use the form of
19796 LD1RQ appropariate for the mode.
19798 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19800 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19801 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19802 duplicated element.
19804 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19807 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19808 check for operands that need to go through aarch64_sve_reload_be.
19810 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19812 PR tree-optimization/81661
19813 PR tree-optimization/84117
19814 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19815 * tree-eh.c: Include gimplify.h.
19816 (find_trapping_overflow, replace_trapping_overflow,
19817 rewrite_to_non_trapping_overflow): New functions.
19818 * tree-vect-loop.c: Include tree-eh.h.
19819 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19820 * tree-data-ref.c: Include tree-eh.h.
19821 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19823 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19825 PR rtl-optimization/84123
19826 * combine.c (change_zero_ext): Check if hard register satisfies
19827 can_change_dest_mode before calling gen_lowpart_SUBREG.
19829 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19832 * ira.c (ira_init_register_move_cost): Remove assert.
19834 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19836 PR rtl-optimization/84071
19837 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19838 * doc/tm.texi: Regenerate.
19840 2018-01-31 Richard Biener <rguenther@suse.de>
19842 PR tree-optimization/84132
19843 * tree-data-ref.c (analyze_miv_subscript): Properly
19844 check whether evolution_function_is_affine_multivariate_p
19845 before calling gcd_of_steps_may_divide_p.
19847 2018-01-31 Julia Koval <julia.koval@intel.com>
19850 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19851 * config/i386/i386.md (rdpid_rex64) New.
19852 (rdpid): Make 32bit only.
19854 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19857 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19858 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19860 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19863 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19865 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19867 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19869 PR rtl-optimization/84071
19870 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19871 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19873 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19875 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19876 (arc_attribute_table): Add 'aux' attribute.
19877 (arc_in_small_data_p): Consider aux like variables.
19878 (arc_is_aux_reg_p): New function.
19879 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19880 (arc_get_aux_arg): New function.
19881 (prepare_move_operands): Handle aux-register access.
19882 (arc_handle_aux_attribute): New function.
19883 * doc/extend.texi (ARC Variable attributes): Add subsection.
19885 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19887 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19888 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19889 (arc_attribute_table): Add 'uncached' attribute.
19890 (arc_print_operand): Print '.di' flag for uncached memory
19892 (arc_in_small_data_p): Do not consider for small data the uncached
19894 (arc_is_uncached_mem_p): New function.
19895 * config/arc/predicates.md (compact_store_memory_operand): Check
19896 for uncached memory accesses.
19897 (nonvol_nonimm_operand): Likewise.
19898 * doc/extend.texi (ARC Type Attribute): New subsection.
19900 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19903 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19904 falign-loops=): Add Optimization flag.
19906 2018-01-30 Jeff Law <law@redhat.com>
19909 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19910 INT_REGISTERS_SAVED. Check it prior to calling
19911 get_scratch_register_on_entry.
19912 (ix86_adjust_stack_and_probe): Similarly.
19913 (ix86_emit_probe_stack_range): Similarly.
19914 (ix86_expand_prologue): Corresponding changes.
19916 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19919 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19920 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19922 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19925 * lra-constraints.c (curr_insn_transform): Process AND in the
19928 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19930 PR rtl-optimization/83986
19931 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19932 dependence against last_pending_memory_flush in addition to
19933 pending_jump_insns.
19935 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19937 PR tree-optimization/81611
19938 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19941 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19944 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19947 2018-01-30 Richard Biener <rguenther@suse.de>
19948 Jakub Jelinek <jakub@redhat.com>
19950 PR tree-optimization/84111
19951 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19952 inner loops added during recursion, as they don't have up-to-date
19955 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19958 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19959 (can_inline_edge_by_limits_p): ... here.
19960 (can_early_inline_edge_p, check_callers,
19961 update_caller_keys, update_callee_keys, recursive_inlining,
19962 add_new_edges_to_heap, speculation_useful_p,
19963 inline_small_functions,
19964 inline_small_functions, flatten_function,
19965 inline_to_all_callers_1): Update.
19967 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19969 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19972 2018-01-30 Richard Biener <rguenther@suse.de>
19974 PR tree-optimization/83008
19975 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19976 invariant and constant vector uses in stmts when they need
19977 more than one stmt.
19979 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19982 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19983 * configure: Regenerate.
19985 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19987 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19989 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19990 Use gen_rtx_REG rather than gen_lowpart.
19992 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19994 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19995 rather than 0 when creating partial subregs.
19997 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19999 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20002 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
20005 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20006 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20007 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20008 flags. This restores the settings used before the 2017-07-24.
20009 Turning off pre increment/decrement/modify allows IVOPTS to
20010 optimize DF/SF loops where the index is an int.
20012 2018-01-29 Richard Biener <rguenther@suse.de>
20013 Kelvin Nilsen <kelvin@gcc.gnu.org>
20016 * tree-vect-stmts.c (vectorizable_call): Don't call
20017 targetm.vectorize_builtin_md_vectorized_function if callee is
20020 2018-01-22 Carl Love <cel@us.ibm.com>
20022 * doc/extend.tex: Fix typo in second arg in
20023 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20025 2018-01-29 Richard Biener <rguenther@suse.de>
20027 PR tree-optimization/84086
20028 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20029 (flush_ssaname_freelist): When SSA names were released reset
20030 the SCEV hash table.
20032 2018-01-29 Richard Biener <rguenther@suse.de>
20034 PR tree-optimization/84057
20035 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20036 removed paths when removing edges.
20038 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
20040 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20041 -mfunction-return=@var{choice}.
20043 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
20045 PR diagnostic/84034
20046 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20047 Handle CR like TAB.
20048 (layout::print_source_line): Likewise.
20049 (test_get_line_width_without_trailing_whitespace): Add test cases.
20051 2018-01-27 Jakub Jelinek <jakub@redhat.com>
20053 PR middle-end/84040
20054 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20057 2018-01-26 Jim Wilson <jimw@sifive.com>
20059 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20061 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20064 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20066 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20067 and CMP + SUB-immediate -> SUBS.
20069 2018-01-26 Martin Sebor <msebor@redhat.com>
20071 PR tree-optimization/83896
20072 * tree-ssa-strlen.c (get_string_len): Rename...
20073 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
20074 Avoid assuming length is constant.
20075 (handle_char_store): Use HOST_WIDE_INT for string length.
20077 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
20080 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20081 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20083 2018-01-26 Richard Biener <rguenther@suse.de>
20085 PR rtl-optimization/84003
20086 * dse.c (record_store): Only record redundant stores when
20087 the earlier store aliases at least all accesses the later one does.
20089 2018-01-26 Jakub Jelinek <jakub@redhat.com>
20091 PR rtl-optimization/83985
20092 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20093 REG_CFA_RESTORE insns.
20094 (delete_unmarked_insns): Don't ignore separate shrink wrapping
20095 REG_CFA_RESTORE insns here.
20098 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20099 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20101 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20103 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20104 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20105 (arc_init): Likewise.
20106 (arc_override_options): Likewise.
20107 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20109 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20111 * config/arc/arc.h (TARGET_DBNZ): Define.
20112 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20113 properly set the tune attribute.
20114 (dbnz): Use TARGET_DBNZ guard.
20115 * config/arc/arc.opt (mtune): Add core3 option.
20117 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20119 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20120 recognize new pic like addresses.
20121 (arc_delegitimize_address): Clean up.
20123 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20125 * config/arc/arc-arches.def: Option mrf16 valid for all
20127 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20128 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20129 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20130 * config/arc/arc-tables.opt: Regenerate.
20131 * config/arc/arc.c (arc_conditional_register_usage): Handle
20132 reduced register file case.
20133 (arc_file_start): Set must have build attributes.
20134 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20135 mrf16 option value.
20136 * config/arc/arc.opt (mrf16): Add new option.
20137 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20138 * config/arc/genmultilib.awk: Handle new mrf16 option.
20139 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20140 * config/arc/t-multilib: Regenerate.
20141 * doc/invoke.texi (ARC Options): Document mrf16 option.
20143 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20145 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20146 * config/arc/arc.c (arc_handle_secure_attribute): New function.
20147 (arc_attribute_table): Add 'secure_call' attribute.
20148 (arc_print_operand): Print secure call operand.
20149 (arc_function_ok_for_sibcall): Don't optimize tail calls when
20151 (arc_is_secure_call_p): New function. * config/arc/arc.md
20152 (call_i): Add support for sjli instruction.
20153 (call_value_i): Likewise.
20154 * config/arc/constraints.md (Csc): New constraint.
20156 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20157 John Eric Martin <John.Martin@emmicro-us.com>
20159 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20160 * config/arc/arc.c (_arc_jli_section): New struct.
20161 (arc_jli_section): New type.
20162 (rc_jli_sections): New static variable.
20163 (arc_handle_jli_attribute): New function.
20164 (arc_attribute_table): Add jli_always and jli_fixed attribute.
20165 (arc_file_end): New function.
20166 (TARGET_ASM_FILE_END): Define.
20167 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20168 (arc_add_jli_section): New function.
20169 (jli_call_scan): Likewise.
20170 (arc_reorg): Call jli_call_scan.
20171 (arc_output_addsi): Remove 'S' from printing asm operand.
20172 (arc_is_jli_call_p): New function.
20173 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20175 (movhi_insn): Likewise.
20176 (movsi_insn): Likewise.
20177 (movsi_set_cc_insn): Likewise.
20178 (loadqi_update): Likewise.
20179 (load_zeroextendqisi_update): Likewise.
20180 (load_signextendqisi_update): Likewise.
20181 (loadhi_update): Likewise.
20182 (load_zeroextendhisi_update): Likewise.
20183 (load_signextendhisi_update): Likewise.
20184 (loadsi_update): Likewise.
20185 (loadsf_update): Likewise.
20186 (movsicc_insn): Likewise.
20187 (bset_insn): Likewise.
20188 (bxor_insn): Likewise.
20189 (bclr_insn): Likewise.
20190 (bmsk_insn): Likewise.
20191 (bicsi3_insn): Likewise.
20192 (cmpsi_cc_c_insn): Likewise.
20193 (movsi_ne): Likewise.
20194 (movsi_cond_exec): Likewise.
20195 (clrsbsi2): Likewise.
20196 (norm_f): Likewise.
20206 (call_i): Remove 'S' asm letter, add jli instruction.
20207 (call_value_i): Likewise.
20208 * config/arc/arc.op (mjli-always): New option.
20209 * config/arc/constraints.md (Cji): New constraint.
20210 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20212 (subsf3_fpx): Likewise.
20213 (mulsf3_fpx): Likewise.
20214 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20216 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20217 function attrbutes.
20218 * doc/invoke.texi (ARC): Document mjli-always option.
20220 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20222 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20223 avoid addition with 0 and use incw and decw where possible.
20225 2018-01-26 Richard Biener <rguenther@suse.de>
20227 PR tree-optimization/81082
20228 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20229 association if it requires casting to unsigned.
20230 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20231 from fold_plusminus_mult_expr to catch important cases late when
20232 range info is available.
20234 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20236 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20237 * configure.ac (hidden_linkonce): New test.
20238 * configure: Regenerate.
20239 * config.in: Regenerate.
20241 2018-01-26 Julia Koval <julia.koval@intel.com>
20243 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20244 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20245 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20246 _mm_mask_bitshuffle_epi64_mask): Fix type.
20247 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20248 USI_FTYPE_V4DI_V4DI_USI): Remove.
20249 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20250 __builtin_ia32_vpshufbitqmb256_mask,
20251 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20252 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20253 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20255 2018-01-26 Alan Modra <amodra@gmail.com>
20258 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20259 UNSPEC_VBPERMQ. Sort other unspecs.
20261 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20263 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20265 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20267 PR middle-end/83055
20268 * predict.c (drop_profile): Do not push/pop cfun; update also
20270 (handle_missing_profiles): Fix logic looking for zero profiles.
20272 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20274 PR middle-end/83977
20275 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20276 on functions with #pragma omp declare simd or functions with simd
20278 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20279 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20280 Remove trailing \n from warning_at calls.
20282 2018-01-25 Tom de Vries <tom@codesourcery.com>
20285 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20286 for neutered workers.
20288 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20291 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20292 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20294 2018-01-24 Jeff Law <law@redhat.com>
20297 * i386.c (get_probe_interval): Move to earlier point.
20298 (ix86_compute_frame_layout): If -fstack-clash-protection and
20299 the frame is larger than the probe interval, then use pushes
20300 to save registers rather than reg->mem moves.
20301 (ix86_expand_prologue): Remove conditional for int_registers_saved
20304 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20307 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20308 min/max for never referenced object.
20310 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20312 PR middle-end/83977
20313 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20315 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20316 attributes from DECL_ATTRIBUTES (decl) without affecting
20317 DECL_ATTRIBUTES (current_function_decl).
20318 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20319 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20321 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20323 PR tree-optimization/83979
20324 * fold-const.c (fold_comparison): Use constant_boolean_node
20325 instead of boolean_{true,false}_node.
20327 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20329 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20332 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20334 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20335 Simplify the clause that sets the length attribute.
20336 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20337 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20338 clause that sets the length attribute.
20339 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20341 2018-01-24 Tom de Vries <tom@codesourcery.com>
20344 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20345 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20346 Add strict parameter.
20347 (prevent_branch_around_nothing): Insert dummy insn between branch to
20348 label and label with no ptx insn inbetween.
20349 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20351 2018-01-24 Tom de Vries <tom@codesourcery.com>
20354 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20355 for neutered threads in warp.
20356 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20358 2018-01-24 Richard Biener <rguenther@suse.de>
20360 PR tree-optimization/83176
20361 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20364 2018-01-24 Richard Biener <rguenther@suse.de>
20366 PR tree-optimization/82819
20367 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20368 code generating pluses that are no-ops in the target precision.
20370 2018-01-24 Richard Biener <rguenther@suse.de>
20372 PR middle-end/84000
20373 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20375 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20377 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20378 to merge probabilities.
20379 * predict.c (probably_never_executed): Also mark as cold functions
20380 with global 0 profile and guessed local profile.
20381 * profile-count.c (profile_probability::combine_with_count): New
20383 * profile-count.h (profile_probability::operator*,
20384 profile_probability::operator*=, profile_probability::operator/,
20385 profile_probability::operator/=): Reduce precision to adjusted
20386 and set value to guessed on contradictory divisions.
20387 (profile_probability::combine_with_freq): Remove.
20388 (profile_probability::combine_wiht_count): Declare.
20389 (profile_count::force_nonzero):: Set to adjusted.
20390 (profile_count::probability_in):: Set quality to adjusted.
20391 * tree-ssa-tail-merge.c (replace_block_by): Use
20392 combine_with_count.
20394 2018-01-23 Andrew Waterman <andrew@sifive.com>
20395 Jim Wilson <jimw@sifive.com>
20397 * config/riscv/riscv.c (riscv_stack_boundary): New.
20398 (riscv_option_override): Set riscv_stack_boundary. Handle
20399 riscv_preferred_stack_boundary_arg.
20400 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20401 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20402 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20403 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20404 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20405 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20407 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20410 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20411 of struct ix86_frame.
20412 (ix86_expand_epilogue): Likewise. Add a local variable for
20413 the reg_save_offset field in struct ix86_frame.
20415 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20417 PR tree-optimization/82604
20418 * tree-loop-distribution.c (enum partition_kind): New enum item
20419 PKIND_PARTIAL_MEMSET.
20420 (partition_builtin_p): Support above new enum item.
20421 (generate_code_for_partition): Ditto.
20422 (compute_access_range): Differentiate cases that equality can be
20423 proven at all loops, the innermost loops or no loops.
20424 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20425 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20426 (finalize_partitions, distribute_loop): Don't fuse partition of
20427 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20428 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20429 parloop is enabled.
20431 2018-01-23 Martin Liska <mliska@suse.cz>
20433 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20434 order to ignore the predictor.
20435 (PRED_POLYMORPHIC_CALL): Likewise.
20436 (PRED_RECURSIVE_CALL): Likewise.
20438 2018-01-23 Martin Liska <mliska@suse.cz>
20440 * tree-profile.c (tree_profiling): Print function header to
20441 aware reader which function we are working on.
20442 * value-prof.c (gimple_find_values_to_profile): Do not print
20443 not interesting value histograms.
20445 2018-01-23 Martin Liska <mliska@suse.cz>
20447 * profile-count.h (enum profile_quality): Add
20448 profile_uninitialized as the first value. Do not number values
20449 as they are zero based.
20450 (profile_count::verify): Update sanity check.
20451 (profile_probability::verify): Likewise.
20453 2018-01-23 Nathan Sidwell <nathan@acm.org>
20455 * doc/invoke.texi (ffor-scope): Deprecate.
20457 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20459 PR tree-optimization/83510
20460 * domwalk.c (set_all_edges_as_executable): New function.
20461 (dom_walker::dom_walker): Convert bool param
20462 "skip_unreachable_blocks" to enum reachability. Move setup of
20463 edge flags to set_all_edges_as_executable and only do it when
20464 reachability is REACHABLE_BLOCKS.
20465 * domwalk.h (enum dom_walker::reachability): New enum.
20466 (dom_walker::dom_walker): Convert bool param
20467 "skip_unreachable_blocks" to enum reachability.
20468 (set_all_edges_as_executable): New decl.
20469 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20470 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20472 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20473 but converting true to REACHABLE_BLOCKS.
20474 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20476 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20477 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20478 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20480 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20481 if check_all_array_refs will be called.
20483 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20485 * tree.c (selftest::test_location_wrappers): Add more test
20488 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20490 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20491 (selftest::test_bit_in_range): Likewise.
20493 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20496 * doc/sourcebuild.texi (vect_float): Say that the selector
20497 only describes the situation when -funsafe-math-optimizations is on.
20498 (vect_float_strict): Document.
20500 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20502 PR tree-optimization/83965
20503 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20504 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20505 instead of checking only for a reduction.
20506 (vect_recog_widen_sum_pattern): Likewise.
20508 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20510 * predict.c (probably_never_executed): Only use precise profile info.
20511 (compute_function_frequency): Skip after inlining hack since we now
20512 have quality checking.
20514 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20516 * profile-count.h (profile_probability::very_unlikely,
20517 profile_probability::unlikely, profile_probability::even): Set
20518 precision to guessed.
20520 2018-01-23 Richard Biener <rguenther@suse.de>
20522 PR tree-optimization/83963
20523 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20524 Properly terminate dominator walk when crossing the exit edge not
20525 when visiting its source block.
20527 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20530 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20531 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20533 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20535 PR tree-optimization/83957
20536 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20537 semicolon after for body surrounded by braces.
20539 PR tree-optimization/83081
20540 * profile-count.h (profile_probability::split): New method.
20541 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20542 Use profile_probability::split.
20543 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20544 when splitting a single conditional jump into 2.
20546 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20548 PR tree-optimization/69452
20549 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20552 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20554 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20555 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20556 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20558 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20560 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20562 * config/rl78/rl78.md (movdi): New define_expand.
20563 * config/rl78/rl78.c (rl78_split_movdi): New function.
20565 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20568 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20570 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20571 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20572 128-bit to produce an UNSPEC move to get the double word with the
20573 signbit and then a shift directly to do signbit.
20574 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20575 implementation with a new version that just does either a direct
20576 move or a regular move. Move memory interface to separate insns.
20577 Move insns so they are next to the expander.
20578 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20579 with signbit move. Split big and little endian case.
20580 (signbit<mode>2_dm_mem_le): Likewise.
20581 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20582 (signbit<mode>2_dm2): Likewise.
20584 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20586 * config/rl78/rl78.md (anddi3): New define_expand.
20588 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20590 * config/rl78/rl78.md (umindi3): New define_expand.
20592 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20594 * config/rl78/rl78.md (smindi3): New define_expand.
20596 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20598 * config/rl78/rl78.md (smaxdi3): New define_expand.
20600 2018-01-22 Carl Love <cel@us.ibm.com>
20602 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20603 LVX_V1TI): Add macro expansion.
20604 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20605 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20606 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20607 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20608 Change check to determine if the instruction is a byte reversing
20609 entry. Fix typo in comment.
20610 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20611 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20612 Add def_builtin calls for new builtins.
20613 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20614 Add define_insn expansion.
20616 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20618 * config/rl78/rl78.md (umaxdi3): New define_expand.
20620 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20622 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20623 for non-QImode registers.
20625 2018-01-22 Richard Biener <rguenther@suse.de>
20627 PR tree-optimization/83963
20628 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20629 including the loop exit block.
20630 (scop_detection::merge_sese): Likewise.
20631 (scop_detection::add_scop): Do it here instead.
20633 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20635 * doc/sourcebuild.texi (arm_softfloat): Document.
20637 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20640 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20641 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20642 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20644 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20645 David Edelsohn <dje.gcc@gmail.com>
20648 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20649 Change "crset eq" to "crset 2".
20650 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20651 (*call_indirect_aix<mode>_nospec): Likewise.
20652 (*call_value_indirect_aix<mode>_nospec): Likewise.
20653 (*call_indirect_elfv2<mode>_nospec): Likewise.
20654 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20655 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20656 change assembly output from . to $.
20657 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20658 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20659 (*tablejump<mode>_internal1_nospec): Likewise.
20661 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20664 * config/sh/sh_optimize_sett_clrt.cc:
20665 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20667 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20669 PR tree-optimization/83940
20670 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20671 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20672 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20673 use it to pass back the definition type.
20674 (vect_check_store_rhs): Likewise rhs_dt_out.
20675 (vect_build_gather_load_calls): Add a mask_dt argument and use
20676 it instead of a call to vect_is_simple_use.
20677 (vectorizable_store): Update calls to vect_check_load_store_mask
20678 and vect_check_store_rhs. Use the dt returned by the latter instead
20679 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20680 instead of calls to vect_is_simple_use. Pass the scalar rather
20681 than the vector operand to vect_is_simple_use when handling
20682 second and subsequent copies of an rhs value.
20683 (vectorizable_load): Update calls to vect_check_load_store_mask
20684 and vect_build_gather_load_calls. Use the cached mask_dt and
20685 gs_info.offset_dt instead of calls to vect_is_simple_use.
20687 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20689 PR middle-end/83945
20690 * tree-emutls.c: Include gimplify.h.
20691 (lower_emutls_2): New function.
20692 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20693 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20694 it before further processing.
20697 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20698 UINTVAL (trueop1) instead of INTVAL (op1).
20700 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20704 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20705 INCOMING_FRAME_SP_OFFSET if not defined.
20706 (scan_trace): Add ENTRY argument. If true and
20707 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20708 emit a note to adjust the CFA offset.
20709 (create_cfi_notes): Adjust scan_trace callers.
20710 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20711 INCOMING_FRAME_SP_OFFSET in the CIE.
20712 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20713 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20715 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20716 * doc/tm.texi: Regenerated.
20718 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20720 PR rtl-optimization/83147
20721 * lra-constraints.c (remove_inheritance_pseudos): Use
20722 lra_substitute_pseudo_within_insn.
20724 2018-01-19 Tom de Vries <tom@codesourcery.com>
20725 Cesar Philippidis <cesar@codesourcery.com>
20728 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20730 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20733 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20734 spaces for function labels.
20736 2018-01-19 Martin Liska <mliska@suse.cz>
20738 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20739 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20740 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20741 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20742 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20743 (PRED_CONST_RETURN): Change from 69 to 65.
20744 (PRED_NULL_RETURN): Change from 91 to 71.
20745 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20746 (PRED_LOOP_GUARD): Change from 66 to 73.
20748 2018-01-19 Martin Liska <mliska@suse.cz>
20750 * predict.c (predict_insn_def): Add new assert.
20751 (struct branch_predictor): Change type to signed integer.
20752 (test_prediction_value_range): Amend test to cover
20753 PROB_UNINITIALIZED.
20754 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20755 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20756 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20757 (PRED_LOOP_IV_COMPARE): Likewise.
20758 * predict.h (PROB_UNINITIALIZED): Define new constant.
20760 2018-01-19 Martin Liska <mliska@suse.cz>
20762 * predict.c (dump_prediction): Add new format for
20763 analyze_brprob.py script which is enabled with -details
20765 * profile-count.h (precise_p): New function.
20767 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20769 PR tree-optimization/83922
20770 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20771 there are no statements that need masking.
20772 (vect_active_double_reduction_p): New function.
20773 (vect_analyze_loop_operations): Use it when handling phis that
20774 are not in the loop header.
20776 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20778 PR tree-optimization/83914
20779 * tree-vect-loop.c (vectorizable_induction): Don't convert
20780 init_expr or apply the peeling adjustment for inductions
20781 that are nested within the vectorized loop.
20783 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20785 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20788 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20792 * function.h (gimplify_parameters): Add gimple_seq * argument.
20793 * function.c: Include gimple.h and options.h.
20794 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20795 for the added local temporaries if needed.
20796 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20797 if there are any parameter cleanups, wrap whole body into a
20798 try/finally with the cleanups.
20800 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20803 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20804 Use GET_MODE_CLASS for scalar floating point.
20806 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20810 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20811 Fix call of call_cgraph_insertion_hooks.
20813 2018-01-18 Martin Sebor <msebor@redhat.com>
20815 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20817 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20820 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20823 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20826 * common.opt: (-ffile-prefix-map): New option.
20827 * opts.c (common_handle_option): Defer it.
20828 * opts-global.c (handle_common_deferred_options): Handle it.
20829 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20830 * file-prefix-map.h: New file.
20831 (remap_debug_filename, add_debug_prefix_map): ...here.
20832 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20833 * final.c (debug_prefix_map, add_debug_prefix_map
20834 remap_debug_filename): Move to...
20835 * file-prefix-map.c: New file.
20836 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20837 generalize, get rid of alloca(), use strrchr() instead of strchr().
20838 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20839 Implement in terms of add_prefix_map().
20840 (remap_macro_filename, remap_debug_filename): Implement in term of
20842 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20843 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20844 * dbxout.c: Include file-prefix-map.h.
20845 * varasm.c: Likewise.
20846 * vmsdbgout.c: Likewise.
20847 * xcoffout.c: Likewise.
20848 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20849 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20850 * doc/invoke.texi (-ffile-prefix-map): Document.
20851 (-fdebug-prefix-map): Update description.
20853 2018-01-18 Martin Liska <mliska@suse.cz>
20855 * config/i386/i386.c (indirect_thunk_name): Document that also
20857 (output_indirect_thunk): Document why both instructions
20858 (pause and lfence) are generated.
20860 2018-01-18 Richard Biener <rguenther@suse.de>
20862 PR tree-optimization/83887
20863 * graphite-scop-detection.c
20864 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20865 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20866 (scop_detection::merge_sese): Re-implement with a flood-fill
20867 algorithm that properly finds a SESE region if it exists.
20869 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20872 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20873 pointer_diff optimizations use view_convert instead of convert.
20875 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20877 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20878 Generate different code for -mno-speculate-indirect-jumps.
20879 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20880 (*call_indirect_aix<mode>): Disable for
20881 -mno-speculate-indirect-jumps.
20882 (*call_indirect_aix<mode>_nospec): New define_insn.
20883 (*call_value_indirect_aix<mode>): Disable for
20884 -mno-speculate-indirect-jumps.
20885 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20886 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20887 -mno-speculate-indirect-jumps.
20888 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20890 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20892 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20893 long double type, set the flags for noting the default long double
20894 type, even if we don't pass or return a long double type.
20896 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20899 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20902 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20904 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20905 support for merge[hl].
20906 (fold_mergehl_helper): New helper function.
20907 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20908 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20909 (altivec_vmrglw_direct): Add xxmrglw insn.
20911 2018-01-17 Andrew Waterman <andrew@sifive.com>
20913 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20914 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20916 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20919 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20920 call the lto_location_cache before reading the
20921 DECL_SOURCE_LOCATION of the types.
20923 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20924 Richard Sandiford <richard.sandiford@linaro.org>
20926 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20927 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20928 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20929 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20930 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20932 * config/aarch64/constraints.md (aarch64_movti_operand):
20934 * config/aarch64/predicates.md (Uti): Add new constraint.
20936 2018-01-17 Carl Love <cel@us.ibm.com>
20938 * config/rs6000/vsx.md (define_expand xl_len_r,
20939 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20940 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20942 (define_expand, define_insn): Move the shift left from the
20943 define_insn to the define_expand for lxvl and stxvl instructions.
20944 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20945 and XL_LEN_R definitions to PURE.
20947 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20949 * config/i386/i386.c (indirect_thunk_name): Declare regno
20950 as unsigned int. Compare regno with INVALID_REGNUM.
20951 (output_indirect_thunk): Ditto.
20952 (output_indirect_thunk_function): Ditto.
20953 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20954 in the call to output_indirect_thunk_function.
20956 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20958 PR middle-end/83884
20959 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20960 rather than the size of inner_type to determine the stack slot size
20961 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20963 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20966 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20969 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20971 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20972 endian Linux systems to optionally enable multilibs for selecting
20973 the long double type if the user configured an explicit type.
20974 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20975 have no long double multilibs if not defined.
20976 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20977 warn if the user used -mabi={ieee,ibm}longdouble and we built
20978 multilibs for long double.
20979 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20980 appropriate multilib option.
20981 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20983 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20984 for building long double multilibs.
20985 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20987 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20989 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20992 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20994 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20997 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21000 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21003 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21005 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21006 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21008 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
21010 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21011 different rtl trees depending on TARGET_64BIT.
21012 (rs6000_gen_lvx): Likewise.
21014 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21016 * config/visium/visium.md (nop): Tweak comment.
21017 (hazard_nop): Likewise.
21019 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21021 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21022 -mspeculate-indirect-jumps.
21023 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21024 for -mno-speculate-indirect-jumps.
21025 (*call_indirect_elfv2<mode>_nospec): New define_insn.
21026 (*call_value_indirect_elfv2<mode>): Disable for
21027 -mno-speculate-indirect-jumps.
21028 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21029 (indirect_jump): Emit different RTL for
21030 -mno-speculate-indirect-jumps.
21031 (*indirect_jump<mode>): Disable for
21032 -mno-speculate-indirect-jumps.
21033 (*indirect_jump<mode>_nospec): New define_insn.
21034 (tablejump): Emit different RTL for
21035 -mno-speculate-indirect-jumps.
21036 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21037 (tablejumpsi_nospec): New define_expand.
21038 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21039 (tablejumpdi_nospec): New define_expand.
21040 (*tablejump<mode>_internal1): Disable for
21041 -mno-speculate-indirect-jumps.
21042 (*tablejump<mode>_internal1_nospec): New define_insn.
21043 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21046 2018-01-16 Artyom Skrobov tyomitch@gmail.com
21048 * caller-save.c (insert_save): Drop unnecessary parameter. All
21051 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21052 Richard Biener <rguenth@suse.de>
21055 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21056 return early, inline manually is_gimple_sizepos. Make sure if we
21057 call gimplify_expr we don't end up with a gimple constant.
21058 * tree.c (variably_modified_type_p): Don't return true for
21059 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
21060 * gimplify.h (is_gimple_sizepos): Remove.
21062 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21064 PR tree-optimization/83857
21065 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21066 vectorizable_live_operation for pure SLP statements.
21067 (vectorizable_live_operation): Handle PHIs.
21069 2018-01-16 Richard Biener <rguenther@suse.de>
21071 PR tree-optimization/83867
21072 * tree-vect-stmts.c (vect_transform_stmt): Precompute
21073 nested_in_vect_loop_p since the scalar stmt may get invalidated.
21075 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21078 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21079 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21080 If off is not INTEGER_CST, issue a may not be aligned warning
21081 rather than isn't aligned. Use isn%'t rather than isn't.
21082 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21084 <case MULT_EXPR>: Improve the case when bottom and one of the
21085 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21086 operand, in that case check if the other operand is multiple of
21087 bottom divided by the INTEGER_CST operand.
21089 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21092 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21093 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21094 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21095 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21096 * config/pa/pa.c (pa_function_arg_advance): Likewise.
21097 (pa_function_arg, pa_arg_partial_bytes): Likewise.
21098 (pa_function_arg_size): New function.
21100 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21102 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21103 in a separate statement.
21105 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21107 PR tree-optimization/83847
21108 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21109 group gathers and scatters.
21111 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21113 PR rtl-optimization/86620
21114 * params.def (max-sched-ready-insns): Bump minimum value to 1.
21116 PR rtl-optimization/83213
21117 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21118 to last if both are JUMP_INSNs.
21120 PR tree-optimization/83843
21121 * gimple-ssa-store-merging.c
21122 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21123 store_immediate_info for bswap/nop orig_stores.
21125 2018-01-15 Andrew Waterman <andrew@sifive.com>
21127 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21129 <UDIV>: Increase cost if !TARGET_DIV.
21131 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
21133 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21134 (define_attr "cr_logical_3op"): New.
21135 (cceq_ior_compare): Adjust.
21136 (cceq_ior_compare_complement): Adjust.
21137 (*cceq_rev_compare): Adjust.
21138 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21139 (is_cracked_insn): Adjust.
21140 (insn_must_be_first_in_group): Adjust.
21141 * config/rs6000/40x.md: Adjust.
21142 * config/rs6000/440.md: Adjust.
21143 * config/rs6000/476.md: Adjust.
21144 * config/rs6000/601.md: Adjust.
21145 * config/rs6000/603.md: Adjust.
21146 * config/rs6000/6xx.md: Adjust.
21147 * config/rs6000/7450.md: Adjust.
21148 * config/rs6000/7xx.md: Adjust.
21149 * config/rs6000/8540.md: Adjust.
21150 * config/rs6000/cell.md: Adjust.
21151 * config/rs6000/e300c2c3.md: Adjust.
21152 * config/rs6000/e500mc.md: Adjust.
21153 * config/rs6000/e500mc64.md: Adjust.
21154 * config/rs6000/e5500.md: Adjust.
21155 * config/rs6000/e6500.md: Adjust.
21156 * config/rs6000/mpc.md: Adjust.
21157 * config/rs6000/power4.md: Adjust.
21158 * config/rs6000/power5.md: Adjust.
21159 * config/rs6000/power6.md: Adjust.
21160 * config/rs6000/power7.md: Adjust.
21161 * config/rs6000/power8.md: Adjust.
21162 * config/rs6000/power9.md: Adjust.
21163 * config/rs6000/rs64.md: Adjust.
21164 * config/rs6000/titan.md: Adjust.
21166 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21168 * config/i386/predicates.md (indirect_branch_operand): Rewrite
21169 ix86_indirect_branch_register logic.
21171 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21173 * config/i386/constraints.md (Bs): Update
21174 ix86_indirect_branch_register check. Don't check
21175 ix86_indirect_branch_register with GOT_memory_operand.
21177 * config/i386/predicates.md (GOT_memory_operand): Don't check
21178 ix86_indirect_branch_register here.
21179 (GOT32_symbol_operand): Likewise.
21181 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21183 * config/i386/predicates.md (constant_call_address_operand):
21184 Rewrite ix86_indirect_branch_register logic.
21185 (sibcall_insn_operand): Likewise.
21187 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21189 * config/i386/constraints.md (Bs): Replace
21190 ix86_indirect_branch_thunk_register with
21191 ix86_indirect_branch_register.
21193 * config/i386/i386.md (indirect_jump): Likewise.
21194 (tablejump): Likewise.
21195 (*sibcall_memory): Likewise.
21196 (*sibcall_value_memory): Likewise.
21197 Peepholes of indirect call and jump via memory: Likewise.
21198 * config/i386/i386.opt: Likewise.
21199 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21200 (GOT_memory_operand): Likewise.
21201 (call_insn_operand): Likewise.
21202 (sibcall_insn_operand): Likewise.
21203 (GOT32_symbol_operand): Likewise.
21205 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21207 PR middle-end/83837
21208 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21209 type rather than type addr's type points to.
21210 (expand_omp_atomic_mutex): Likewise.
21211 (expand_omp_atomic): Likewise.
21213 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21216 * config/i386/i386.c (output_indirect_thunk_function): Use
21217 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21218 for __x86_return_thunk.
21220 2018-01-15 Richard Biener <rguenther@suse.de>
21222 PR middle-end/83850
21223 * expmed.c (extract_bit_field_1): Fix typo.
21225 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21228 * config/arm/iterators.md (VF): New mode iterator.
21229 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21230 Remove integer-related logic from pattern.
21231 (neon_vabd<mode>_3): Likewise.
21233 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21235 PR middle-end/82694
21236 * common.opt (fstrict-overflow): No longer an alias.
21237 (fwrapv-pointer): New option.
21238 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21239 also for pointer types based on flag_wrapv_pointer.
21240 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21241 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21242 opts->x_flag_wrapv got set.
21243 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21244 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21245 POINTER_TYPE_OVERFLOW_UNDEFINED.
21246 * match.pd: Likewise in address comparison pattern.
21247 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21249 2018-01-15 Richard Biener <rguenther@suse.de>
21252 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21253 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21254 Reset type names to their identifier if their TYPE_DECL doesn't
21255 have linkage (and thus is used for ODR and devirt).
21256 (save_debug_info_for_decl): Remove.
21257 (save_debug_info_for_type): Likewise.
21258 (add_tree_to_fld_list): Adjust.
21259 * tree-pretty-print.c (dump_generic_node): Make dumping of
21260 type names more robust.
21262 2018-01-15 Richard Biener <rguenther@suse.de>
21264 * BASE-VER: Bump to 8.0.1.
21266 2018-01-14 Martin Sebor <msebor@redhat.com>
21269 * builtins.c (check_access): Avoid warning when the no-warning bit
21272 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21274 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21275 * ira-color (allocno_hard_regs_compare): Likewise.
21277 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21280 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21281 Use .pushsection/.popsection.
21283 2018-01-14 Martin Sebor <msebor@redhat.com>
21286 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21288 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21290 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21291 entry from extra_headers.
21292 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21293 extra_headers, make the list bitwise identical to the i?86-*-* one.
21295 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21297 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21298 -mcmodel=large with -mindirect-branch=thunk,
21299 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21300 -mfunction-return=thunk-extern.
21301 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21302 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21303 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21305 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21307 * config/i386/i386.c (print_reg): Print the name of the full
21308 integer register without '%'.
21309 (ix86_print_operand): Handle 'V'.
21310 * doc/extend.texi: Document 'V' modifier.
21312 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21314 * config/i386/constraints.md (Bs): Disallow memory operand for
21315 -mindirect-branch-register.
21317 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21318 (GOT_memory_operand): Likewise.
21319 (call_insn_operand): Likewise.
21320 (sibcall_insn_operand): Likewise.
21321 (GOT32_symbol_operand): Likewise.
21322 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21323 for -mindirect-branch-register.
21324 (tablejump): Likewise.
21325 (*sibcall_memory): Likewise.
21326 (*sibcall_value_memory): Likewise.
21327 Disallow peepholes of indirect call and jump via memory for
21328 -mindirect-branch-register.
21329 (*call_pop): Replace m with Bw.
21330 (*call_value_pop): Likewise.
21331 (*sibcall_pop_memory): Replace m with Bs.
21332 * config/i386/i386.opt (mindirect-branch-register): New option.
21333 * doc/invoke.texi: Document -mindirect-branch-register option.
21335 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21337 * config/i386/i386-protos.h (ix86_output_function_return): New.
21338 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21339 set function_return_type.
21340 (indirect_thunk_name): Add ret_p to indicate thunk for function
21342 (output_indirect_thunk_function): Pass false to
21343 indirect_thunk_name.
21344 (ix86_output_indirect_branch_via_reg): Likewise.
21345 (ix86_output_indirect_branch_via_push): Likewise.
21346 (output_indirect_thunk_function): Create alias for function
21347 return thunk if regno < 0.
21348 (ix86_output_function_return): New function.
21349 (ix86_handle_fndecl_attribute): Handle function_return.
21350 (ix86_attribute_table): Add function_return.
21351 * config/i386/i386.h (machine_function): Add
21352 function_return_type.
21353 * config/i386/i386.md (simple_return_internal): Use
21354 ix86_output_function_return.
21355 (simple_return_internal_long): Likewise.
21356 * config/i386/i386.opt (mfunction-return=): New option.
21357 (indirect_branch): Mention -mfunction-return=.
21358 * doc/extend.texi: Document function_return function attribute.
21359 * doc/invoke.texi: Document -mfunction-return= option.
21361 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21363 * config/i386/i386-opts.h (indirect_branch): New.
21364 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21365 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21366 with local indirect jump when converting indirect call and jump.
21367 (ix86_set_indirect_branch_type): New.
21368 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21369 (indirectlabelno): New.
21370 (indirect_thunk_needed): Likewise.
21371 (indirect_thunk_bnd_needed): Likewise.
21372 (indirect_thunks_used): Likewise.
21373 (indirect_thunks_bnd_used): Likewise.
21374 (INDIRECT_LABEL): Likewise.
21375 (indirect_thunk_name): Likewise.
21376 (output_indirect_thunk): Likewise.
21377 (output_indirect_thunk_function): Likewise.
21378 (ix86_output_indirect_branch_via_reg): Likewise.
21379 (ix86_output_indirect_branch_via_push): Likewise.
21380 (ix86_output_indirect_branch): Likewise.
21381 (ix86_output_indirect_jmp): Likewise.
21382 (ix86_code_end): Call output_indirect_thunk_function if needed.
21383 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21385 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21386 (ix86_attribute_table): Add indirect_branch.
21387 * config/i386/i386.h (machine_function): Add indirect_branch_type
21388 and has_local_indirect_jump.
21389 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21391 (tablejump): Likewise.
21392 (*indirect_jump): Use ix86_output_indirect_jmp.
21393 (*tablejump_1): Likewise.
21394 (simple_return_indirect_internal): Likewise.
21395 * config/i386/i386.opt (mindirect-branch=): New option.
21396 (indirect_branch): New.
21399 (thunk-inline): Likewise.
21400 (thunk-extern): Likewise.
21401 * doc/extend.texi: Document indirect_branch function attribute.
21402 * doc/invoke.texi: Document -mindirect-branch= option.
21404 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21407 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21409 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21411 * ipa-inline.c (want_inline_small_function_p): Return false if
21412 inlining has already failed with CIF_FINAL_ERROR.
21413 (update_caller_keys): Call want_inline_small_function_p before
21415 (update_callee_keys): Likewise.
21417 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21419 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21421 (rs6000_quadword_masked_address_p): Likewise.
21422 (quad_aligned_load_p): Likewise.
21423 (quad_aligned_store_p): Likewise.
21424 (const_load_sequence_p): Add comment to describe the outer-most loop.
21425 (mimic_memory_attributes_and_flags): New function.
21426 (rs6000_gen_stvx): Likewise.
21427 (replace_swapped_aligned_store): Likewise.
21428 (rs6000_gen_lvx): Likewise.
21429 (replace_swapped_aligned_load): Likewise.
21430 (replace_swapped_load_constant): Capitalize argument name in
21431 comment describing this function.
21432 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21433 and stores that access quad-word aligned addresses and replace
21434 with stvx or lvx instructions when appropriate.
21435 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21436 New function prototype.
21437 (rs6000_quadword_masked_address_p): Likewise.
21438 (rs6000_gen_lvx): Likewise.
21439 (rs6000_gen_stvx): Likewise.
21440 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21441 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21442 when memory address is aligned.
21443 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21444 this split to select lvx instruction when memory address is aligned.
21445 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21446 instruction when memory address is aligned.
21447 (*vsx_le_perm_load_v16qi): Likewise.
21448 (four unnamed splitters): Modify to select the stvx instruction
21449 when memory is aligned.
21451 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21453 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21454 which appears in the queue multiple times.
21456 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21457 Alan Hayward <alan.hayward@arm.com>
21458 David Sherwood <david.sherwood@arm.com>
21460 * tree-vectorizer.h (vec_lower_bound): New structure.
21461 (_loop_vec_info): Add check_nonzero and lower_bounds.
21462 (LOOP_VINFO_CHECK_NONZERO): New macro.
21463 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21464 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21465 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21466 fields. Make seg_len the distance travelled, not including the
21468 (dr_direction_indicator): Declare.
21469 (dr_zero_step_indicator): Likewise.
21470 (dr_known_forward_stride_p): Likewise.
21471 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21473 (runtime_alias_check_p): Allow runtime alias checks with
21475 (operator ==): Compare access_size and align.
21476 (prune_runtime_alias_test_list): Rework for new distinction between
21477 the access_size and seg_len.
21478 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21480 (get_segment_min_max): New function.
21481 (create_intersect_range_checks): Use it.
21482 (dr_step_indicator): New function.
21483 (dr_direction_indicator): Likewise.
21484 (dr_zero_step_indicator): Likewise.
21485 (dr_known_forward_stride_p): Likewise.
21486 * tree-loop-distribution.c (data_ref_segment_size): Return
21487 DR_STEP * (niters - 1).
21488 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21490 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21491 (vect_preserves_scalar_order_p): New function, split out from...
21492 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21493 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21494 (vect_vfa_access_size): New function.
21495 (vect_vfa_align): Likewise.
21496 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21497 (dump_lower_bound): New function.
21498 (vect_check_lower_bound): Likewise.
21499 (vect_small_gap_p): Likewise.
21500 (vectorizable_with_step_bound_p): Likewise.
21501 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21502 depencies if the vectorization factor is 1. Convert the checks
21503 for nonzero steps into checks on the bounds of DR_STEP. Try using
21504 a bunds check for variable steps if the minimum required step is
21505 relatively small. Update calls to the dr_with_seg_len
21506 constructor and to vect_compile_time_alias.
21507 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21509 (vect_loop_versioning): Call it.
21510 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21512 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21514 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21515 Alan Hayward <alan.hayward@arm.com>
21516 David Sherwood <david.sherwood@arm.com>
21518 * doc/sourcebuild.texi (vect_scatter_store): Document.
21519 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21521 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21523 * genopinit.c (main): Add supports_vec_scatter_store and
21524 supports_vec_scatter_store_cached to target_optabs.
21525 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21526 IFN_MASK_SCATTER_STORE.
21527 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21529 * internal-fn.h (internal_store_fn_p): Declare.
21530 (internal_fn_stored_value_index): Likewise.
21531 * internal-fn.c (scatter_store_direct): New macro.
21532 (expand_scatter_store_optab_fn): New function.
21533 (direct_scatter_store_optab_supported_p): New macro.
21534 (internal_store_fn_p): New function.
21535 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21536 IFN_MASK_SCATTER_STORE.
21537 (internal_fn_mask_index): Likewise.
21538 (internal_fn_stored_value_index): New function.
21539 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21540 for scatter stores.
21541 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21542 * optabs-query.c (supports_vec_scatter_store_p): New function.
21543 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21544 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21545 true for scatter stores.
21546 (vect_gather_scatter_fn_p): Handle scatter stores too.
21547 (vect_check_gather_scatter): Consider using scatter stores if
21548 supports_vec_scatter_store_p.
21549 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21550 scatter stores too.
21551 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21552 internal_fn_stored_value_index.
21553 (check_load_store_masking): Handle scatter stores too.
21554 (vect_get_store_rhs): Make public.
21555 (vectorizable_call): Use internal_store_fn_p.
21556 (vectorizable_store): Handle scatter store internal functions.
21557 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21558 when deciding whether the end of the group has been reached.
21559 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21560 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21561 (mask_scatter_store<mode>): New insns.
21563 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21564 Alan Hayward <alan.hayward@arm.com>
21565 David Sherwood <david.sherwood@arm.com>
21567 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21568 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21569 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21571 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21572 Use vect_truncate_gather_scatter_offset if we can't treat the
21573 operation as a normal gather load or scatter store.
21574 (get_group_load_store_type): Take the gather_scatter_info
21575 as argument. Try using a gather load or scatter store for
21576 single-element groups.
21577 (get_load_store_type): Update calls to get_group_load_store_type
21578 and vect_use_strided_gather_scatters_p.
21580 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21581 Alan Hayward <alan.hayward@arm.com>
21582 David Sherwood <david.sherwood@arm.com>
21584 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21585 optional tree argument.
21586 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21588 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21589 but continue to use the current value as a fallback.
21590 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21591 to compare the updates.
21592 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21593 (get_load_store_type): Use it when handling a strided access.
21594 (vect_get_strided_load_store_ops): New function.
21595 (vect_get_data_ptr_increment): Likewise.
21596 (vectorizable_load): Handle strided gather loads. Always pass
21597 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21599 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21600 Alan Hayward <alan.hayward@arm.com>
21601 David Sherwood <david.sherwood@arm.com>
21603 * doc/md.texi (gather_load@var{m}): Document.
21604 (mask_gather_load@var{m}): Likewise.
21605 * genopinit.c (main): Add supports_vec_gather_load and
21606 supports_vec_gather_load_cached to target_optabs.
21607 * optabs-tree.c (init_tree_optimization_optabs): Use
21608 ggc_cleared_alloc to allocate target_optabs.
21609 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21610 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21612 * internal-fn.h (internal_load_fn_p): Declare.
21613 (internal_gather_scatter_fn_p): Likewise.
21614 (internal_fn_mask_index): Likewise.
21615 (internal_gather_scatter_fn_supported_p): Likewise.
21616 * internal-fn.c (gather_load_direct): New macro.
21617 (expand_gather_load_optab_fn): New function.
21618 (direct_gather_load_optab_supported_p): New macro.
21619 (direct_internal_fn_optab): New function.
21620 (internal_load_fn_p): Likewise.
21621 (internal_gather_scatter_fn_p): Likewise.
21622 (internal_fn_mask_index): Likewise.
21623 (internal_gather_scatter_fn_supported_p): Likewise.
21624 * optabs-query.c (supports_at_least_one_mode_p): New function.
21625 (supports_vec_gather_load_p): Likewise.
21626 * optabs-query.h (supports_vec_gather_load_p): Declare.
21627 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21628 and memory_type field.
21629 (NUM_PATTERNS): Bump to 15.
21630 * tree-vect-data-refs.c: Include internal-fn.h.
21631 (vect_gather_scatter_fn_p): New function.
21632 (vect_describe_gather_scatter_call): Likewise.
21633 (vect_check_gather_scatter): Try using internal functions for
21634 gather loads. Recognize existing calls to a gather load function.
21635 (vect_analyze_data_refs): Consider using gather loads if
21636 supports_vec_gather_load_p.
21637 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21638 (vect_get_gather_scatter_offset_type): Likewise.
21639 (vect_convert_mask_for_vectype): Likewise.
21640 (vect_add_conversion_to_patterm): Likewise.
21641 (vect_try_gather_scatter_pattern): Likewise.
21642 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21643 (vect_vect_recog_func_ptrs): Add it.
21644 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21645 internal_fn_mask_index and internal_gather_scatter_fn_p.
21646 (check_load_store_masking): Take the gather_scatter_info as an
21647 argument and handle gather loads.
21648 (vect_get_gather_scatter_ops): New function.
21649 (vectorizable_call): Check internal_load_fn_p.
21650 (vectorizable_load): Likewise. Handle gather load internal
21652 (vectorizable_store): Update call to check_load_store_masking.
21653 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21654 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21655 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21656 (aarch64_gather_scale_operand_d): New predicates.
21657 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21658 (mask_gather_load<mode>): New insns.
21660 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21661 Alan Hayward <alan.hayward@arm.com>
21662 David Sherwood <david.sherwood@arm.com>
21664 * optabs.def (fold_left_plus_optab): New optab.
21665 * doc/md.texi (fold_left_plus_@var{m}): Document.
21666 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21667 * internal-fn.c (fold_left_direct): Define.
21668 (expand_fold_left_optab_fn): Likewise.
21669 (direct_fold_left_optab_supported_p): Likewise.
21670 * fold-const-call.c (fold_const_fold_left): New function.
21671 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21672 * tree-parloops.c (valid_reduction_p): New function.
21673 (gather_scalar_reductions): Use it.
21674 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21675 (vect_finish_replace_stmt): Declare.
21676 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21677 (needs_fold_left_reduction_p): New function, split out from...
21678 (vect_is_simple_reduction): ...here. Accept reductions that
21679 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21680 (vect_force_simple_reduction): Also store the reduction type in
21681 the assignment's STMT_VINFO_REDUC_TYPE.
21682 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21683 (merge_with_identity): New function.
21684 (vect_expand_fold_left): Likewise.
21685 (vectorize_fold_left_reduction): Likewise.
21686 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21687 scalar phi in place for it. Check for target support and reject
21688 cases that would reassociate the operation. Defer the transform
21689 phase to vectorize_fold_left_reduction.
21690 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21691 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21692 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21694 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21696 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21697 call to ifc_temp_var.
21699 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21700 Alan Hayward <alan.hayward@arm.com>
21701 David Sherwood <david.sherwood@arm.com>
21703 * target.def (legitimize_address_displacement): Take the original
21704 offset as a poly_int.
21705 * targhooks.h (default_legitimize_address_displacement): Update
21707 * targhooks.c (default_legitimize_address_displacement): Likewise.
21708 * doc/tm.texi: Regenerate.
21709 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21710 as an argument, moving assert of ad->disp == ad->disp_term to...
21711 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21712 Try calling targetm.legitimize_address_displacement before expanding
21713 the address rather than afterwards, and adjust for the new interface.
21714 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21715 Match the new hook interface. Handle SVE addresses.
21716 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21717 new hook interface.
21719 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21721 * Makefile.in (OBJS): Add early-remat.o.
21722 * target.def (select_early_remat_modes): New hook.
21723 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21724 * doc/tm.texi: Regenerate.
21725 * targhooks.h (default_select_early_remat_modes): Declare.
21726 * targhooks.c (default_select_early_remat_modes): New function.
21727 * timevar.def (TV_EARLY_REMAT): New timevar.
21728 * passes.def (pass_early_remat): New pass.
21729 * tree-pass.h (make_pass_early_remat): Declare.
21730 * early-remat.c: New file.
21731 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21733 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21735 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21736 Alan Hayward <alan.hayward@arm.com>
21737 David Sherwood <david.sherwood@arm.com>
21739 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21740 vfm1 with a bound_epilog parameter.
21741 (vect_do_peeling): Update calls accordingly, and move the prologue
21742 call earlier in the function. Treat the base bound_epilog as 0 for
21743 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21744 this base when peeling for gaps.
21745 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21746 with fully-masked loops.
21747 (vect_estimate_min_profitable_iters): Handle the single peeled
21748 iteration in that case.
21750 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21751 Alan Hayward <alan.hayward@arm.com>
21752 David Sherwood <david.sherwood@arm.com>
21754 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21755 single-element interleaving even if the size is not a power of 2.
21756 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21757 accesses for single-element interleaving if the group size is
21760 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21761 Alan Hayward <alan.hayward@arm.com>
21762 David Sherwood <david.sherwood@arm.com>
21764 * doc/md.texi (fold_extract_last_@var{m}): Document.
21765 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21766 * optabs.def (fold_extract_last_optab): New optab.
21767 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21768 * internal-fn.c (fold_extract_direct): New macro.
21769 (expand_fold_extract_optab_fn): Likewise.
21770 (direct_fold_extract_optab_supported_p): Likewise.
21771 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21772 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21773 EXTRACT_LAST_REDUCTION.
21774 (get_initial_def_for_reduction): Do not create an initial vector
21775 for EXTRACT_LAST_REDUCTION reductions.
21776 (vectorizable_reduction): Leave the scalar phi in place for
21777 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21778 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21779 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21780 transform phase to vectorizable_condition.
21781 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21783 (vect_finish_stmt_generation): ...here.
21784 (vect_finish_replace_stmt): New function.
21785 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21786 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21788 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21790 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21791 Alan Hayward <alan.hayward@arm.com>
21792 David Sherwood <david.sherwood@arm.com>
21794 * doc/md.texi (extract_last_@var{m}): Document.
21795 * optabs.def (extract_last_optab): New optab.
21796 * internal-fn.def (EXTRACT_LAST): New internal function.
21797 * internal-fn.c (cond_unary_direct): New macro.
21798 (expand_cond_unary_optab_fn): Likewise.
21799 (direct_cond_unary_optab_supported_p): Likewise.
21800 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21801 loops using EXTRACT_LAST.
21802 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21803 (extract_last_<mode>): ...this optab.
21804 (vec_extract<mode><Vel>): Update accordingly.
21806 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21807 Alan Hayward <alan.hayward@arm.com>
21808 David Sherwood <david.sherwood@arm.com>
21810 * target.def (empty_mask_is_expensive): New hook.
21811 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21812 * doc/tm.texi: Regenerate.
21813 * targhooks.h (default_empty_mask_is_expensive): Declare.
21814 * targhooks.c (default_empty_mask_is_expensive): New function.
21815 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21816 if the target says that empty masks are expensive.
21817 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21819 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21821 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21822 Alan Hayward <alan.hayward@arm.com>
21823 David Sherwood <david.sherwood@arm.com>
21825 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21826 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21827 (vect_use_loop_mask_for_alignment_p): New function.
21828 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21829 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21830 niters_skip argument. Make sure that the first niters_skip elements
21831 of the first iteration are inactive.
21832 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21833 Update call to vect_set_loop_masks_directly.
21834 (get_misalign_in_elems): New function, split out from...
21835 (vect_gen_prolog_loop_niters): ...here.
21836 (vect_update_init_of_dr): Take a code argument that specifies whether
21837 the adjustment should be added or subtracted.
21838 (vect_update_init_of_drs): Likewise.
21839 (vect_prepare_for_masked_peels): New function.
21840 (vect_do_peeling): Skip prologue peeling if we're using a mask
21841 instead. Update call to vect_update_inits_of_drs.
21842 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21844 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21845 alignment. Do not include the number of peeled iterations in
21846 the minimum threshold in that case.
21847 (vectorizable_induction): Adjust the start value down by
21848 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21849 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21850 Take the number of skipped iterations into account when calculating
21852 * tree-vect-stmts.c (vect_gen_while_not): New function.
21854 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21855 Alan Hayward <alan.hayward@arm.com>
21856 David Sherwood <david.sherwood@arm.com>
21858 * doc/sourcebuild.texi (vect_fully_masked): Document.
21859 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21860 default value to 0.
21861 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21863 (vect_analyze_loop_2): ...here. Don't check the vectorization
21864 factor against the number of loop iterations if the loop is
21867 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21868 Alan Hayward <alan.hayward@arm.com>
21869 David Sherwood <david.sherwood@arm.com>
21871 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21872 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21873 (dump_groups): Update accordingly.
21874 (iv_use::mem_type): New member variable.
21875 (address_p): New function.
21876 (record_use): Add a mem_type argument and initialize the new
21878 (record_group_use): Add a mem_type argument. Use address_p.
21879 Remove obsolete null checks of base_object. Update call to record_use.
21880 (find_interesting_uses_op): Update call to record_group_use.
21881 (find_interesting_uses_cond): Likewise.
21882 (find_interesting_uses_address): Likewise.
21883 (get_mem_type_for_internal_fn): New function.
21884 (find_address_like_use): Likewise.
21885 (find_interesting_uses_stmt): Try find_address_like_use before
21886 calling find_interesting_uses_op.
21887 (addr_offset_valid_p): Use the iv mem_type field as the type
21888 of the addressed memory.
21889 (add_autoinc_candidates): Likewise.
21890 (get_address_cost): Likewise.
21891 (split_small_address_groups_p): Use address_p.
21892 (split_address_groups): Likewise.
21893 (add_iv_candidate_for_use): Likewise.
21894 (autoinc_possible_for_pair): Likewise.
21895 (rewrite_groups): Likewise.
21896 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21897 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21898 (get_alias_ptr_type_for_ptr_address): New function.
21899 (rewrite_use_address): Rewrite address uses in calls that were
21900 identified by find_address_like_use.
21902 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21903 Alan Hayward <alan.hayward@arm.com>
21904 David Sherwood <david.sherwood@arm.com>
21906 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21908 * gimple-expr.h (is_gimple_addressable: Likewise.
21909 * gimple-expr.c (is_gimple_address): Likewise.
21910 * internal-fn.c (expand_call_mem_ref): New function.
21911 (expand_mask_load_optab_fn): Use it.
21912 (expand_mask_store_optab_fn): Likewise.
21914 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21915 Alan Hayward <alan.hayward@arm.com>
21916 David Sherwood <david.sherwood@arm.com>
21918 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21919 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21920 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21921 (cond_umax@var{mode}): Document.
21922 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21923 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21924 (cond_umin_optab, cond_umax_optab): New optabs.
21925 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21926 (COND_IOR, COND_XOR): New internal functions.
21927 * internal-fn.h (get_conditional_internal_fn): Declare.
21928 * internal-fn.c (cond_binary_direct): New macro.
21929 (expand_cond_binary_optab_fn): Likewise.
21930 (direct_cond_binary_optab_supported_p): Likewise.
21931 (get_conditional_internal_fn): New function.
21932 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21933 Cope with reduction statements that are vectorized as calls rather
21935 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21936 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21937 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21938 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21939 (UNSPEC_COND_EOR): New unspecs.
21940 (optab): Add mappings for them.
21941 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21942 (sve_int_op, sve_fp_op): New int attributes.
21944 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21945 Alan Hayward <alan.hayward@arm.com>
21946 David Sherwood <david.sherwood@arm.com>
21948 * optabs.def (while_ult_optab): New optab.
21949 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21950 * internal-fn.def (WHILE_ULT): New internal function.
21951 * internal-fn.h (direct_internal_fn_supported_p): New override
21952 that takes two types as argument.
21953 * internal-fn.c (while_direct): New macro.
21954 (expand_while_optab_fn): New function.
21955 (convert_optab_supported_p): Likewise.
21956 (direct_while_optab_supported_p): New macro.
21957 * wide-int.h (wi::udiv_ceil): New function.
21958 * tree-vectorizer.h (rgroup_masks): New structure.
21959 (vec_loop_masks): New typedef.
21960 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21961 and fully_masked_p.
21962 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21963 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21964 (vect_max_vf): New function.
21965 (slpeel_make_loop_iterate_ntimes): Delete.
21966 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21967 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21968 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21969 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21970 internal-fn.h, stor-layout.h and optabs-query.h.
21971 (vect_set_loop_mask): New function.
21972 (add_preheader_seq): Likewise.
21973 (add_header_seq): Likewise.
21974 (interleave_supported_p): Likewise.
21975 (vect_maybe_permute_loop_masks): Likewise.
21976 (vect_set_loop_masks_directly): Likewise.
21977 (vect_set_loop_condition_masked): Likewise.
21978 (vect_set_loop_condition_unmasked): New function, split out from
21979 slpeel_make_loop_iterate_ntimes.
21980 (slpeel_make_loop_iterate_ntimes): Rename to..
21981 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21982 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21983 (vect_do_peeling): Update call accordingly.
21984 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21986 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21987 mask_compare_type, can_fully_mask_p and fully_masked_p.
21988 (release_vec_loop_masks): New function.
21989 (_loop_vec_info): Use it to free the loop masks.
21990 (can_produce_all_loop_masks_p): New function.
21991 (vect_get_max_nscalars_per_iter): Likewise.
21992 (vect_verify_full_masking): Likewise.
21993 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21994 retries, and free the mask rgroups before retrying. Check loop-wide
21995 reasons for disallowing fully-masked loops. Make the final decision
21996 about whether use a fully-masked loop or not.
21997 (vect_estimate_min_profitable_iters): Do not assume that peeling
21998 for the number of iterations will be needed for fully-masked loops.
21999 (vectorizable_reduction): Disable fully-masked loops.
22000 (vectorizable_live_operation): Likewise.
22001 (vect_halve_mask_nunits): New function.
22002 (vect_double_mask_nunits): Likewise.
22003 (vect_record_loop_mask): Likewise.
22004 (vect_get_loop_mask): Likewise.
22005 (vect_transform_loop): Handle the case in which the final loop
22006 iteration might handle a partial vector. Call vect_set_loop_condition
22007 instead of slpeel_make_loop_iterate_ntimes.
22008 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22009 (check_load_store_masking): New function.
22010 (prepare_load_store_mask): Likewise.
22011 (vectorizable_store): Handle fully-masked loops.
22012 (vectorizable_load): Likewise.
22013 (supportable_widening_operation): Use vect_halve_mask_nunits for
22015 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22016 (vect_gen_while): New function.
22017 * config/aarch64/aarch64.md (umax<mode>3): New expander.
22018 (aarch64_uqdec<mode>): New insn.
22020 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22021 Alan Hayward <alan.hayward@arm.com>
22022 David Sherwood <david.sherwood@arm.com>
22024 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22025 (reduc_xor_scal_optab): New optabs.
22026 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22027 (reduc_xor_scal_@var{m}): Document.
22028 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22029 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22030 internal functions.
22031 * fold-const-call.c (fold_const_call): Handle them.
22032 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22033 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22034 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22035 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22036 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22037 (UNSPEC_XORV): New unspecs.
22038 (optab): Add entries for them.
22039 (BITWISEV): New int iterator.
22040 (bit_reduc_op): New int attributes.
22042 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22043 Alan Hayward <alan.hayward@arm.com>
22044 David Sherwood <david.sherwood@arm.com>
22046 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22047 * internal-fn.def (VEC_SHL_INSERT): New internal function.
22048 * optabs.def (vec_shl_insert_optab): New optab.
22049 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22050 (duplicate_and_interleave): Likewise.
22051 * tree-vect-loop.c: Include internal-fn.h.
22052 (neutral_op_for_slp_reduction): New function, split out from
22053 get_initial_defs_for_reduction.
22054 (get_initial_def_for_reduction): Handle option 2 for variable-length
22055 vectors by loading the neutral value into a vector and then shifting
22056 the initial value into element 0.
22057 (get_initial_defs_for_reduction): Replace the code argument with
22058 the neutral value calculated by neutral_op_for_slp_reduction.
22059 Use gimple_build_vector for constant-length vectors.
22060 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22061 but the first group_size elements have a neutral value.
22062 Use duplicate_and_interleave otherwise.
22063 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22064 Update call to get_initial_defs_for_reduction. Handle SLP
22065 reductions for variable-length vectors by creating one vector
22066 result for each scalar result, with the elements associated
22067 with other scalar results stubbed out with the neutral value.
22068 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22069 Require IFN_VEC_SHL_INSERT for double reductions on
22070 variable-length vectors, or SLP reductions that have
22071 a neutral value. Require can_duplicate_and_interleave_p
22072 support for variable-length unchained SLP reductions if there
22073 is no neutral value, such as for MIN/MAX reductions. Also require
22074 the number of vector elements to be a multiple of the number of
22075 SLP statements when doing variable-length unchained SLP reductions.
22076 Update call to vect_create_epilog_for_reduction.
22077 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22078 and remove initial values.
22079 (duplicate_and_interleave): Make public.
22080 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22081 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22083 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22084 Alan Hayward <alan.hayward@arm.com>
22085 David Sherwood <david.sherwood@arm.com>
22087 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22088 (can_duplicate_and_interleave_p): New function.
22089 (vect_get_and_check_slp_defs): Take the vector of statements
22090 rather than just the current one. Remove excess parentheses.
22091 Restriction rejectinon of vect_constant_def and vect_external_def
22092 for variable-length vectors to boolean types, or types for which
22093 can_duplicate_and_interleave_p is false.
22094 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22095 (duplicate_and_interleave): New function.
22096 (vect_get_constant_vectors): Use gimple_build_vector for
22097 constant-length vectors and suitable variable-length constant
22098 vectors. Use duplicate_and_interleave for other variable-length
22099 vectors. Don't defer the update when inserting new statements.
22101 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22102 Alan Hayward <alan.hayward@arm.com>
22103 David Sherwood <david.sherwood@arm.com>
22105 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22106 min_profitable_iters doesn't go negative.
22108 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22109 Alan Hayward <alan.hayward@arm.com>
22110 David Sherwood <david.sherwood@arm.com>
22112 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22113 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22114 * optabs.def (vec_mask_load_lanes_optab): New optab.
22115 (vec_mask_store_lanes_optab): Likewise.
22116 * internal-fn.def (MASK_LOAD_LANES): New internal function.
22117 (MASK_STORE_LANES): Likewise.
22118 * internal-fn.c (mask_load_lanes_direct): New macro.
22119 (mask_store_lanes_direct): Likewise.
22120 (expand_mask_load_optab_fn): Handle masked operations.
22121 (expand_mask_load_lanes_optab_fn): New macro.
22122 (expand_mask_store_optab_fn): Handle masked operations.
22123 (expand_mask_store_lanes_optab_fn): New macro.
22124 (direct_mask_load_lanes_optab_supported_p): Likewise.
22125 (direct_mask_store_lanes_optab_supported_p): Likewise.
22126 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22128 (vect_load_lanes_supported): Likewise.
22129 * tree-vect-data-refs.c (strip_conversion): New function.
22130 (can_group_stmts_p): Likewise.
22131 (vect_analyze_data_ref_accesses): Use it instead of checking
22132 for a pair of assignments.
22133 (vect_store_lanes_supported): Take a masked_p parameter.
22134 (vect_load_lanes_supported): Likewise.
22135 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22136 vect_store_lanes_supported and vect_load_lanes_supported.
22137 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22138 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22139 parameter. Don't allow gaps for masked accesses.
22140 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
22141 and vect_load_lanes_supported.
22142 (get_load_store_type): Take a masked_p parameter and update
22143 call to get_group_load_store_type.
22144 (vectorizable_store): Update call to get_load_store_type.
22145 Handle IFN_MASK_STORE_LANES.
22146 (vectorizable_load): Update call to get_load_store_type.
22147 Handle IFN_MASK_LOAD_LANES.
22149 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22150 Alan Hayward <alan.hayward@arm.com>
22151 David Sherwood <david.sherwood@arm.com>
22153 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22155 * config/aarch64/aarch64-protos.h
22156 (aarch64_sve_struct_memory_operand_p): Declare.
22157 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22158 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22159 (VPRED, vpred): Handle SVE structure modes.
22160 * config/aarch64/constraints.md (Utx): New constraint.
22161 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22162 (aarch64_sve_struct_nonimmediate_operand): New predicates.
22163 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22164 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22165 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22166 structure modes. Split into pieces after RA.
22167 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22168 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22170 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22171 SVE structure modes.
22172 (aarch64_classify_address): Likewise.
22173 (sizetochar): Move earlier in file.
22174 (aarch64_print_operand): Handle SVE register lists.
22175 (aarch64_array_mode): New function.
22176 (aarch64_sve_struct_memory_operand_p): Likewise.
22177 (TARGET_ARRAY_MODE): Redefine.
22179 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22180 Alan Hayward <alan.hayward@arm.com>
22181 David Sherwood <david.sherwood@arm.com>
22183 * target.def (array_mode): New target hook.
22184 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22185 * doc/tm.texi: Regenerate.
22186 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22187 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22188 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22189 targetm.array_mode.
22190 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22193 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22194 Alan Hayward <alan.hayward@arm.com>
22195 David Sherwood <david.sherwood@arm.com>
22197 * fold-const.c (fold_binary_loc): Check the argument types
22198 rather than the result type when testing for a vector operation.
22200 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22202 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22203 * doc/tm.texi: Regenerate.
22205 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22206 Alan Hayward <alan.hayward@arm.com>
22207 David Sherwood <david.sherwood@arm.com>
22209 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22210 (sve): Document new AArch64 extension.
22211 * doc/md.texi (w): Extend the description of the AArch64
22212 constraint to include SVE vectors.
22213 (Upl, Upa): Document new AArch64 predicate constraints.
22214 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22216 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22217 (msve-vector-bits=): New option.
22218 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22219 SVE when these are disabled.
22220 (sve): New extension.
22221 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22222 modes. Adjust their number of units based on aarch64_sve_vg.
22223 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22224 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22225 aarch64_addr_query_type.
22226 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22227 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22228 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22229 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22230 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22231 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22232 (aarch64_simd_imm_zero_p): Delete.
22233 (aarch64_check_zero_based_sve_index_immediate): Declare.
22234 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22235 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22236 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22237 (aarch64_sve_float_mul_immediate_p): Likewise.
22238 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22239 rather than an rtx.
22240 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22241 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22242 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22243 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22244 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22245 (aarch64_regmode_natural_size): Likewise.
22246 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22247 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22249 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22250 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22251 for VG and the SVE predicate registers.
22252 (V_ALIASES): Add a "z"-prefixed alias.
22253 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22254 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22255 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22256 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22257 (REG_CLASS_NAMES): Add entries for them.
22258 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22259 and the predicate registers.
22260 (aarch64_sve_vg): Declare.
22261 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22262 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22263 (REGMODE_NATURAL_SIZE): Define.
22264 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22266 * config/aarch64/aarch64.c: Include cfgrtl.h.
22267 (simd_immediate_info): Add a constructor for series vectors,
22268 and an associated step field.
22269 (aarch64_sve_vg): New variable.
22270 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22271 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22272 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22273 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22274 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22275 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22276 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22277 (aarch64_get_mask_mode): New functions.
22278 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22279 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22280 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22281 predicate modes and predicate registers. Explicitly restrict
22282 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22283 to store a vector mode if it is recognized by
22284 aarch64_classify_vector_mode.
22285 (aarch64_regmode_natural_size): New function.
22286 (aarch64_hard_regno_caller_save_mode): Return the original mode
22288 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22289 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22290 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22291 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22293 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22294 does not overlap dest if the function is frame-related. Handle
22296 (aarch64_split_add_offset): New function.
22297 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22298 them aarch64_add_offset.
22299 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22300 and update call to aarch64_sub_sp.
22301 (aarch64_add_cfa_expression): New function.
22302 (aarch64_expand_prologue): Pass extra temporary registers to the
22303 functions above. Handle the case in which we need to emit new
22304 DW_CFA_expressions for registers that were originally saved
22305 relative to the stack pointer, but now have to be expressed
22306 relative to the frame pointer.
22307 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22309 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22310 IP0 and IP1 values for SVE frames.
22311 (aarch64_expand_vec_series): New function.
22312 (aarch64_expand_sve_widened_duplicate): Likewise.
22313 (aarch64_expand_sve_const_vector): Likewise.
22314 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22315 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22316 into the register, rather than emitting a SET directly.
22317 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22318 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22319 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22320 (offset_9bit_signed_scaled_p): New functions.
22321 (aarch64_replicate_bitmask_imm): New function.
22322 (aarch64_bitmask_imm): Use it.
22323 (aarch64_cannot_force_const_mem): Reject expressions involving
22324 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22325 (aarch64_classify_index): Handle SVE indices, by requiring
22326 a plain register index with a scale that matches the element size.
22327 (aarch64_classify_address): Handle SVE addresses. Assert that
22328 the mode of the address is VOIDmode or an integer mode.
22329 Update call to aarch64_classify_symbol.
22330 (aarch64_classify_symbolic_expression): Update call to
22331 aarch64_classify_symbol.
22332 (aarch64_const_vec_all_in_range_p): New function.
22333 (aarch64_print_vector_float_operand): Likewise.
22334 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22335 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22336 and the FP immediates 1.0 and 0.5.
22337 (aarch64_print_address_internal): Handle SVE addresses.
22338 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22339 (aarch64_regno_regclass): Handle predicate registers.
22340 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22342 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22343 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22344 (aarch64_convert_sve_vector_bits): New function.
22345 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22346 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22347 rather than an rtx.
22348 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22349 Handle SVE vector and predicate modes. Accept VL-based constants
22350 that need only one temporary register, and VL offsets that require
22351 no temporary registers.
22352 (aarch64_conditional_register_usage): Mark the predicate registers
22353 as fixed if SVE isn't available.
22354 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22355 Return true for SVE vector and predicate modes.
22356 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22357 rather than an unsigned int. Handle SVE modes.
22358 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22360 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22362 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22363 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22364 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22365 (aarch64_sve_float_mul_immediate_p): New functions.
22366 (aarch64_sve_valid_immediate): New function.
22367 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22368 Explicitly reject structure modes. Check for INDEX constants.
22369 Handle PTRUE and PFALSE constants.
22370 (aarch64_check_zero_based_sve_index_immediate): New function.
22371 (aarch64_simd_imm_zero_p): Delete.
22372 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22373 vector modes. Accept constants in the range of CNT[BHWD].
22374 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22375 ask for an Advanced SIMD mode.
22376 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22377 (aarch64_simd_vector_alignment): Handle SVE predicates.
22378 (aarch64_vectorize_preferred_vector_alignment): New function.
22379 (aarch64_simd_vector_alignment_reachable): Use it instead of
22381 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22382 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22384 (MAX_VECT_LEN): Delete.
22385 (expand_vec_perm_d): Add a vec_flags field.
22386 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22387 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22388 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22390 (aarch64_evpc_rev): Rename to...
22391 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22392 (aarch64_evpc_rev_global): New function.
22393 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22394 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22396 (aarch64_evpc_sve_tbl): New function.
22397 (aarch64_expand_vec_perm_const_1): Update after rename of
22398 aarch64_evpc_rev. Handle SVE permutes too, trying
22399 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22400 than aarch64_evpc_tbl.
22401 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22402 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22403 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22404 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22405 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22406 (aarch64_expand_sve_vcond): New functions.
22407 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22408 of aarch64_vector_mode_p.
22409 (aarch64_dwarf_poly_indeterminate_value): New function.
22410 (aarch64_compute_pressure_classes): Likewise.
22411 (aarch64_can_change_mode_class): Likewise.
22412 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22413 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22414 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22415 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22416 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22417 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22418 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22419 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22421 (Dn, Dl, Dr): Accept const as well as const_vector.
22422 (Dz): Likewise. Compare against CONST0_RTX.
22423 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22424 of "vector" where appropriate.
22425 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22426 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22427 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22428 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22429 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22430 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22431 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22432 (v_int_equiv): Extend to SVE modes.
22433 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22435 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22436 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22437 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22438 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22439 (SVE_COND_FP_CMP): New int iterators.
22440 (perm_hilo): Handle the new unpack unspecs.
22441 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22443 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22444 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22445 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22446 (aarch64_equality_operator, aarch64_constant_vector_operand)
22447 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22448 (aarch64_sve_nonimmediate_operand): Likewise.
22449 (aarch64_sve_general_operand): Likewise.
22450 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22451 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22452 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22453 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22454 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22455 (aarch64_sve_float_arith_immediate): Likewise.
22456 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22457 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22458 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22459 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22460 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22461 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22462 (aarch64_sve_float_arith_operand): Likewise.
22463 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22464 (aarch64_sve_float_mul_operand): Likewise.
22465 (aarch64_sve_vec_perm_operand): Likewise.
22466 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22467 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22468 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22469 as well as const_vector.
22470 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22471 in file. Use CONST0_RTX and CONSTM1_RTX.
22472 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22473 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22474 Use aarch64_simd_imm_zero.
22475 * config/aarch64/aarch64-sve.md: New file.
22476 * config/aarch64/aarch64.md: Include it.
22477 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22478 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22479 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22480 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22481 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22482 (sve): New attribute.
22483 (enabled): Disable instructions with the sve attribute unless
22485 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22486 aarch64_expand_mov_immediate.
22487 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22488 CNT[BHSD] immediates.
22489 (movti): Split CONST_POLY_INT moves into two halves.
22490 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22491 Split additions that need a temporary here if the destination
22492 is the stack pointer.
22493 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22494 (*add<mode>3_poly_1): New instruction.
22495 (set_clobber_cc): New expander.
22497 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22499 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22500 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22501 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22502 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22503 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22504 Change innermode from fixed_mode_size to machine_mode.
22505 (simplify_subreg): Update call accordingly. Handle a constant-sized
22506 subreg of a variable-length CONST_VECTOR.
22508 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22509 Alan Hayward <alan.hayward@arm.com>
22510 David Sherwood <david.sherwood@arm.com>
22512 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22513 (add_offset_to_base): New function, split out from...
22514 (create_mem_ref): ...here. When handling a scale other than 1,
22515 check first whether the address is valid without the offset.
22516 Add it into the base if so, leaving the index and scale as-is.
22518 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22521 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22522 fold_for_warn before checking if arg2 is INTEGER_CST.
22524 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22526 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22527 (store_multiple_operation): Delete.
22528 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22529 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22530 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22531 guarded by TARGET_STRING.
22532 (rs6000_output_load_multiple): Delete.
22533 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22534 OPTION_MASK_STRING / TARGET_STRING handling.
22535 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22536 (const rs6000_opt_masks) <"string">: Change mask to 0.
22537 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22538 (MASK_STRING): Delete.
22539 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22541 (load_multiple): Delete.
22548 (store_multiple): Delete.
22555 (movmemsi_8reg): Delete.
22556 (corresponding unnamed define_insn): Delete.
22557 (movmemsi_6reg): Delete.
22558 (corresponding unnamed define_insn): Delete.
22559 (movmemsi_4reg): Delete.
22560 (corresponding unnamed define_insn): Delete.
22561 (movmemsi_2reg): Delete.
22562 (corresponding unnamed define_insn): Delete.
22563 (movmemsi_1reg): Delete.
22564 (corresponding unnamed define_insn): Delete.
22565 * config/rs6000/rs6000.opt (mno-string): New.
22566 (mstring): Replace by deprecation warning stub.
22567 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22569 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22571 * regrename.c (regrename_do_replace): If replacing the same
22572 reg multiple times, try to reuse last created gen_raw_REG.
22575 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22576 main to workaround a bug in GDB.
22578 2018-01-12 Tom de Vries <tom@codesourcery.com>
22581 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22583 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22585 PR rtl-optimization/80481
22586 * ira-color.c (get_cap_member): New function.
22587 (allocnos_conflict_by_live_ranges_p): Use it.
22588 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22589 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22591 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22594 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22595 (*saddl_se_1): Ditto.
22596 (*ssubsi_1): Ditto.
22597 (*ssubl_se_1): Ditto.
22599 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22601 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22602 rather than wi::to_widest for DR_INITs.
22603 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22604 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22605 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22607 (vect_analyze_group_access_1): Note that here.
22609 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22611 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22612 polynomial type sizes.
22614 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22616 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22617 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22618 (gimple_add_tmp_var): Likewise.
22620 2018-01-12 Martin Liska <mliska@suse.cz>
22622 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22623 (gimple_alloc_sizes): Likewise.
22624 (dump_gimple_statistics): Use PRIu64 in printf format.
22625 * gimple.h: Change uint64_t to int.
22627 2018-01-12 Martin Liska <mliska@suse.cz>
22629 * tree-core.h: Use uint64_t instead of int.
22630 * tree.c (tree_node_counts): Likewise.
22631 (tree_node_sizes): Likewise.
22632 (dump_tree_statistics): Use PRIu64 in printf format.
22634 2018-01-12 Martin Liska <mliska@suse.cz>
22636 * Makefile.in: As qsort_chk is implemented in vec.c, add
22637 vec.o to linkage of gencfn-macros.
22638 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22639 passing the info to record_node_allocation_statistics.
22640 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22642 * ggc-common.c (struct ggc_usage): Add operator== and use
22643 it in operator< and compare function.
22644 * mem-stats.h (struct mem_usage): Likewise.
22645 * vec.c (struct vec_usage): Remove operator< and compare
22646 function. Can be simply inherited.
22648 2018-01-12 Martin Jambor <mjambor@suse.cz>
22651 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22652 * tree-ssa-math-opts.c: Include domwalk.h.
22653 (convert_mult_to_fma_1): New function.
22654 (fma_transformation_info): New type.
22655 (fma_deferring_state): Likewise.
22656 (cancel_fma_deferring): New function.
22657 (result_of_phi): Likewise.
22658 (last_fma_candidate_feeds_initial_phi): Likewise.
22659 (convert_mult_to_fma): Added deferring logic, split actual
22660 transformation to convert_mult_to_fma_1.
22661 (math_opts_dom_walker): New type.
22662 (math_opts_dom_walker::after_dom_children): New method, body moved
22663 here from pass_optimize_widening_mul::execute, added deferring logic
22665 (pass_optimize_widening_mul::execute): Moved most of code to
22666 math_opts_dom_walker::after_dom_children.
22667 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22668 * config/i386/i386.c (ix86_option_override_internal): Added
22669 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22671 2018-01-12 Richard Biener <rguenther@suse.de>
22674 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22675 inline instance vars.
22677 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22680 * config/rx/rx.c (rx_is_restricted_memory_address):
22681 Handle SUBREG case.
22683 2018-01-12 Richard Biener <rguenther@suse.de>
22685 PR tree-optimization/80846
22686 * target.def (split_reduction): New target hook.
22687 * targhooks.c (default_split_reduction): New function.
22688 * targhooks.h (default_split_reduction): Declare.
22689 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22690 target requests first reduce vectors by combining low and high
22692 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22693 (get_vectype_for_scalar_type_and_size): Export.
22694 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22695 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22696 * doc/tm.texi: Regenerate.
22697 * config/i386/i386.c (ix86_split_reduction): Implement
22698 TARGET_VECTORIZE_SPLIT_REDUCTION.
22700 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22703 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22704 in PIC mode except for TARGET_VXWORKS_RTP.
22705 * config/sparc/sparc.c: Include cfgrtl.h.
22706 (TARGET_INIT_PIC_REG): Define.
22707 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22708 (sparc_pic_register_p): New predicate.
22709 (sparc_legitimate_address_p): Use it.
22710 (sparc_legitimize_pic_address): Likewise.
22711 (sparc_delegitimize_address): Likewise.
22712 (sparc_mode_dependent_address_p): Likewise.
22713 (gen_load_pcrel_sym): Remove 4th parameter.
22714 (load_got_register): Adjust call to above. Remove obsolete stuff.
22715 (sparc_expand_prologue): Do not call load_got_register here.
22716 (sparc_flat_expand_prologue): Likewise.
22717 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22718 (sparc_use_pseudo_pic_reg): New function.
22719 (sparc_init_pic_reg): Likewise.
22720 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22721 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22723 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22725 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22726 Add item for branch_cost.
22728 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22730 PR rtl-optimization/83565
22731 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22732 not extend the result to a larger mode for rotate operations.
22733 (num_sign_bit_copies1): Likewise.
22735 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22738 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22740 Use values-Xc.o for -pedantic.
22741 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22743 2018-01-12 Martin Liska <mliska@suse.cz>
22746 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22748 (possible_polymorphic_call_targets): Use it.
22749 (ipa_devirt): Likewise.
22751 2018-01-12 Martin Liska <mliska@suse.cz>
22753 * profile-count.h (enum profile_quality): Use 0 as invalid
22754 enum value of profile_quality.
22756 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22758 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22759 -mext-string options.
22761 2018-01-12 Richard Biener <rguenther@suse.de>
22763 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22764 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22765 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22767 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22769 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22771 * configure.ac (--with-long-double-format): Add support for the
22772 configuration option to change the default long double format on
22774 * config.gcc (powerpc*-linux*-*): Likewise.
22775 * configure: Regenerate.
22776 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22777 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22778 used without modification.
22780 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22782 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22783 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22784 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22785 MISC_BUILTIN_SPEC_BARRIER.
22786 (rs6000_init_builtins): Likewise.
22787 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22789 (speculation_barrier): New define_insn.
22790 * doc/extend.texi: Document __builtin_speculation_barrier.
22792 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22795 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22796 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22797 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22799 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22800 integral modes instead of "ss" and "sd".
22801 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22802 vectors with 32-bit and 64-bit elements.
22803 (vecdupssescalarmodesuffix): New mode attribute.
22804 (vec_dup<mode>): Use it.
22806 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22809 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22810 frame if argument is passed on stack.
22812 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22815 * ree.c (combine_reaching_defs): Optimize also
22816 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22817 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22819 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22821 PR middle-end/83189
22822 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22824 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22826 PR middle-end/83718
22827 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22828 after they are computed.
22830 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22832 PR tree-optimization/83695
22833 * gimple-loop-linterchange.cc
22834 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22835 reset cached scev information after interchange.
22836 (pass_linterchange::execute): Remove call to scev_reset_htab.
22838 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22840 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22841 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22842 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22843 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22844 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22845 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22846 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22847 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22848 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22849 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22850 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22851 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22852 (V_lane_reg): Likewise.
22853 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22855 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22856 (vfmal_lane_low<mode>_intrinsic,
22857 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22858 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22859 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22860 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22861 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22862 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22864 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22866 * config/arm/arm-cpus.in (fp16fml): New feature.
22867 (ALL_SIMD): Add fp16fml.
22868 (armv8.2-a): Add fp16fml as an option.
22869 (armv8.3-a): Likewise.
22870 (armv8.4-a): Add fp16fml as part of fp16.
22871 * config/arm/arm.h (TARGET_FP16FML): Define.
22872 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22874 * config/arm/arm-modes.def (V2HF): Define.
22875 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22876 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22877 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22878 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22879 vfmsl_low, vfmsl_high): New set of builtins.
22880 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22881 (vfml_op): New code attribute.
22882 (VFMLHALVES): New int iterator.
22883 (VFML, VFMLSEL): New mode attributes.
22884 (V_reg): Define mapping for V2HF.
22885 (V_hi, V_lo): New mode attributes.
22886 (VF_constraint): Likewise.
22887 (vfml_half, vfml_half_selector): New int attributes.
22888 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22890 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22891 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22893 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22894 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22895 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22896 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22898 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22899 Document new effective target and option set.
22901 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22903 * config/arm/arm-cpus.in (armv8_4): New feature.
22904 (ARMv8_4a): New fgroup.
22905 (armv8.4-a): New arch.
22906 * config/arm/arm-tables.opt: Regenerate.
22907 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22908 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22909 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22910 Add matching rules for -march=armv8.4-a and extensions.
22911 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22913 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22916 * config/rx/rx.md (BW): New mode attribute.
22917 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22919 2018-01-11 Richard Biener <rguenther@suse.de>
22921 PR tree-optimization/83435
22922 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22923 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22924 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22926 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22927 Alan Hayward <alan.hayward@arm.com>
22928 David Sherwood <david.sherwood@arm.com>
22930 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22932 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22933 (aarch64_print_address_internal): Use it to check for a zero offset.
22935 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22936 Alan Hayward <alan.hayward@arm.com>
22937 David Sherwood <david.sherwood@arm.com>
22939 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22940 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22941 Return a poly_int64 rather than a HOST_WIDE_INT.
22942 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22943 rather than a HOST_WIDE_INT.
22944 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22945 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22946 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22947 final_offset from HOST_WIDE_INT to poly_int64.
22948 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22949 to_constant when getting the number of units in an Advanced SIMD
22951 (aarch64_builtin_vectorized_function): Check for a constant number
22953 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22955 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22956 attribute instead of GET_MODE_NUNITS.
22957 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22958 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22959 GET_MODE_SIZE for fixed-size registers.
22960 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22961 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22962 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22963 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22964 (aarch64_print_operand, aarch64_print_address_internal)
22965 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22966 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22967 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22968 Handle polynomial GET_MODE_SIZE.
22969 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22970 wider than SImode without modification.
22971 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22972 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22973 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22974 passing and returning SVE modes.
22975 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22976 rather than GEN_INT.
22977 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22978 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22979 (aarch64_allocate_and_probe_stack_space): Likewise.
22980 (aarch64_layout_frame): Cope with polynomial offsets.
22981 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22982 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22983 polynomial offsets.
22984 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22985 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22986 poly_int64 rather than a HOST_WIDE_INT.
22987 (aarch64_get_separate_components, aarch64_process_components)
22988 (aarch64_expand_prologue, aarch64_expand_epilogue)
22989 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22990 (aarch64_anchor_offset): New function, split out from...
22991 (aarch64_legitimize_address): ...here.
22992 (aarch64_builtin_vectorization_cost): Handle polynomial
22993 TYPE_VECTOR_SUBPARTS.
22994 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22996 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22997 number of elements from the PARALLEL rather than the mode.
22998 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22999 rather than GET_MODE_BITSIZE.
23000 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23001 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23002 (aarch64_expand_vec_perm_const_1): Handle polynomial
23003 d->perm.length () and d->perm elements.
23004 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
23005 Apply to_constant to d->perm elements.
23006 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23007 polynomial CONST_VECTOR_NUNITS.
23008 (aarch64_move_pointer): Take amount as a poly_int64 rather
23010 (aarch64_progress_pointer): Avoid temporary variable.
23011 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23012 the mode attribute instead of GET_MODE.
23014 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23015 Alan Hayward <alan.hayward@arm.com>
23016 David Sherwood <david.sherwood@arm.com>
23018 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23019 x exists before using it.
23020 (aarch64_add_constant_internal): Rename to...
23021 (aarch64_add_offset_1): ...this. Replace regnum with separate
23022 src and dest rtxes. Handle the case in which they're different,
23023 including when the offset is zero. Replace scratchreg with an rtx.
23024 Use 2 additions if there is no spare register into which we can
23025 move a 16-bit constant.
23026 (aarch64_add_constant): Delete.
23027 (aarch64_add_offset): Replace reg with separate src and dest
23028 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
23029 Use aarch64_add_offset_1.
23030 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23031 an rtx rather than an int. Take the delta as a poly_int64
23032 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
23033 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23034 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23035 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23036 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23037 and aarch64_add_sp.
23038 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23039 aarch64_add_constant.
23041 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23043 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23044 Use scalar_float_mode.
23046 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23048 * config/aarch64/aarch64-simd.md
23049 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23050 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23051 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23052 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23053 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23054 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23055 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23056 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23057 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23058 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23060 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23063 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23064 targ_options->x_arm_arch_string is non NULL.
23066 2018-01-11 Tamar Christina <tamar.christina@arm.com>
23068 * config/aarch64/aarch64.h
23069 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
23071 2018-01-11 Sudakshina Das <sudi.das@arm.com>
23074 * expmed.c (emit_store_flag_force): Swap if const op0
23075 and change VOIDmode to mode of op0.
23077 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23079 PR rtl-optimization/83761
23080 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23081 than bytes to mode_for_size.
23083 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23085 PR middle-end/83189
23086 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23087 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23090 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23092 PR middle-end/83575
23093 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23094 when in layout mode.
23095 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23096 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23099 2018-01-10 Michael Collison <michael.collison@arm.com>
23101 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23102 * config/aarch64/aarch64-option-extension.def: Add
23103 AARCH64_OPT_EXTENSION of 'fp16fml'.
23104 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23105 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23106 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23107 * config/aarch64/constraints.md (Ui7): New constraint.
23108 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23109 (VFMLA_SEL_W): Ditto.
23112 (VFMLA16_LOW): New int iterator.
23113 (VFMLA16_HIGH): Ditto.
23114 (UNSPEC_FMLAL): New unspec.
23115 (UNSPEC_FMLSL): Ditto.
23116 (UNSPEC_FMLAL2): Ditto.
23117 (UNSPEC_FMLSL2): Ditto.
23118 (f16mac): New code attribute.
23119 * config/aarch64/aarch64-simd-builtins.def
23120 (aarch64_fmlal_lowv2sf): Ditto.
23121 (aarch64_fmlsl_lowv2sf): Ditto.
23122 (aarch64_fmlalq_lowv4sf): Ditto.
23123 (aarch64_fmlslq_lowv4sf): Ditto.
23124 (aarch64_fmlal_highv2sf): Ditto.
23125 (aarch64_fmlsl_highv2sf): Ditto.
23126 (aarch64_fmlalq_highv4sf): Ditto.
23127 (aarch64_fmlslq_highv4sf): Ditto.
23128 (aarch64_fmlal_lane_lowv2sf): Ditto.
23129 (aarch64_fmlsl_lane_lowv2sf): Ditto.
23130 (aarch64_fmlal_laneq_lowv2sf): Ditto.
23131 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23132 (aarch64_fmlalq_lane_lowv4sf): Ditto.
23133 (aarch64_fmlsl_lane_lowv4sf): Ditto.
23134 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23135 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23136 (aarch64_fmlal_lane_highv2sf): Ditto.
23137 (aarch64_fmlsl_lane_highv2sf): Ditto.
23138 (aarch64_fmlal_laneq_highv2sf): Ditto.
23139 (aarch64_fmlsl_laneq_highv2sf): Ditto.
23140 (aarch64_fmlalq_lane_highv4sf): Ditto.
23141 (aarch64_fmlsl_lane_highv4sf): Ditto.
23142 (aarch64_fmlalq_laneq_highv4sf): Ditto.
23143 (aarch64_fmlsl_laneq_highv4sf): Ditto.
23144 * config/aarch64/aarch64-simd.md:
23145 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23146 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23147 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23148 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23149 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23150 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23151 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23152 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23153 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23154 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23155 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23156 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23157 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23158 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23159 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23160 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23161 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23162 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23163 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23164 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23165 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23166 (vfmlsl_low_u32): Ditto.
23167 (vfmlalq_low_u32): Ditto.
23168 (vfmlslq_low_u32): Ditto.
23169 (vfmlal_high_u32): Ditto.
23170 (vfmlsl_high_u32): Ditto.
23171 (vfmlalq_high_u32): Ditto.
23172 (vfmlslq_high_u32): Ditto.
23173 (vfmlal_lane_low_u32): Ditto.
23174 (vfmlsl_lane_low_u32): Ditto.
23175 (vfmlal_laneq_low_u32): Ditto.
23176 (vfmlsl_laneq_low_u32): Ditto.
23177 (vfmlalq_lane_low_u32): Ditto.
23178 (vfmlslq_lane_low_u32): Ditto.
23179 (vfmlalq_laneq_low_u32): Ditto.
23180 (vfmlslq_laneq_low_u32): Ditto.
23181 (vfmlal_lane_high_u32): Ditto.
23182 (vfmlsl_lane_high_u32): Ditto.
23183 (vfmlal_laneq_high_u32): Ditto.
23184 (vfmlsl_laneq_high_u32): Ditto.
23185 (vfmlalq_lane_high_u32): Ditto.
23186 (vfmlslq_lane_high_u32): Ditto.
23187 (vfmlalq_laneq_high_u32): Ditto.
23188 (vfmlslq_laneq_high_u32): Ditto.
23189 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23190 (AARCH64_FL_FOR_ARCH8_4): New.
23191 (AARCH64_ISA_F16FML): New ISA flag.
23192 (TARGET_F16FML): New feature flag for fp16fml.
23193 (doc/invoke.texi): Document new fp16fml option.
23195 2018-01-10 Michael Collison <michael.collison@arm.com>
23197 * config/aarch64/aarch64-builtins.c:
23198 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23199 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23200 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23201 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23202 (AARCH64_ISA_SHA3): New ISA flag.
23203 (TARGET_SHA3): New feature flag for sha3.
23204 * config/aarch64/iterators.md (sha512_op): New int attribute.
23205 (CRYPTO_SHA512): New int iterator.
23206 (UNSPEC_SHA512H): New unspec.
23207 (UNSPEC_SHA512H2): Ditto.
23208 (UNSPEC_SHA512SU0): Ditto.
23209 (UNSPEC_SHA512SU1): Ditto.
23210 * config/aarch64/aarch64-simd-builtins.def
23211 (aarch64_crypto_sha512hqv2di): New builtin.
23212 (aarch64_crypto_sha512h2qv2di): Ditto.
23213 (aarch64_crypto_sha512su0qv2di): Ditto.
23214 (aarch64_crypto_sha512su1qv2di): Ditto.
23215 (aarch64_eor3qv8hi): Ditto.
23216 (aarch64_rax1qv2di): Ditto.
23217 (aarch64_xarqv2di): Ditto.
23218 (aarch64_bcaxqv8hi): Ditto.
23219 * config/aarch64/aarch64-simd.md:
23220 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23221 (aarch64_crypto_sha512su0qv2di): Ditto.
23222 (aarch64_crypto_sha512su1qv2di): Ditto.
23223 (aarch64_eor3qv8hi): Ditto.
23224 (aarch64_rax1qv2di): Ditto.
23225 (aarch64_xarqv2di): Ditto.
23226 (aarch64_bcaxqv8hi): Ditto.
23227 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23228 (vsha512h2q_u64): Ditto.
23229 (vsha512su0q_u64): Ditto.
23230 (vsha512su1q_u64): Ditto.
23231 (veor3q_u16): Ditto.
23232 (vrax1q_u64): Ditto.
23233 (vxarq_u64): Ditto.
23234 (vbcaxq_u16): Ditto.
23235 * config/arm/types.md (crypto_sha512): New type attribute.
23236 (crypto_sha3): Ditto.
23237 (doc/invoke.texi): Document new sha3 option.
23239 2018-01-10 Michael Collison <michael.collison@arm.com>
23241 * config/aarch64/aarch64-builtins.c:
23242 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23243 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23244 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23245 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23246 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23247 (AARCH64_ISA_SM4): New ISA flag.
23248 (TARGET_SM4): New feature flag for sm4.
23249 * config/aarch64/aarch64-simd-builtins.def
23250 (aarch64_sm3ss1qv4si): Ditto.
23251 (aarch64_sm3tt1aq4si): Ditto.
23252 (aarch64_sm3tt1bq4si): Ditto.
23253 (aarch64_sm3tt2aq4si): Ditto.
23254 (aarch64_sm3tt2bq4si): Ditto.
23255 (aarch64_sm3partw1qv4si): Ditto.
23256 (aarch64_sm3partw2qv4si): Ditto.
23257 (aarch64_sm4eqv4si): Ditto.
23258 (aarch64_sm4ekeyqv4si): Ditto.
23259 * config/aarch64/aarch64-simd.md:
23260 (aarch64_sm3ss1qv4si): Ditto.
23261 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23262 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23263 (aarch64_sm4eqv4si): Ditto.
23264 (aarch64_sm4ekeyqv4si): Ditto.
23265 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23266 (sm3part_op): Ditto.
23267 (CRYPTO_SM3TT): Ditto.
23268 (CRYPTO_SM3PART): Ditto.
23269 (UNSPEC_SM3SS1): New unspec.
23270 (UNSPEC_SM3TT1A): Ditto.
23271 (UNSPEC_SM3TT1B): Ditto.
23272 (UNSPEC_SM3TT2A): Ditto.
23273 (UNSPEC_SM3TT2B): Ditto.
23274 (UNSPEC_SM3PARTW1): Ditto.
23275 (UNSPEC_SM3PARTW2): Ditto.
23276 (UNSPEC_SM4E): Ditto.
23277 (UNSPEC_SM4EKEY): Ditto.
23278 * config/aarch64/constraints.md (Ui2): New constraint.
23279 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23280 * config/arm/types.md (crypto_sm3): New type attribute.
23281 (crypto_sm4): Ditto.
23282 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23283 (vsm3tt1aq_u32): Ditto.
23284 (vsm3tt1bq_u32): Ditto.
23285 (vsm3tt2aq_u32): Ditto.
23286 (vsm3tt2bq_u32): Ditto.
23287 (vsm3partw1q_u32): Ditto.
23288 (vsm3partw2q_u32): Ditto.
23289 (vsm4eq_u32): Ditto.
23290 (vsm4ekeyq_u32): Ditto.
23291 (doc/invoke.texi): Document new sm4 option.
23293 2018-01-10 Michael Collison <michael.collison@arm.com>
23295 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23296 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23297 (AARCH64_FL_FOR_ARCH8_4): New.
23298 (AARCH64_FL_V8_4): New flag.
23299 (doc/invoke.texi): Document new armv8.4-a option.
23301 2018-01-10 Michael Collison <michael.collison@arm.com>
23303 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23304 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23305 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23306 * config/aarch64/aarch64-option-extension.def: Add
23307 AARCH64_OPT_EXTENSION of 'sha2'.
23308 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23309 (crypto): Disable sha2 and aes if crypto disabled.
23310 (crypto): Enable aes and sha2 if enabled.
23311 (simd): Disable sha2 and aes if simd disabled.
23312 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23314 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23315 (TARGET_SHA2): New feature flag for sha2.
23316 (TARGET_AES): New feature flag for aes.
23317 * config/aarch64/aarch64-simd.md:
23318 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23319 conditional on TARGET_AES.
23320 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23321 (aarch64_crypto_sha1hsi): Make pattern conditional
23323 (aarch64_crypto_sha1hv4si): Ditto.
23324 (aarch64_be_crypto_sha1hv4si): Ditto.
23325 (aarch64_crypto_sha1su1v4si): Ditto.
23326 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23327 (aarch64_crypto_sha1su0v4si): Ditto.
23328 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23329 (aarch64_crypto_sha256su0v4si): Ditto.
23330 (aarch64_crypto_sha256su1v4si): Ditto.
23331 (doc/invoke.texi): Document new aes and sha2 options.
23333 2018-01-10 Martin Sebor <msebor@redhat.com>
23335 PR tree-optimization/83781
23336 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23339 2018-01-11 Martin Sebor <msebor@gmail.com>
23340 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23342 PR tree-optimization/83501
23343 PR tree-optimization/81703
23345 * tree-ssa-strlen.c (get_string_cst): Rename...
23346 (get_string_len): ...to this. Handle global constants.
23347 (handle_char_store): Adjust.
23349 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23350 Jim Wilson <jimw@sifive.com>
23352 * config/riscv/riscv-protos.h (riscv_output_return): New.
23353 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23354 (riscv_attribute_table, riscv_output_return),
23355 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23356 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23357 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23359 (riscv_expand_prologue): Add early return for naked function.
23360 (riscv_expand_epilogue): Likewise.
23361 (riscv_function_ok_for_sibcall): Return false for naked function.
23362 (riscv_set_current_function): New.
23363 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23364 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23365 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23366 * doc/extend.texi (RISC-V Function Attributes): New.
23368 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23370 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23371 check for 128-bit long double before checking TCmode.
23372 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23373 128-bit long doubles before checking TFmode or TCmode.
23374 (FLOAT128_IBM_P): Likewise.
23376 2018-01-10 Martin Sebor <msebor@redhat.com>
23378 PR tree-optimization/83671
23379 * builtins.c (c_strlen): Unconditionally return zero for the empty
23381 Use -Warray-bounds for warnings.
23382 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23383 for non-constant array indices with COMPONENT_REF, arrays of
23384 arrays, and pointers to arrays.
23385 (gimple_fold_builtin_strlen): Determine and set length range for
23386 non-constant character arrays.
23388 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23390 PR middle-end/81897
23391 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23394 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23396 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23398 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23401 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23402 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23403 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23404 indexed_or_indirect_operand predicate.
23405 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23406 (*vsx_le_perm_load_v8hi): Likewise.
23407 (*vsx_le_perm_load_v16qi): Likewise.
23408 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23409 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23410 (*vsx_le_perm_store_v8hi): Likewise.
23411 (*vsx_le_perm_store_v16qi): Likewise.
23412 (eight unnamed splitters): Likewise.
23414 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23416 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23417 * config/rs6000/emmintrin.h: Likewise.
23418 * config/rs6000/mmintrin.h: Likewise.
23419 * config/rs6000/xmmintrin.h: Likewise.
23421 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23424 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23426 * tree.c (tree_nop_conversion): Return true for location wrapper
23428 (maybe_wrap_with_location): New function.
23429 (selftest::check_strip_nops): New function.
23430 (selftest::test_location_wrappers): New function.
23431 (selftest::tree_c_tests): Call it.
23432 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23433 (maybe_wrap_with_location): New decl.
23434 (EXPR_LOCATION_WRAPPER_P): New macro.
23435 (location_wrapper_p): New inline function.
23436 (tree_strip_any_location_wrapper): New inline function.
23438 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23441 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23442 stack_realign_offset for the largest alignment of stack slot
23444 (ix86_find_max_used_stack_alignment): New function.
23445 (ix86_finalize_stack_frame_flags): Use it. Set
23446 max_used_stack_alignment if we don't realign stack.
23447 * config/i386/i386.h (machine_function): Add
23448 max_used_stack_alignment.
23450 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23452 * config/arm/arm.opt (-mbranch-cost): New option.
23453 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23456 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23459 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23460 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23462 2018-01-10 Richard Biener <rguenther@suse.de>
23465 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23466 early out so it also covers the case where we have a non-NULL
23469 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23471 PR tree-optimization/83753
23472 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23473 for non-strided grouped accesses if the number of elements is 1.
23475 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23478 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23479 * i386.h (TARGET_USE_GATHER): Define.
23480 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23482 2018-01-10 Martin Liska <mliska@suse.cz>
23485 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23486 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23488 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23489 CLEANUP_NO_PARTITIONING is not set.
23491 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23493 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23494 for vectors, as a partial revert of r254296.
23495 * rtl.h (const_vec_p): Delete.
23496 (const_vec_duplicate_p): Don't test for vector CONSTs.
23497 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23498 * expmed.c (make_tree): Likewise.
23501 * common.md (E, F): Use CONSTANT_P instead of checking for
23503 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23504 checking for CONST_VECTOR.
23506 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23508 PR middle-end/83575
23509 * predict.c (force_edge_cold): Handle in more sane way edges
23510 with no prediction.
23512 2018-01-09 Carl Love <cel@us.ibm.com>
23514 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23516 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23517 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23518 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23519 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23520 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23521 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23522 * config/rs6000/rs6000-protos.h: Add extern defition for
23523 rs6000_generate_float2_double_code.
23524 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23526 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23527 (float2_v2df): Add define_expand.
23529 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23532 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23533 op_mode in the force_to_mode call.
23535 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23537 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23538 instead of checking each element individually.
23539 (aarch64_evpc_uzp): Likewise.
23540 (aarch64_evpc_zip): Likewise.
23541 (aarch64_evpc_ext): Likewise.
23542 (aarch64_evpc_rev): Likewise.
23543 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23544 instead of checking each element individually. Return true without
23546 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23547 whether all selected elements come from the same input, instead of
23548 checking each element individually. Remove calls to gen_rtx_REG,
23549 start_sequence and end_sequence and instead assert that no rtl is
23552 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23554 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23555 order of HIGH and CONST checks.
23557 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23559 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23560 if the destination isn't an SSA_NAME.
23562 2018-01-09 Richard Biener <rguenther@suse.de>
23564 PR tree-optimization/83668
23565 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23567 (canonicalize_loop_form): ... here, renamed from ...
23568 (canonicalize_loop_closed_ssa_form): ... this and amended to
23569 swap successor edges for loop exit blocks to make us use
23570 the RPO order we need for initial schedule generation.
23572 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23574 PR tree-optimization/64811
23575 * match.pd: When optimizing comparisons with Inf, avoid
23576 introducing or losing exceptions from comparisons with NaN.
23578 2018-01-09 Martin Liska <mliska@suse.cz>
23581 * asan.c (shadow_mem_size): Add gcc_assert.
23583 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23585 Don't save registers in main().
23588 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23589 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23590 * config/avr/avr.c (avr_set_current_function): Don't error if
23591 naked, OS_task or OS_main are specified at the same time.
23592 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23594 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23596 * common/config/avr/avr-common.c (avr_option_optimization_table):
23597 Switch on -mmain-is-OS_task for optimizing compilations.
23599 2018-01-09 Richard Biener <rguenther@suse.de>
23601 PR tree-optimization/83572
23602 * graphite.c: Include cfganal.h.
23603 (graphite_transform_loops): Connect infinite loops to exit
23604 and remove fake edges at the end.
23606 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23608 * ipa-inline.c (edge_badness): Revert accidental checkin.
23610 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23613 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23614 symbols; not inline clones.
23616 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23619 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23620 hard registers. Formatting fixes.
23622 PR preprocessor/83722
23623 * gcc.c (try_generate_repro): Pass
23624 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23625 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23628 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23629 Kito Cheng <kito.cheng@gmail.com>
23631 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23632 (riscv_leaf_function_p): Delete.
23633 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23635 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23637 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23639 (do_ifelse): New function.
23640 (do_isel): New function.
23641 (do_sub3): New function.
23642 (do_add3): New function.
23643 (do_load_mask_compare): New function.
23644 (do_overlap_load_compare): New function.
23645 (expand_compare_loop): New function.
23646 (expand_block_compare): Call expand_compare_loop() when appropriate.
23647 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23648 option description.
23649 (-mblock-compare-inline-loop-limit): New option.
23651 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23654 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23655 Reverse order of second and third operands in first alternative.
23656 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23657 of first and second elements in UNSPEC_VPERMR vector.
23658 (altivec_expand_vec_perm_le): Likewise.
23660 2018-01-08 Jeff Law <law@redhat.com>
23662 PR rtl-optimizatin/81308
23663 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23664 (process_switch): If group_case_labels makes a change, then set
23666 (pass_convert_switch::execute): If a switch is converted, then
23667 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23669 PR rtl-optimization/81308
23670 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23673 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23675 PR target/83663 - Revert r255946
23676 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23677 generation for cases where splatting a value is not useful.
23678 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23679 across a vec_duplicate and a paradoxical subreg forming a vector
23680 mode to a vec_concat.
23682 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23684 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23685 -march=armv8.3-a variants.
23686 * config/arm/t-multilib: Likewise.
23687 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23689 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23691 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23693 (cceq_ior_compare_complement): Give it a name so I can use it, and
23694 change boolean_or_operator predicate to boolean_operator so it can
23695 be used to generate a crand.
23696 (eqne): New code iterator.
23697 (bd/bd_neg): New code_attrs.
23698 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23699 a single define_insn.
23700 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23701 decrement (bdnzt/bdnzf/bdzt/bdzf).
23702 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23703 with the new names of the branch decrement patterns, and added the
23704 names of the branch decrement conditional patterns.
23706 2018-01-08 Richard Biener <rguenther@suse.de>
23708 PR tree-optimization/83563
23709 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23712 2018-01-08 Richard Biener <rguenther@suse.de>
23714 PR middle-end/83713
23715 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23717 2018-01-08 Richard Biener <rguenther@suse.de>
23719 PR tree-optimization/83685
23720 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23721 references to abnormals.
23723 2018-01-08 Richard Biener <rguenther@suse.de>
23726 * dwarf2out.c (output_indirect_strings): Handle empty
23727 skeleton_debug_str_hash.
23728 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23730 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23732 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23733 (emit_store_direct): Likewise.
23734 (arc_trampoline_adjust_address): Likewise.
23735 (arc_asm_trampoline_template): New function.
23736 (arc_initialize_trampoline): Use asm_trampoline_template.
23737 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23738 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23739 * config/arc/arc.md (flush_icache): Delete pattern.
23741 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23743 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23744 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23747 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23750 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23751 by not USED_FOR_TARGET.
23752 (make_pass_resolve_sw_modes): Likewise.
23754 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23756 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23759 2018-01-08 Richard Biener <rguenther@suse.de>
23761 PR middle-end/83580
23762 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23764 2018-01-08 Richard Biener <rguenther@suse.de>
23766 PR middle-end/83517
23767 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23769 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23771 PR middle-end/81897
23772 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23773 basic blocks with a small number of successors.
23774 (convert_control_dep_chain_into_preds): Improve handling of
23776 (dump_predicates): Split apart into...
23777 (dump_pred_chain): ...here...
23778 (dump_pred_info): ...and here.
23779 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23780 (can_chain_union_be_invalidated_p): Improve check for invalidation
23782 (uninit_uses_cannot_happen): Avoid unnecessary if
23783 convert_control_dep_chain_into_preds yielded nothing.
23785 2018-01-06 Martin Sebor <msebor@redhat.com>
23787 PR tree-optimization/83640
23788 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23789 subtracting negative offset from size.
23790 (builtin_access::overlap): Adjust offset bounds of the access to fall
23791 within the size of the object if possible.
23793 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23795 PR rtl-optimization/83699
23796 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23797 extract_bit_field_as_subreg to cases in which the extracted
23798 value is also a vector.
23800 * lra-constraints.c (process_alt_operands): Test for the equivalence
23801 substitutions when detecting a possible reload cycle.
23803 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23806 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23807 by default if flag_selective_schedling{,2}. Formatting fixes.
23809 PR rtl-optimization/83682
23810 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23811 if it has non-VECTOR_MODE element mode.
23812 (vec_duplicate_p): Likewise.
23814 PR middle-end/83694
23815 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23816 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23818 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23821 * config/i386/i386-builtin.def
23822 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23823 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23824 Require also OPTION_MASK_ISA_AVX512F in addition to
23825 OPTION_MASK_ISA_GFNI.
23826 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23827 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23828 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23829 to OPTION_MASK_ISA_GFNI.
23830 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23831 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23832 OPTION_MASK_ISA_AVX512BW.
23833 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23834 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23835 addition to OPTION_MASK_ISA_GFNI.
23836 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23837 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23838 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23839 to OPTION_MASK_ISA_GFNI.
23840 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23841 a requirement for all ISAs rather than any of them with a few
23843 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23845 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23846 bitmasks to be enabled with 3 exceptions, instead of requiring any
23847 enabled ISA with lots of exceptions.
23848 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23849 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23850 Change avx512bw in isa attribute to avx512f.
23851 * config/i386/sgxintrin.h: Add license boilerplate.
23852 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23853 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23854 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23855 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23857 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23858 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23859 temporarily sse2 rather than sse if not enabled already.
23862 * config/i386/sse.md (VI248_VLBW): Rename to ...
23863 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23864 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23865 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23866 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23867 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23868 mode iterator instead of VI248_VLBW.
23870 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23872 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23873 (record_modified): Skip clobbers; add debug output.
23874 (param_change_prob): Use sreal frequencies.
23876 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23878 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23879 punt for user-aligned variables.
23881 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23883 * tree-chrec.c (chrec_contains_symbols): Return true for
23886 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23889 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23890 of (x|y) == x for BICS pattern.
23892 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23894 PR tree-optimization/83605
23895 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23896 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23899 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23901 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23902 * config/epiphany/rtems.h: New file.
23904 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23905 Uros Bizjak <ubizjak@gmail.com>
23908 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23909 QIreg_operand instead of register_operand predicate.
23910 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23911 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23912 comments instead of -fmitigate[-_]rop.
23914 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23917 * cgraphunit.c (symbol_table::compile): Switch to text_section
23918 before calling assembly_start debug hook.
23919 * run-rtl-passes.c (run_rtl_passes): Likewise.
23922 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23924 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23925 range_int_cst_p rather than !symbolic_range_p before calling
23926 extract_range_from_multiplicative_op_1.
23928 2018-01-04 Jeff Law <law@redhat.com>
23930 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23931 redundant test in assertion.
23933 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23935 * doc/rtl.texi: Document machine_mode wrapper classes.
23937 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23939 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23940 using tree_to_uhwi.
23942 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23944 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23945 the VEC_PERM_EXPR fold to fail.
23947 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23950 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23951 to switched_sections.
23953 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23956 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23957 test for d.testing.
23959 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23962 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23963 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23965 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23968 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23969 is BLKmode and bitpos not zero or mode change is needed.
23971 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23974 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23977 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23980 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23981 instead of MULT rtx. Update all corresponding splitters.
23982 (*saddl_se): Ditto.
23983 (*ssub<modesuffix>): Ditto.
23984 (*ssubl_se): Ditto.
23985 (*cmp_sadd_di): Update split patterns.
23986 (*cmp_sadd_si): Ditto.
23987 (*cmp_sadd_sidi): Ditto.
23988 (*cmp_ssub_di): Ditto.
23989 (*cmp_ssub_si): Ditto.
23990 (*cmp_ssub_sidi): Ditto.
23991 * config/alpha/predicates.md (const23_operand): New predicate.
23992 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23993 Look for ASHIFT, not MULT inner operand.
23994 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23996 2018-01-04 Martin Liska <mliska@suse.cz>
23998 PR gcov-profile/83669
23999 * gcov.c (output_intermediate_file): Add version to intermediate
24001 * doc/gcov.texi: Document new field 'version' in intermediate
24002 file format. Fix location of '-k' option of gcov command.
24004 2018-01-04 Martin Liska <mliska@suse.cz>
24007 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24009 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24011 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24013 2018-01-03 Martin Sebor <msebor@redhat.com>
24015 PR tree-optimization/83655
24016 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24017 checking calls with invalid arguments.
24019 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24021 * tree-vect-stmts.c (vect_get_store_rhs): New function.
24022 (vectorizable_mask_load_store): Delete.
24023 (vectorizable_call): Return false for masked loads and stores.
24024 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
24025 instead of gimple_assign_rhs1.
24026 (vectorizable_load): Handle IFN_MASK_LOAD.
24027 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24031 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24033 (vectorizable_mask_load_store): ...here.
24034 (vectorizable_load): ...and here.
24036 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24038 * tree-vect-stmts.c (vect_build_all_ones_mask)
24039 (vect_build_zero_merge_argument): New functions, split out from...
24040 (vectorizable_load): ...here.
24042 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24044 * tree-vect-stmts.c (vect_check_store_rhs): New function,
24046 (vectorizable_mask_load_store): ...here.
24047 (vectorizable_store): ...and here.
24049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24051 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24053 (vectorizable_mask_load_store): ...here.
24055 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24057 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24058 (vect_model_store_cost): Take a vec_load_store_type instead of a
24060 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24061 (vect_model_store_cost): Take a vec_load_store_type instead of a
24063 (vectorizable_mask_load_store): Update accordingly.
24064 (vectorizable_store): Likewise.
24065 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24067 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24069 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24070 IFN_MASK_LOAD calls here rather than...
24071 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24073 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24074 Alan Hayward <alan.hayward@arm.com>
24075 David Sherwood <david.sherwood@arm.com>
24077 * expmed.c (extract_bit_field_1): For vector extracts,
24078 fall back to extract_bit_field_as_subreg if vec_extract
24081 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24082 Alan Hayward <alan.hayward@arm.com>
24083 David Sherwood <david.sherwood@arm.com>
24085 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24086 they are variable or constant sized.
24087 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24088 slots for constant-sized data.
24090 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24091 Alan Hayward <alan.hayward@arm.com>
24092 David Sherwood <david.sherwood@arm.com>
24094 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24095 handling COND_EXPRs with boolean comparisons, try to find a better
24096 basis for the mask type than the boolean itself.
24098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24100 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24101 is calculated and how it can be overridden.
24102 * genmodes.c (max_bitsize_mode_any_mode): New variable.
24103 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24105 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24108 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24109 Alan Hayward <alan.hayward@arm.com>
24110 David Sherwood <david.sherwood@arm.com>
24112 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24113 Remove the mode argument.
24114 (aarch64_simd_valid_immediate): Remove the mode and inverse
24116 * config/aarch64/iterators.md (bitsize): New iterator.
24117 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24118 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24119 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24120 aarch64_simd_valid_immediate.
24121 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24122 (aarch64_reg_or_bic_imm): Likewise.
24123 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24124 with an insn_type enum and msl with a modifier_type enum.
24125 Replace element_width with a scalar_mode. Change the shift
24126 to unsigned int. Add constructors for scalar_float_mode and
24127 scalar_int_mode elements.
24128 (aarch64_vect_float_const_representable_p): Delete.
24129 (aarch64_can_const_movi_rtx_p)
24130 (aarch64_simd_scalar_immediate_valid_for_move)
24131 (aarch64_simd_make_constant): Update call to
24132 aarch64_simd_valid_immediate.
24133 (aarch64_advsimd_valid_immediate_hs): New function.
24134 (aarch64_advsimd_valid_immediate): Likewise.
24135 (aarch64_simd_valid_immediate): Remove mode and inverse
24136 arguments. Rewrite to use the above. Use const_vec_duplicate_p
24137 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24138 and aarch64_float_const_representable_p on the result.
24139 (aarch64_output_simd_mov_immediate): Remove mode argument.
24140 Update call to aarch64_simd_valid_immediate and use of
24141 simd_immediate_info.
24142 (aarch64_output_scalar_simd_mov_immediate): Update call
24145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24146 Alan Hayward <alan.hayward@arm.com>
24147 David Sherwood <david.sherwood@arm.com>
24149 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24150 (mode_nunits): Likewise CONST_MODE_NUNITS.
24151 * machmode.def (ADJUST_NUNITS): Document.
24152 * genmodes.c (mode_data::need_nunits_adj): New field.
24153 (blank_mode): Update accordingly.
24154 (adj_nunits): New variable.
24155 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24157 (emit_mode_size_inline): Set need_bytesize_adj for all modes
24158 listed in adj_nunits.
24159 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24160 listed in adj_nunits. Don't emit case statements for such modes.
24161 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24162 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
24163 nothing if adj_nunits is nonnull.
24164 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24165 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24166 (emit_mode_fbit): Update use of print_maybe_const_decl.
24167 (emit_move_size): Likewise. Treat the array as non-const
24169 (emit_mode_adjustments): Handle adj_nunits.
24171 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24173 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24174 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24175 (VECTOR_MODES): Use it.
24176 (make_vector_modes): Take the prefix as an argument.
24178 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24179 Alan Hayward <alan.hayward@arm.com>
24180 David Sherwood <david.sherwood@arm.com>
24182 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24183 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24184 for MODE_VECTOR_BOOL.
24185 * machmode.def (VECTOR_BOOL_MODE): Document.
24186 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24187 (make_vector_bool_mode): New function.
24188 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24190 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24191 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24193 * stor-layout.c (int_mode_for_mode): Likewise.
24194 * tree.c (build_vector_type_for_mode): Likewise.
24195 * varasm.c (output_constant_pool_2): Likewise.
24196 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24197 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24198 for MODE_VECTOR_BOOL.
24199 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24200 of mode class checks.
24201 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24202 instead of a list of mode class checks.
24203 (expand_vector_scalar_condition): Likewise.
24204 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24207 Alan Hayward <alan.hayward@arm.com>
24208 David Sherwood <david.sherwood@arm.com>
24210 * machmode.h (mode_size): Change from unsigned short to
24212 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24213 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24214 or if measurement_type is not polynomial.
24215 (fixed_size_mode::includes_p): Check for constant-sized modes.
24216 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24217 return a poly_uint16 rather than an unsigned short.
24218 (emit_mode_size): Change the type of mode_size from unsigned short
24219 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24220 (emit_mode_adjustments): Cope with polynomial vector sizes.
24221 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24223 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24225 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24226 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24227 * caller-save.c (setup_save_areas): Likewise.
24228 (replace_reg_with_saved_mem): Likewise.
24229 * calls.c (emit_library_call_value_1): Likewise.
24230 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24231 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24232 (gen_lowpart_for_combine): Likewise.
24233 * convert.c (convert_to_integer_1): Likewise.
24234 * cse.c (equiv_constant, cse_insn): Likewise.
24235 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24236 (cselib_subst_to_values): Likewise.
24237 * dce.c (word_dce_process_block): Likewise.
24238 * df-problems.c (df_word_lr_mark_ref): Likewise.
24239 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24240 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24241 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24242 (rtl_for_decl_location): Likewise.
24243 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24244 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24245 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24246 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24247 (expand_expr_real_1): Likewise.
24248 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24249 (pad_below): Likewise.
24250 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24251 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24252 * ira.c (get_subreg_tracking_sizes): Likewise.
24253 * ira-build.c (ira_create_allocno_objects): Likewise.
24254 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24255 (ira_sort_regnos_for_alter_reg): Likewise.
24256 * ira-costs.c (record_operand_costs): Likewise.
24257 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24258 (resolve_simple_move): Likewise.
24259 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24260 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24261 (lra_constraints): Likewise.
24262 (CONST_POOL_OK_P): Reject variable-sized modes.
24263 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24264 (add_pseudo_to_slot, lra_spill): Likewise.
24265 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24266 * optabs-query.c (get_best_extraction_insn): Likewise.
24267 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24268 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24269 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24270 * recog.c (offsettable_address_addr_space_p): Likewise.
24271 * regcprop.c (maybe_mode_change): Likewise.
24272 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24273 * regrename.c (build_def_use): Likewise.
24274 * regstat.c (dump_reg_info): Likewise.
24275 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24276 (find_reloads, find_reloads_subreg_address): Likewise.
24277 * reload1.c (eliminate_regs_1): Likewise.
24278 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24279 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24280 (simplify_binary_operation_1, simplify_subreg): Likewise.
24281 * targhooks.c (default_function_arg_padding): Likewise.
24282 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24283 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24284 (verify_gimple_assign_ternary): Likewise.
24285 * tree-inline.c (estimate_move_cost): Likewise.
24286 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24287 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24288 (get_address_cost_ainc): Likewise.
24289 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24290 (vect_supportable_dr_alignment): Likewise.
24291 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24292 (vectorizable_reduction): Likewise.
24293 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24294 (vectorizable_operation, vectorizable_load): Likewise.
24295 * tree.c (build_same_sized_truth_vector_type): Likewise.
24296 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24297 * var-tracking.c (emit_note_insn_var_location): Likewise.
24298 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24299 (ADDR_VEC_ALIGN): Likewise.
24301 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24302 Alan Hayward <alan.hayward@arm.com>
24303 David Sherwood <david.sherwood@arm.com>
24305 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24307 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24308 or if measurement_type is polynomial.
24309 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24310 * combine.c (make_extraction): Likewise.
24311 * dse.c (find_shift_sequence): Likewise.
24312 * dwarf2out.c (mem_loc_descriptor): Likewise.
24313 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24314 (extract_bit_field, extract_low_bits): Likewise.
24315 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24316 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24317 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24318 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24319 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24320 * reload.c (find_reloads): Likewise.
24321 * reload1.c (alter_reg): Likewise.
24322 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24323 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24324 * tree-if-conv.c (predicate_mem_writes): Likewise.
24325 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24326 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24327 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24328 * valtrack.c (dead_debug_insert_temp): Likewise.
24329 * varasm.c (mergeable_constant_section): Likewise.
24330 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24333 Alan Hayward <alan.hayward@arm.com>
24334 David Sherwood <david.sherwood@arm.com>
24336 * expr.c (expand_assignment): Cope with polynomial mode sizes
24337 when assigning to a CONCAT.
24339 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24340 Alan Hayward <alan.hayward@arm.com>
24341 David Sherwood <david.sherwood@arm.com>
24343 * machmode.h (mode_precision): Change from unsigned short to
24345 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24347 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24348 or if measurement_type is not polynomial.
24349 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24350 in which the mode is already known to be a scalar_int_mode.
24351 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24352 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24354 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24355 for GET_MODE_PRECISION.
24356 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24357 for GET_MODE_PRECISION.
24358 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24360 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24361 (expand_field_assignment, make_extraction): Likewise.
24362 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24363 (get_last_value): Likewise.
24364 * convert.c (convert_to_integer_1): Likewise.
24365 * cse.c (cse_insn): Likewise.
24366 * expr.c (expand_expr_real_1): Likewise.
24367 * lra-constraints.c (simplify_operand_subreg): Likewise.
24368 * optabs-query.c (can_atomic_load_p): Likewise.
24369 * optabs.c (expand_atomic_load): Likewise.
24370 (expand_atomic_store): Likewise.
24371 * ree.c (combine_reaching_defs): Likewise.
24372 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24373 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24374 * tree.h (type_has_mode_precision_p): Likewise.
24375 * ubsan.c (instrument_si_overflow): Likewise.
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 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24382 polynomial numbers of units.
24383 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24384 (valid_vector_subparts_p): New function.
24385 (build_vector_type): Remove temporary shim and take the number
24386 of units as a poly_uint64 rather than an int.
24387 (build_opaque_vector_type): Take the number of units as a
24388 poly_uint64 rather than an int.
24389 * tree.c (build_vector_from_ctor): Handle polynomial
24390 TYPE_VECTOR_SUBPARTS.
24391 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24392 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24393 (build_vector_from_val): If the number of units is variable,
24394 use build_vec_duplicate_cst for constant operands and
24395 VEC_DUPLICATE_EXPR otherwise.
24396 (make_vector_type): Remove temporary is_constant ().
24397 (build_vector_type, build_opaque_vector_type): Take the number of
24398 units as a poly_uint64 rather than an int.
24399 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24401 * cfgexpand.c (expand_debug_expr): Likewise.
24402 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24403 (store_constructor, expand_expr_real_1): Likewise.
24404 (const_scalar_mask_from_tree): Likewise.
24405 * fold-const-call.c (fold_const_reduction): Likewise.
24406 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24407 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24408 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24409 (fold_relational_const): Likewise.
24410 (native_interpret_vector): Likewise. Change the size from an
24411 int to an unsigned int.
24412 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24413 TYPE_VECTOR_SUBPARTS.
24414 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24415 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24416 duplicating a non-constant operand into a variable-length vector.
24417 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24418 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24419 * ipa-icf.c (sem_variable::equals): Likewise.
24420 * match.pd: Likewise.
24421 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24422 * print-tree.c (print_node): Likewise.
24423 * stor-layout.c (layout_type): Likewise.
24424 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24425 * tree-cfg.c (verify_gimple_comparison): Likewise.
24426 (verify_gimple_assign_binary): Likewise.
24427 (verify_gimple_assign_ternary): Likewise.
24428 (verify_gimple_assign_single): Likewise.
24429 * tree-pretty-print.c (dump_generic_node): Likewise.
24430 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24431 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24432 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24433 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24434 (vect_shift_permute_load_chain): Likewise.
24435 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24436 (expand_vector_condition, optimize_vector_constructor): Likewise.
24437 (lower_vec_perm, get_compute_type): Likewise.
24438 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24439 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24440 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24441 (vect_recog_mask_conversion_pattern): Likewise.
24442 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24443 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24444 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24445 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24446 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24447 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24448 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24449 (supportable_widening_operation): Likewise.
24450 (supportable_narrowing_operation): Likewise.
24451 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24453 * varasm.c (output_constant): Likewise.
24455 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24456 Alan Hayward <alan.hayward@arm.com>
24457 David Sherwood <david.sherwood@arm.com>
24459 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24460 so that both the length == 3 and length != 3 cases set up their
24461 own permute vectors. Add comments explaining why we know the
24462 number of elements is constant.
24463 (vect_permute_load_chain): Likewise.
24465 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24466 Alan Hayward <alan.hayward@arm.com>
24467 David Sherwood <david.sherwood@arm.com>
24469 * machmode.h (mode_nunits): Change from unsigned char to
24471 (ONLY_FIXED_SIZE_MODES): New macro.
24472 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24473 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24474 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24476 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24477 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24478 or if measurement_type is not polynomial.
24479 * genmodes.c (ZERO_COEFFS): New macro.
24480 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24482 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24483 Use ZERO_COEFFS when emitting initializers.
24484 * data-streamer.h (bp_pack_poly_value): New function.
24485 (bp_unpack_poly_value): Likewise.
24486 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24487 for GET_MODE_NUNITS.
24488 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24489 for GET_MODE_NUNITS.
24490 * tree.c (make_vector_type): Remove temporary shim and make
24491 the real function take the number of units as a poly_uint64
24492 rather than an int.
24493 (build_vector_type_for_mode): Handle polynomial nunits.
24494 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24495 * emit-rtl.c (const_vec_series_p_1): Likewise.
24496 (gen_rtx_CONST_VECTOR): Likewise.
24497 * fold-const.c (test_vec_duplicate_folding): Likewise.
24498 * genrecog.c (validate_pattern): Likewise.
24499 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24500 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24501 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24502 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24503 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24504 * rtlanal.c (subreg_get_info): Likewise.
24505 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24506 (vect_grouped_load_supported): Likewise.
24507 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24508 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24509 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24510 (simplify_const_unary_operation, simplify_binary_operation_1)
24511 (simplify_const_binary_operation, simplify_ternary_operation)
24512 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24513 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24514 instead of CONST_VECTOR_NUNITS.
24515 * varasm.c (output_constant_pool_2): Likewise.
24516 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24517 explicit-encoded elements in the XVEC for variable-length vectors.
24519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24521 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24523 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24524 Alan Hayward <alan.hayward@arm.com>
24525 David Sherwood <david.sherwood@arm.com>
24527 * coretypes.h (fixed_size_mode): Declare.
24528 (fixed_size_mode_pod): New typedef.
24529 * builtins.h (target_builtins::x_apply_args_mode)
24530 (target_builtins::x_apply_result_mode): Change type to
24531 fixed_size_mode_pod.
24532 * builtins.c (apply_args_size, apply_result_size, result_vector)
24533 (expand_builtin_apply_args_1, expand_builtin_apply)
24534 (expand_builtin_return): Update accordingly.
24536 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24538 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24539 * cselib.c (cselib_hash_rtx): Likewise.
24540 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24541 CONST_VECTOR encoding.
24543 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24544 Jeff Law <law@redhat.com>
24547 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24548 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24549 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24550 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24553 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24554 explicitly probe *sp in a noreturn function if there were any callee
24555 register saves or frame pointer is needed.
24557 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24560 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24561 BLKmode for ternary, binary or unary expressions.
24564 * var-tracking.c (delete_vta_debug_insn): New inline function.
24565 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24566 insns from get_insns () to NULL instead of each bb separately.
24567 Use delete_vta_debug_insn. No longer static.
24568 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24569 delete_vta_debug_insns callers.
24570 * rtl.h (delete_vta_debug_insns): Declare.
24571 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24572 instead of variable_tracking_main.
24574 2018-01-03 Martin Sebor <msebor@redhat.com>
24576 PR tree-optimization/83603
24577 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24578 arguments past the endof the argument list in functions declared
24579 without a prototype.
24580 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24581 Avoid checking when arguments are null.
24583 2018-01-03 Martin Sebor <msebor@redhat.com>
24586 * doc/extend.texi (attribute const): Fix a typo.
24587 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24588 issuing -Wsuggest-attribute for void functions.
24590 2018-01-03 Martin Sebor <msebor@redhat.com>
24592 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24593 offset_int::from instead of wide_int::to_shwi.
24594 (maybe_diag_overlap): Remove assertion.
24595 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24596 * gimple-ssa-sprintf.c (format_directive): Same.
24597 (parse_directive): Same.
24598 (sprintf_dom_walker::compute_format_length): Same.
24599 (try_substitute_return_value): Same.
24601 2018-01-03 Jeff Law <law@redhat.com>
24603 PR middle-end/83654
24604 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24605 non-constant residual for zero at runtime and avoid probing in
24606 that case. Reorganize code for trailing problem to mirror handling
24609 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24611 PR tree-optimization/83501
24612 * tree-ssa-strlen.c (get_string_cst): New.
24613 (handle_char_store): Call get_string_cst.
24615 2018-01-03 Martin Liska <mliska@suse.cz>
24617 PR tree-optimization/83593
24618 * tree-ssa-strlen.c: Include tree-cfg.h.
24619 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24620 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24621 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24623 (strlen_dom_walker::before_dom_children): Call
24624 gimple_purge_dead_eh_edges. Dump tranformation with details
24626 (strlen_dom_walker::before_dom_children): Update call by adding
24627 new argument cleanup_eh.
24628 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24630 2018-01-03 Martin Liska <mliska@suse.cz>
24633 * cif-code.def (VARIADIC_THUNK): New enum value.
24634 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24637 2018-01-03 Jan Beulich <jbeulich@suse.com>
24639 * sse.md (mov<mode>_internal): Tighten condition for when to use
24640 vmovdqu<ssescalarsize> for TI and OI modes.
24642 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24644 Update copyright years.
24646 2018-01-03 Martin Liska <mliska@suse.cz>
24649 * ipa-visibility.c (function_and_variable_visibility): Skip
24650 functions with noipa attribure.
24652 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24654 * gcc.c (process_command): Update copyright notice dates.
24655 * gcov-dump.c (print_version): Ditto.
24656 * gcov.c (print_version): Ditto.
24657 * gcov-tool.c (print_version): Ditto.
24658 * gengtype.c (create_file): Ditto.
24659 * doc/cpp.texi: Bump @copying's copyright year.
24660 * doc/cppinternals.texi: Ditto.
24661 * doc/gcc.texi: Ditto.
24662 * doc/gccint.texi: Ditto.
24663 * doc/gcov.texi: Ditto.
24664 * doc/install.texi: Ditto.
24665 * doc/invoke.texi: Ditto.
24667 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24669 * vector-builder.h (vector_builder::m_full_nelts): Change from
24670 unsigned int to poly_uint64.
24671 (vector_builder::full_nelts): Update prototype accordingly.
24672 (vector_builder::new_vector): Likewise.
24673 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24674 (vector_builder::operator ==): Likewise.
24675 (vector_builder::finalize): Likewise.
24676 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24677 Take the number of elements as a poly_uint64 rather than an
24679 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24680 from unsigned int to poly_uint64.
24681 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24682 (vec_perm_indices::new_vector): Likewise.
24683 (vec_perm_indices::length): Likewise.
24684 (vec_perm_indices::nelts_per_input): Likewise.
24685 (vec_perm_indices::input_nelts): Likewise.
24686 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24687 number of elements per input as a poly_uint64 rather than an
24688 unsigned int. Use the original encoding for variable-length
24689 vectors, rather than clamping each individual element.
24690 For the second and subsequent elements in each pattern,
24691 clamp the step and base before clamping their sum.
24692 (vec_perm_indices::series_p): Handle polynomial element counts.
24693 (vec_perm_indices::all_in_range_p): Likewise.
24694 (vec_perm_indices_to_tree): Likewise.
24695 (vec_perm_indices_to_rtx): Likewise.
24696 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24697 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24698 (tree_vector_builder::new_binary_operation): Handle polynomial
24699 element counts. Return false if we need to know the number
24700 of elements at compile time.
24701 * fold-const.c (fold_vec_perm): Punt if the number of elements
24702 isn't known at compile time.
24704 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24706 * vec-perm-indices.h (vec_perm_builder): Change element type
24707 from HOST_WIDE_INT to poly_int64.
24708 (vec_perm_indices::element_type): Update accordingly.
24709 (vec_perm_indices::clamp): Handle polynomial element_types.
24710 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24711 (vec_perm_indices::all_in_range_p): Likewise.
24712 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24714 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24715 polynomial vec_perm_indices element types.
24716 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24717 * fold-const.c (fold_vec_perm): Likewise.
24718 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24719 * tree-vect-generic.c (lower_vec_perm): Likewise.
24720 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24721 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24722 element type to HOST_WIDE_INT.
24724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24725 Alan Hayward <alan.hayward@arm.com>
24726 David Sherwood <david.sherwood@arm.com>
24728 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24729 rather than an int. Use plus_constant.
24730 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24731 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24734 Alan Hayward <alan.hayward@arm.com>
24735 David Sherwood <david.sherwood@arm.com>
24737 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24738 a HOST_WIDE_INT to a poly_int64.
24740 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24741 Alan Hayward <alan.hayward@arm.com>
24742 David Sherwood <david.sherwood@arm.com>
24744 * calls.c (load_register_parameters): Cope with polynomial
24745 mode sizes. Require a constant size for BLKmode parameters
24746 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24747 forces a parameter to be padded at the lsb end in order to
24748 fill a complete number of words, require the parameter size
24749 to be ordered wrt UNITS_PER_WORD.
24751 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24752 Alan Hayward <alan.hayward@arm.com>
24753 David Sherwood <david.sherwood@arm.com>
24755 * reload1.c (spill_stack_slot_width): Change element type
24756 from unsigned int to poly_uint64_pod.
24757 (alter_reg): Treat mode sizes as polynomial.
24759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24760 Alan Hayward <alan.hayward@arm.com>
24761 David Sherwood <david.sherwood@arm.com>
24763 * reload.c (complex_word_subreg_p): New function.
24764 (reload_inner_reg_of_subreg, push_reload): Use it.
24766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24767 Alan Hayward <alan.hayward@arm.com>
24768 David Sherwood <david.sherwood@arm.com>
24770 * lra-constraints.c (process_alt_operands): Reject matched
24771 operands whose sizes aren't ordered.
24772 (match_reload): Refer to this check here.
24774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24775 Alan Hayward <alan.hayward@arm.com>
24776 David Sherwood <david.sherwood@arm.com>
24778 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24779 that the mode size is in the set {1, 2, 4, 8, 16}.
24781 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24782 Alan Hayward <alan.hayward@arm.com>
24783 David Sherwood <david.sherwood@arm.com>
24785 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24786 Use plus_constant instead of gen_rtx_PLUS.
24788 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24789 Alan Hayward <alan.hayward@arm.com>
24790 David Sherwood <david.sherwood@arm.com>
24792 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24793 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24794 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24795 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24796 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24797 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24798 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24799 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24800 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24801 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24803 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24804 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24805 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24806 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24807 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24808 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24809 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24810 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24811 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24812 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24814 * expr.c (emit_move_resolve_push): Treat the input and result
24815 of PUSH_ROUNDING as a poly_int64.
24816 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24817 (emit_push_insn): Likewise.
24818 * lra-eliminations.c (mark_not_eliminable): Likewise.
24819 * recog.c (push_operand): Likewise.
24820 * reload1.c (elimination_effects): Likewise.
24821 * rtlanal.c (nonzero_bits1): Likewise.
24822 * calls.c (store_one_arg): Likewise. Require the padding to be
24823 known at compile time.
24825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24826 Alan Hayward <alan.hayward@arm.com>
24827 David Sherwood <david.sherwood@arm.com>
24829 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24830 Use plus_constant instead of gen_rtx_PLUS.
24832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24833 Alan Hayward <alan.hayward@arm.com>
24834 David Sherwood <david.sherwood@arm.com>
24836 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24837 rather than an int.
24839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24840 Alan Hayward <alan.hayward@arm.com>
24841 David Sherwood <david.sherwood@arm.com>
24843 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24844 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24845 via stack temporaries. Treat the mode size as polynomial too.
24847 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24848 Alan Hayward <alan.hayward@arm.com>
24849 David Sherwood <david.sherwood@arm.com>
24851 * expr.c (expand_expr_real_2): When handling conversions involving
24852 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24853 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24854 as a poly_uint64 too.
24856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24857 Alan Hayward <alan.hayward@arm.com>
24858 David Sherwood <david.sherwood@arm.com>
24860 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24863 Alan Hayward <alan.hayward@arm.com>
24864 David Sherwood <david.sherwood@arm.com>
24866 * combine.c (can_change_dest_mode): Handle polynomial
24867 REGMODE_NATURAL_SIZE.
24868 * expmed.c (store_bit_field_1): Likewise.
24869 * expr.c (store_constructor): Likewise.
24870 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24871 and polynomial REGMODE_NATURAL_SIZE.
24872 (gen_lowpart_common): Likewise.
24873 * reginfo.c (record_subregs_of_mode): Likewise.
24874 * rtlanal.c (read_modify_subreg_p): Likewise.
24876 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24877 Alan Hayward <alan.hayward@arm.com>
24878 David Sherwood <david.sherwood@arm.com>
24880 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24881 numbers of elements.
24883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24884 Alan Hayward <alan.hayward@arm.com>
24885 David Sherwood <david.sherwood@arm.com>
24887 * match.pd: Cope with polynomial numbers of vector elements.
24889 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24890 Alan Hayward <alan.hayward@arm.com>
24891 David Sherwood <david.sherwood@arm.com>
24893 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24894 in a POINTER_PLUS_EXPR.
24896 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24897 Alan Hayward <alan.hayward@arm.com>
24898 David Sherwood <david.sherwood@arm.com>
24900 * omp-simd-clone.c (simd_clone_subparts): New function.
24901 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24902 (ipa_simd_modify_function_body): Likewise.
24904 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24905 Alan Hayward <alan.hayward@arm.com>
24906 David Sherwood <david.sherwood@arm.com>
24908 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24909 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24910 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24911 (expand_vector_condition, vector_element): Likewise.
24912 (subparts_gt): New function.
24913 (get_compute_type): Use subparts_gt.
24914 (count_type_subparts): Delete.
24915 (expand_vector_operations_1): Use subparts_gt instead of
24916 count_type_subparts.
24918 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24919 Alan Hayward <alan.hayward@arm.com>
24920 David Sherwood <david.sherwood@arm.com>
24922 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24923 (vect_compile_time_alias): ...this new function. Do the calculation
24924 on poly_ints rather than trees.
24925 (vect_prune_runtime_alias_test_list): Update call accordingly.
24927 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24928 Alan Hayward <alan.hayward@arm.com>
24929 David Sherwood <david.sherwood@arm.com>
24931 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24933 (vect_schedule_slp_instance): Likewise.
24935 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24936 Alan Hayward <alan.hayward@arm.com>
24937 David Sherwood <david.sherwood@arm.com>
24939 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24940 constant and extern definitions for variable-length vectors.
24941 (vect_get_constant_vectors): Note that the number of units
24942 is known to be constant.
24944 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24945 Alan Hayward <alan.hayward@arm.com>
24946 David Sherwood <david.sherwood@arm.com>
24948 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24949 of units as polynomial. Choose between WIDE and NARROW based
24952 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24953 Alan Hayward <alan.hayward@arm.com>
24954 David Sherwood <david.sherwood@arm.com>
24956 * tree-vect-stmts.c (simd_clone_subparts): New function.
24957 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24960 Alan Hayward <alan.hayward@arm.com>
24961 David Sherwood <david.sherwood@arm.com>
24963 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24964 vectors as polynomial. Use build_index_vector for
24965 IFN_GOMP_SIMD_LANE.
24967 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24968 Alan Hayward <alan.hayward@arm.com>
24969 David Sherwood <david.sherwood@arm.com>
24971 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24972 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24973 for variable-length vectors.
24974 (vectorizable_mask_load_store): Treat the number of units as
24975 polynomial, asserting that it is constant if the condition has
24976 already been enforced.
24977 (vectorizable_store, vectorizable_load): Likewise.
24979 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24980 Alan Hayward <alan.hayward@arm.com>
24981 David Sherwood <david.sherwood@arm.com>
24983 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24984 of units as polynomial. Punt if we can't tell at compile time
24985 which vector contains the final result.
24987 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24988 Alan Hayward <alan.hayward@arm.com>
24989 David Sherwood <david.sherwood@arm.com>
24991 * tree-vect-loop.c (vectorizable_induction): Treat the number
24992 of units as polynomial. Punt on SLP inductions. Use an integer
24993 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24994 cast of such a series for variable-length floating-point
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.h (build_index_vector): Declare.
25002 * tree.c (build_index_vector): New function.
25003 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25004 of units as polynomial, forcibly converting it to a constant if
25005 vectorizable_reduction has already enforced the condition.
25006 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
25007 to create a {1,2,3,...} vector.
25008 (vectorizable_reduction): Treat the number of units as polynomial.
25009 Choose vectype_in based on the largest scalar element size rather
25010 than the smallest number of units. Enforce the restrictions
25013 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25014 Alan Hayward <alan.hayward@arm.com>
25015 David Sherwood <david.sherwood@arm.com>
25017 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25018 number of units as polynomial.
25020 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25021 Alan Hayward <alan.hayward@arm.com>
25022 David Sherwood <david.sherwood@arm.com>
25024 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25025 * target.def (autovectorize_vector_sizes): Return the vector sizes
25026 by pointer, using vector_sizes rather than a bitmask.
25027 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25028 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25029 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25031 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25032 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25033 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25034 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25035 * omp-general.c (omp_max_vf): Likewise.
25036 * omp-low.c (omp_clause_aligned_alignment): Likewise.
25037 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25038 * tree-vect-loop.c (vect_analyze_loop): Likewise.
25039 * tree-vect-slp.c (vect_slp_bb): Likewise.
25040 * doc/tm.texi: Regenerate.
25041 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25043 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25044 the vector size as a poly_uint64 rather than an unsigned int.
25045 (current_vector_size): Change from an unsigned int to a poly_uint64.
25046 (get_vectype_for_scalar_type): Update accordingly.
25047 * tree.h (build_truth_vector_type): Take the size and number of
25048 units as a poly_uint64 rather than an unsigned int.
25049 (build_vector_type): Add a temporary overload that takes
25050 the number of units as a poly_uint64 rather than an unsigned int.
25051 * tree.c (make_vector_type): Likewise.
25052 (build_truth_vector_type): Take the number of units as a poly_uint64
25053 rather than an unsigned int.
25055 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25056 Alan Hayward <alan.hayward@arm.com>
25057 David Sherwood <david.sherwood@arm.com>
25059 * target.def (get_mask_mode): Take the number of units and length
25060 as poly_uint64s rather than unsigned ints.
25061 * targhooks.h (default_get_mask_mode): Update accordingly.
25062 * targhooks.c (default_get_mask_mode): Likewise.
25063 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25064 * doc/tm.texi: Regenerate.
25066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25067 Alan Hayward <alan.hayward@arm.com>
25068 David Sherwood <david.sherwood@arm.com>
25070 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25071 * omp-general.c (omp_max_vf): Likewise.
25072 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25073 (expand_omp_simd): Handle polynomial safelen.
25074 * omp-low.c (omplow_simd_context): Add a default constructor.
25075 (omplow_simd_context::max_vf): Change from int to poly_uint64.
25076 (lower_rec_simd_input_clauses): Update accordingly.
25077 (lower_rec_input_clauses): Likewise.
25079 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25080 Alan Hayward <alan.hayward@arm.com>
25081 David Sherwood <david.sherwood@arm.com>
25083 * tree-vectorizer.h (vect_nunits_for_cost): New function.
25084 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25085 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25086 (vect_analyze_slp_cost): Likewise.
25087 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25088 (vect_model_load_cost): Likewise.
25090 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25091 Alan Hayward <alan.hayward@arm.com>
25092 David Sherwood <david.sherwood@arm.com>
25094 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25095 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25096 from an unsigned int * to a poly_uint64_pod *.
25097 (calculate_unrolling_factor): New function.
25098 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
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 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25105 from an unsigned int to a poly_uint64.
25106 (_loop_vec_info::slp_unrolling_factor): Likewise.
25107 (_loop_vec_info::vectorization_factor): Change from an int
25109 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25110 (vect_get_num_vectors): New function.
25111 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25112 (vect_get_num_copies): Use vect_get_num_vectors.
25113 (vect_analyze_data_ref_dependences): Change max_vf from an int *
25114 to an unsigned int *.
25115 (vect_analyze_data_refs): Change min_vf from an int * to a
25117 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25118 than an unsigned HOST_WIDE_INT.
25119 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25120 (vect_analyze_data_ref_dependence): Change max_vf from an int *
25121 to an unsigned int *.
25122 (vect_analyze_data_ref_dependences): Likewise.
25123 (vect_compute_data_ref_alignment): Handle polynomial vf.
25124 (vect_enhance_data_refs_alignment): Likewise.
25125 (vect_prune_runtime_alias_test_list): Likewise.
25126 (vect_shift_permute_load_chain): Likewise.
25127 (vect_supportable_dr_alignment): Likewise.
25128 (dependence_distance_ge_vf): Take the vectorization factor as a
25129 poly_uint64 rather than an unsigned HOST_WIDE_INT.
25130 (vect_analyze_data_refs): Change min_vf from an int * to a
25132 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25133 vfm1 as a poly_uint64 rather than an int. Make the same change
25134 for the returned bound_scalar.
25135 (vect_gen_vector_loop_niters): Handle polynomial vf.
25136 (vect_do_peeling): Likewise. Update call to
25137 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25138 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25140 * tree-vect-loop.c (vect_determine_vectorization_factor)
25141 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25142 (vect_get_known_peeling_cost): Likewise.
25143 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25144 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25145 (vect_transform_loop): Likewise. Use the lowest possible VF when
25146 updating the upper bounds of the loop.
25147 (vect_min_worthwhile_factor): Make static. Return an unsigned int
25148 rather than an int.
25149 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25150 polynomial unroll factors.
25151 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25152 (vect_make_slp_decision): Likewise.
25153 (vect_supported_load_permutation_p): Likewise, and polynomial
25155 (vect_analyze_slp_cost): Handle polynomial vf.
25156 (vect_slp_analyze_node_operations): Likewise.
25157 (vect_slp_analyze_bb_1): Likewise.
25158 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25159 than an unsigned HOST_WIDE_INT.
25160 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25161 (vectorizable_load): Handle polynomial vf.
25162 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25164 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25166 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25167 Alan Hayward <alan.hayward@arm.com>
25168 David Sherwood <david.sherwood@arm.com>
25170 * match.pd: Handle bit operations involving three constants
25171 and try to fold one pair.
25173 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25175 * tree-vect-loop-manip.c: Include gimple-fold.h.
25176 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25177 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25178 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25179 Add a path that uses a step of VF instead of 1, but disable it
25181 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25182 and niters_no_overflow parameters. Update calls to
25183 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25184 Create a new SSA name if the latter choses to use a ste other
25185 than zero, and return it via niters_vector_mult_vf_var.
25186 * tree-vect-loop.c (vect_transform_loop): Update calls to
25187 vect_do_peeling, vect_gen_vector_loop_niters and
25188 slpeel_make_loop_iterate_ntimes.
25189 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25190 (vect_gen_vector_loop_niters): Update declarations after above changes.
25192 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25194 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25195 128-bit round to integer instructions.
25196 (ceil<mode>2): Likewise.
25197 (btrunc<mode>2): Likewise.
25198 (round<mode>2): Likewise.
25200 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25202 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25203 unaligned VSX load/store on P8/P9.
25204 (expand_block_clear): Allow the use of unaligned VSX
25205 load/store on P8/P9.
25207 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25209 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25211 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25212 swap associated with both a load and a store.
25214 2018-01-02 Andrew Waterman <andrew@sifive.com>
25216 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25217 * config/riscv/riscv.md (clear_cache): Use it.
25219 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25221 * web.c: Remove out-of-date comment.
25223 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25225 * expr.c (fixup_args_size_notes): Check that any existing
25226 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25227 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25228 (emit_single_push_insn): ...here.
25230 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25232 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25233 (const_vector_encoded_nelts): New function.
25234 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25235 (const_vector_int_elt, const_vector_elt): Declare.
25236 * emit-rtl.c (const_vector_int_elt_1): New function.
25237 (const_vector_elt): Likewise.
25238 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25239 of CONST_VECTOR_ELT.
25241 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25243 * expr.c: Include rtx-vector-builder.h.
25244 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25245 directly on the tree encoding.
25246 (const_vector_from_tree): Likewise.
25247 * optabs.c: Include rtx-vector-builder.h.
25248 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25249 sequence of "u" values.
25250 * vec-perm-indices.c: Include rtx-vector-builder.h.
25251 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25252 directly on the vec_perm_indices encoding.
25254 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25256 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25257 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25258 * rtx-vector-builder.h: New file.
25259 * rtx-vector-builder.c: Likewise.
25260 * rtl.h (rtx_def::u2): Add a const_vector field.
25261 (CONST_VECTOR_NPATTERNS): New macro.
25262 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25263 (CONST_VECTOR_DUPLICATE_P): Likewise.
25264 (CONST_VECTOR_STEPPED_P): Likewise.
25265 (CONST_VECTOR_ENCODED_ELT): Likewise.
25266 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25267 (unwrap_const_vec_duplicate): Likewise.
25268 (const_vec_series_p): Check for a non-duplicated vector encoding.
25269 Say that the function only returns true for integer vectors.
25270 * emit-rtl.c: Include rtx-vector-builder.h.
25271 (gen_const_vec_duplicate_1): Delete.
25272 (gen_const_vector): Call gen_const_vec_duplicate instead of
25273 gen_const_vec_duplicate_1.
25274 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25275 (gen_const_vec_duplicate): Use rtx_vector_builder.
25276 (gen_const_vec_series): Likewise.
25277 (gen_rtx_CONST_VECTOR): Likewise.
25278 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25279 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25280 Build a new vector rather than modifying a CONST_VECTOR in-place.
25281 (handle_special_swappables): Update call accordingly.
25282 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25283 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25284 Build a new vector rather than modifying a CONST_VECTOR in-place.
25285 (handle_special_swappables): Update call accordingly.
25287 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25289 * simplify-rtx.c (simplify_const_binary_operation): Use
25290 CONST_VECTOR_ELT instead of XVECEXP.
25292 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25294 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25295 the selector elements to be different from the data elements
25296 if the selector is a VECTOR_CST.
25297 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25298 ssizetype for the selector.
25300 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25302 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25303 before testing each element individually.
25304 * tree-vect-generic.c (lower_vec_perm): Likewise.
25306 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25308 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25309 * selftest-run-tests.c (selftest::run_tests): Call it.
25310 * vector-builder.h (vector_builder::operator ==): New function.
25311 (vector_builder::operator !=): Likewise.
25312 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25313 (vec_perm_indices::all_from_input_p): New function.
25314 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25315 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25316 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25317 instead of reading the VECTOR_CST directly. Detect whether both
25318 vector inputs are the same before constructing the vec_perm_indices,
25319 and update the number of inputs argument accordingly. Use the
25320 utility functions added above. Only construct sel2 if we need to.
25322 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25324 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25325 the broadcast of the low byte.
25326 (expand_mult_highpart): Use an explicit encoding for the permutes.
25327 * optabs-query.c (can_mult_highpart_p): Likewise.
25328 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25329 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25330 (vectorizable_bswap): Likewise.
25331 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25332 explicit encoding for the power-of-2 permutes.
25333 (vect_permute_store_chain): Likewise.
25334 (vect_grouped_load_supported): Likewise.
25335 (vect_permute_load_chain): Likewise.
25337 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25339 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25340 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25341 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25342 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25343 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25344 (vect_gen_perm_mask_any): Likewise.
25346 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25348 * int-vector-builder.h: New file.
25349 * vec-perm-indices.h: Include int-vector-builder.h.
25350 (vec_perm_indices): Redefine as an int_vector_builder.
25351 (auto_vec_perm_indices): Delete.
25352 (vec_perm_builder): Redefine as a stand-alone class.
25353 (vec_perm_indices::vec_perm_indices): New function.
25354 (vec_perm_indices::clamp): Likewise.
25355 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25356 (vec_perm_indices::new_vector): New function.
25357 (vec_perm_indices::new_expanded_vector): Update for new
25358 vec_perm_indices class.
25359 (vec_perm_indices::rotate_inputs): New function.
25360 (vec_perm_indices::all_in_range_p): Operate directly on the
25361 encoded form, without computing elided elements.
25362 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25363 encoding. Update for new vec_perm_indices class.
25364 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25365 the given vec_perm_builder.
25366 (expand_vec_perm_var): Update vec_perm_builder constructor.
25367 (expand_mult_highpart): Use vec_perm_builder instead of
25368 auto_vec_perm_indices.
25369 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25370 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25371 or double series encoding as appropriate.
25372 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25373 vec_perm_indices instead of auto_vec_perm_indices.
25374 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25375 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25376 (vect_permute_store_chain): Likewise.
25377 (vect_grouped_load_supported): Likewise.
25378 (vect_permute_load_chain): Likewise.
25379 (vect_shift_permute_load_chain): Likewise.
25380 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25381 (vect_transform_slp_perm_load): Likewise.
25382 (vect_schedule_slp_instance): Likewise.
25383 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25384 (vectorizable_mask_load_store): Likewise.
25385 (vectorizable_bswap): Likewise.
25386 (vectorizable_store): Likewise.
25387 (vectorizable_load): Likewise.
25388 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25389 vec_perm_indices instead of auto_vec_perm_indices. Use
25390 tree_to_vec_perm_builder to read the vector from a tree.
25391 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25392 vec_perm_builder instead of a vec_perm_indices.
25393 (have_whole_vector_shift): Use vec_perm_builder and
25394 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25395 truncation to calc_vec_perm_mask_for_shift.
25396 (vect_create_epilog_for_reduction): Likewise.
25397 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25398 from auto_vec_perm_indices to vec_perm_indices.
25399 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25400 instead of changing individual elements.
25401 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25402 the vector in d.perm.
25403 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25404 from auto_vec_perm_indices to vec_perm_indices.
25405 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25406 instead of changing individual elements.
25407 (arm_vectorize_vec_perm_const): Use new_vector to install
25408 the vector in d.perm.
25409 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25410 Update vec_perm_builder constructor.
25411 (rs6000_expand_interleave): Likewise.
25412 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25413 (rs6000_expand_interleave): Likewise.
25415 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25417 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25418 to qimode could truncate the indices.
25419 * optabs.c (expand_vec_perm_var): Likewise.
25421 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25423 * Makefile.in (OBJS): Add vec-perm-indices.o.
25424 * vec-perm-indices.h: New file.
25425 * vec-perm-indices.c: Likewise.
25426 * target.h (vec_perm_indices): Replace with a forward class
25428 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25429 * optabs.h: Include vec-perm-indices.h.
25430 (expand_vec_perm): Delete.
25431 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25432 (expand_vec_perm_const): Declare.
25433 * target.def (vec_perm_const_ok): Replace with...
25434 (vec_perm_const): ...this new hook.
25435 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25436 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25437 * doc/tm.texi: Regenerate.
25438 * optabs.def (vec_perm_const): Delete.
25439 * doc/md.texi (vec_perm_const): Likewise.
25440 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25441 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25442 expand_vec_perm for constant permutation vectors. Assert that
25443 the mode of variable permutation vectors is the integer equivalent
25444 of the mode that is being permuted.
25445 * optabs-query.h (selector_fits_mode_p): Declare.
25446 * optabs-query.c: Include vec-perm-indices.h.
25447 (selector_fits_mode_p): New function.
25448 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25449 is defined, instead of checking whether the vec_perm_const_optab
25450 exists. Use targetm.vectorize.vec_perm_const instead of
25451 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25452 fit in the vector mode before using a variable permute.
25453 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25454 vec_perm_indices instead of an rtx.
25455 (expand_vec_perm): Replace with...
25456 (expand_vec_perm_const): ...this new function. Take the selector
25457 as a vec_perm_indices rather than an rtx. Also take the mode of
25458 the selector. Update call to shift_amt_for_vec_perm_mask.
25459 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25460 Use vec_perm_indices::new_expanded_vector to expand the original
25461 selector into bytes. Check whether the indices fit in the vector
25462 mode before using a variable permute.
25463 (expand_vec_perm_var): Make global.
25464 (expand_mult_highpart): Use expand_vec_perm_const.
25465 * fold-const.c: Includes vec-perm-indices.h.
25466 * tree-ssa-forwprop.c: Likewise.
25467 * tree-vect-data-refs.c: Likewise.
25468 * tree-vect-generic.c: Likewise.
25469 * tree-vect-loop.c: Likewise.
25470 * tree-vect-slp.c: Likewise.
25471 * tree-vect-stmts.c: Likewise.
25472 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25474 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25475 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25476 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25477 (aarch64_vectorize_vec_perm_const): ...this new function.
25478 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25479 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25480 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25481 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25482 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25483 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25484 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25486 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25487 check for NEON modes.
25488 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25489 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25490 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25491 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25493 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25494 the old VEC_PERM_CONST conditions.
25495 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25496 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25497 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25498 (ia64_vectorize_vec_perm_const_ok): Merge into...
25499 (ia64_vectorize_vec_perm_const): ...this new function.
25500 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25501 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25502 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25503 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25504 * config/mips/mips.c (mips_expand_vec_perm_const)
25505 (mips_vectorize_vec_perm_const_ok): Merge into...
25506 (mips_vectorize_vec_perm_const): ...this new function.
25507 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25508 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25509 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25510 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25511 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25512 (rs6000_expand_vec_perm_const): Delete.
25513 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25515 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25516 (altivec_expand_vec_perm_const_le): Take each operand individually.
25517 Operate on constant selectors rather than rtxes.
25518 (altivec_expand_vec_perm_const): Likewise. Update call to
25519 altivec_expand_vec_perm_const_le.
25520 (rs6000_expand_vec_perm_const): Delete.
25521 (rs6000_vectorize_vec_perm_const_ok): Delete.
25522 (rs6000_vectorize_vec_perm_const): New function.
25523 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25524 an element count and rtx array.
25525 (rs6000_expand_extract_even): Update call accordingly.
25526 (rs6000_expand_interleave): Likewise.
25527 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25528 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25529 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25530 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25531 (rs6000_expand_vec_perm_const): Delete.
25532 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25533 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25534 (altivec_expand_vec_perm_const_le): Take each operand individually.
25535 Operate on constant selectors rather than rtxes.
25536 (altivec_expand_vec_perm_const): Likewise. Update call to
25537 altivec_expand_vec_perm_const_le.
25538 (rs6000_expand_vec_perm_const): Delete.
25539 (rs6000_vectorize_vec_perm_const_ok): Delete.
25540 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25541 reference to the SPE evmerge intructions.
25542 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25543 an element count and rtx array.
25544 (rs6000_expand_extract_even): Update call accordingly.
25545 (rs6000_expand_interleave): Likewise.
25546 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25547 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25549 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25551 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25553 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25554 vector mode and that that mode matches the mode of the data
25556 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25557 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25558 directly using expand_vec_perm_1 when forcing selectors into
25560 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25562 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25564 * optabs-query.h (can_vec_perm_p): Delete.
25565 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25566 * optabs-query.c (can_vec_perm_p): Split into...
25567 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25568 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25569 particular selector is valid.
25570 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25571 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25572 (vect_grouped_load_supported): Likewise.
25573 (vect_shift_permute_load_chain): Likewise.
25574 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25575 (vect_transform_slp_perm_load): Likewise.
25576 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25577 (vectorizable_bswap): Likewise.
25578 (vect_gen_perm_mask_checked): Likewise.
25579 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25580 implementations of variable permutation vectors into account
25581 when deciding which selector to use.
25582 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25583 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25584 with a false third argument.
25585 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25586 to test whether the constant selector is valid and can_vec_perm_var_p
25587 to test whether a variable selector is valid.
25589 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25591 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25592 * optabs-query.c (can_vec_perm_p): Likewise.
25593 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25594 instead of vec_perm_indices.
25595 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25596 (vect_gen_perm_mask_checked): Likewise,
25597 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25598 (vect_gen_perm_mask_checked): Likewise,
25600 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25602 * optabs-query.h (qimode_for_vec_perm): Declare.
25603 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25604 (qimode_for_vec_perm): ...this new function.
25605 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25607 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25609 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25610 does not have a conditional at the top.
25612 2018-01-02 Richard Biener <rguenther@suse.de>
25614 * ipa-inline.c (big_speedup_p): Fix expression.
25616 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25619 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25622 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25626 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25627 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25628 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25629 cond_taken_branch_cost 3->4.
25631 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25633 PR tree-optimization/83581
25634 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25635 TODO_cleanup_cfg if any changes have been made.
25637 PR middle-end/83608
25638 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25639 convert_modes if target mode has the right side, but different mode
25642 PR middle-end/83609
25643 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25644 last argument when extracting from CONCAT. If either from_real or
25645 from_imag is NULL, use expansion through memory. If result is not
25646 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25647 the parts directly to inner mode, if even that fails, use expansion
25650 PR middle-end/83623
25651 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25652 check for bswap in mode rather than HImode and use that in expand_unop
25655 Copyright (C) 2018 Free Software Foundation, Inc.
25657 Copying and distribution of this file, with or without modification,
25658 are permitted in any medium without royalty provided the copyright
25659 notice and this notice are preserved.